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

[BEACON API] SSE for block builders #7837

Merged
merged 14 commits into from
Dec 21, 2023

Conversation

StefanBratanov
Copy link
Contributor

@StefanBratanov StefanBratanov commented Dec 16, 2023

PR Description

Implement ethereum/beacon-APIs#244

  • Create new payload_attributes EventType and PayloadAttributesEvent
  • Created NewBlockBuildingSubscriber to be notified whenever new block is being built with all the information needed for the event as per the spec
  • Send events to subscribers in ForkChoiceNotifierImpl

Fixed Issue(s)

fixes #6817

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.

@StefanBratanov StefanBratanov force-pushed the sse_block_building branch 2 times, most recently from 83e2057 to e6396f8 Compare December 20, 2023 07:38
@StefanBratanov StefanBratanov marked this pull request as ready for review December 20, 2023 12:25
Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
just few nits

"parent_beacon_block_root",
BYTES32_TYPE,
payloadAttributes ->
Optional.ofNullable(payloadAttributes.getParentBeaconBlockRoot()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure, but we fill it always, so even for V1 we will set this field, which is not good I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmmm yeah you are right, not sure how to do this, got any idea?

Copy link
Contributor

@zilm13 zilm13 Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the cleanest way is to make additional record with only needed fields filled in accordance with "milestone.isGreater or" and passing it here instead of PayloadBuildingAttributes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok got it, done. wdyt?

@zilm13
Copy link
Contributor

zilm13 commented Dec 20, 2023

Also added issue #7847 as per talk

@StefanBratanov StefanBratanov merged commit ba185d9 into Consensys:master Dec 21, 2023
15 checks passed
@StefanBratanov StefanBratanov deleted the sse_block_building branch December 21, 2023 16:22
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.

[BEACON API] SSE for block builders
2 participants