-
Notifications
You must be signed in to change notification settings - Fork 283
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
Make checkpoint sync work when finalized state is transitioned with empty slot(s) #7981
Changes from all commits
bd487b5
0526205
f157063
e076e5d
9e78600
b201ce3
872953b
c05a1f2
6199a4a
e05a5d7
7c37dbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -858,13 +858,10 @@ private SafeFuture<Optional<StateAndBlockSummary>> getOrRegenerateBlockAndState( | |
return SafeFuture.completedFuture(maybeEpochState); | ||
} | ||
|
||
// if finalized is gone from cache we can still reconstruct that without regenerating | ||
// if finalized is gone from cache we can use the finalized anchor without regenerating | ||
if (finalizedAnchor.getRoot().equals(blockRoot)) { | ||
LOG.trace("epochCache GET finalizedAnchor {}", finalizedAnchor::getSlot); | ||
return SafeFuture.completedFuture( | ||
Optional.of( | ||
StateAndBlockSummary.create( | ||
finalizedAnchor.getBlockSummary(), finalizedAnchor.getState()))); | ||
return SafeFuture.completedFuture(Optional.of(finalizedAnchor)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's transitioned anchor, it will be incorrect state for requested block_root There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In any case, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On startup we definitely create the Store with the anchor coming from the checkpoint URL. So it is possible that we could return it from here... |
||
} | ||
|
||
maybeEpochStates.ifPresent( | ||
|
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'd also add verification for state.block_roots (block slot - state slot interval) and state.state_roots (block slot)
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.
Added those checks, made it bit more complex, since don't have access to
spec
in super class.