ChainSafe / ChainSafe/lodestar

Persist fork_choice on stop and load on restart

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

Description

### Problem description

Right now when we restart a lodestar beacon node, we completely ignore the old forkchoice, and we start from the head of the finalized state.
This cause the node to be out of date compared to EL, and other CL peers

### Solution description

See lighthouse reference implementation:
- load fork_choice: https://github.com/sigp/lighthouse/blob/e5b4983d6baf85770fe4539a565d8a2dd462bc53/beacon_node/beacon_chain/src/beacon_chain.rs#L608
- persist fork_choice: https://github.com/sigp/lighthouse/blob/af9cae4d3e32fadbc022c494a8cad7bbc6012398/beacon_node/beacon_chain/src/beacon_chain.rs#L7503

### Additional context

_No response_

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.