EIPs
EIPs copied to clipboard
Update EIP-7702: selfdestruct opcode behaviour change in eip-7702
File EIPS/eip-7702.md
Requires 1 more reviewers from @adietrichs, @lightclient, @samwilsn, @vbuterin
This clarification makes sense and is in general how I anticipated the EIP to be implemented. Currently the EIP doesn't specify that the auth list accounts should be considered "created in this tx" as defined by EIP-6780:
A contract is considered created at the beginning of a create transaction or when a CREATE series operation begins execution (CREATE, CREATE2, and other operations that deploy contracts in the future). If a balance exists at the contract’s new address it is still considered to be a contract creation.
So given that definition, 7702 delegation designations are not "created" during the tx and therefore cannot be selfdestructed.
- SELFDESTRUCT indeed need to be specified explicitly for 7702 - namely, remove the delegate at the end of the transaction, so that the EOA is left as EOA for future transactions.
- to prevent replay, it should NOT revert the nonce-bump
I don't think SELFDESTRUCT should revert the deployment of a delegation designation. It isn't added to the list of "deployed contracts" during the tx for a reason.
Suggestion for two cases that the tests should cover:
- Set code transaction creates delegation (originally to empty account), same transaction creates contract at delegate address, then calls the delegated account, the code executes SELFDESTRUCT.
- Delegation exists in prestate, regular transaction creates contract at delegate address, then calls the delegated account, the code executes SELFDESTRUCT.
I've been out of loop on this for a while. I suppose we should merge this PR? There's been no change on this behavior.