Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State for currentJustifiedCheckpoint not available #3358

Closed
twoeths opened this issue Oct 13, 2021 · 3 comments
Closed

State for currentJustifiedCheckpoint not available #3358

twoeths opened this issue Oct 13, 2021 · 3 comments
Assignees

Comments

@twoeths
Copy link
Contributor

twoeths commented Oct 13, 2021

Describe the bug

Got this error while syncing:

Oct-13 06:18:06.629 [CHAIN]           error: State for currentJustifiedCheckpoint not available, using closest state checkpointEpoch=1230, checkpointRoot=0xd91739c32a919ec322926368a5c34155f1492578876c282dc505ca341f5dc0e9, stateSlot=9841, stateRoot=0x169e6840c5e75878689b5344c085b749dba1a444ede326979cae542fd7dfad00

Expected behavior

No error

@twoeths
Copy link
Contributor Author

twoeths commented Oct 13, 2021

This is because we don't store checkpoint state for epoch with skipped slot in the current implementation, it's implemented here https://github.com/ChainSafe/lodestar/blob/v0.30.0/packages/lodestar/src/chain/blocks/stateTransition.ts#L79

Whenever we pass checkpoint, we should store it in the checkpoint state cache because that checkpoint state may become justified/finalized state later and we need it.

@dapplion could you confirm this?

@twoeths twoeths self-assigned this Oct 13, 2021
@dapplion
Copy link
Contributor

@tuyennhv When I finish with the SSZ refactor I'll go for a review a regen that should tackle that. You can see the WIP branch here https://github.com/ChainSafe/lodestar/tree/dapplion/regen-blackbox

@dapplion
Copy link
Contributor

Closing for #4005

This specific case is mitigated by a flexible fn that tolerates that specific state not being avail

function getStateForJustifiedBalances(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants