-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[reconfiguration] Notify checkpoint service of last checkpoint #6585
Conversation
@@ -2294,7 +2293,20 @@ impl AuthorityState { | |||
// | |||
// Only after CheckpointService::notify_checkpoint stores checkpoint in it's store we update checkpoint boundary | |||
if let Some((index, roots)) = self.database.last_checkpoint(round)? { | |||
checkpoint_service.notify_checkpoint(index, roots, false)?; | |||
let final_checkpoint_round = self.database.final_epoch_checkpoint()?; |
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.
So there will be some period of gap between when we receive 2f+1 EndOfPublish and here. What happens in that period?
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.
We might have more narwhal transactions in the commit, and we will process them. Remaining certificates will be rejected, other messages like checkpoint signatures will be processed as usual
|
||
/// Records narwhal consensus output index of the final checkpoint in epoch | ||
/// This is a single entry table with key FINAL_EPOCH_CHECKPOINT_INDEX | ||
final_epoch_checkpoint: DBMap<u64, u64>, |
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.
Do you need final_epoch_checkpoint
? Could you derive it from the current checkpoint-to-be-built under the condition that all certs are closed?
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 do need this, since we continue to process narwhal commits even after receiving 2f+1 EndOfPublish
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.
Thinking more, I think this table could be removed in the future, after some of the other refactoring is done, namely when we merge #6305 and move all of narwhal commit processing into single batch(if it is even possible). With what we have now however, I think we have to live with it
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.
worth adding some comments here
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 todo
#5763