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

Update view sync for 2 timeouts #2233

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions crates/task-impls/src/view_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,12 @@ impl<
self.num_timeouts_tracked, *view_number
);

if self.num_timeouts_tracked > 3 {
if self.num_timeouts_tracked >= 3 {
error!("Too many consecutive timeouts! This shouldn't happen");
}

if self.num_timeouts_tracked > 2 {
if self.num_timeouts_tracked >= 2 {
error!("Starting view sync protocol for view {}", *view_number + 1);
// Start polling for view sync certificates
self.network
.inject_consensus_info(ConsensusIntentEvent::PollForViewSyncCertificate(
Expand Down Expand Up @@ -743,6 +744,12 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
.publish(HotShotEvent::ViewSyncFinalizeVoteSend(vote))
.await;
}

error!(
"View sync protocol has received view sync evidence to update the view to {}",
*self.next_view
);
Comment on lines +748 to +751
Copy link
Member

Choose a reason for hiding this comment

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

I think the logging at lines 475 and 484 should suffice?

Copy link
Member Author

Choose a reason for hiding this comment

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

My thought here was to log when view sync successfully updates the view, as well as when it starts. So we can see if view sync is updating the view or if the view is updated because a proposal was received.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense!


self.event_stream
.publish(HotShotEvent::ViewChange(self.next_view))
.await;
Expand Down
Loading