Jump to content
devnullprod

Another Question: Out of order transactions in a ledger

Recommended Posts

Today just doesn't seem to be my day! While tuning and verifying our db I noticed a particular situation with some ledger traffic that seemed to trip up our synchronization system. The incident which we noted was in ledger 45263657 particularily with the two transactions originating from "rQK6HjFraXpWo4RiKKjuumrnrZpTFDtbAX".

https://wipple.devnull.network/live/ledgers/45263657

 

This particular case is a bit strange because they appear in the transaction log appearingly out of order (Sequence 109 is before 108), the later is right after the former, and the former deletes a RippleState object which is modified in the later. It is our understanding that if a transaction comes in out of order rippled will hold onto it for a while or until the sequenent missing transactions comes in, so perhaps this is the case there, but my question is why the transaction list in the ledger would not be sorted by final transaction application order? Also how can one reconstitute this order for use of tracking changes locally.

Thanks again!

Share this post


Link to post
Share on other sites

I think your ordering is off. I haven't looked deeply into transaction metadata, but from a quick glance I'd assume transactions must be sorted according to the metaData.TransactionIndex field of each transaction, not in the order that rippled sends them to you.

Share this post


Link to post
Share on other sites

Interestingly, the documentation is slightly wrong (an index of "2" means it is the third transaction of the ledger because the field starts at 0, not 1).

Glad I could help, please donate to Wikipedia or the TOR project instead of tipping me.

Share this post


Link to post
Share on other sites
30 minutes ago, cmbartley said:

So why won't Ripple respond to Sukrim's job application?...

That was 2-3 years ago, and it was an inquiry, not an application. Also Rome is the wrong person for that anyways. Thanks for following up on my behalf, but I'm more than capable myself of bugging Ripple about stuff. ;-)

Share this post


Link to post
Share on other sites
17 hours ago, Sukrim said:

That was 2-3 years ago, and it was an inquiry, not an application. Also Rome is the wrong person for that anyways. Thanks for following up on my behalf, but I'm more than capable myself of bugging Ripple about stuff. ;-)

True.

Share this post


Link to post
Share on other sites
On 2/21/2019 at 12:45 PM, Sukrim said:

I think your ordering is off. I haven't looked deeply into transaction metadata, but from a quick glance I'd assume transactions must be sorted according to the metaData.TransactionIndex field of each transaction, not in the order that rippled sends them to you.

Exactly right. The order you get the transactions back is undefined (but is, currently, hash order).

The TransactionIndex field contains the proper index and should used to sort the transaction set for a given ledger.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...