EIP-8496 Code reads in the block access list (Code Reads in Block-Level Access Lists)
No call decision · Scaling & data · EIP status Draft · created 2026-11-12
This adds a code_hash field to the EIP-7928 block access list (BAL), recording the hash of every pre-block code read during block execution. The BAL alone is then enough to know which bytecode a block needs.
Why it is needed
The current block access list (BAL, EIP-7928) fully records how accounts and storage changed, but code is only recorded in code_changes when it actually changes. So if a contract is merely called, or only queried for size via EXTCODESIZE, the BAL alone cannot tell whether its code was even read. Stateless validators or zkVM provers ended up having to execute the block first to discover which bytecode was needed, or to pull in the full code of every related address. In practice, clients diverged: some answered EXTCODESIZE from a cached size without reading the code, while others, like the reference implementation, actually read the code and fail if it is absent, creating interoperability problems. Combined with EIP-7709, which turns BLOCKHASH into a storage read, a block plus its BAL and a state snapshot can produce a complete proof input with no execution needed.
What changes
Today
- The BAL only records code when it changes, not on plain calls, size queries, or copies
- Knowing which code is needed requires actually executing the block
- Clients handle EXTCODESIZE differently, causing interoperability problems
- Over-estimation occurs, pulling in the full code of addresses that are not actually needed
After EIP-8496
- A code_hash field is added to AccountChanges, recording the hash of code loaded during execution
- A block plus its BAL and a state snapshot are enough to know the list of needed code without execution
- The definition of a 'code read' for EXTCODESIZE and similar operations is made precise, removing cross-client inconsistency
- Being hash-based, code shared across multiple accounts only needs to be stored once
Who is affected
- Stateless validators and zkVM provers: The BAL alone reveals which bytecode is needed without executing the block first, so proof input collection can begin as soon as the BAL arrives.
- Client development teams: Because the specification now defines what counts as a 'code read,' the interoperability problem of clients handling EXTCODESIZE and similar operations differently disappears.
- Witness format developers (EIP-8025 and others): A checkable criterion based on code_hash now exists to verify that a code list is complete and minimal.
- Ordinary users and contracts: There is no change to gas costs or contract behavior.
In depth
The code_hash field and its encoding
EIP-7928's AccountChanges had six elements: [address, storage_changes, storage_reads, balance_changes, nonce_changes, code_changes]. This EIP adds code_hash as a seventh element. When a value is present, the 32-byte Keccak-256 hash is RLP-encoded; when absent, it is encoded as an empty byte string (0x80). All other EIP-7928 encoding rules remain unchanged.
The definition of a 'code read'
A code load is limited to exactly five cases: (1) when a message frame executes with A as the code address (the transaction's to, the code address of CALL/CALLCODE/DELEGATECALL/STATICCALL, system contract calls, etc., including when the frame reverts or fails), (2) when EXTCODESIZE or EXTCODECOPY targets A, (3) when an EIP-7702 authorization designates A as the authority and that account is loaded, (4) when transaction validation checks sender A's code under EIP-7702 sender rules, and (5) when EIP-8298's SETCODEFROM designates A as the source and passes the SETCODEFROM_SOURCE_GAS check. Nothing outside these five counts as a code read.
Cases that are not code reads
BALANCE, EXTCODEHASH, collision checks in CREATE/CREATE2, the initcode executed by the creation frame, the delegation target itself designated by an EIP-7702 authorization, the SELFDESTRUCT beneficiary, withdrawal recipients, and fee recipients are not code reads. EXTCODEHASH can be answered directly from the account leaf and so does not read code, but EXTCODESIZE must read code since the account leaf has no code size. Also, if EIP-7928 fails to record access to the address at all (for instance, because the cold-access gas cost could not be paid), it does not count as a code read.
The recording rule and pre-block code
code_hash is filled with keccak256(pre-block code) only when the account's 'pre-block code' is non-empty and at least one code read occurred for that account within the block; otherwise it is left empty. Pre-block code is the bytecode as it stood at the start of block execution, that is, before the pre-execution system call at block_access_index=0. For an account delegated via EIP-7702, the pre-block code is the delegation indicator itself, not the delegate's code. Code newly created or changed within the block is not carried in code_hash, and reverted creations are also excluded from the BAL since they can be reconstructed from execution.
Validation and completeness
EIP-7928's requirement that 'the BAL must be complete and accurate' now extends to code_hash. A block containing a code_hash value that differs from the execution result is invalid. Since the value is derived directly from execution, a block builder cannot force a validator to load bytecode it never actually read. Clients already have code hashes alongside accounts and already track code changes for code_changes, so producing this field requires no additional prior state lookups, bytecode loads, or hashing.
Why only a hash is included
Including the full bytecode in the BAL could add megabytes per block (compare to a 60M-gas block's BAL being about 72 KiB). Including only a 32-byte hash instead adds just 33 bytes per filled field, or 1 byte for an empty field (about 13 KiB when 400 fields are filled). The hash approach lets stateless consumers look up bytecode from a hash-based code store, avoids duplicate storage when multiple accounts share the same code, and matches the shape of new_code_hash, which EIP-8298 adds to code_changes. code_hash is kept as an always-present, fixed-position field rather than an optional element, so decoders do not need to separately check the element count.
Hard fork, compatibility, and still Draft
This EIP requires a hard fork. Because AccountChanges' RLP encoding changes, the block_access_list_hash value changes too, so a client implementing only EIP-7928 will reject blocks built under this EIP, and vice versa. The Engine API does not change. The BAL remains opaque RLP bytes to the consensus layer. There is no change to gas costs, and contract behavior is unaffected. The current status is Draft, created on 2026-11-12, and there is no record of a core developer call discussing or deciding on fork inclusion, so details may change.