Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit ledger entry in meta before modifying it #944

Merged
merged 6 commits into from
Dec 7, 2015

Conversation

MonsieurNicolas
Copy link
Contributor

This change set adds an optional LEDGER_ENTRY_STATE before LEDGER_ENTRY_UPDATED and LEDGER_ENTRY_REMOVED.
The new meta is emitted when a ledger entry is first modified in a ledger:
given a transaction set that produces a stream of meta, the very first UPDATE/REMOVE for any given ledger entry will be preceded by a STATE entry.
The idea is that a consumer of this information will load the meta for a specific ledger close, and can with the new meta know what the state before applying transactions looks like.
This resolves #719

This should help with various scenarios tracked in issues like
not possible to determine if a signer was added or removed Resolves #711
not possible to determine if a signer is re-enabled or updated Resolves #712

@MonsieurNicolas
Copy link
Contributor Author

@nullstyle
The xdr change included here breaks horizon (in that, an old version of horizon will throw as it won't understand what "STATE" is).
So in terms of deployment, we need to first get the new horizon bits out and then these.

@nullstyle
Copy link
Contributor

@MonsieurNicolas thanks for the heads up, I'll work on updating horizon today

latobarita added a commit that referenced this pull request Dec 7, 2015
Emit ledger entry in meta before modifying it

Reviewed-by: jedmccaleb
@latobarita latobarita merged commit 80dee4a into stellar:master Dec 7, 2015
nullstyle added a commit to stellar-deprecated/horizon-importer that referenced this pull request Dec 7, 2015
bartekn added a commit to stellar/go that referenced this pull request Jan 10, 2020
This commit removes support for ingesting `TransactionMeta.V=0` in
`io.LedgerTransaction.GetChanges`.

The code generating V0 meta was changed in stellar-core but without
upgrading the V param. Some V0 meta has only one `LEDGER_ENTRY_STATE`
emitted only when a ledger entry is first modified in a ledger but
others add it before every `LEDGER_ENTRY_UPDATE` and
`LEDGER_ENTRY_REMOVED`. It looks like the code to parse meta to support
both cases should be possible but since transaction meta in protocol
version <10 can be incomplete (see [1]) users still need to switch to
V2 to be able to parse it.

[1] #1902
[2] stellar/stellar-core#944
[3] stellar/stellar-core#1441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants