Skip to content

Conversation

@lupin012
Copy link
Contributor

@lupin012 lupin012 commented Oct 31, 2025

Close #17703

After EIP-6780 (Dencun), when a contract calls SELFDESTRUCT in a different transaction than its creation, the contract should remain in state (code/storage persist, only balance transferred).
prestateTracer in diffMode should show the contract in both pre and post states or otherwise in neither of them.

The PR contains also codeHash on post (if necessary).

Add debug_traceTransaction tests on rpc-tests (sepolia/mainnet) to verify that SELFDESTRUCT address is present or not in pre/post state before/after Dencun (the expected responses have been verified also against Geth).

Extras
Unskip 3 eth_getProof tests that reappeared in the skip list after some merge

@lupin012 lupin012 changed the title rpcdaemon: add check on deleted EIP 6780 rpcdaemon: add check on SelfDestruct EIP 6780 Oct 31, 2025
@lupin012 lupin012 marked this pull request as ready for review November 4, 2025 17:18
@lupin012 lupin012 requested a review from canepat November 4, 2025 17:49
@yperbasis yperbasis merged commit a2c1833 into main Nov 6, 2025
26 of 30 checks passed
@yperbasis yperbasis deleted the lupin012/prestateFixPostCancun branch November 6, 2025 08:52
mh0lt pushed a commit that referenced this pull request Nov 9, 2025
Close #17703

After EIP-6780 (Dencun), when a contract calls SELFDESTRUCT in a
different transaction than its creation, the contract should remain in
state (code/storage persist, only balance transferred).
`prestateTracer` in `diffMode` should show the contract in both pre and
post states or otherwise in neither of them.

The PR contains also codeHash on post (if necessary).

Add `debug_traceTransaction` tests on `rpc-tests` (sepolia/mainnet) to
verify that SELFDESTRUCT address is present or not in pre/post state
before/after Dencun (the expected responses have been verified also
against Geth).

*Extras*
Unskip 3 `eth_getProof` tests that reappeared in the skip list after
some merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debug_traceTransaction with prestateTracer incorrectly handles EIP-6780 SELFDESTRUCT in diffMode

5 participants