Skip to content

feat(relay): Re-add {Deposit,Withdrawal,Consolidation}Request objects for relay submissions#1786

Closed
ryanschneider wants to merge 4 commits intoalloy-rs:mainfrom
ryanschneider:feature/re-add-CL-requests
Closed

feat(relay): Re-add {Deposit,Withdrawal,Consolidation}Request objects for relay submissions#1786
ryanschneider wants to merge 4 commits intoalloy-rs:mainfrom
ryanschneider:feature/re-add-CL-requests

Conversation

@ryanschneider
Copy link
Copy Markdown
Contributor

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-7865 Vec<Bytes>.

Solution

So, this restores some of the structs removed in #1515 and adds a new RequestsV4 struct to rpc-types-beacon.

A couple things to note:

  • In restoring the eip structs I removed the "EL-specific" encoding helpers in favor of the CL flavors (e.g. integers are encoded using DisplayFromStr instead of alloy_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 in rpc-types-beacon or restore them with "EL-encoding" and add wrapper/custom serde functionality in rpc-types-beacon.
  • I also replaced the quantity encoding on SignedBidSubmissionV4::target_blobs_per_block with DisplayFromStr as I'm pretty sure this should be "decimal" encoded.
  • The example JSON in 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 running rbuilder inside our builder-playground with execution_requests and target_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 to rpc-types-beacon::requests::RequestsV4, for use for example flashbots/rbuilder#267. So this PR is only the first step in fully closing #1763

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@ryanschneider ryanschneider force-pushed the feature/re-add-CL-requests branch from b86e9c4 to 3cddce6 Compare December 11, 2024 22:32
@ryanschneider ryanschneider marked this pull request as ready for review December 11, 2024 22:33
@ryanschneider ryanschneider force-pushed the feature/re-add-CL-requests branch from 3cddce6 to 6dd0983 Compare December 11, 2024 23:39
@ryanschneider ryanschneider force-pushed the feature/re-add-CL-requests branch from 6dd0983 to 656a5b2 Compare December 11, 2024 23:40
@ryanschneider
Copy link
Copy Markdown
Contributor Author

Closing in favor of #1787 which is a cleaned up version of this that also includes the necessary conversions.

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.

1 participant