Commit e3ddeed
committed
fix(sequencer): override pending-tip slotNumber so canPruneAtTime can't bypass pending override
When pipelining with a proposed parent, the canProposeAt simulation overrides
`tips.pending` to the parent's checkpoint number but the centralised override
helper was not setting `tempCheckpointLogs[pending].slotNumber`. The L1
`STFLib.canPruneAtTime(_ts)` reads that slot via `getEpochForCheckpoint(proven + 1)`;
with the override unset it falls back to 0 (epoch 0), which at any non-trivial
simulation timestamp is far past its proof-submission window. `canPruneAtTime`
returns true, `getEffectivePendingCheckpointNumber` collapses pending back to
proven, the pending override is silently bypassed, and
`canProposeAtTime` then compares the supplied archive against
`archives[proven]` (= genesis on a fresh chain), reverting with
`Rollup__InvalidArchive(genesis, syncedTo.archive)`. This was the cause of the
"Rollup contract check failed" / proposer-rollup-check-failed reverts across
the e2e_epochs_mbps, epochs_missed_l1_slot, and e2e_l1_publisher tests after
7c9268f centralised the override helper and dropped the
`withPendingTempCheckpointLogFields` call the pre-refactor helper had.
Restore the slotNumber override (only) in the centralised helper. The other
fields the pre-refactor helper set (headerHash, outHash, payloadDigest) were
only consumed by the propose-call simulation that 85b6a02 removed; the
post-refactor enqueue-time simulations (canProposeAt and validateBlockHeader
with ignoreSignatures: true) do not read them. To make the partial override
expressible, loosen `withPendingTempCheckpointLogFields` to accept any subset
of fields — the underlying `makeTempCheckpointLogOverride` already emits a
stateDiff entry per field actually set.
Also switch `archiveForCheck` and `lastArchiveRoot` from `syncedTo.archive` to
`syncedTo.proposedCheckpointData.archive.root` when pipelining with a proposed
parent. The two values agree in steady state but can transiently diverge when
world-state has not yet applied the proposed parent's blocks locally; the
proposed-checkpoint archive is the value L1 will actually see at archives[pending]
once the parent lands, and using it on both sides of the comparison keeps the
override and the supplied archive in lockstep.
Diagnosed against /tmp/a1442bdbf1cf22fe.log (epochs_mbps) and
/tmp/b84862271b974e83.log (e2e_l1_publisher); confirmed independently by codex.1 parent 28d32d6 commit e3ddeed
3 files changed
Lines changed: 34 additions & 8 deletions
File tree
- yarn-project
- ethereum/src/contracts
- sequencer-client/src/sequencer
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | 100 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| |||
410 | 416 | | |
411 | 417 | | |
412 | 418 | | |
413 | | - | |
| 419 | + | |
| 420 | + | |
414 | 421 | | |
415 | 422 | | |
416 | 423 | | |
| |||
0 commit comments