namada icon indicating copy to clipboard operation
namada copied to clipboard

Batch events order

Open grarco opened this issue 4 months ago • 1 comments

In finalize_block we return the events as an ordered Vec. In the write log we manage them as an IndexSet which preserves the insertion order. In BatchedTxResult though we store them in a BTreeSet and here we lose the ordering.

This means that when clients query the events for a specific block they can expect them to be ordered following the transactions' order in the block, but within a single batch the order is not preserved. This is not an issue at the moment but it's better to keep track of this if we'll ever have the need to rely on events' ordering inside a batch (for example in #3824)

grarco avatar Sep 30 '24 16:09 grarco