ChainSafe / ChainSafe/lodestar

Optionally store finalized header's state for best update of every sync committee period

Open
#5,142 4 comments 0 reactions 0 assignees View on GitHub
meta-feature-request scope-light-clients
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 16h
Merged PRs (30d)
150

Description

**Is your feature request related to a problem? Please describe.**

A light client might require the beacon state for all sorts of state proofs. In my case, I would like to use `block_roots` for ancestry proofs. I have a finalized beacon header, and now want to provide that a beacon header is an ancestor of the finalized header. To do that, I need at least one finalized header beacon state per sync committee period to import older beacon blocks.

**Describe the solution you'd like**

A flag to optionally persist the last finalized header beacon state on disk. A nice extra would be to say how many states should be persisted (e.g. 50, and if there are more states they will pruned).

**Describe alternatives you've considered**

I could update this parameter myself: https://github.com/ChainSafe/lodestar/blob/unstable/packages/beacon-node/src/chain/archiver/archiveStates.ts#L12

**Additional context**

Context on Discord: https://discord.com/channels/593655374469660673/621838504955084830/1074751947728498811

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.