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

[reconfiguration] Notify checkpoint service of last checkpoint #6585

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

andll
Copy link
Contributor

@andll andll commented Dec 5, 2022

@@ -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()?;
Copy link
Contributor

@lxfind lxfind Dec 6, 2022

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?

Copy link
Contributor Author

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>,
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added todo

@andll andll enabled auto-merge (squash) December 6, 2022 23:46
@andll andll merged commit 3d50e4b into main Dec 7, 2022
@andll andll deleted the andrey-76 branch December 7, 2022 00:58
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

Successfully merging this pull request may close these issues.

2 participants