Commit 0f15574
polish(traces): committee-driven polish of the ancestor-error cascade — INVARIANTS row, INV-20(d), byAddr robustify, candor doc
Scoped follow-up polish on the ancestor-error trace cascade (core algorithm unchanged;
already committee-proven byte-identical to stock ponder's rpc/actions.ts DFS).
- Reword the shipped placeholder: the JSDoc's `<UPSTREAM_ISSUE_URL> (to be filled by the
reviewer)` now points to "Upstream divergence documented in VALIDATION.md §5" (no invented URL).
- Renumber the cascade invariant INV-19 → INV-20 across code/test/doc. INV-19 was ALREADY
taken by the code-enforced low-edge chunk-coverage guard from #50 (portal.ts
invariant("INV-19", …), tested in portal.test.ts). Squatting on INV-19 broke the
doc⟷code⟷test grep-ability rule (two unrelated invariants under one id); INV-20 is the
next free id.
- Add the INV-20 catalog row to portal/INVARIANTS.md (matches the table's column format;
cites cascadeTraceErrors/rankTraces + the INV-20 tests + VALIDATION.md §5).
- Robustify the byAddr test helper: assert ranked.length === sorted.length so the
positional zip stays a valid oracle instead of silently misaligning if a future fixture
ever introduces a parityToCallFrame-droppable trace type (safe today: all type:'call').
- Add a non-prefix-closed candor doc-comment above cascadeTraceErrors: an orphan (missing
intermediate ancestor) inherits nothing — a deliberate conservative choice (never fabricate
a false smear; no worse than the pre-shim null), unreachable on geth-faithful prefix-closed
Portal trees.
- Add test INV-20 (d): an inheriting child of an ancestor with an error but NO revertReason
gets error set AND revertReason === undefined — pinning the UNCONDITIONAL revertReason
assignment that keeps the Portal store byte-exact with upstream rpc/actions.ts. No guard
added on frame.revertReason (a guard would diverge the Portal store from the RPC store).
Gates: sync-upstream.sh --test 0.16.6 + 0.16.8 both 333 passed / 18 files, build OK; biome
2.5.2 clean at error level. Mutation-verified: neutering the applied cascade fails INV-20 /
(a) / (b) / (d) ("expected undefined to be 'execution reverted'") while (c) stays green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent e11d5bd commit 0f15574
3 files changed
Lines changed: 47 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
| 543 | + | |
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
560 | 564 | | |
561 | 565 | | |
562 | 566 | | |
| |||
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
589 | | - | |
| 593 | + | |
590 | 594 | | |
591 | 595 | | |
592 | 596 | | |
| |||
614 | 618 | | |
615 | 619 | | |
616 | 620 | | |
617 | | - | |
| 621 | + | |
618 | 622 | | |
619 | 623 | | |
620 | 624 | | |
| |||
632 | 636 | | |
633 | 637 | | |
634 | 638 | | |
635 | | - | |
| 639 | + | |
636 | 640 | | |
637 | 641 | | |
638 | 642 | | |
| |||
647 | 651 | | |
648 | 652 | | |
649 | 653 | | |
650 | | - | |
| 654 | + | |
651 | 655 | | |
652 | 656 | | |
653 | 657 | | |
| |||
660 | 664 | | |
661 | 665 | | |
662 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
102 | 112 | | |
103 | 113 | | |
104 | 114 | | |
| |||
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
136 | | - | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| |||
0 commit comments