Skip to content
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

chore: flatten eip-7685 requests into a single list #1383

Draft
wants to merge 1 commit into
base: onbjerg/flat-requests
Choose a base branch
from

Conversation

onbjerg
Copy link
Member

@onbjerg onbjerg commented Sep 26, 2024

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 ethereum/execution-apis#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

@onbjerg onbjerg force-pushed the onbjerg/engine-api-flatten-requests branch from 882bb2f to 60acd18 Compare September 26, 2024 13:16
@onbjerg onbjerg added the enhancement New feature or request label Sep 26, 2024
@onbjerg
Copy link
Member Author

onbjerg commented Sep 26, 2024

After some thinking we likely do not gain much by retaining the type here instead of using blobs, since validation is mostly a CL responsibility now, and system contracts adhering to EIP-7685 return the requests pre-serialized. For user-facing RPC it will matter more, but at that point in time it's ok to pay for the ser/de cost, while we'd likely want to avoid it during execution.

Restructuring the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant