ChainSafe / ChainSafe/lodestar

Must commit changes before reading all nodes on restart

Open
#7,635 0 comments 1 reaction 0 assignees View on GitHub
meta-bug meta-investigate
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 18h
Merged PRs (30d)
156

Description

Noticed this when restarting my Holesky node, might be related to `--forceCheckpointSync` with an existing db state as removing the db resolved the issue.

Bit strange though as I haven't observed that before

![Image](https://github.com/user-attachments/assets/818ec7c6-f5be-4b1d-8865-ee1fd218be33)

but what looks suspicious is the debug log, it says that db state is used because it's ahead but with `--forceCheckpointSync` this shouldn't be the case, we always want to use the pulled checkpoint state

```
Mar-29 18:16:21.469[] info: Lodestar network=holesky, version=v1.28.1/cayman/bump-libp2p/44e7e10, commit=44e7e10ba9aa097d686b76fa95c455443e6abd9f
Mar-29 18:16:21.499[] info: Connected to LevelDB database path=/home/devops/holesky/data/beacon2/chain-db
Mar-29 18:16:23.498[] verbose: Found the last archived state slot=3947392, size=433.36 MB
Mar-29 18:16:31.948[] warn: Forced syncing from checkpoint even though db state at slot 3947392 is within weak subjectivity period
Mar-29 18:16:31.949[] warn: Please consider removing --forceCheckpointSync flag unless absolutely necessary
Mar-29 18:16:31.949[] info: Fetching checkpoint state checkpointSyncUrl=https://beaconstate-holesky.chainsafe.io
Mar-29 18:16:46.509[] info: Download completed stateId=finalized, size=433.37 MB, slot=3947328
Mar-29 18:17:10.600[] verbose: Db state is ahead of the provided checkpoint state, using the db state to initialize the beacon chain
```

needs further investigation

Contributor guide

Open the contributing guide

Research direction

Reproduce a Holesky restart with an existing LevelDB state and --forceCheckpointSync, using the logged startup sequence as the starting point. Investigate why the database state is selected after the checkpoint download; done means the behavior is understood and the forced checkpoint path selects the intended state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.