EIPs Explained

EIP-8374 · Draft · Core · 2026-08-06

EIP-8374: Persist Warm Access Sets Across Reverts

Proposes that addresses and storage slots stay warm for the rest of a transaction even if the call frame that touched them reverts, since the client has already loaded the data.

What problem does it solve?

EIP-2929 made the first access to an account or storage slot in a transaction "cold" and expensive, and later accesses "warm" and cheap. The point is to charge for the real cost of reading state from disk.

But EIP-2929 also rolls the warm sets back whenever a call frame reverts or runs out of gas. If a subcall reads slot s and reverts, the caller pays the cold price again when it reads s. In reality the client still has that data in its cache: a revert undoes state changes, it does not unload data. So the current rule overcharges, and it forces clients to journal the access sets alongside real state.

How it works

After the fork:

  • When a call frame ends in anything other than success (revert, exceptional halt, out of gas), accessed_addresses and accessed_storage_keys are not rolled back. Entries added by the frame and its subcalls stay for the rest of the transaction.
  • An entry is only added once its cold access charge has actually been paid. If the frame cannot afford the cold charge, nothing is added. Once paid, the entry stays even if a later check in the same operation fails.
  • Everything else from EIP-2929 is unchanged: the sets pre-filled at transaction start (sender, recipient, precompiles, access list) and addresses added by CREATE / CREATE2.
  • State changes made in a reverted frame are still reverted. Only warmth persists.

Access sets become append-only for the transaction, which simplifies client implementations.

Sample code

The spec's test cases, illustrated in Solidity:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Inner {
    function touchAndRevert(address a) external view {
        uint256 b = a.balance; // cold BALANCE: cold account access charge paid
        b;
        revert("undo");
    }
}

contract Outer {
    Inner immutable inner = new Inner();

    function run(address a) external view returns (uint256) {
        try inner.touchAndRevert(a) {} catch {}
        // Before this EIP: `a` was rolled back to cold, so this costs the cold price again.
        // After this EIP:  `a` stays warm, so this costs the warm access price.
        return a.balance;
    }
}

Client-side pseudocode for the rule change:

def on_frame_exit(frame, success):
    if success:
        commit(frame.state_changes)
    else:
        revert(frame.state_changes)
        # EIP-2929: also restore accessed_addresses / accessed_storage_keys
        # EIP-8374: leave them as they are

Things to know

  • Status is Draft: details may change and it is not scheduled for any fork.
  • Requires a hard fork. No transaction becomes more expensive; some become cheaper. Contracts that depend on exact gas used after a reverted subcall may see different numbers.
  • Warming entries in a reverted frame and using them later is not a new capability: an EIP-2930 access list already lets a transaction warm arbitrary entries up front. Each entry's cold cost is still paid once per transaction.
  • If EIP-8038 is active, the cost constants have different names (WARM_ACCESS, COLD_STORAGE_ACCESS, COLD_ACCOUNT_ACCESS), but the rule is the same.

#gas #evm #access-lists #core

Details

Authors
Dragan Rakita (@rakita)
Status
Draft
Type
Standards Track / Core
Created
2026-08-06
Requires

Machine-readable: Markdown · JSON