-
Notifications
You must be signed in to change notification settings - Fork 781
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
Fix corrupted DB on networks where the first slot is skipped (Holesky) #4985
Conversation
Reproduced the bug by backfilling a Holesky node with v4.5.0:
There's that 0x0 block root! After running this PR and healing block roots we get:
Fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!
) | ||
.unwrap() | ||
.map(|r| { | ||
println!("{r:?}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets delete this println before merging
Issue Addressed
#4943 (co-authored with @michaelsproul)
Proposed Changes
There was a bug in earlier versions of Lighthouse where zero block roots are incorrectly stored before the first block slot. This happens on nodes that were checkpoint sync'd on a network that has skipped slot(s) before the first block. The additional consequence is that Lighthouse BN could return duplicate genesis blocks in
BlocksByRange
responses.This bug was fixed in #4820, so it should not be an issue for nodes that are sync'd using v4.6.0 (next release) on Holesky. This PR contains migration script to heal the database on nodes that were checkpoint sync'd using 4.5.0, so they would no longer serve duplicate genesis blocks.
See @michaelsproul's comment here for more details.