-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add EIP: General purpose execution layer requests #8432
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,76 @@ | ||||||
--- | ||||||
eip: 7685 | ||||||
title: General purpose execution layer requests | ||||||
description: A general purpose bus for sharing EL triggered requests with the CL | ||||||
author: lightclient (@lightclient) | ||||||
discussions-to: https://ethereum-magicians.org/t/eip-7685-general-purpose-execution-layer-requests/19668 | ||||||
status: Draft | ||||||
type: Standards Track | ||||||
category: Core | ||||||
created: 2024-04-14 | ||||||
--- | ||||||
|
||||||
## Abstract | ||||||
|
||||||
This proposal defines a general purpose framework for propagating contract-triggered requests from execution layer to the consensus layer. It extends the header and body with only a single field each to store the request information. | ||||||
|
||||||
## Motivation | ||||||
|
||||||
The proliferation of smart contract controlled validators has caused there to be a demand for additional EL triggered behaviors. By allowing these systems to delegate administrative operations to their governing smart contracts, they can avoid intermediaries needing to step in and ensure certain operations occur. This creates a safer system for end users. | ||||||
|
||||||
## Specification | ||||||
|
||||||
### Execution Layer | ||||||
|
||||||
#### Request | ||||||
|
||||||
A `Request` consists of a `RequestType` prepended to an opaque byte array `RequestData`. | ||||||
|
||||||
``` | ||||||
Request = RequestType ++ RequestData | ||||||
``` | ||||||
|
||||||
Let `Requests` be the list of all `Request` objects in the block in ascending order by type. | ||||||
|
||||||
#### Header | ||||||
|
||||||
Extend the header with a new 32 byte value `RequestsRoot`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be expanded to provide the complete structure of the RLP encoding of the header, along the lines of 4788 On a related note, given we're adding this new field, does this imply that 4844 and 4788 are required EIPs for this in the sense that they have both added new header fields that are prior to |
||||||
|
||||||
Let `RequestsRoot` be the root of a Merkle-Patricia trie keyed by the index in the list of `Requests`. This is equivalent to how the transaction trie root is computed. | ||||||
|
||||||
### Consensus Layer | ||||||
|
||||||
Each proposal may choose how to extend `ExecutionPayload` to include the new EL request. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why wouldn't CL format just mirror the EL format? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really have a preference, it just seems more flexible for the CL to decide how to store the data instead of being forced to put all requests in a requests union type |
||||||
|
||||||
A additional processing step is be added to `process_execution_payload` to iterate over and process all requests. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some things we will want to process before iirc none of the current 'requests' are actually addressed inside given the validity semantics of the spec, this isn't really material to the structure introduced by this EIP There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay i will remove this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
|
||||||
## Rationale | ||||||
|
||||||
### Opaque byte array rather than an RLP array | ||||||
|
||||||
By having the second byte on be opaque bytes, rather than an RLP (or other encoding) list, we can support different encoding formats for the transaction payload in the future such as SSZ, LEB128, or a fixed width format. | ||||||
|
||||||
### Request source and validity | ||||||
|
||||||
This EIP makes no strict requirement where a request may come from nor when/how a request must be validated. This is to provide future protocol designers maximum flexibility. | ||||||
|
||||||
The authors' recommendations on source and validity of requests are: | ||||||
|
||||||
* The source of requests should be from the execution of transactions. More specifically, transactions which make calls to designated system contracts that store the request in account. The storage would later be retrieved by a post-block system call to the contract. Alternatively, if the system call does not need to be inherently concerned with rate limiting, it could rely simply on emitting an event which is later parsed post-block by the system and converted into a request. | ||||||
* A request's validity can often not be fully verified at the execution layer. This is why they are referred to merely as "requests"; they do not carry the authority on their own unilaterally catalyze and action. We expect the system contracts to perform whatever validation is possible by the EL and then pass it on to the CL for further validation. | ||||||
|
||||||
## Backwards Compatibility | ||||||
|
||||||
No backward compatibility issues found. | ||||||
|
||||||
## Test Cases | ||||||
|
||||||
TODO | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you use HTML-style comments, the linter will make sure you replace them before going to review.
Suggested change
|
||||||
|
||||||
## Security Considerations | ||||||
|
||||||
Needs discussion. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## Copyright | ||||||
|
||||||
Copyright and related rights waived via [CC0](../LICENSE.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ascending meaning by execution order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's ascending order by type. intra type ordering is not defined in this eip