---
eip: 8295
label: EIP-8295
title: State Tiering by Periods
status: Draft
type: Standards Track
category: Core
created: 2026-06-10
requires: 2929, 2930, 7702, 7825, 8037, 8038, 8188
official: https://eips.ethereum.org/EIPS/eip-8295
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8295.md
canonical: https://eips.huatuo.xyz/eip-8295/
lang: en
tldr: "Charges extra gas to write state that has not been written for a long time, using EIP-8188's last-written block, so long-untouched state carries an ongoing cost without any deletion."
tags: [gas, state, state-expiry, repricing, core]
---

# EIP-8295: State Tiering by Periods

> Tiered gas pricing for state writes based on renewal age, charging more for write-inactive state.

**TL;DR:** Charges extra gas to write state that has not been written for a long time, using EIP-8188's last-written block, so long-untouched state carries an ongoing cost without any deletion.

## What problem does it solve?

Today every write to existing state costs the same, whether the slot was last changed a minute ago or five years ago. In practice they are not the same for a node: recently written state tends to live in the fast "working set", while long-untouched state sits on slower database paths with deeper lookups and more write overhead. A flat price overcharges the active set and undercharges reviving old state.

There is also a fairness issue. Once state is created it lives forever, and node operators pay to store and index it with no ongoing contribution from whoever created it. Clients could track write age locally, but a local heuristic cannot be priced: an attacker could deliberately touch lots of old state to make every node do expensive work.

[EIP-8188](/eip-8188/) adds consensus metadata, `last_written_block`, recording when each account and storage slot was last written. EIP-8295 turns that metadata into a price.

## How it works

- **Periods.** Block numbers are bucketed into coarse periods of `PERIOD_LENGTH` blocks, counted from the fork block. The target duration mentioned in the rationale is about six months; the exact constants are still TBD.
- **Two tiers.** If `current_period - last_written_period < INACTIVE_MIN_AGE`, an item is **Active**; otherwise it is **Inactive**.
- **Surcharge, not replacement.** Writing an existing Inactive account adds `INACTIVE_ACCOUNT_WRITE_SURCHARGE`; changing an existing Inactive storage slot adds `INACTIVE_STORAGE_WRITE_SURCHARGE`. Normal gas from [EIP-8038](/eip-8038/) and [EIP-8037](/eip-8037/) still applies. Active writes are not repriced, and **reads are unchanged**.
- **What gets hit.** `SSTORE` to an existing slot (the slot plus its account, since `storageRoot` changes), value transfers (sender and receiver), nonce bumps, the creator of `CREATE`/`CREATE2`, and the authority in an [EIP-7702](/eip-7702/) authorization.
- **Creation is exempt.** New accounts, new slots and deployed code are never surcharged; their price comes from EIP-8037. Writing a new slot into a dormant contract still pays the account surcharge.
- **Once per block.** The tier is checked before the write; the write then refreshes `last_written_block`, so the item becomes Active.
- The surcharge is ordinary regular gas: non-refundable, still consumed if the frame reverts (and the item stays Inactive), and counted against the [EIP-7825](/eip-7825/) per-transaction cap.

Renewal tiers are separate from [EIP-2929](/eip-2929/) warm/cold. Pre-warming a slot through an access list does not avoid the write surcharge.

## Sample code

Tier logic from the spec (constants TBD):

```python
def period_of(block_number: int) -> int:
    return max(0, (block_number - PERIOD_START_BLOCK) // PERIOD_LENGTH)

def write_surcharge(kind: str, last_written_block: int, block_number: int) -> int:
    age = period_of(block_number) - period_of(last_written_block)
    if age < INACTIVE_MIN_AGE:
        return 0  # Active: no extra cost
    return (INACTIVE_ACCOUNT_WRITE_SURCHARGE if kind == "account"
            else INACTIVE_STORAGE_WRITE_SURCHARGE)

# SSTORE changing an existing slot of an Inactive contract:
# normal cost + storage surcharge (slot) + account surcharge (storageRoot cascade)
```

## Things to know

- **Status: Draft.** `PERIOD_LENGTH`, `INACTIVE_MIN_AGE` and both surcharge values are still TBD, and test cases are not written yet.
- It needs [EIP-8188](/eip-8188/) (Draft) and must activate at or after the same fork.
- `eth_estimateGas` implementations must look up each written item's `last_written_block` to estimate correctly. Contracts that rarely write storage may see higher one-off costs after long idle periods.
- Rewriting state just to keep it Active is intended to cost something; the surcharge size has to balance that against mass speculative refreshes.
- "Inactive" means not *written* recently. A slot read every block can still be Inactive, so clients should not treat the tier as a read-hotness signal.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8295
