Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eventstream electra atts #14655

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Fix eventstream electra atts #14655

merged 3 commits into from
Nov 22, 2024

Conversation

kasey
Copy link
Contributor

@kasey kasey commented Nov 22, 2024

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

This PR updates the event stream api to support electra attestation and attester_slashing messages. The approach taken is to marshal these values as they would be represented elsewhere in the beacon api, without any special treatment around distinguishing the different schema of events that could be streamed in the same client session. This is unlikely to be the correct way to marshal these events when the beacon API spec discussion on this topic resolves, but in the meantime this approach should be backwards-compatible with the attestantio/go-eth2-client stream client used by tools like xatu and ethereum-metrics-exporter, assuming these tools are not using the new committee_bits field.

Other notes for review

This works because the electra attestation is almost the same as pre-electra, only adding committee_bits to the outer container (outside the signed container). So unmarshaling the electra json into a pre-electra struct should work, except it will drop the unknown committee_bits field on the floor.

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have made an appropriate entry to CHANGELOG.md.
  • I have added a description to this PR with sufficient context for reviewers to understand this PR.

@kasey kasey requested a review from a team as a code owner November 22, 2024 02:19
@kasey kasey requested review from nalepae, potuz and dB2510 November 22, 2024 02:19
@kasey kasey requested a review from terencechain November 22, 2024 02:19
@kasey kasey added this pull request to the merge queue Nov 22, 2024
Merged via the queue into develop with commit 25eae3a Nov 22, 2024
18 checks passed
@kasey kasey deleted the fix-eventstream-electra-atts branch November 22, 2024 03:11
@terencechain terencechain restored the fix-eventstream-electra-atts branch November 25, 2024 19:54
rkapka pushed a commit that referenced this pull request Nov 29, 2024
* fix handler for electra atts

* same fix for attestation_slashing

* changelog

---------

Co-authored-by: Kasey Kirkham <[email protected]>
@kasey kasey added the changelog/fixed Changelog Section: Fixed label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/fixed Changelog Section: Fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants