-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Update EIP-7702: add several clarifications to align spec with tests #8906
Conversation
✅ All reviewers have approved. |
cdb63b6
to
f50bc21
Compare
|
||
For example, `EXTCODESIZE` would return the size of the code pointed to by `address` instead of `23` which would represent the delegation designation. `CALL` would similarly load the code from `address` and execute it in the context of `authority`. | ||
|
||
In case a delegation designator points to a precompile address, retrieved code is considered empty and `CALL`, `CALLCODE`, `STATICCALL`, `DELEGATECALL` instructions targeting this account will execute empty code, i.e. succeed with no execution given enough gas. |
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.
Personally would like to change this rule to the opposite, i.e. executing precompiles, but this is what tests currently expect.
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.
What would be the argument for doing this? IMO that conflates the trie structure and it's values with the convenience feature of the EVM of having "precompiles" at specific addresses.
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.
Argument would be being consistent in how if execution is targeting certain address, it behaves the same regardless if it was 7702-delegated.
I.e. currently there is a special case "If execution targets a precompile, don't execute it if target was delegated to".
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.
Hmm I just don't see 7702 operating at that level. To me it's more about reading the trie and setting certain values in the trie. It's then, separately, the job of the EVM to execute the code it's provided.
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.
I guess it depends on where the boundary between EVM and the rest of the client lies in the particular implementation. If EVM is in charge of resolving precompile addresses, it's natural to do the same resolution for 7702 case. If precompile resolution is outside of EVM and EVM gets only code, then it could be more natural to give it empty code in this case.
f50bc21
to
64e7da5
Compare
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.
thank you
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.
All Reviewers Have Approved; Performing Automatic Merge...
shoot now this has merge conflicts |
replaced with #8940 so i could resolve the merge conflicts. thanks for this |
Pull request was closed
cc @jochem-brouwer