execution/state: simplify creation storage handling after EIP-8253

Open
#26,445 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@yperbasis is already working on this.

Since Nov 17, 2026.

Assessment

This issue has not been assessed yet.

Description

Hegota tech debt reduction

Follow-up to #26443, which implements EIP-8253 for Bogota devnet-2 and addresses #26280.

The pinned EIP-8253 specification restores the invariant that an account with zero nonce and empty code has empty storage. After activation on a correctly configured chain, a successful CREATE or CREATE2 therefore has no old storage to erase.

Potential follow-ups

  1. Separate creation bookkeeping from storage clearing. StateWriter.CreateContract currently represents both. It clears a storage prefix, but is also called when EIP-8246 SELFDESTRUCT leaves a balance-only account. That latter path still needs a real reset. Give callers a clear way to request the operation they need before making creation cheaper.
  2. Avoid redundant storage cleanup for post-Bogota creation. ApplyWrites reads the committed account and, if present, walks its storage prefix. Writer.CreateContract always clears that prefix. Investigate bypassing this work where EIP-8253 guarantees empty storage. Keep serial and parallel execution consistent, and make the decision at a boundary that already knows the fork rules where possible.
  3. Audit creation-specific state bookkeeping using the stronger invariant. Look for work whose only purpose is handling creation over old storage. Coordinate with #24906 on the net effect of creation followed by SELFDESTRUCT. EIP-8253 alone does not justify deleting incarnation tracking, rollback handling or creation markers used by speculative execution.

Constraints and evidence

  • Preserve historical execution before activation, including the existing create-over-storage tests. RPC state overrides and custom genesis allocations can also construct states outside the canonical invariant; define their handling before applying the optimization there.
  • Preserve actual storage resets for account deletion and SELFDESTRUCT, and creation at a pre-funded address. Audit all implementations and callers of the writer interface.
  • Keep the new-contract zero-storage read shortcut: it avoids database reads even when the underlying storage is guaranteed empty.
  • Measure account reads, prefix walks, allocations and execution time for CREATE/CREATE2 at fresh and pre-funded addresses. No performance benefit has been measured yet. Avoid spreading fork flags through generic storage interfaces unless the resulting design or measured savings justify it.
  • Verify fork-boundary behavior, rollback, destruction/recreation, state roots and BAL agreement across serial and parallel execution.

The transaction-trace simplification is already in place: TransactionTrace uses the first journaled slot value as the transaction prestate and explicitly relies on EIP-8253. There is no separate pre-creation storage lookup left to remove there.

Related: #15443 proposed removing the creation-time storage clear under a retroactive EIP-7610 rule. EIP-8253 instead establishes the invariant at its activation boundary, so the historical behavior must remain supported. Coordinate the overlapping work rather than implementing two independent cleanups.

Dominant language
Go
Stars
3.6k
Forks
1.6k
Avg merge
1d 17h
Merged PRs (30d)
820

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from erigontech/erigon

All issues in erigontech/erigon

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.