---
eip: 8189
label: EIP-8189
title: snap/2 - BAL-Based State Healing
status: Last Call
type: Standards Track
category: Networking
created: 2026-03-06
requires: 7928
official: https://eips.ethereum.org/EIPS/eip-8189
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8189.md
canonical: https://eips.huatuo.xyz/eip-8189/
lang: en
tldr: "Upgrades the snap sync protocol to snap/2, replacing slow trie-node \"healing\" with downloading block access lists and replaying their state diffs, so new nodes catch up to the chain head in fewer round trips."
tags: [networking, sync, snap, devp2p, bal]
---

# EIP-8189: snap/2 - BAL-Based State Healing

> Replaces trie node healing with block access list based state catch-up in the snap protocol

**TL;DR:** Upgrades the snap sync protocol to snap/2, replacing slow trie-node "healing" with downloading block access lists and replaying their state diffs, so new nodes catch up to the chain head in fewer round trips.

## What problem does it solve?

Snap sync lets a new node download Ethereum state in large ranges instead of walking the trie node by node. But the chain keeps moving while the download runs, so the copied state ends up a patchwork of different blocks. snap/1 fixes this in a **healing** phase: the node repeatedly asks peers for individual trie nodes (`GetTrieNodes`) until the state root matches. This can take many round trips, because the node only discovers what is missing as it goes.

[EIP-7928](/eip-7928/) adds block-level access lists (BALs): a per-block record of every state change, committed in the block header. With BALs, a syncing node already knows exactly which blocks it fell behind on and can simply replay their diffs.

## How it works

**Protocol changes (snap/1 → snap/2):**

| Message | ID | Change |
| --- | --- | --- |
| `GetTrieNodes` / `TrieNodes` | 0x06 / 0x07 | Removed |
| `GetBlockAccessLists` | 0x08 | New: `[request-id, [blockhash...], bytes]` |
| `BlockAccessLists` | 0x09 | New: `[request-id, [bal...]]` |
| Account, storage and bytecode range messages | 0x00 to 0x05 | Unchanged |

- Responses keep request order. A missing BAL is returned as the RLP empty string `0x80`. A peer may truncate from the tail to respect the `bytes` limit, with a recommended 2 MiB soft cap.
- Every BAL must be checked: `keccak256(rlp(bal))` must equal the header's `block-access-list-hash`.

**Sync algorithm:**

1. Pick a pivot block P a little behind the head (for example HEAD-64).
2. Bulk-download the state at P with the range messages.
3. When the pivot moves to P+K, fetch BALs for blocks P+1 through P+K, verify each one, apply the diffs in order, and continue from P+K.
4. Repeat as the chain advances, then verify the final state root.

If a reorg goes past the pivot, the node uses BALs from the old fork (back to the common ancestor) to find and re-fetch the entries that fork touched. Nodes are therefore asked to keep BALs for orphaned blocks within the retention period too.

## Sample code

Wire messages and the verification step, in pseudocode:

```python
# request
GetBlockAccessLists = [request_id, [h1, h2, h3], 2 * 1024 * 1024]

# response: positional, 0x80 where unavailable
BlockAccessLists = [request_id, [bal1, bal2, b"\x80"]]

def apply_catch_up(state, headers, bals):
    for header, bal in zip(headers, bals):          # strict block order
        if bal == b"\x80":
            raise Retry("ask another peer")
        assert keccak256(rlp.encode(bal)) == header.block_access_list_hash
        state.apply_diff(bal)
    return state
```

## Things to know

- **Status: Last Call** (deadline 2026-11-01 in the spec). Final wording may still change.
- snap/2 only works for blocks after EIP-7928 activates (the spec refers to post-Amsterdam blocks), since earlier headers have no BAL hash. Older clients keep using snap/1.
- A syncing node should pick snap/1 or snap/2 for a sync, not run both at once; afterwards it can serve both.
- BAL requests can return much more data than they ask for, so serving nodes should rate-limit. Peers that return empty entries for blocks they should have can be deprioritized.
- BAL exchange lives in `snap` rather than `eth`, following the idea that sync primitives belong in satellite protocols.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8189
