03Sheet 03.07 · Tools

Order scan

make order-scan: 20 fresh runs per recipe lane record which ledgers come out in more than one byte order, and prove the content never varies.

make order-scan      # recipes/order-scan.sh classic 20, then soroban 20 at P30; about 15 minutes

stellar-core iterates a hash map with a per-process random salt, so the changes within an operation can come out in a different order on every run. The order scan measures this. It runs each recipe lane 20 times on fresh cores, records every byte ordering seen per ledger, and fails if any ledger's content differs once order is normalised.

The committed results

Results are in recipes/classic/order-scan/p30-mainnet-base.json and recipes/soroban/order-scan/p30-mainnet-base.json:

LaneRunsLedgers that vary in orderContent that varies
Classic2018 of 80 recipe ledgers; 12, 78, 80 differ in every run0
Soroban2013 of 80 recipe ledgers0

The protocol-upgrade ledger (2) varies in both lanes as well; it is never an entry.

Corpus entries whose order varies pin an order-normalised hash, and list every raw ordering seen (change_order in the schema).

For indexers

Never depend on the order of changes within an operation.

On this page