Summary
Post-EIP-6780, SELFDESTRUCT to self when the contract was not created in the same transaction is a no-op — no destruction, no ETH movement. With EIP-7708 (transfer/burn logs) enabled, this no-op case should not emit any log since no value moves.
Coverage gap
There doesn't appear to be a spec test covering this scenario. We discovered this while working on Nethermind's Amsterdam (EIP-8037) support — we accidentally moved the EIP-7708 log emission from before to after the SELFDESTRUCT no-op guard, and no EEST test failed. Only a local unit test caught the regression.
Suggested test
- Deploy a contract with non-zero balance in block N
- In block N+1, call the contract which executes
SELFDESTRUCT(self)
- Post-EIP-6780:
selfdestruct_only_on_same_transaction = True, contract not created in same tx → no-op
- Assert: no EIP-7708 log is emitted in the receipt (no self-destruct log, no transfer log)
- Assert: contract balance is unchanged
This should be tested for any fork where both EIP-6780 and EIP-7708 are active.
Context
Nethermind PR: NethermindEth/nethermind#10697
Summary
Post-EIP-6780,
SELFDESTRUCTto self when the contract was not created in the same transaction is a no-op — no destruction, no ETH movement. With EIP-7708 (transfer/burn logs) enabled, this no-op case should not emit any log since no value moves.Coverage gap
There doesn't appear to be a spec test covering this scenario. We discovered this while working on Nethermind's Amsterdam (EIP-8037) support — we accidentally moved the EIP-7708 log emission from before to after the SELFDESTRUCT no-op guard, and no EEST test failed. Only a local unit test caught the regression.
Suggested test
SELFDESTRUCT(self)selfdestruct_only_on_same_transaction = True, contract not created in same tx → no-opThis should be tested for any fork where both EIP-6780 and EIP-7708 are active.
Context
Nethermind PR: NethermindEth/nethermind#10697