EIP-7863 Block-level warming
No call decision · Fees & gas · EIP status Draft · created 2025-01-15
Maintains the warm status of contract addresses and storage slots at the block level rather than the transaction level. A transaction that rereads a location already accessed within the same block pays only the cheap warm cost.
Why it is needed
Currently, the Ethereum Virtual Machine (EVM) charges an expensive cold cost the first time a transaction touches an account or storage slot, and only the cheap warm cost when it touches the same location again within the same transaction. But this warm status disappears once the transaction ends. Even if multiple transactions in the same block read the same slot, each one pays the cold cost again from scratch. However, modern node software caches storage access at the block level, so from the second access onward the actual computation cost is much cheaper. This means the gas fee charged and the actual cost are misaligned. This proposal aims to maintain the warm status until the block ends, reducing redundant warming costs, aligning gas fees with the actual computational burden, and increasing network throughput without compromising security. According to the source document, the measured efficiency improvement as of January 2025 is about 5%.
What changes
Today
- Warm status disappears once the transaction ends
- The next transaction in the same block pays the cold cost again for the same address and slot
- Gas fees are misaligned with the block-level caching behavior that nodes actually use
After EIP-7863
- Warm status is maintained until the block ends and resets at block boundaries
- From the second access onward within a block, any transaction pays only the warm cost
- Gas fees move closer to the actual cache cost structure and redundant costs disappear
Who is affected
- Users: Transactions using popular contracts in the same block may see reduced gas fees. Even in the worst case, they never pay more than the current cold cost.
- Client teams: Requires a change to block execution to maintain a block-level access set and pass it to each transaction. Activated via a hard fork.
- Block builders/validators: Transaction ordering can be adjusted to direct warming benefits to oneself. Third-party builders can backrun a transaction that has warmed a specific address.
- Contract developer: Existing contracts continue to work as is. Since gas fees only decrease and never increase, logic that depends on gas fees remains valid.
In depth
Default behavior: only extends the lifetime of warm status
The first access to a storage slot within a block pays the cold access cost as defined by EIP-2929, as before. If the same slot is accessed again within the same block, even from a different transaction, it pays only the warm access cost from EIP-2929. Warm/cold status resets at block boundaries. In other words, this proposal does not touch the cost figures themselves; it only extends the scope within which warm status is maintained from the transaction to the block. The cost constants and determination rules reuse the existing scheme as is.
Block processing: two block-level sets
At the start of a block, initialize empty sets block_level_accessed_addresses and block_level_accessed_storage_keys. Before each transaction processes a storage access, if the address being accessed is in block_level_accessed_addresses, charge WARM_STORAGE_READ_COST; otherwise charge COLD_ACCOUNT_ACCESS_COST and add the address to the set. Storage keys are handled the same way: if the key is in block_level_accessed_storage_keys, charge WARM_STORAGE_READ_COST; otherwise charge COLD_SLOAD_COST and add the key to the set.
Implementation: treated as warm from the start, like precompiles
The execution layer's apply_body initializes the two sets and passes them to each transaction's vm.Environment. process_transaction adds this block-level set to the transaction's preaccessed_addresses and preaccessed_storage_keys. As a result, from the transaction's perspective, addresses and storage keys already accessed in the block are treated as warm from the start, just like precompiles or the coinbase address. Message call processing tracks accessed_addresses and accessed_storage_keys accessed during execution, propagating them up to the transaction level and then to the block-level set.
Open question: handling warm status on revert
Under EIP-2929, if a subcall reverts, all addresses and slots accessed within it revert to cold status. Under block-level warming, whether an already-warmed address or slot from a failed transaction should be reset to cold again for the next transaction in the same block remains an open question. Some propose removing the cold reset on revert altogether, for consistency with block-level warming. Whether keeping warm status even on failure aligns with the goal of matching gas fees to actual client cache behavior is still under discussion.
The first accessor bears the full warming cost
The transaction that first accesses something in the block pays the full warming cost, and subsequent transactions benefit at no extra cost. The source document considers this acceptable, because the early part of a block where warming mostly happens is usually occupied by transactions placed by specialized builders aiming for top-of-block execution, and the cost difference is relatively small, so simplicity was chosen over a complex cost-sharing model. As an alternative, it introduces an approach where each transaction initially pays the cold cost, but after block execution ends, the total warming cost is evenly split based on the number of accesses, with the difference refunded.
Alternative: warming windows spanning multiple blocks
Warming periods longer than a single block were also considered: maintaining warm status for an epoch, or using a ring buffer spanning x blocks. Since the execution layer currently operates without considering epoch boundaries, the source document notes that the ring buffer approach may be more suitable if this design is kept. For the ring buffer, there is an approach that stores warming information in the block headers of those x blocks, but this adds extra overhead and could complicate statelessness. Adopting multi-block warming would require carefully designing trade-offs such as header size and client complexity.
Security: memory limits and MEV
The size of the warm slot set is bounded by the block gas limit divided by the minimum gas cost per slot access, which prevents denial-of-service (DoS) attacks that overwhelm nodes through excessive memory use. On the MEV side, block producers can optimize transaction ordering to direct warming benefits to themselves, and third-party block builders can backrun transactions that have warmed a specific address or storage key.
Compatibility and current status
This change is not backward compatible and requires hard fork activation. However, existing transactions continue to work exactly as before, gas fees only decrease and never increase, and the worst case of paying the cold cost on first access remains unchanged, so contract logic that depends on gas fees remains valid. The source document's status is Draft, so specification details may still change, and there is no record of inclusion being decided for any specific fork.