Commit d8a2dd4
fix(testing): make finalized-safety head check scheme-independent (leanEthereum#916)
A fork-choice vector asserted head_slot=5 at the step that adds an empty
sibling block above the canonical head.
At that step both children of the justified block carry zero distinguishing
fork-choice weight, so the head is a pure tie broken by the larger block
root.
A block root embeds the post-state root, which embeds the validator public
keys, so the tie resolves differently under the test and production
signature schemes.
The vector passed under the test scheme and failed under production, where
the sibling at slot 6 won the tie.
Stop asserting which sibling is head at the tie step.
Assert instead that the empty fork block changes neither justification nor
finalization, which holds under both schemes.
The genuine "above fork wins" property is still asserted at the next step,
where the fork gathers the votes that justify it and move the head onto it
with no tie.
Also add a repository rule: every test change must update the associated
documentation in the same change, per the documentation rules.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 992b7a6 commit d8a2dd4
2 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| |||
0 commit comments