Component Details

Screenshot 2025-07-24 at 15 00 55

See individual components and state recovery details in the table below. Note that most components have little to no internal state or persistence — this is one of the design principles.

ComponentIn-memory statePersistenceState Recovery
Command Sourcestarting_block (only used on startup)nonestarting_block is the first block after the compacted block stored in state, i.e., starting_block = highest_block - blocks_to_retain_in_memory.
BlockContextProvidernext_l1_priority_id; block_hashes_for_next_block (last 256 block hashes)nonenext_l1_priority_id: take from ReplayRecord of starting_block - 1; block_hashes_for_next_block: take from 256 ReplayRecords before starting_block
L1WatcherGapless list of Priority transactions - starting from the last committed to L1nonenone - recovers itself from L1
L2Mempool (RETH crate)prepared list of pending L2 transactionsnonenone (consider persisting mempool transactions in the future)
BlockExecutornone 🔥nonenone
Repositories (API subsystem)BlockHeaders and Transactions for ~blocks_to_retain_in_memory blocksHistorical BlockHeaders and Transactionsnone - recovers naturally when replaying blocks from starting_block
StateAll Storage Logs and Preimages for blocks_to_retain_in_memory last blocksCompacted state at some older block (highest_block - blocks_to_retain_in_memory): full state map and all preimagesnone - recovers naturally when replaying blocks from starting_block
Merkle TreeOnly persistenceFull Merkle tree - including previous values on each leafnone
⬇️ Batcher Subsystem Components⬇️ Components below operate on Batches - not Blocks️⬇️ Components below must not rely on persistence - otherwise failover is not possible⬇️
Batcherstartup: starting_batch and batcher_starting_block;
operation: Trailing Batch’s CommitBatchInfo;
nonefirst_block_to_process: block after the last block in the last committed L1 batch;
last_persisted_block: the block after which we start checking for batch timeouts
StoredBatchInfo in run_loop: Currently: from FRI cache; todo - Load last committed StoredBatchInfo from L1 OR reprocess last committed batch
Prover Input Generatornonenone
FRI Job ManagerGapless List of unproved batches with ProverInput and prover assignment infononenone - batches before starting_batch are guaranteed to have FRI proofs, batches after will go through the pipeline again
FRI Store/CachenoneMap<BatchNumber, FRIProof> (todo: extract from the node process to enable failover)none
L1 Committernone*nonenone - recovers itself from L1
L1 Proof Submitternone*nonenone - recovers itself from L1
L1 Executornone*nonenone - recovers itself from L1
SNARK Job Manager (TODO - missing)Gapless list of batches with their FRI proofs and prover assignment infononeLoad batches that are committed but not proved on L1 yet. Load their FRI proofs from FRI cache (TODO)
Priority Tree ManagerDynamic Merkle tree with L1->L2 transaction hashesCompressed data needed to rebuild the tree, see CachedTreeData for more detailsnone - recovers itself from replay storage