Update EIP-7702: add several clarifications to align spec with tests#8906
Update EIP-7702: add several clarifications to align spec with tests#8906gumb0 wants to merge 5 commits intoethereum:masterfrom
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.
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.
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.
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.
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.
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
eth-bot
left a comment
There was a problem hiding this comment.
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