feat(relay): Re-add {Deposit,Withdrawal,Consolidation}Request objects for relay submissions #1786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As reviewing the builder-specs (and unsuccessfully attempting to change them with ethereum/builder-specs#107) I determined that the
V4
relay submission actually needs to include the requests in their JSON "object" form rather than the encoded EIP-7865Vec<Bytes>
.Solution
So, this restores some of the structs removed in #1515 and adds a new
RequestsV4
struct torpc-types-beacon
.A couple things to note:
eip
structs I removed the "EL-specific" encoding helpers in favor of the CL flavors (e.g. integers are encoded usingDisplayFromStr
instead ofalloy_serde::quantity
. I think this makes sense since these structs are no longer used by the EL/engine API, but I could be convinced to either move these structs inrpc-types-beacon
or restore them with "EL-encoding" and add wrapper/custom serde functionality inrpc-types-beacon
.quantity
encoding onSignedBidSubmissionV4::target_blobs_per_block
withDisplayFromStr
as I'm pretty sure this should be "decimal" encoded.crates/rpc-types-beacon/src/examples/relay_builder_block_validation_request_v4.json
is a bit of frankenstein, it's a payload I captured from my locally runningrbuilder
inside ourbuilder-playground
withexecution_requests
andtarget_blobs_per_block
manually edited, but it's the best I could find at the moment.Note that after this PR is accepted, we'll also need to add functionality for converting
eip7865::Requests
torpc-types-beacon::requests::RequestsV4
, for use for example flashbots/rbuilder#267. So this PR is only the first step in fully closing #1763PR Checklist