Modify notify_forkchoice_updated - #5197
Merged
Merged
Conversation
jtraglia
reviewed
Apr 29, 2026
jtraglia
reviewed
Apr 29, 2026
jtraglia
reviewed
Apr 29, 2026
Contributor
Author
|
@jtraglia Removed the function header and rephrased the statements inspired by your comments |
terencechain
approved these changes
Apr 30, 2026
jtraglia
reviewed
Apr 30, 2026
| # Return Hash32() if no payload is yet justified | ||
| if compute_epoch_at_slot(safe_block.slot) >= GLOAS_FORK_EPOCH: | ||
| safe_block_bid = safe_block.body.signed_execution_payload_bid.message | ||
| return safe_block_bid.parent_block_hash |
Member
There was a problem hiding this comment.
Just curious, why not safe_block_bid.block_hash?
Contributor
Author
There was a problem hiding this comment.
Because we yet don’t know if this payload is going to be canonical, do we?
notify_forkchoice_updated
jtraglia
approved these changes
May 9, 2026
2 tasks
nflaig
added a commit
to ChainSafe/lodestar
that referenced
this pull request
Aug 7, 2026
**Motivation** Post-Gloas (ePBS) a block's own payload may not yet be confirmed canonical, so `engine_forkchoiceUpdated` must report the bid's `parent_block_hash` as the safe/finalized block hash. **Description** - Add `getFinalizedExecutionBlockHash` and a shared fork-aware helper; switch all five FCU callsites - Post-Gloas blocks report the bid `parent_block_hash`; pre-Gloas behavior unchanged - Safe hash is based on the fast-confirmation confirmed block via new `IForkChoice.getConfirmedBlock()` (justified fallback when FCR is disabled), with warnings on zero-hash fallbacks - Genesis anchor: `ZERO_HASH` pre-Gloas (genesis body carries a default payload, so it is not an execution block); bid `parent_block_hash` for Gloas genesis References: - ethereum/consensus-specs#5197 - ethereum/consensus-specs#5449 **AI Assistance Disclosure** - Claude-assisted (rebase, genesis semantics, validation) --------- Co-authored-by: Nazar Hussain <nazarhussain@gmail.com> Co-authored-by: Nico Flaig <nflaig@protonmail.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.
Modifies the computation of
safe_block_hashandfinalized_block_hashthat are passed to thenotify_forkchoice_updatedstarting with Gloas:safe_block_hashis computed as theparent_block_hashof the safe block, this modification is done by extendingget_safe_execution_block_hashfunctionfinalized_block_hashis computed as theparent_block_hashof the finalized block bid