Commit 718768e
committed
fix: align fork-choice finality and aggregate validation with leanSpec
Three spec-test fixtures from the latest leanSpec release failed:
- test_losing_fork_higher_finalized_does_not_latch: finalized was latched
monotonically in on_block_core. The spec derives the finalized checkpoint
from the chosen head's post-state in update_head and pins it to the head's
own ancestry, so a fork switch can move finalization downward. Move that
computation into update_head; keep justified monotonic (advance_to) as the
spec does.
- test_gossip_aggregated_attestation_empty_participants_rejected: an aggregate
naming no participants slipped through the mocked-proof path. Reject empty
participants (EMPTY_AGGREGATION_BITS) before bounds-check and verification,
matching the spec's to_validator_indices().
- test_genesis_registry_holds_exact_validator_entries: the stf runner rejected
the new post-state 'validators' registry check (deny_unknown_fields). Parse
it and compare each validator's index and public keys.1 parent 949abfd commit 718768e
3 files changed
Lines changed: 90 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
| |||
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
91 | 128 | | |
92 | 129 | | |
93 | 130 | | |
| |||
406 | 443 | | |
407 | 444 | | |
408 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
409 | 452 | | |
410 | 453 | | |
411 | 454 | | |
| |||
547 | 590 | | |
548 | 591 | | |
549 | 592 | | |
550 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
551 | 596 | | |
552 | 597 | | |
553 | | - | |
554 | | - | |
555 | 598 | | |
556 | | - | |
557 | | - | |
| 599 | + | |
| 600 | + | |
558 | 601 | | |
559 | 602 | | |
560 | 603 | | |
| |||
866 | 909 | | |
867 | 910 | | |
868 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
869 | 915 | | |
870 | 916 | | |
871 | 917 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
278 | 312 | | |
279 | 313 | | |
280 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
0 commit comments