Skip to content

Add EIP: Fixed-Cutoff State Tiering#11790

Open
weiihann wants to merge 9 commits into
ethereum:masterfrom
weiihann:eip-state-inactivity-cutoff
Open

Add EIP: Fixed-Cutoff State Tiering#11790
weiihann wants to merge 9 commits into
ethereum:masterfrom
weiihann:eip-state-inactivity-cutoff

Conversation

@weiihann

@weiihann weiihann commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Need to merge #11784 first

@github-actions github-actions Bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Jun 10, 2026
@eth-bot

eth-bot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

File EIPS/eip-8296.md

Requires 1 more review from Editors: @g11tech, @jochem-brouwer, @lightclient, @samwilsn

@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Jun 10, 2026
@github-actions github-actions Bot added the w-ci Waiting on CI to pass label Jun 10, 2026
weiihann added 4 commits June 11, 2026 00:41
Single governance-chosen cutoff block splits state into Active and
Inactive via EIP-8188's last_written_block. Writes to Inactive state pay
a surcharge. Inactive state stays in the state root, so there is no
eviction, witness, or resurrection. Recommends that clients converge on
a shared file format for the inactive set so it can be held outside the
hot database and distributed out-of-band, following the E2Store era-file
precedent.
Make the inactive write cost an additive surcharge on top of normal gas
and rename the constants to INACTIVE_ACCOUNT_WRITE_SURCHARGE and
INACTIVE_STORAGE_WRITE_SURCHARGE. Specify the surcharge gas semantics
(non-refundable, consumed on revert, with the EIP-8188 field update
reverting alongside state). Add a charge-before-load gas-availability
rule so inactive-tier loads cannot be forced uncompensated, calibrate
the surcharge against EIP-8037 creation cost, and add the monotonic
hot-set growth weakness to Security Considerations.
@weiihann weiihann force-pushed the eip-state-inactivity-cutoff branch from 6c8feb0 to cf5abc2 Compare June 10, 2026 16:41
@weiihann weiihann marked this pull request as ready for review June 10, 2026 16:43
@weiihann weiihann requested a review from eth-bot as a code owner June 10, 2026 16:43
@github-actions github-actions Bot removed the w-ci Waiting on CI to pass label Jun 10, 2026
@github-actions

Copy link
Copy Markdown

The commit 717a336 (as a parent of 473103b) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions Bot added the w-ci Waiting on CI to pass label Jun 10, 2026
Comment thread EIPS/eip-9998.md Outdated
Comment thread EIPS/eip-9998.md Outdated
@github-actions github-actions Bot removed the w-ci Waiting on CI to pass label Jun 11, 2026

@CPerezz CPerezz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per EIP-8188, several operations bump more than one leaf, but EIP-8296's cost table has one row per leaf type and says the operation is charged its normal gas plus the corresponding inactive surcharge (singular).

Three concrete cases are undefined:

  1. SSTORE to a dormant contract. 8188: an SSTORE bumps the slot's last_written_block and the account's (storageRoot recomputed). If both slot and account are Inactive, does the caller pay INACTIVE_STORAGE_WRITE_SURCHARGE only, or storage + INACTIVE_ACCOUNT_WRITE_SURCHARGE?
  2. Value transfer between two dormant accounts. 8188: a balance transfer sets last_written_block for both sender and receiver. If both are Inactive, is that one account surcharge or two?
  3. Direct collision with State Creation Is Not Tiered.
    Creating a new slot (SSTORE 0→x) in a dormant contract is exempt from the surcharge (it's creation, priced by 8037) — but it cascades an account storageRoot mutation, and that account already exists and is Inactive. By the literal rule "tier is evaluated for mutations of state that already exists in the trie," the cascaded account bump would be surcharged.

So "creation is not tiered" and "Inactive account mutation is surcharged" contradict each other for this very common case.

Extra stuff worth signaling:

  1. Another topic is how intrinsic gas should be affected based on this PR.
  2. EIP-8037 (same family, explicitly referenced here) splits gas into regular-gas and state-gas, with different block-accounting and a different relationship to EIP-7825's TX_MAX_GAS_LIMIT. EIP-8296 says the surcharge is "consumed like ordinary execution gas," "not refundable," "consumed even on revert" — which reads as regular-gas / single-dimension. But it never reconciles with 8037's two dimensions. Since reviving cold state is I/O work (not state growth), regular-gas is the likely intent — but with 8037 active, this must be explicit, or block-level accounting is undefined.
  3. From 8188, legacy (pre-fork, never-rewritten) accounts/slots decode with last_written_block = 0, which is < CUTOFF_BLOCK for any valid cutoff ⇒ Inactive. That's exactly the intent, but 8296 never says it. Also, the inverse edge: state created in [8188_activation, CUTOFF) is Inactive, so its second write pays the surcharge even though it was created recently. Both are consequences worth one explicit sentence each so implementers and users aren't surprised.

weiihann added 2 commits June 11, 2026 22:13
Replace the per-operation surcharge table with a per-Inactive-leaf rule
layered on EIP-8037/EIP-8038: charge the surcharge for each existing
Inactive leaf an operation writes, including the storageRoot cascade and
both sides of a value transfer, while newly-created leaves stay exempt
(priced by EIP-8037). Make the surcharge regular-gas, subject to the
EIP-7825 cap and consumed on revert, add an enumerated per-operation
table, and note the legacy and recently-created classifications.
requires now 2929, 8037, 8038, 8188.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants