05Sheet 05.01 · Findings

Found while building

Nine things building the corpus measured about stellar-core, its metadata and the decoders. Each one is a hazard for indexers.

Each finding says where it comes from: a committed measurement, a mined ledger, or an observation on recipe runs. The recipe runs themselves are not shipped. The recipes are, along with the order-scan and flag-profile results.

stellar-core emits some operation changes in a random order

Across 20 fresh runs of each recipe lane, 18 of 80 classic recipe ledgers and 13 of 80 Soroban ones came out in more than one byte order (the protocol-upgrade ledger aside, which varies too). Their headers and content were identical. 3 classic ledgers (12, 78, 80) had a different order in every run. The cause is hash-map iteration with a per-process random salt. Measured by make order-scan; the results are committed in recipes/*/order-scan/.

For indexers

Never depend on the order of changes within an operation.

Node flags change the metadata, never the ledger

The recipes were run under the three flag profiles (base, Galexie and bare). Every ledger of both lanes keeps the same header hash.

  • Bare changes the metadata content of every ledger except the protocol-upgrade one. There are no classic events, no fee events, and v0 meta extensions.
  • Galexie's extra flags change no classic ledger, and 46 Soroban ones: every ledger with a contract call. In those, each contract event appears twice, in the operation's events and again among the diagnostic events.

make generate re-measures this into recipes/<lane>/profiles/.

A Soroban ledger written with diagnostic events on is not byte-reproducible

Every call carries a core_metrics diagnostic event, invoke_time_nsecs: the wall-clock time the host spent. Two nodes running Galexie's default config write different bytes for the same ledger. The corpus's normalised form zeroes that one value.

The public data lake carries TransactionMeta v4, even for 2019 ledgers

Every lake object inspected, at protocols 12, 22 and 29, has v4 meta. The protocol-12 mainnet ledger in mined/ has v4 meta and 532 V0 envelopes. This is because Galexie sets BACKFILL_STELLAR_ASSET_EVENTS, which makes stellar-core write v4 at any protocol. A default node replaying the same ledger writes v2 (v3 for protocols 20–22). Only the LedgerCloseMeta arm varies by era: v0 at protocol 12, v1 at 22, v2 at 29.

A Soroban fee source merged earlier in the same ledger gets no refund

fee_charged is then the full declared maximum, with no refund change and no refund event. A reader that computes the fee as the charge minus the refund, or that expects a refund for every Soroban transaction, gets it wrong.

stellar-core's own golden ledgers reach 254 of 499 arms

A LedgerCloseMeta reader can meet 499 XDR union arms at v30.0. stellar-core's own golden ledger files reach 254 of them. For comparison, the corpus entries reach 350 and the mined ledgers 289 (Coverage). Many of the missing arms are result codes that never appear in a closed ledger. Measured by make coverage-goldens against stellar-core commit f2b91947.

Soroban authorization trees apply up to 245 levels deep

At Protocol 30, an authorization tree 245 levels deep applies. At 246 the transaction is included, but traps. Any indexer cap below about 246 meets real, valid ledgers. Re-checked by make verify on the entries auth.tree-depth-245-max and auth.tree-depth-246-trapped.

The WASM build of rs-stellar-xdr cannot decode those ledgers

@stellar/stellar-xdr-json 30.0.0, the WASM build of rs-stellar-xdr, fails on the 245-deep ledgers with depth limit exceeded. Native rs-stellar-xdr decodes them. make verify lists these variants as the ones the WASM reader cannot decode (13 today). To be reported upstream once checked for duplicates.

Order across ledger keys is unstable; the pairing for one key is stable

Between core processes, the order across different ledger keys changes. The STATE → UPDATED pairing for one key does not. Readers can rely on the pairing, never on the order between keys.

On this page