Component Details
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.
| Component | In-memory state | Persistence | State Recovery |
|---|---|---|---|
| Command Source | starting_block (only used on startup) | none | starting_block is the first block after the compacted block stored in state, i.e., starting_block = highest_block - blocks_to_retain_in_memory. |
| BlockContextProvider | next_l1_priority_id; block_hashes_for_next_block (last 256 block hashes) | none | next_l1_priority_id: take from ReplayRecord of starting_block - 1; block_hashes_for_next_block: take from 256 ReplayRecords before starting_block |
| L1Watcher | Gapless list of Priority transactions - starting from the last committed to L1 | none | none - recovers itself from L1 |
| L2Mempool (RETH crate) | prepared list of pending L2 transactions | none | none (consider persisting mempool transactions in the future) |
| BlockExecutor | none 🔥 | none | none |
| Repositories (API subsystem) | BlockHeaders and Transactions for ~blocks_to_retain_in_memory blocks | Historical BlockHeaders and Transactions | none - recovers naturally when replaying blocks from starting_block |
| State | All Storage Logs and Preimages for blocks_to_retain_in_memory last blocks | Compacted state at some older block (highest_block - blocks_to_retain_in_memory): full state map and all preimages | none - recovers naturally when replaying blocks from starting_block |
| Merkle Tree | Only persistence | Full Merkle tree - including previous values on each leaf | none |
| ⬇️ Batcher Subsystem Components | ⬇️ Components below operate on Batches - not Blocks️ | ⬇️ Components below must not rely on persistence - otherwise failover is not possible | ⬇️ |
| Batcher | startup: starting_batch and batcher_starting_block; operation: Trailing Batch’s CommitBatchInfo; | none | first_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 Generator | none | none | |
| FRI Job Manager | Gapless List of unproved batches with ProverInput and prover assignment info | none | none - batches before starting_batch are guaranteed to have FRI proofs, batches after will go through the pipeline again |
| FRI Store/Cache | none | Map<BatchNumber, FRIProof> (todo: extract from the node process to enable failover) | none |
| L1 Committer | none* | none | none - recovers itself from L1 |
| L1 Proof Submitter | none* | none | none - recovers itself from L1 |
| L1 Executor | none* | none | none - recovers itself from L1 |
| SNARK Job Manager (TODO - missing) | Gapless list of batches with their FRI proofs and prover assignment info | none | Load batches that are committed but not proved on L1 yet. Load their FRI proofs from FRI cache (TODO) |
| Priority Tree Manager | Dynamic Merkle tree with L1->L2 transaction hashes | Compressed data needed to rebuild the tree, see CachedTreeData for more details | none - recovers itself from replay storage |