-
Notifications
You must be signed in to change notification settings - Fork 745
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
Add blob_sidecar
event to SSE
#4790
Conversation
…lidation level is `Gossip`.
Had a bit of discussion with @pawanjay176 on this today, and I think I might park this for a bit, as there are some ongoing discussions on when to emit the block events, and may potentially impact blob events (on whether to emit it after gossip or after full validation). If we're doing it after gossip, Pawan suggested
This function is new in @realbigsean 's PR and hasn't landed on Deneb branch yet, so seems to make sense to wait for a bit. On the testing side it doesn't seem too complicated, we could potentially pass a |
# Conflicts: # beacon_node/beacon_chain/src/blob_verification.rs # beacon_node/http_api/src/publish_blocks.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
.unwrap(); | ||
|
||
let sidecar_event = blob_event_receiver.try_recv().unwrap(); | ||
assert!(matches!(sidecar_event, EventKind::BlobSidecar(..))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! You don't have to do this but since you seeded the RNG with a known value, the blob generated should be the same each time. You could check that the output matches the static SseBlobSidecar
here so that this test breaks if something goes wrong in the code we use to generate it. Just an idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! Addressed in 39cc2fe. Thanks 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we just need to add quotes on the JSON representation of a blob index. But nice tests! And also nice bonus fix on the blob gossip without import.
Co-authored-by: realbigsean <seananderson33@GMAIL.com>
Issue Addressed
Partially address #4722 (as the issue also covers potential
block
event changes in Deneb, which aren't covered in this PR)Proposed Changes
BlobSidecar
SSE event, and register the event when a the beacon node has received aBlobSidecar
from either P2P or API)BeaconChain
for processing.gossip
and blob validation fails after the block has successfully broadcasted to the network (this is consistent with block validation behaviour).