Skip to content

Use MIN_SEED_LOOKAHEAD in proposer preferences - #10731

Merged
zilm13 merged 5 commits into
Consensys:masterfrom
zilm13:min-lookahead-proposer-preferences
May 25, 2026
Merged

Use MIN_SEED_LOOKAHEAD in proposer preferences#10731
zilm13 merged 5 commits into
Consensys:masterfrom
zilm13:min-lookahead-proposer-preferences

Conversation

@zilm13

@zilm13 zilm13 commented May 19, 2026

Copy link
Copy Markdown
Contributor

PR Description

ethereum/consensus-specs#5215
part of #10724

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Medium Risk
Changes consensus gossip validation and checkpoint/lookahead math for proposer preferences; incorrect constants would reject valid messages or accept invalid ones.

Overview
Proposer preferences gossip validation and publishing now follow Gloas rules that use MIN_SEED_LOOKAHEAD instead of a fixed “current or next epoch” window.

In GossipValidationHelper, separate isSlotInCurrentEpoch / isSlotInNextEpoch checks are replaced by isSlotInCurrentEpochWithMinSeedLookaheadTolerance, which accepts proposal slots whose epoch is between the current epoch and current + MIN_SEED_LOOKAHEAD.

ProposerPreferencesGossipValidator uses that helper for the IGNORE rule, loads checkpoint state at proposal_epoch - MIN_SEED_LOOKAHEAD (not always minus one), and indexes proposer_lookahead with MIN_SEED_LOOKAHEAD * SLOTS_PER_EPOCH + (proposal_slot % SLOTS_PER_EPOCH) when validating the proposer index.

ProposerPreferencesPublisher documents the Gloas dependent-root formula and checkArguments that MIN_SEED_LOOKAHEAD == 1 before reusing the proposer-duties dependent root from Fulu’s getBlockProposalDependentRoot.

Tests and specrefs are updated accordingly (get_proposer_dependent_root#gloas marked not needed in ethspecify).

Reviewed by Cursor Bugbot for commit d104417. Bugbot is set up for automated code reviews on this repo. Configure here.

@zilm13 zilm13 mentioned this pull request May 19, 2026
17 tasks

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 12cc916. Configure here.

tbenr
tbenr previously approved these changes May 22, 2026

@tbenr tbenr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +76 to 81
// for next-epoch duties, BlockProposalUtilFulu's
// getBlockProposalDependentRoot returns the same value, so we reuse it here.
final Bytes32 dependentRoot = proposerDuties.getDependentRoot();

final ProposerPreferencesUtil preferencesUtil = spec.getProposerPreferencesUtil(epoch);

@tbenr tbenr May 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wander if we should assert that MIN_SEED_LOOKAHEAD is 1, so we start failing if it will ever change and we will be forced to fix it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, will add

@zilm13
zilm13 enabled auto-merge (squash) May 25, 2026 08:18

@tbenr tbenr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zilm13
zilm13 merged commit c1525ef into Consensys:master May 25, 2026
83 of 84 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 25, 2026
@zilm13
zilm13 deleted the min-lookahead-proposer-preferences branch May 25, 2026 13:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants