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
Handle missing archived index #5899
Conversation
archivedIndex := uint64(0) | ||
if slot/params.BeaconConfig().SlotsPerArchivedPoint > 1 { | ||
archivedIndex = slot/params.BeaconConfig().SlotsPerArchivedPoint - 1 | ||
} | ||
return s.beaconDB.ArchivedPointRoot(ctx, archivedIndex) | ||
fmt.Println(archivedIndex) |
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.
I see this number increasing constantly, reached 130 and I turned off my slasher.
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.
That's good. That means your slasher is doing work 👍 I removed the debug log
if s.beaconDB.HasArchivedPoint(ctx, archivedIndex) { | ||
return s.beaconDB.ArchivedPointRoot(ctx, archivedIndex), nil | ||
} | ||
archivedIndex-- |
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.
What is this? Can you add more to the godoc description about what this implementation is doing?
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.
will do
…abs/prysm into handle-missing-archived-index
Codecov Report
@@ Coverage Diff @@
## master #5899 +/- ##
==========================================
+ Coverage 59.83% 60.13% +0.30%
==========================================
Files 314 314
Lines 26505 26431 -74
==========================================
+ Hits 15858 15895 +37
+ Misses 8486 8391 -95
+ Partials 2161 2145 -16 |
What type of PR is this?
What does this PR do? Why is it needed?
When an archived slot has a skip block, the node should be looking back to last archived slot to get a real root instead of returning
0x0000...
This also handles genesis case instead of returning0x0000...
Which issues(s) does this PR fix?
Fixes #5898
Other notes for review
Tested locally. Was able to request previously failed historical states via debug end point