Where the gas goes #
Every unit of gas a block uses is either intrinsic (the fixed cost of a transaction, its calldata, access list and authorizations), spent by an opcode, by a precompile, on deploying contract code, or lost when a call frame halts with an error. Refunds are given back at the end of each transaction.
Opcodes #
The gas of an opcode is its own cost: for CALL and CREATE that is the access, value transfer and memory cost, not the gas the called code uses, which counts for that code's opcodes.
State access #
How much of the state a block reads and writes. Cold accesses are the first touch of an account or storage slot in a transaction (EIP-2929); for a client they are the ones likely to go to disk.
State growth #
What blocks add to the state and remove from it, counted from each block's state diff. The current day is still in progress: it is projected to a full day and drawn dashed.
Transactions #
Transaction types, their size in gas, how often they fail and how many calls they make.
Precompiles #
Built-in contracts at fixed addresses for cryptography and other work too expensive in EVM code.
Contracts using the most gas #
Gas of the code running for each contract, by the address whose storage it uses: the gas of a proxy's implementation counts for the proxy. The code a contract calls counts for the called contract.
Recent blocks #
The newest blocks recorded. A block is recorded two blocks after it was imported, once it is clear it stays on the canonical chain.
How these numbers are made #
Measuring
A plugin in a Besu node attaches a tracer to every block the node imports, so no block is executed twice. It sees each opcode with its gas, every call frame, and each block's state diff (Besu's trie log). Parallel transaction execution is turned off on that node, because transactions executed in parallel bypass plugin tracers. A block's record is complete when every one of its transactions was traced; averages leave incomplete records out.
Where the gas goes
- Intrinsic: the gas limit of a transaction minus the gas its first call frame starts with: 21,000 per transaction, calldata, access lists, EIP-7702 authorizations and contract creation.
- Opcodes, shown by opcode group: the gas each opcode costs. CALL and CREATE count their own cost only; a value transfer's 2,300 gas stipend, which the callee gets for free, is subtracted. The groups are listed under Opcode groups below.
- Precompiles: gas used by calls to precompiled contracts.
- Code deposit: 200 gas per byte of contract code a successful contract creation stores, paid when the creation ends; no opcode accounts for it.
- Halted frames: gas left in a call frame that stops with an error (out of gas, invalid opcode, …), which is consumed rather than returned.
- Refund: the difference between the gas execution used and the gas the transaction was charged, mostly for clearing storage. When a transaction pays the EIP-7623 calldata floor instead, the difference is counted as floor.
These add up to each block's gas used.
Opcode groups
An opcode a future fork adds counts as "Other opcodes" until it gets a group. The implicit STOP at the end of code is not counted.
State access
An SLOAD costing 2,100 gas is cold, 100 warm. An SSTORE is classified by its cost: setting a zero slot (20,000), first change of a non-zero slot (2,900), or anything else (100), plus 2,100 when cold. Account accesses (BALANCE, EXTCODE*, the CALL family, SELFDESTRUCT) are cold when the address was not yet accessed in the transaction; precompiles are always warm.
Touched accounts and storage slots are those in the block's state diff: every existing account and non-empty slot the block read or changed. Contracts executed counts distinct code addresses whose code ran, with their code size.
State growth
From the block's state diff: an account is new when it did not exist before the block, a slot is created when it goes from zero to non-zero and cleared the other way. Code with the EIP-7702 prefix 0xef0100 is a delegation, not a contract. Per-day numbers are the average per block times the blocks of the day; a day the records only partly cover, like the current one, is projected to all of its blocks.
Canonical blocks and coverage
Records are written two blocks behind the head, after checking the block is the canonical one at its height; if a deeper reorg replaces a block, the later record wins. Days, hours and the 24-hour, 7-day and 30-day windows are in UTC.