Commit 3e79c44
fix(node): scope startup rewind to a non-fresh DB and require VALID (PR review pass 68)
Codex review pass 68 raised two P1s on the pass-66/67 startup head-reconciliation.
P1a — do not apply the head-repair to a fresh rollup database. The pass-66
reconciliation fired whenever the execution node's head sat above the persisted
L2 head, including when the persisted head is 0. A fresh rollup database against
an already-synced execution datadir is a legitimate bootstrap (permitted by
startup_refusal), and the zero anchor is not authoritative there: the repair
would construct head=safe=0 and either fail startup with SafeBelowFinalized (when
the execution node's finalized marker is above 0) or, via the pass-67 push,
rewind the execution node's canonical head all the way back to genesis. Gate the
reconciliation on a non-zero persisted head, so bootstrap adopts the provider
forkchoice unchanged — exactly as the pre-existing repair loop already does (its
`> finalized` bound is likewise never met at 0).
P1b — treat a non-VALID startup rewind as a launch failure. The pass-67 push
logged a warning and launched on SYNCING/ACCEPTED, on the assumption a later FCU
would reassert the head. But the orchestrator starts L2-Synced with no
l2_sync_recheck_target, and the periodic recheck only fires while L2 is syncing
with a target, so on a quiescent node nothing reissues the FCU and the execution
node keeps serving the discarded head. The rewind target is an ancestor the
execution node already holds, so VALID is the only correct answer; any other
status now fails startup so the supervisor restarts and retries, rather than
launching on a head the execution node has not adopted.
Both fixes are in the startup path already tracked for e2e coverage in
.claude/vmark-pr-review-follow-ups.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent f1b9f17 commit 3e79c44
1 file changed
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
683 | 691 | | |
684 | 692 | | |
685 | 693 | | |
| |||
764 | 772 | | |
765 | 773 | | |
766 | 774 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
776 | 790 | | |
777 | 791 | | |
778 | 792 | | |
| |||
0 commit comments