fix: align SSE parent root with predicted proposer head#9251
Closed
lodekeeper wants to merge 1 commit intoChainSafe:unstablefrom
Closed
fix: align SSE parent root with predicted proposer head#9251lodekeeper wants to merge 1 commit intoChainSafe:unstablefrom
lodekeeper wants to merge 1 commit intoChainSafe:unstablefrom
Conversation
nflaig
reviewed
Apr 21, 2026
| prepareState: updatedPrepareState, | ||
| prepareSlot, | ||
| parentBlockRoot: fromHex(headRoot), | ||
| parentBlockRoot: fromHex(updatedHeadRoot), |
Member
There was a problem hiding this comment.
no, we decided to keep headRoot in the other PR cc @lodekeeper
Contributor
Author
There was a problem hiding this comment.
Ack — missed that decision. Closing the PR.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the prepareNextSlot logic to use updatedHeadRoot as the parentBlockRoot when retrieving payload attributes for SSE, ensuring consistency during predicted proposer-boost reorgs. Additionally, comprehensive unit tests were added for the 'gloas' fork to verify the handling of fresh versus stale withdrawals and the alignment of block roots. I have no feedback to provide as the existing review comment was explanatory and did not identify any issues.
Contributor
Author
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.
Summary
Follow-up to #9209. Aligns the
parentBlockRooton thepayload_attributesSSE event withupdatedHeadRoot, so the event emits a consistent(prepareState, parentBlockRoot)pair when the predicted proposer differs from the canonical head.Current behavior on
unstable:When
updatedHeadRoot !== headRoot(predicted proposer path in ePBS),prepareStatereflects the updated head whileparentBlockRootstill points at the original head. Downstream SSE consumers (builders, relays) see a mismatch between the state's slot/parent and the advertisedparentBlockRoot.This PR changes
parentBlockRoot: fromHex(headRoot)→parentBlockRoot: fromHex(updatedHeadRoot)so both fields come from the same predicted head.Context
While investigating the v1.42.0 "Withdrawal mismatch at index=0" regression, I found this inconsistency neighboring the SSE emit path. It was deliberately left out of #9209 (which converged on keeping the original
headRootthere). The fix here is a separate latent-semantics alignment, independent of the actual mismatch root cause (addressed in #9246).Happy to close this if the current SSE semantics are intentional and external consumers rely on
headRootspecifically.Test plan
gloas - should emit payloadAttributes with parentBeaconBlockRoot aligned to updatedHeadRootinprepareNextSlot.test.tsgetPayloadAttributesForSSE.test.tscovering the extend-vs-fresh-withdrawal pathAI assistance
Drafted and validated with AI assistance.