Skip to content
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: selfdestruct opcode behaviour change in eip-7702 #8832

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sudeepdino008
Copy link
Contributor

corresponds to this discord comment

@sudeepdino008 sudeepdino008 requested a review from eth-bot as a code owner August 28, 2024 06:18
@github-actions github-actions bot added c-update Modifies an existing proposal s-review This EIP is in Review t-core labels Aug 28, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Aug 28, 2024

File EIPS/eip-7702.md

Requires 1 more reviewers from @adietrichs, @lightclient, @SamWilsn, @vbuterin

@eth-bot eth-bot added the a-review Waiting on author to review label Aug 28, 2024
@eth-bot eth-bot changed the title selfdestruct opcode behaviour change in eip-7702 Update EIP-7702: selfdestruct opcode behaviour change in eip-7702 Aug 28, 2024
EIPS/eip-7702.md Outdated Show resolved Hide resolved
EIPS/eip-7702.md Outdated Show resolved Hide resolved
@lightclient
Copy link
Member

lightclient commented Aug 28, 2024

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.

@drortirosh
Copy link
Contributor

  1. 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.
  2. to prevent replay, it should NOT revert the nonce-bump

@lightclient
Copy link
Member

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.

@gumb0
Copy link
Member

gumb0 commented Sep 10, 2024

Suggestion for two cases that the tests should cover:

  1. 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.
  2. Delegation exists in prestate, regular transaction creates contract at delegate address, then calls the delegated account, the code executes SELFDESTRUCT.

@RyanDinh8
Copy link

RyanDinh8 commented Dec 10, 2024

corresponds to this discord comment

Hi @sudeepdino008
This is Ryan from SubWallet - a multichain wallet supporting EVM. We're building a POC for EIP-7702. It seems I'm not able to open the Discord link. Could you please share the link to the Discord channel again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-review Waiting on author to review c-update Modifies an existing proposal s-review This EIP is in Review t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants