Apply order is not transaction-set order, and differs by network and protocol
The transaction set lists transactions in phases sorted by hash; core applies the classic phase first, then the Soroban phase, each in an order shuffled by the hash of the whole set (TxSetFrame.cpp ApplyTxSorter).
The shape
The transaction set lists transactions in phases sorted by hash; core applies the classic phase first, then the Soroban phase, each in an order shuffled by the hash of the whole set (TxSetFrame.cpp ApplyTxSorter). The same recipe gives a different apply order on each network and protocol. Readers that number transactions by their position in the set, or assume one order, misattribute results.
Variants
| Variant | Protocol | Network | Source | Size | sha256 |
|---|---|---|---|---|---|
p30-mainnet-generated | P30 | mainnet passphrase | generated by stellar-core v30.0.0 | 17,236 B | dbc26aa0d752… |
p28-mainnet-generated | P28 | mainnet passphrase | generated by stellar-core v30.0.0 | 17,228 B | b464fb610c5d… |
p30-testnet-generated | P30 | testnet passphrase | generated by stellar-core v30.0.0 | 17,132 B | 93d7ae80867e… |
p28-testnet-generated | P28 | testnet passphrase | generated by stellar-core v30.0.0 | 17,124 B | e7e04e4b8cdf… |
What a correct reader returns
| A correct reader finds | Value | Backed by |
|---|---|---|
| The ledger applies 12 transactions. | length 12 | constructionsnapshot |
| Applied first (p30-mainnet): race-attacker-merge-tx-source. p30-mainnet-generated | e1d0c3540dab4451c867f57717e15ea3df0a2442087eef21898084b1f66e883f | snapshotcorewalker |
| Applied last (p30-mainnet): race-victim-opNO_ACCOUNT, a Soroban transaction. p30-mainnet-generated | 6f567981957f2a9e4aacb9c5393e51853cb8399a57fa0aa0de3cca498862c0e7 | snapshotcorewalker |
| Applied first (p28-mainnet): race-attacker-bump-sequence. p28-mainnet-generated | 86aaca7b5f6ef4c53049986de367c63f5684e20fae244f6eb348189063dcfb98 | snapshotcorewalker |
| Applied last (p28-mainnet): race-victim-txBAD_SEQ, a Soroban transaction. p28-mainnet-generated | 961954d8ed490a2e44f35f97495a6594417029d3218ca6f325c97479323565f2 | snapshotcorewalker |
| Applied first (p30-testnet): race-attacker-bump-sequence. p30-testnet-generated | 4ac9fa3f3e0cd863700b37054c9c9173ecacdb1327a26d7b0195aef52e87cbaa | snapshotcorewalker |
| Applied last (p30-testnet): race-victim-txNO_ACCOUNT, a Soroban transaction. p30-testnet-generated | d32c6d2fd3dd151f22b5b123193ebbdd40c79f7e7316c1db0beb08f07f9b0507 | snapshotcorewalker |
| Applied first (p28-testnet): race-attacker-remove-op-signer. p28-testnet-generated | 2e6ab3b022cf9769e69d6ef488aff887ba5d4939de3ea4d68537c5aa3ec62679 | snapshotcorewalker |
| Applied last (p28-testnet): race-victim-txBAD_AUTH, a Soroban transaction. p28-testnet-generated | f3668f3187d61ad00a88f1144f6edfb1e6d533ea88063846dee36b082d936bda | snapshotcorewalker |
Check it yourself
make verify # schema, hashes, the byte-for-byte round trip and every fact above
make oracle # the facts' values, re-read by stellar-core and the schema walkerEntry id ledger.apply-order-differs-from-set-order · compiled from catalog/ledger.apply-order-differs-from-set-order.json · entry.json
A transaction left with an open sponsorship fails txBAD_SPONSORSHIP
BEGIN_SPONSORING_FUTURE_RESERVES without the matching END in the same transaction: every operation succeeds, then the transaction fails with txBAD_SPONSORSHIP and nothing it did is kept.
A ledger with no transactions
A closed ledger with an empty transaction set: no transactions, no results.