-
Notifications
You must be signed in to change notification settings - Fork 62
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
Update getHeader and submitBlindedBlock to support blobs (EIP-4844) #61
Conversation
@ralexstokes @0xGabi would you mind reviewing this please? I've addressed all comments from the previous PR. This PR includes changes for EIP-4844 only. |
apis/builder/blinded_blocks.yaml
Outdated
capella: | ||
$ref: "../../builder-oapi.yaml#/components/examples/Capella.ExecutionPayload" | ||
eip4844: | ||
$ref: "../../builder-oapi.yaml#/components/examples/EIP4844.ExecutionPayloadAndBlobsSidecar" |
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.
@jimmygchen: Can we shift this to a new version: submitBlindedBlockV2
, it would help so much with the code flow and the type handling and hence cleaner code as this literally changes the structure of the underlying response
(I know there was a submitBlindedBlockV2 in the parent PR of this PR which returned full signedbeaconblock and was cleared out)
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.
@g11tech there's been a bit of back and forth on this one in the previous PR and discord as well - originally I had similar thoughts about adding a new version, but I also agree that it's not necessary to add a new version to support new types if the fork information is provided in the request.
Perhaps we could include the "consensus version" in the request headers (similar to the Beacon APIs), so it would be easier for the builder to support this? There's a PR in mev-boost
to fallback to Bellatrix if it's not able to decode the payload, but I think this will get more complicated once the 4844 fork / payload is introduced.
To your point on code flow on the consensus side, I've tried implementing both in Lighthouse and haven't experienced too many issues with this (yet), but I don't have a strong opinion either way. The builder would need to know what version the payload is regardless of whether we do V1 or V2.
I think I'd go with the conventions (using version version without adding new api version) unless there's any strong reasons for adding v2? perhaps @ralexstokes can share some thoughts on this?
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.
as @ralexstokes pointed out, beacon apis insist on api version bump on format changes, i recon the response format has changed from direct execution payload to {execution_payload,...} object.
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.
@g11tech not needing a new API versions for these changes was already discussed previously, i would keep it as is for now, and if you feel strongly, please initiate a new discussion about this in an issue.
I've replaced all EIP-4844 references with Deneb. |
Waiting for the ethereum/beacon-APIs#289 to be merged to pass the build |
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.
As it stands today, blobs will be decoupled which changes how validator interacts with relayers (https://hackmd.io/cmYisgxkRuGe9NjX4gr97A) I'd recommend wait on it for a little bit until the spec matures
There is currently a discussion in the below PR regarding blob signing and publishing, and could have an impact on the builder API, I'll come back to this PR once we get more input on the decisison: |
@metachris @terencechain @g11tech @ralexstokes Thanks! |
sync_aggregate: SyncAggregate | ||
execution_payload_header: ExecutionPayloadHeader # [Modified in Deneb] | ||
bls_to_execution_changes: List[SignedBLSToExecutionChange, MAX_BLS_TO_EXECUTION_CHANGES] | ||
blob_kzg_commitments: List[KZGCommitment, MAX_BLOBS_PER_BLOCK] # [New in Deneb] |
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.
May have to update MAX_BLOBS_PER_BLOCK
to MAX_BLOB_COMMITMENTS_PER_BLOCK
.
https://github.com/ethereum/consensus-specs/pull/3338/files
Thanks for your efforts @jimmygchen, much appreciated 🙏 We've discussed this PR with the mev-boost maintainers group, and believe a single
Also it may be a preferable approach to not return the payload to the proposer, but have it be the relay responsibility to broadcast the block. Returning the payload is currently delayed by relays, and is problematic due to equivocation attacks, and there has been some discussion recently by core devs about it perhaps being safer to not return the payload on this API. |
@metachris the PR is updated to send a single
Thanks for sharing this - I'll keep an eye on the development! |
@@ -0,0 +1,41 @@ | |||
{ | |||
"value": { |
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.
We don't actually have this top level value
field right?
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.
+1
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.
Oh I think this is the format openapi lint
expects when validating the example files - we have them in all other example jsons, and is required for lint to work.
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.
looks amazing overall 👍 , few suggestions
Co-authored-by: g11tech <[email protected]>
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.
excellent work and I think this reflects the latest direction around 4844 well
I'd say we move ahead with merging this so we can start prototyping at various places in the mev-boost ecosystem/stack
Thanks @ralexstokes ! I've updated the There's a pending CL spec PR to update |
Builder spec changes for EIP-4844, separated from PR #58.
Description
getHeader
changesExecutionPayload
&BeaconBlockBody
types to align with EIP-4844 specs. (Depends on types from this Beacon API PR: Update types to support EIP-4844 beacon-APIs#271)blinded_blobs
togetHeader
response (SignedBuilderBid
), so that validators can create signatures over the blinded block and blinded blobs.submitBlindedBlock
changesSignedBlindedBlockContents
after Deneb.ExecutionPayloadAndBlobsBundle
.blobs_bundle
instead ofblob_sidecars
, as I think it's more consistent with what we get from the EL, and BN should have enough to build the blob sidecars.I'm currently pointing the
beacon-APIs
submodule to this PR, as it contains the newSignedBlindedBlockContents
type: ethereum/beacon-APIs#302Moved design diagrams to this HackMD page as it was getting outdated here.