EIP-8247 Ancestor Block Index BAL (Ancestor-Indexed BALs)

No call decision · Scaling & data · EIP status Draft · created 2026-05-03

Replaces addresses and storage keys already seen in the most recent 8 blocks in an EIP-7928 Block Access List (BAL) with short positional references, reducing BAL size by roughly 30-50%.

Why it is needed

The Block Access List (BAL) in EIP-7928 is data embedded in a block recording which accounts and storage slots the block read from and wrote to. However, frequently used contracts and accounts appear in nearly every block, so the same 20-byte addresses and 32-byte storage keys are repeatedly included block after block. The source points out that a large share of BAL bytes are addresses and storage keys that already appeared in recent blocks. If a value has already appeared, a short reference such as 'entry number N in ancestor block M' is smaller than rewriting the full value. This EIP replaces the repeated data with references pointing to BAL positions in the most recent 8 ancestor blocks. The expected reduction is roughly 30-50%, depending on the degree of reuse between blocks.

What changes

Today

After EIP-8247

Who is affected

In depth

Distinguishing Reference Types from Literals

The address slot is extended to AddressKey = Address | AccountRef, and the storage key slot is extended to StorageKeyRef = StorageKey | SlotRef. AccountRef MUST be a length-2 RLP list of [ancestor_offset: uint8, account_index: uint32], and SlotRef MUST be a length-3 RLP list of [ancestor_offset: uint8, account_index: uint32, slot_index: uint32]. ancestor_offset ranges from 0 to 7, where 0 is the parent block, 1 is the grandparent, and 7 is the 8th ancestor. Literals and references are distinguished by RLP type: Address is a 20-byte string and AccountRef is a list, while StorageKey is an RLP-encoded 32-byte value and SlotRef is a list. The SlotChanges, AccountChanges, and BlockAccessList structures are modified to accept these types, and the remaining EIP-7928 fields and semantics are unchanged.

The Reference Target Is the Expanded View of the Ancestor BAL

What a reference points to is not the encoded ancestor BAL but its expanded view. The expanded view is a literal-only BlockAccessList that has already passed EIP-7928 validation and has had all of this EIP's references resolved. Referencing the current block is also forbidden (MUST NOT). account_index is a position within the BAL, and since EIP-7928 already requires addresses to be sorted lexicographically, the position is uniquely determined. slot_index is a position in the per-account canonical slot dictionary. The slot dictionary is formed by merging the storage keys that appear in that account's storage_changes and storage_reads, removing duplicates, and sorting lexicographically. Clients MUST store or be able to reconstruct the expanded views and per-account slot dictionaries of the most recent 8 canonical blocks after activation.

Canonical Encoding Rule

The height of the ancestor block a reference points to is block_number(B) - ancestor_offset - 1. For any literal value in the current BAL, if any reference in the most recent 8 canonical ancestor expanded views resolves to the same value, a literal MUST NOT be used. If multiple candidate references exist, the smallest one MUST be used: by (ancestor_offset, account_index) for AccountRef, or by (ancestor_offset, account_index, slot_index) for SlotRef. Enforcing the smallest valid reference this way makes the encoded BAL a pure function of the block and its ancestors, preventing a producer from deliberately choosing a literal or a larger offset to inflate the encoding.

The 8-Step Validation Procedure

For a block's BAL B, perform the following. 1) Reject any reference whose ancestor_offset is outside 0-7. 2) Reject if the referenced ancestor height is below 0 or below the activation height. 3) Reject if an AccountRef's account_index is out of range for the target ancestor. 4) Reject if a SlotRef's account_index or slot_index is out of range. 5) Resolve each reference from the ancestor expanded view, substituting literals, to obtain the expanded BAL B'. 6) Apply EIP-7928 validation to B'. 7) Reject B if any literal within B has a valid reference available in the most recent 8 expanded ancestor views. 8) Reject B if any reference is not the smallest valid reference in canonical order. The number of EIP-7928 bal_items is counted based on the expanded BAL.

Rationale for the Savings and the 8-Block Window

By the source's estimate, a 20-byte Address shrinks to a roughly 5-byte (1 + 4) AccountRef, and a 32-byte StorageKey shrinks to a roughly 9-byte (1 + 4 + 4) SlotRef. Overall BAL size is expected to decrease by roughly 30-50%, depending on the degree of reuse between blocks. The window was set to 8 blocks because this limits the ancestor state that must be retained for validation while still capturing most of the cross-block reuse, and because ancestor_offset fits within 3 bits.

Activation and Backwards Compatibility

A reference pointing to a pre-activation block is invalid. A reference is valid only when its target ancestor falls within the most recent 8 canonical blocks after activation. This change requires a hard fork. BALs from before activation cannot be reached by a reference and remain valid in their original literal form.

Handling DoS and Reorgs

Validation incurs the cost of storing 8 expanded ancestor BAL views and per-account slot dictionaries. In exchange, reference resolution is a bounds-checked array lookup with no recursion, so DoS risk is limited. EIP-7928's bal_items budget continues to bound the expanded size. If a reorg occurs and a block's references can no longer be resolved on the new canonical chain, that block becomes invalid, which the source describes as consistent with the usual handling of data tied to a specific block.

Progress status

This EIP is in Draft status, so the specification may still change. The Test Cases section is empty, marked TBD. There is no record in current materials of a core developer call decision on fork inclusion.

Original EIP · ← EIPs