Modify EIP-3607 restrictions to account for EIP-7702 delegations#1727
Conversation
|
@sorpaas would be great to have your opinion on this! |
Can you explain more? Not sure if I follow what you mean. |
I've been adding more tests and debugging the issue. While yesterday I had the impression that the storage was not updating according to EIP-7702, I now think I've narrowed down the problem to a transaction failure. The new However, the corresponding integration test fails. This probably means that the failure happens during the construction of the new transaction. |
|
Apart from the fix in dc55a6b it turned out to be mostly faulty test code (which is good news, I'd say 🥳). The PR is now ready for review. Thank you! |
|
Found an issue with delegation to the zero address (cleanup). Working on it. AssertionError: expected '0xef010000000000000000000000000000000…' to equal '0x'
+ expected - actual
-0xef01000000000000000000000000000000000000000042
+0x |
… the account's code
Addressed in 664fe9f |
RomarQ
left a comment
There was a problem hiding this comment.
Added a remark, the suggestion will also require changes to evm crate, in the initialize_with_authorization_list function, where we call set_code.
Description
Account codes do not work as expected by EIP-7702. This PR addresses the following requirement:
Modify the restriction put in place by EIP-3607 to allow EOAs whose code is a valid delegation indicator, i.e. 0xef0100 || address, to originate transactions. Accounts with any other code values may not originate transactions.
Additionally, if a transaction’s destination has a delegation indicator, add the target of the delegation to accessed_addresses.
but more work is needed for the account codes to work properly. Maybe a missing link between
evmstate andAccountCodes<T>?Relevant PRs
StackStaterust-ethereum/evm#367