Skip to content

feat(evm): EIP-4758 deactivate SELFDESTRUCT (SENDALL) - #12231

Draft
MarekM25 wants to merge 1 commit into
NethermindEth:masterfrom
MarekM25:feature/eip-4758
Draft

feat(evm): EIP-4758 deactivate SELFDESTRUCT (SENDALL)#12231
MarekM25 wants to merge 1 commit into
NethermindEth:masterfrom
MarekM25:feature/eip-4758

Conversation

@MarekM25

@MarekM25 MarekM25 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Changes

  • IsEip4758Enabled spec flag + eip4758TransitionTimestamp chainspec parameter (full plumbing)
  • InstructionSelfDestruct: when active, the executing account is never marked for destruction — including the created-in-same-transaction case that EIP-6780 still destroys — so the opcode degenerates to SENDALL
  • Self-inheriting SENDALL keeps the existing surviving-account no-op semantics (no burn, no transfer log)
  • SELFDESTRUCT refunds were already removed by EIP-3529, so no gas changes are needed

Spec: https://eips.ethereum.org/EIPS/eip-4758 (Hegotá / EIP-8081 candidate; Stagnant but listed as Proposed for Inclusion in EIP-8081). Not yet activated in any fork file — activation lands with the Hegotá fork wiring (#12226).

Part of the Hegotá (EIP-8081) PR series.

Types of changes

What types of changes does your code introduce?

  • New feature (a non-breaking change that adds functionality)

Testing

Requires testing

  • Yes

If yes, did you write tests?

  • Yes

Notes on testing

Eip4758Tests: same-transaction creation survives with code intact and full balance sent; later-transaction SENDALL; self-inheriting SENDALL does not burn. Existing Eip6780Tests and StorageAndSelfDestructTests pass unchanged (29 total).

Documentation

Requires documentation update

  • No

Requires explanation in Release Notes

  • No

🤖 Generated with Claude Code

When IsEip4758Enabled, SELFDESTRUCT never destroys the executing
account — not even when it was created in the same transaction, which
EIP-6780 still allowed — and only moves the whole balance to the
inheritor. Self-inheriting SENDALL is a no-op (no burn, no log),
matching the existing EIP-6780 surviving-account behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant