Commit 9954ebf
fix(chain-orchestrator): refill pool + loopback parse; revert startup EL/DB reconciliation (PR review pass 69)
Codex review pass 69 raised two P1s, one P2, and one P3. The two P1s are both on
the pass-66..68 startup execution-node/database reconciliation, which has now
produced six findings across four passes without converging.
Revert the startup EL-vs-DB head reconciliation (the args.rs additions from
passes 66, 67, and 68), returning startup to the stable, pre-existing repair-loop
behavior. Root cause of the non-convergence: correctly reconciling a persisted
L2 head of 0 requires distinguishing a FRESH database (bootstrap against an
already-synced execution datadir — adopt the execution node) from a database
UNWOUND to genesis (authoritative at 0 — rewind the execution node), and no such
freshness signal exists today (`l2_head_block` is always seeded to 0, and
`startup_refusal` also treats 0 as bootstrap). Getting this right is a
self-contained crash-recovery hardening task (freshness marker, forkchoice push
to the execution node with a VALID gate, pool refill, e2e restart coverage) that
is disproportionate to this CI-stabilization PR and kept regressing when patched
incrementally. It is recorded in .claude/vmark-pr-review-follow-ups.md. This
resolves pass-67 P1, pass-68 P1a/P1b, and pass-69 P1a/P1b together. The
sign-failure fail-stop that motivated it is retained; restart re-converges via
the pre-existing loop with its documented limitations.
P2 — refill the transaction pool after the optimistic-head rewind to safe. The
recheck's recovery from an INVALID optimistic head (added pass 66) rewinds the
engine head down to the safe head but, because it is a target==mirror path, the
existing `rewound_backward` collection never ran, so the discarded blocks'
transactions were dropped from the pool. Collect them (safe+1 ..= mirror) before
the rewind FCU — while those blocks are still canonical — and reinsert on VALID,
matching every other rewind seam. (Their L1-message mappings were already cleared
when optimistic_sync purged all mappings on entry, so no purge is paired here.)
P3 — classify the remote-source plaintext-http loopback exemption by the PARSED
address, not a string prefix. `host.starts_with("127.")` treated DNS names like
`127.rpc.example` as loopback and silenced the MITM warning; parse the host as an
IP and use `is_loopback` (stripping IPv6 brackets), exempting only the exact
`localhost` domain.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 3e79c44 commit 9954ebf
3 files changed
Lines changed: 80 additions & 139 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2430 | 2430 | | |
2431 | 2431 | | |
2432 | 2432 | | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
2433 | 2457 | | |
2434 | 2458 | | |
2435 | 2459 | | |
| |||
2439 | 2463 | | |
2440 | 2464 | | |
2441 | 2465 | | |
| 2466 | + | |
2442 | 2467 | | |
2443 | 2468 | | |
2444 | 2469 | | |
| |||
3811 | 3836 | | |
3812 | 3837 | | |
3813 | 3838 | | |
3814 | | - | |
3815 | | - | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
3816 | 3847 | | |
3817 | 3848 | | |
3818 | 3849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
254 | 264 | | |
255 | 265 | | |
256 | 266 | | |
| |||
582 | 592 | | |
583 | 593 | | |
584 | 594 | | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| |||
669 | 672 | | |
670 | 673 | | |
671 | 674 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | 675 | | |
722 | 676 | | |
723 | 677 | | |
| |||
738 | 692 | | |
739 | 693 | | |
740 | 694 | | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
| 695 | + | |
800 | 696 | | |
801 | 697 | | |
802 | 698 | | |
| |||
0 commit comments