Add fork-choice tests for should_apply_proposer_boost - #5441
Merged
jtraglia merged 2 commits intoJul 9, 2026
Merged
Conversation
Add MC/DC coverage for the gloas `should_apply_proposer_boost` gate with four generator vectors: - parent not adjacent -> boost applies - parent not weak -> boost applies - no equivocation -> boost applies - withhold -> boost withheld The head-discriminating rows engineer a weight tie (weak zero-weight parent vs a same-slot sibling whose root is tuned to win the fork-choice tiebreak) so the apply/withhold decision flips `get_head`; each test also asserts the boosted leaf's weight for clients that validate `viable_for_head_roots_and_weights`. Add a shared `setup_finalized_store` helper to helpers/fork_choice.py (also introduced by ethereum#5385; identical, drop one on merge). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ensi321
commented
Jul 9, 2026
should_apply_proposer_boostCo-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
should_apply_proposer_boost
ensi321
added a commit
to ensi321/consensus-specs
that referenced
this pull request
Aug 26, 2026
The compliance test generator delivers every block at its slot start, and the untargeted random mutations almost never move an equivocating sibling, so same-slot same-proposer blocks in generated vectors are in practice always timely. Timeliness-sensitive logic keyed on equivocations is therefore only exercised in one direction: for `should_apply_proposer_boost`, the case where a sibling exists but is not PTC-timely, so the boost must be applied despite the equivocation, never appears. That direction is currently covered only by the fixed vectors from ethereum#5441. Add a mutation operator that finds same-slot same-proposer block pairs in the test vector and moves one of the pair to a random whole second within its own or the following slot, straddling the intra-slot timeliness deadlines. All copies of the delayed block move together since timeliness is recorded at first import. Vectors without proposer equivocations are unaffected.
ensi321
added a commit
to ensi321/consensus-specs
that referenced
this pull request
Aug 26, 2026
The compliance test generator delivers every block at its slot start, and the untargeted random mutations almost never move an equivocating sibling, so same-slot same-proposer blocks in generated vectors are in practice always timely. Timeliness-sensitive logic keyed on equivocations is therefore only exercised in one direction: for `should_apply_proposer_boost`, the case where a sibling exists but is not PTC-timely, so the boost must be applied despite the equivocation, never appears. That direction is currently covered only by the fixed vectors from ethereum#5441. Add a mutation operator that finds same-slot same-proposer block pairs in the test vector and moves one of the pair to a random whole second within its own or the following slot, straddling the intra-slot timeliness deadlines. All copies of the delayed block move together since timeliness is recorded at first import. Vectors without proposer equivocations are unaffected.
gitToki
pushed a commit
to gitToki/prysm
that referenced
this pull request
Sep 9, 2026
- Bump consensus spec tests from v1.7.0-alpha.12 to v1.7.0-beta.0, through alpha.13 and alpha.14 - alpha.13: Look up payload availability at the parent block's slot ([consensus-specs#5473](ethereum/consensus-specs#5473)) - alpha.13: Enable equivocation tracking by default, gated on the early cutoff window, required by the `should_apply_proposer_boost` fork-choice tests ([consensus-specs#5441](ethereum/consensus-specs#5441)) - alpha.13: Source KZG spec test vectors from ethereum/cryptography-specs ([consensus-specs#5398](ethereum/consensus-specs#5398)) - alpha.14: Explicitly set bid fields, including the slot, when upgrading to Gloas ([consensus-specs#5550](ethereum/consensus-specs#5550), [consensus-specs#5553](ethereum/consensus-specs#5553)) - alpha.14: Disallow proposer reorgs at epoch boundaries before Fulu ([consensus-specs#5547](ethereum/consensus-specs#5547)) - alpha.14: Refresh ethspecify references, add exceptions for named SSZ collections ([consensus-specs#5528](ethereum/consensus-specs#5528)), executable gossip validation functions ([consensus-specs#5294](ethereum/consensus-specs#5294)), and the gas limit schedule ([consensus-specs#5533](ethereum/consensus-specs#5533)) - beta.0: Reject bids whose block hash equals the parent block hash, in state transition and gossip ([consensus-specs#5594](ethereum/consensus-specs#5594), cherry-picked from OffchainLabs#17443) - beta.0: Read the parent slot from the latest block header when applying the parent payload ([consensus-specs#5554](ethereum/consensus-specs#5554)) - beta.0: Rename the PTC SSZ types to `PayloadTimelinessCommittee*` in ethspecify references ([consensus-specs#5558](ethereum/consensus-specs#5558)) - The beta.0 `minimal.tar.gz` is not published yet, so the WORKSPACE minimal hash still points at alpha.14 and will be updated once the asset lands --------- Co-authored-by: Potuz <potuz@prysmaticlabs.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lodestar currently passing all fork choice spec test without having
should_apply_proposer_boostimplemented.Add 4 test vectors that mirror the conditions in
should_apply_proposer_boost: