Repository navigation
Conversation
Adds `BuilderDepositRequest` and `BuilderExitRequest` to the `eip8282` module alongside the contract constants from alloy-rs#4146, with the `0x03`/`0x04` EIP-7685 request type bytes and the per-block limits.
`ExecutionRequestsV5` extends V4 with `builder_deposits` and `builder_exits`, and the `TryFrom<Requests>` / `to_requests()` conversions handle the two new type bytes. `SignedBidSubmissionV6` carries V5, so the Amsterdam submission can represent builder registry operations.
|
|
||
| match *request_type { | ||
| BUILDER_DEPOSIT_REQUEST_TYPE => { | ||
| builder_deposits = parse_request_payload( |
There was a problem hiding this comment.
Low: Duplicate request types overwrite committed data
An attacker supplying untrusted Requests can include multiple type-0x03 or type-0x04 entries; each entry remains part of the EIP-7685 commitment, but this assignment silently discards every payload except the last. Reject duplicate type bytes before decoding so the returned ExecutionRequestsV5 cannot represent different data from the committed request list; the same uniqueness check should cover the request types delegated to ExecutionRequestsV4.
There was a problem hiding this comment.
Looks like a false positive to me:
- Last-wins on duplicate type bytes is the existing
ExecutionRequestsV4behaviour, which this PR follows. Requestsdocuments it as expected: https://github.com/alloy-rs/alloy/blob/91289f9e/crates/eips/src/eip7685.rs#L19-L20
There was a problem hiding this comment.
Thanks for the detail. I can't automatically confirm this is safe to dismiss, so I'm leaving the thread open for a maintainer to make the call.
PR overviewThis PR adds EIP-8282 builder execution request support to the beacon RPC types, including decoding request lists into the new execution request structures. One security issue remains open, and none have yet been addressed. Duplicate request types can cause decoded execution requests to differ from the data covered by the EIP-7685 commitment, allowing attacker-controlled input to create an integrity mismatch with a limited blast radius. Open issues (1)
Fixed/addressed: 0 · PR risk: 5/10 |
… vendor Matches the convention already used on ultra-sound-validation-v2, where our extended V3/V4/V5 request types shadow the alloy names and wrap SignedBidSubmissionVx directly rather than flattening alloy's wrapper. Also repoints the alloy patch at 0ca1a68c, which carries the restructured ExecutionRequestsV5 conversion now open upstream as alloy-rs/alloy#4215.
… vendor Matches the convention already used on ultra-sound-validation-v2, where our extended V3/V4/V5 request types shadow the alloy names and wrap SignedBidSubmissionVx directly rather than flattening alloy's wrapper. Also repoints the alloy patch at 0ca1a68c, which carries the restructured ExecutionRequestsV5 conversion now open upstream as alloy-rs/alloy#4215.
The limit in `RequestPayloadSizeExceeded` is per request type, and with `ExecutionRequestsV5` it can now be an EIP-8282 builder limit, so naming Electra in the message is misleading. Same for the two sibling docs, which the V5 conversion also reaches.
99b5b0a to
8d1b1f4
Compare
Upstream's V6 body is the Amsterdam submission everywhere except its execution requests, which were left at ExecutionRequestsV4 (Electra types only) -- so a gloas submission whose block carries builder registry ops (EIP-8282 deposits 0x03 / exits 0x04) could not be expressed, and the submitted requests would mismatch requests_hash and fail validation. Pulls ExecutionRequestsV5 in via [patch.crates-io] onto the ultrasoundmoney alloy fork at 0ca1a68c, which widens SignedBidSubmissionV6.execution_requests to carry the builder deposit and exit lists. Electra-shaped bodies still decode, with the builder lists defaulting to empty. The restructured ExecutionRequestsV5 conversion the pin carries is open upstream as alloy-rs/alloy#4215.
Upstream's V6 body is the Amsterdam submission everywhere except its execution requests, which were left at ExecutionRequestsV4 (Electra types only) -- so a gloas submission whose block carries builder registry ops (EIP-8282 deposits 0x03 / exits 0x04) could not be expressed, and the submitted requests would mismatch requests_hash and fail validation. Pulls ExecutionRequestsV5 in via [patch.crates-io] onto the ultrasoundmoney alloy fork at 0ca1a68c, which widens SignedBidSubmissionV6.execution_requests to carry the builder deposit and exit lists. Electra-shaped bodies still decode, with the builder lists defaulting to empty. The restructured ExecutionRequestsV5 conversion the pin carries is open upstream as alloy-rs/alloy#4215.
…mmit The EIP-8282 builder request types landed upstream in alloy-rs/alloy#4215, so the fork branch no longer needs to carry them. It is now alloy main plus the single commit that registry-resolves alloy's internal path deps, which the patch still needs to avoid pulling the whole alloy tree in beside the registry copies. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01UnaXsaGDBEacK8UsdZE3Fr
Amsterdam adds builder deposit and exit requests (EIP-8282), but
SignedBidSubmissionV6.execution_requestsisExecutionRequestsV4, which holds only the three Electra lists and cannot represent the0x03/0x04types.This breaks reth today.
ExecutionRequestsV4's hand-writtenDeserializereads through a helper struct that is notdeny_unknown_fields(the attribute on the struct is inert — onlySerializeis derived), so the builder entries are dropped silently at parse time rather than rejected.validate_builder_submission_v6then computes arequests_hashwithout them, and a truthful gloas block carrying builder requests fails withblock hash mismatch: want …, got …, naming neither the dropped requests nor EIP-8282. Reproduced on upstream reth against stock alloy with glamsterdam-devnet-8 block 210258, whose on-chainrequestsHashis0x1c85a255…: the V6 path yieldssha256("")instead.eip8282:BuilderDepositRequest/BuilderExitRequest, request-type bytes0x03/0x04, per-block limits — alongside the contract constants from feat(eips): add EIP-8282 builder system contract variants #4146ExecutionRequestsV5: V4 plusbuilder_deposits/builder_exits;TryFrom<Requests>takes the two new type bytes and defers the rest to V4SignedBidSubmissionV6carries V5 — widened in place, since V6 is already the Amsterdam submissionBreaking for
SignedBidSubmissionV6in both its Rust type and its SSZ layout (two extra list fields). JSON is unaffected.The last commit is separable:
RequestPayloadSizeExceededand two sibling docs name Electra, which is misleading once the limit can be an EIP-8282 one.Fixes #4205