You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: yarn-project/archiver/README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,13 @@ The archiver runs a periodic sync loop with two phases:
26
26
27
27
```
28
28
sync()
29
-
├── processQueuedBlocks() # Handle blocks pushed via addBlock()
29
+
├── processQueuedBlocks() # Handle blocks pushed via addBlock()
30
+
├── pruneOrphanProposedBlocks() # Wall-clock prune of orphan block-only tips
30
31
└── syncFromL1()
31
-
├── handleL1ToL2Messages() # Sync messages from Inbox contract
32
-
├── handleCheckpoints() # Sync checkpoints from Rollup contract
32
+
├── handleL1ToL2Messages() # Sync messages from Inbox contract
33
+
├── handleCheckpoints() # Sync checkpoints from Rollup contract
33
34
├── pruneUncheckpointedBlocks() # Prune provisional blocks from expired slots
34
-
├── handleEpochPrune() # Proactive unwind before proof window expires
35
+
├── handleEpochPrune() # Proactive unwind before proof window expires
35
36
└── checkForNewCheckpointsBeforeL1SyncPoint() # Handle L1 reorg edge case
36
37
```
37
38
@@ -100,8 +101,9 @@ Queued blocks are processed at the start of each sync iteration. This allows the
100
101
Blocks added via `addBlock()` are considered "provisional" until they appear in an L1 checkpoint. These provisional blocks may need to be reconciled when:
101
102
-**Checkpoint mismatch**: A checkpoint lands on L1 with different blocks than stored locally (e.g., a different proposer won the slot)
102
103
-**Slot expiration**: An L2 slot ends without any checkpoint being mined on L1
104
+
-**Orphan proposed block**: Under proposer pipelining, a proposer can broadcast a block-only proposal but never the matching `CheckpointProposal` (e.g. it crashes before assembling the checkpoint). The provisional block then has no proposed checkpoint backing it.
103
105
104
-
When `handleCheckpoints()` processes incoming checkpoints, it compares archive roots of local blocks against the checkpoint's blocks. If they differ, local blocks are pruned and replaced with the checkpoint's blocks. After checkpoint sync, `pruneUncheckpointedBlocks()` removes any remaining provisional blocks from slots that have ended. Both cases emit `L2PruneUncheckpointed`.
106
+
When `handleCheckpoints()` processes incoming checkpoints, it compares archive roots of local blocks against the checkpoint's blocks. If they differ, local blocks are pruned and replaced with the checkpoint's blocks. After checkpoint sync, `pruneUncheckpointedBlocks()` removes any remaining provisional blocks from slots that have ended. Independently, `pruneOrphanProposedBlocks()` runs on wall-clock time (so it fires during quiet L1 periods) and removes a block-only tip once its build slot ended without a matching proposed checkpoint, plus a grace window configured via `orphanProposedBlockPruneGraceSeconds`. All three cases emit `L2PruneUncheckpointed`.
0 commit comments