In this track: Gas and execution fees
intermediate · 3 MIN READ

Warm versus cold access overview

Access history within a transaction can affect some resource costs.

LET’S PICTURE IT

Opening a cabinet for the first time can require more setup than looking again while it is already in use.

SEE IT FOR YOURSELF
Pack small values into Solidity storage slotsStep 1 / 4
Pack small values into Solidity storage slotsFirstuint128 A16 bytesSeconduint128 B16 bytesThirduint256 C32 bytesSimple elementary types only; not a complete compiler layoutSlot 0 · 32 bytesUnused · 16 BA · 16 BHigh-order bytes ← → low-order bytesSlot 0 · fullB · 16 BA · 16 BDeclaration order and sizes determine this packingSlot 0BASlot 1C · 32 bytesTry different sequences in the storage-layout tool

In this simple default-layout example, two uint128 values come before one uint256. Each slot holds thirty-two bytes.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Some accesses have a tracked context

Ethereum gas rules distinguish cold and warm access for relevant accounts or storage locations. The first qualifying access and subsequent accesses can therefore have different costs.

The scope is transaction execution

Warmness is not a promise that a server’s operating-system cache was recently used. It is protocol-defined accounting. A new transaction has its own relevant starting context under the rules.

Access lists can supply information

Certain transaction formats can name accounts and storage keys in advance, with specified charges and effects. An access list is not universally a free optimization; compare the full costs and actual usage.

Avoid one-cost mental models

Saying every storage read costs one fixed amount can miss the context. The primary EIP describes the detailed rules, including how execution scope and reversions interact with tracked accesses.

TURN UNDERSTANDING INTO PRACTICEOpen the Storage layout →
QUICK CHECK · NO PRESSURE

Does protocol warmness simply mean a machine happened to cache the data recently?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.