Three stores
Committed block
Ledger storetransactions · outputs · events · write sets · accumulators · block metadata
Replay and audit
State KV storecurrent and historical values, sharded sixteen ways, hot state in its own tier
Queries and execution
State Merkle storea versioned sparse Merkle tree, plus the indexes tracking superseded nodes
Verification — proofs
A read that only needs a value does not pay for tree traversal, and a proof is not reconstructed from a store optimized for point lookups.
Authentication
Two Merkle structures do different jobs.Versioned sparse Merkle tree
Accumulators
Your key and its value
sibling hash
sibling hash
State root, committed by consensus
Your transaction, or an event
Transaction accumulator · event accumulatoreach commits to everything included so far, in order
Ledger root, committed by consensus
The tree proves what a value was; the accumulators prove what happened and in what order. Together they make “this transaction is in the chain at this position” provable without holding the chain.
Speculative state
A block’s results exist before they are committed. Rather than writing them into the durable tree and undoing that if the block does not commit, uncommitted state is held in an in-memory sparse Merkle overlay on top of the last committed version. Execution reads through the overlay and sees a consistent view. If the block commits, the overlay is materialized. If it does not, the overlay is dropped and nothing durable was ever touched. This is what keeps speculative execution from leaving debris in storage.Caching
Tree nodes are cached at two levels: a version-aware cache that keeps recent versions addressable, and a least-recently-used cache underneath it. The access pattern of a trading chain — a small set of hot keys touched every block, against a long tail touched rarely — is exactly the shape these are for.Pruning
Keeping every version forever is a choice, not a requirement. Three independent pruners run against the three stores, each with its own retention policy: one over the ledger, one over state values, one over Merkle nodes. The Merkle and state-value pruners are driven by stale indexes written at the same time as the data. When a version supersedes a node or a value, the superseded entry is recorded as stale at that version. Pruning is then a range scan over an index rather than a search for garbage — the writer already said what would become collectable and when.Retention is an operator decision with real consequences. A node pruned aggressively serves current state efficiently and cannot answer historical queries or serve state sync to a node starting from further back. An archival node keeps everything and pays for it. See Run a node.
Backup and restore
The stores can be backed up and restored independently of the running node, which is what makes it possible to stand up a node from a snapshot rather than replaying from genesis, and to verify a restored node’s state against the committed roots rather than trusting the backup.Where to go next
State sync
How a node catches up to the chain without replaying all of it.
State model
What is being stored, and which representation is authoritative.
Indexer
Reconstructing history from committed records.
Run a node
Node roles, and how to ask about operating one.