alloy
alloy copied to clipboard
chore: flatten eip-7685 requests into a single list
Motivation
The three different request fields have been replaced by a single field.
Requests over engine API will now be in an opaquely encoded format as defined by EIP-7685, and they will be in a single list.
See https://github.com/ethereum/execution-apis/pull/577
Solution
Theoretically this allows us to not encode or decode requests on the EL, since system contracts are expected to output requests in a pre-serialized format, ready to be pushed over engine API. We can also compute the requests hash and compare it to the one in the payload (if it is an external block) without encoding or decoding.
However, we decided to retain type safety, so we do not gain from this, and we will still be encoding and decoding in the hot path. This also means we now depend on alloy-consensus
in alloy-rpc-types-beacon
.
Draft Status
This currently lacks
- doc updates
- serializing requests with
Eip7685Encodable
when serializing the requests as JSON for engine API
PR Checklist
- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes