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

Add rpc trigger for blob sidecar event #13411

Merged
merged 4 commits into from
Jan 4, 2024
Merged

Conversation

james-prysm
Copy link
Contributor

What type of PR is this?

Feature

What does this PR do? Why is it needed?

similar to notifying blocks, when blobs are broadcasted ( triggered from rpc) we should send an event.

Which issues(s) does this PR fix?

continuing off of #13315

ethereum/beacon-APIs#348

Other notes for review

@james-prysm james-prysm added API Api related tasks Deneb PRs or issues for the Deneb upgrade labels Jan 3, 2024
@@ -315,7 +316,12 @@ func (vs *Server) broadcastAndReceiveBlobs(ctx context.Context, sidecars []*ethp
if err != nil {
return errors.Wrap(err, "ROBlob creation failed")
}
if err := vs.BlobReceiver.ReceiveBlob(ctx, blocks.NewVerifiedROBlob(readOnlySc)); err != nil {
verifiedBlob := blocks.NewVerifiedROBlob(readOnlySc)
vs.OperationNotifier.OperationFeed().Send(&feed.Event{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should this be under the operations feed or should I create a new notifier for blobs or use the block notifier instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

operation feed makes sense...as it is for all objects that go inside of blocks

Copy link
Contributor

Choose a reason for hiding this comment

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

The other place we fire this event is in blobSubscriber. blobSubscriber and this function (line 324) both call ReceiveBlob. ReceiveBlob is responsible for actually writing the blob to disk and pushing it to a possibly blocked ReceiveBlock call. In terms of timing, I think it makes sense to publish the blob on the event feed after it has been saved and to prioritize the da check over the event feed, so I would suggest moving the event firing to the end of ReceiveBlob which ensures the timing is the same in both cases.

Copy link
Contributor

@kasey kasey Jan 3, 2024

Choose a reason for hiding this comment

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

should I create a new notifier for blobs or use the block notifier instead

I need more context - why do you want to move it to a different notifier?

Copy link
Contributor

Choose a reason for hiding this comment

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

re moving the event firing to ReceiveBlob, heard from James that this requires more extensive plumbing to get the notifier into the blockchain package, so I will approve this as-is.

@james-prysm james-prysm changed the title adding missed rpc trigger for blob sidecar event Add rpc trigger for blob sidecar event Jan 3, 2024
@james-prysm james-prysm marked this pull request as ready for review January 3, 2024 21:51
@james-prysm james-prysm requested a review from a team as a code owner January 3, 2024 21:51
@james-prysm james-prysm added the Ready For Review A pull request ready for code review label Jan 3, 2024
rauljordan
rauljordan previously approved these changes Jan 3, 2024
terencechain
terencechain previously approved these changes Jan 3, 2024
@james-prysm james-prysm enabled auto-merge January 3, 2024 21:57
@james-prysm james-prysm disabled auto-merge January 3, 2024 21:58
@james-prysm james-prysm added this pull request to the merge queue Jan 4, 2024
Merged via the queue into develop with commit 7781eb6 Jan 4, 2024
17 checks passed
@james-prysm james-prysm deleted the rpc-blob-sidecar-event branch January 4, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Deneb PRs or issues for the Deneb upgrade Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants