---
eip: 7658
label: EIP-7658
title: Light client data backfill
status: Stagnant
type: Standards Track
category: Core
created: 2024-03-21
official: https://eips.ethereum.org/EIPS/eip-7658
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7658.md
canonical: https://eips.huatuo.xyz/eip-7658/
lang: en
tldr: Proposes recording the best sync-committee signature of each period in the BeaconState, so beacon nodes can backfill and prove canonical light client data for past periods.
tags: [light-client, consensus, sync-committee, core]
---

# EIP-7658: Light client data backfill

> Mechanism for beacon nodes for syncing historical light client data

**TL;DR:** Proposes recording the best sync-committee signature of each period in the BeaconState, so beacon nodes can backfill and prove canonical light client data for past periods.

## What problem does it solve?

Since Altair, beacon nodes produce *light client data*: small updates signed by the sync committee that let a light client follow the chain without downloading full blocks. The existing sync protocol only works **forward**: a node creates this data as it follows new blocks.

Producing it for the past is hard. A node needs the matching `BeaconState` and `SignedBeaconBlock`, but states before the node's checkpoint are not available and blocks are only kept on the p2p network for a limited time. There is also no single agreed answer for which update is "the best" for a given ~27-hour sync committee period, so archives such as the Portal Network cannot serve a consistent, verifiable set of historical updates.

## How it works

The EIP adds a minimal amount of tracking to the consensus state:

- A new container `SyncData { sync_aggregate, signature_slot }`.
- Three new `BeaconState` fields: `previous_best_sync_data`, `current_best_sync_data` and `parent_block_has_sync_committee_finality`.
- **On every block** (`process_best_sync_data`, run before the block header is processed), the node compares the block's `SyncAggregate` with the current best for this period, using a subset of the existing light-client `is_better_update` ranking:
  1. a 2/3 supermajority of participants beats no supermajority;
  2. without supermajority, more participants wins;
  3. data where the next sync committee is finalized beats data where it is not;
  4. otherwise more participants wins;
  5. ties go to the lower `signature_slot`.
- **At each sync committee period boundary**, `current_best_sync_data` moves to `previous_best_sync_data` and the current slot is reset.

Because the choice is now part of the state root, anyone can later prove with a Merkle proof that a given `LightClientUpdate` for a past period is the canonical, optimal one. The rationale sketches a backfill protocol that combines this with `historical_summaries` proofs to rebuild `LightClientBootstrap` and update data for old periods.

## Sample code

The new container and state fields (consensus-spec Python):

```python
class SyncData(Container):
    sync_aggregate: SyncAggregate   # sync committee aggregate signature
    signature_slot: Slot            # slot at which it was created

class BeaconState(Container):
    ...
    previous_best_sync_data: SyncData
    current_best_sync_data: SyncData
    parent_block_has_sync_committee_finality: bool

def process_block(state: BeaconState, block: BeaconBlock) -> None:
    process_best_sync_data(state, block)   # new, before the header is overwritten
    process_block_header(state, block)
    ...
```

## Things to know

- Status is **Stagnant**. It has not been scheduled for a consensus upgrade.
- It needs a hard fork. Only light client data after that fork could be proven canonical this way; earlier periods could at best be pinned by a hash once finalized.
- No new `LightClientUpdate` structures are stored in state, only the chosen signature and its slot, keeping the state growth small.
- It complements other history work such as [EIP-7643](/eip-7643/) (a fixed root for pre-Merge history) and [EIP-4444](/eip-4444/) (history expiry), which increase reliance on archives that must serve verifiable data.


---

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