Add EIP: Fixed-Cutoff State Tiering#11790
Open
weiihann wants to merge 9 commits into
Open
Conversation
Collaborator
File
|
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.
6c8feb0 to
cf5abc2
Compare
|
The commit 717a336 (as a parent of 473103b) contains errors. |
abcoathup
reviewed
Jun 11, 2026
abcoathup
reviewed
Jun 11, 2026
CPerezz
reviewed
Jun 11, 2026
CPerezz
left a comment
Contributor
There was a problem hiding this comment.
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:
- SSTORE to a dormant contract. 8188: an
SSTOREbumps the slot's last_written_block and the account's (storageRoot recomputed). If both slot and account are Inactive, does the caller payINACTIVE_STORAGE_WRITE_SURCHARGEonly, or storage +INACTIVE_ACCOUNT_WRITE_SURCHARGE? - Value transfer between two dormant accounts. 8188: a balance transfer sets
last_written_blockfor both sender and receiver. If both are Inactive, is that one account surcharge or two? - 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 accountstorageRootmutation, 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:
- Another topic is how intrinsic gas should be affected based on this PR.
- 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.
- 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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Need to merge #11784 first