Reviewed and confirmed by a Stellar Core engineer on 14 November 2026.
corpus/results/. Nothing here is “best practice” by assertion.
The one idea underneath all of it
The envelope says what a transaction asked for. LedgerCloseMeta says what happened. When they disagree, the metadata is right.
Most of the rules are that idea applied to a specific field.
The rules
1. Effects from metadata
Participants, balances and created entries come from meta, not the envelope.
2. Fees
Who paid, how much, and why fee changes over-count Soroban fees.
3. 64-bit integers
Muxed IDs, amounts, limits and TOIDs all exceed 2^53.
4. Muxed accounts
Keep the account and the ID; expect fee-bump wrapping.
5. Signed-payload signers
Store the full P… key, payload included.
6. SAC trustlines
Trustlines and accounts created without classic operations.
7. Untrusted strings
Memo text isn’t validated UTF-8.
8. Bounded recursion
Walkers over ScVal and auth trees need a depth limit.
9. Consensus data only
Diagnostic events differ between nodes. Never index them.