Skip to content

Update ProposeBeaconBlock Prysm RPC for Deneb (Non builder)#12495

Merged
terencechain merged 2 commits intodeneb-integrationfrom
deneb-propose-block
Jun 7, 2023
Merged

Update ProposeBeaconBlock Prysm RPC for Deneb (Non builder)#12495
terencechain merged 2 commits intodeneb-integrationfrom
deneb-propose-block

Conversation

@terencechain
Copy link
Collaborator

Changes

  • ProposeBeaconBlock absorbs proposeGenericBeaconBlock. proposeGenericBeaconBlock is becoming harder to maintain.
  • Broadcast and save blobs if block version is greater than Deneb

@terencechain terencechain requested a review from a team as a code owner June 5, 2023 22:46
@terencechain terencechain self-assigned this Jun 5, 2023
@terencechain terencechain requested review from james-prysm, prestonvanloon and saolyn and removed request for a team June 5, 2023 22:46
return nil, fmt.Errorf("could not broadcast block: %v", err)
}

root, err := blk.Block().HashTreeRoot()
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this check after the broadcast?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not really a check, it calculates the root for logging, and we can remove the log. But it's also later used in ReceiveBlock anyway. Moving it after the broadcast to reduce latency before the gossip

scs := make([]*ethpb.BlobSidecar, len(b.Deneb.Blobs))
for i, blob := range b.Deneb.Blobs {
if err := vs.P2P.BroadcastBlob(ctx, blob.Message.Index, blob); err != nil {
log.WithError(err).Error("Could not broadcast blob")
Copy link
Contributor

Choose a reason for hiding this comment

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

can we log at which blob this message failed ? among the total blobs broadcasted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if !ok {
return nil, status.Error(codes.Internal, "Could not cast block to Deneb")
}
scs := make([]*ethpb.BlobSidecar, len(b.Deneb.Blobs))
Copy link
Contributor

Choose a reason for hiding this comment

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

does this need a validation check on len for blobs, or does receiving handle that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that's a good check to have, I'll add it in

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

}).Debug("Broadcasting block")

if blk.Version() >= version.Deneb {
b, ok := req.GetBlock().(*ethpb.GenericSignedBeaconBlock_Deneb)
Copy link
Contributor

Choose a reason for hiding this comment

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

This could still be blinded right? , it was unblinded above but the request block would still be possibly blinded. that being said if it was blinded the blobs would also need to be unblinded below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, I'm not handling the blinded logic in this PR. I'll clarify this in the title

@terencechain terencechain changed the title Update ProposeBeaconBlock Prysm RPC for Deneb Update ProposeBeaconBlock Prysm RPC for Deneb (Non builder) Jun 6, 2023
@terencechain terencechain merged commit ccf3258 into deneb-integration Jun 7, 2023
@terencechain terencechain deleted the deneb-propose-block branch June 7, 2023 14:08
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.

2 participants