Commit 11ee711
committed
fix(stf): keep the 3SF-mini justifiability rule under the heartbeat fork choice
The heartbeat work had dropped `slot_is_justifiable_after` and collapsed
finalization to `source.slot + 1 == target.slot`. Restore the rule: the two-tier
fork choice changes which head each interval computes, not which slots may be
justified, so the two are independent.
Unjustifiable slots exist to funnel votes. Under high latency validators
otherwise spread across many targets and none reaches a supermajority; the
4-interval grid does not remove that pressure.
Restored at the four sites that had diverged:
- `is_valid_vote` filters targets that are not justifiable after the finalized
slot. Its doc comment had kept listing the check, so the code and the contract
had drifted apart.
- `try_finalize` requires no justifiable slot strictly between source and
target, rather than plain adjacency.
- `get_attestation_target_with_checkpoints` walks the target back into the
justifiable range again, making `finalized` a live parameter once more.
- The block builder mirrors both: `finalizes` uses the gap scan and
`entry_passes_filters` rejects `target_not_justifiable`.
The test added to pin the adjacency rule still holds under 3SF-mini, for the
reason the rule gives rather than by adjacency, and is renamed to say so.
stf_spectests returns to 74/74 and forkchoice_spectests to 97/122. The 25
remaining failures are the interval grid and the two-tier head, which the
fixtures do not encode yet.1 parent 2455ce8 commit 11ee711
3 files changed
Lines changed: 99 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
490 | | - | |
| 491 | + | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
| |||
523 | 525 | | |
524 | 526 | | |
525 | 527 | | |
526 | | - | |
527 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
528 | 531 | | |
529 | 532 | | |
530 | 533 | | |
| |||
561 | 564 | | |
562 | 565 | | |
563 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
564 | 572 | | |
565 | 573 | | |
566 | 574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
1052 | 1053 | | |
1053 | 1054 | | |
1054 | 1055 | | |
1055 | | - | |
| 1056 | + | |
1056 | 1057 | | |
1057 | 1058 | | |
1058 | 1059 | | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
| 1060 | + | |
1064 | 1061 | | |
1065 | 1062 | | |
1066 | 1063 | | |
| |||
1091 | 1088 | | |
1092 | 1089 | | |
1093 | 1090 | | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1094 | 1107 | | |
1095 | 1108 | | |
1096 | 1109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
488 | 493 | | |
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
492 | 497 | | |
493 | 498 | | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
499 | 504 | | |
500 | 505 | | |
501 | 506 | | |
| |||
509 | 514 | | |
510 | 515 | | |
511 | 516 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
516 | 521 | | |
517 | 522 | | |
518 | 523 | | |
| |||
621 | 626 | | |
622 | 627 | | |
623 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
624 | 670 | | |
625 | 671 | | |
626 | 672 | | |
| |||
706 | 752 | | |
707 | 753 | | |
708 | 754 | | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
713 | 760 | | |
714 | 761 | | |
715 | 762 | | |
| |||
732 | 779 | | |
733 | 780 | | |
734 | 781 | | |
735 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
736 | 786 | | |
737 | 787 | | |
738 | 788 | | |
| |||
0 commit comments