CANCUN: EIP-6780 SELFDESTRUCT only in same transaction#947
Open
pldespaigne wants to merge 4 commits intoethereum:cancunfrom
Open
CANCUN: EIP-6780 SELFDESTRUCT only in same transaction#947pldespaigne wants to merge 4 commits intoethereum:cancunfrom
SELFDESTRUCT only in same transaction#947pldespaigne wants to merge 4 commits intoethereum:cancunfrom
Conversation
3530a78 to
e6bd00f
Compare
This was referenced Dec 18, 2025
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR depends on #946, please review it before this one.
EIP-6780
SELFDESTRUCTonly in same transactionThis PR translate EIP-6780 into the Yellow Paper.
Here is the PDF version of those changes: Paper.pdf
Introducing a new set to the accrued transaction sub-state
We start by adding the set of created contract$A_{\mathrm{c}}$ to the transaction accrued sub-state. This new set is empty at the beginning of the transaction. (section 6.1.)
Screenshot
Push new contract addresses to the new set
At the beginning of every contract creation, we push the new address the contract creation set (section 7.)
Screenshot
Update the behavior of the
SELFDESTRUCTopcodeWe mark the current account to be destructed only if it's a member of the contract creation set (i.e. it was created during this transaction) (Appendix I.2.)
Screenshot
We add the new edge case stating that ether is burn only when the contract target itself and is actually self-destructed, otherwise the contract keep its balance (its account remain unchanged) (Appendix I.2.)
Screenshot