feat(deneb): proposer rpc to handle builder flow#12554
feat(deneb): proposer rpc to handle builder flow#12554terencechain merged 6 commits intodeneb-integrationfrom
Conversation
a37b3e8 to
d5dfbc6
Compare
| } | ||
| if len(b.Deneb.Blobs) > fieldparams.MaxBlobsPerBlock { | ||
| return nil, status.Errorf(codes.InvalidArgument, "Too many blobs in block: %d", len(b.Deneb.Blobs)) | ||
| if wasBlinded { |
There was a problem hiding this comment.
I feel like there is a code smell around this, a lot of different arrays used, can't put my finger on how to clean it up just yet but some parts can be broken into its own function or cleaned up some way just for readability.
47a1b2c to
d1284cc
Compare
0bd8d4d to
db935ce
Compare
| for i, blob := range b.Deneb.Blobs { | ||
| if err := vs.P2P.BroadcastBlob(ctx, blob.Message.Index, blob); err != nil { | ||
| log.WithError(err).Errorf("Could not broadcast blob index %d / %d", i, len(b.Deneb.Blobs)) | ||
| sidecar := make([]*ethpb.BlobSidecar, len(scs)) |
There was a problem hiding this comment.
sidecar -> sidecars?
or maybe savableSidecars?
| blk, err = unblinder.unblindBuilderBlock(ctx) | ||
| blind := unblinder.b.IsBlinded() // | ||
|
|
||
| blk, sidecars, err := unblinder.unblindBuilderBlock(ctx) |
There was a problem hiding this comment.
sidecars -> signedSidecars?
or hmm unblindedSignedSidecars?
a bit verbose but I think it can get rid of some of the comments and the blind check below.
There was a problem hiding this comment.
f5f9478, went with unblindedSidecars. Didn't think signed convey anything extra here
james-prysm
left a comment
There was a problem hiding this comment.
I think the logic makes sense, there's probably more improvements on readability and the creation of all those slices to do similar things has some kind of code smell to me, but I don't have great suggestions on improvement right now, I do think that maybe blinded variable can be removed in favor of checking if unblindedsidecars is not nil but that's not too much of an improvement.
This PR updates the proposer RPC to handle builder flow for Deneb.
GetBeaconBlockhighlights:getBuilderPayloadreturnsblindBlobsBundleto align symmetric withgetLocalPayloadsetKzgCommitmentstakes inblindBlobsBundlealongsideblobsBundleand choose accordinglyblindBlobsBundleToSidecarsto convert blind bundles to blind sidecarsGenericBeaconBlock_BlindedDenebgets returned to the validator client is the block is blindProposeBeaconBlockhighlights:newUnblindertakes in blinded blobs to callSubmitBlindBlockunblindBlobsSidecarsto convert blind sidecars and full bundle to unblinded sidecarsunblindBuilderBlockreturns unblinded sidecars