Skip to content

CANCUN: EIP-6780 SELFDESTRUCT only in same transaction#947

Open
pldespaigne wants to merge 4 commits intoethereum:cancunfrom
pldespaigne:cancun-eip-6780
Open

CANCUN: EIP-6780 SELFDESTRUCT only in same transaction#947
pldespaigne wants to merge 4 commits intoethereum:cancunfrom
pldespaigne:cancun-eip-6780

Conversation

@pldespaigne
Copy link
Contributor

@pldespaigne pldespaigne commented Dec 18, 2025

This PR depends on #946, please review it before this one.

EIP-6780 SELFDESTRUCT only in same transaction

This is the 5th PR aiming to bring the Yellow Paper up to date with Cancun update

This 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 0 1 2

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 3

Update the behavior of the SELFDESTRUCT opcode

We 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 4

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 5

@pldespaigne pldespaigne changed the base branch from master to cancun December 18, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant