Add head_v2 event - #16930
Merged
Merged
Conversation
Add the NewHeadV2 state-feed event type and its HeadV2Data carrier. It mirrors the legacy head event fields, renames the duty-dependent roots to current/next_epoch_dependent_root per beacon-APIs#590, and adds the execution payload status and head fork version needed to render head_v2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add HeadEventV2 ({version, data} envelope) and HeadEventV2Data for the
head_v2 SSE event. Fields are renamed per beacon-APIs#590
(current/next_epoch_dependent_root) and add payload_status. Fields are
ordered to satisfy the maligned nogo check.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Register the head_v2 topic, route statefeed.NewHeadV2 to it, and serialize
HeadV2Data into the {version, data} HeadEventV2 envelope (version rendered
via runtime/version). The legacy head topic is unchanged. Extend the
stream test to cover head_v2.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…execution payload envelope
…sult of `postPayloadTasks`: Resolve duplicated event emits
syjn99
marked this pull request as ready for review
June 9, 2026 10:33
terencechain
requested changes
Jun 10, 2026
james-prysm
reviewed
Jun 10, 2026
james-prysm
reviewed
Jun 10, 2026
james-prysm
reviewed
Jun 10, 2026
james-prysm
reviewed
Jun 10, 2026
terencechain
left a comment
Collaborator
There was a problem hiding this comment.
Lgtm, ill defer @james-prysm to approve since he has more comments
james-prysm
approved these changes
Jun 11, 2026
syjn99
enabled auto-merge
June 11, 2026 17:35
terencechain
approved these changes
Jun 11, 2026
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.
What type of PR is this?
What does this PR do? Why is it needed?
Implements a new
head_v2event. Ref: ethereum/beacon-APIs#590Note that it doesn't deprecate the legacy
headevent. So it is expected to receive bothheadandhead_v2events if subscribed for them.Which issues(s) does this PR fix?
Fixes #16922
Other notes for review
Kurtosis config
Result
Command:
so that we can subscribe both
headandhead_v2.Outcome:
Notable points:
head_v2is properly versioned. It will give"fulu"if the current fork isfulu.head_v2is emitted two times for same block, right after the execution payload is received.current_epoch_dependent_root==previous_duty_dependent_rootandnext_epoch_dependent_root==current_duty_dependent_rootas expected.Acknowledgements