Skip to content

Remove shuffling stable from fulu onwards - #11203

Open
gfukushima wants to merge 13 commits into
Consensys-Incorporated:masterfrom
gfukushima:remove-shuffling_stable-from-fulu-onwards
Open

Remove shuffling stable from fulu onwards#11203
gfukushima wants to merge 13 commits into
Consensys-Incorporated:masterfrom
gfukushima:remove-shuffling_stable-from-fulu-onwards

Conversation

@gfukushima

@gfukushima gfukushima commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

PR Description

Since the introduction of EIP 7917 (proposer lookahead) the shuffling in the proposers of the next epoch isn't possible at the last slot of the previous epoch. So from FULU onwards isForkChoiceStableAndFinalizationOk gets simplified to the single check isFinalizationOk

Fixed Issue(s)

Fixes #11150

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-adjacent fork-choice re-org behavior at epoch boundaries on Fulu; mistakes could alter which block validators propose on, though scope is limited to late-block re-org paths and is covered by new milestone tests.

Overview
Aligns late-block proposer re-org with Fulu (EIP-7917) by splitting the old combined gate into isProposerStable and isFinalizationOk in getProposerHead. Pre-Fulu, proposer stability still means shuffling-stable (not at an epoch boundary); from Fulu, ForkChoiceUtilFulu treats the proposer as always stable because lookahead fixes assignments before the epoch boundary, so epoch-first-slot re-orgs are no longer blocked solely by shuffling stability.

shouldOverrideForkChoiceUpdate (Teku-only FCU optimization) still requires isShufflingStable at all milestones, with an explicit comment that payload prep on the parent stays conservative at epoch boundaries.

Adds ForkChoiceUtilReorgMilestoneTest (Bellatrix vs Fulu at epoch boundary) and updates existing re-org tests and specrefs for get_proposer_head#fulu.

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

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
zilm13
zilm13 previously approved these changes Aug 31, 2026

@zilm13 zilm13 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
both comments are nit and optional

import tech.pegasys.teku.spec.logic.common.statetransition.exceptions.SlotProcessingException;

@TestSpecContext(milestone = {BELLATRIX, FULU})
class ForkChoiceUtilProposerHeadTest {

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.

Maybe ForkChoiceUtilReorgMilestoneTest?
The key purpose of this is to handle parameterized tests (compared to ForkChoiceUtilReorgTest)

final boolean isProposerBoostActive = isProposerBoostActive(store, headNode.blockRoot());
final boolean isShufflingStableAndForkChoiceOk =
isForkChoiceStableAndFinalizationOk(store, slot);
final boolean isProposerHeadReorgAllowed = isProposerHeadReorgAllowed(store, slot);

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.

isProposerHeadReorgAllowed is a very general name which combines all the conditions together. What i suggest:
isFinalizationOk
isProposerStable: >fulu? true : isShuffilngStable

2 of those are different by meaning if I understand it correctly, there were not many reasons to combine them before, and even less now with fulu change.

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
zilm13
zilm13 previously approved these changes Sep 1, 2026

@zilm13 zilm13 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

lucassaldanha
lucassaldanha previously approved these changes Sep 2, 2026
@lucassaldanha
lucassaldanha enabled auto-merge (squash) September 2, 2026 21:41
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
@gfukushima
gfukushima dismissed stale reviews from zilm13 and lucassaldanha via dd1f835 September 9, 2026 23:09
@zilm13
zilm13 disabled auto-merge September 11, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fulu: get_proposer_head still applies is_shuffling_stable (EIP-7917)

3 participants