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

[Stability] Cancel polling for old votes #2223

Merged
merged 4 commits into from
Dec 14, 2023
Merged

Conversation

rob-maron
Copy link
Collaborator

Closes #2222

This PR:

Fixes a bug wherein we are not cancelling old polls for votes.

Cancels polls for votes in the following places:

  • when we receive a timeout in view sync or a finalized view sync cert
  • when we form a QC or DAC
  • when we time out for both the quorum and view sync (DA already had this)

Also cancels a poll for proposals for view 1, as this is covered by the latest proposal mechanism. For a node finishing catchup, it would constantly try to pull the first proposal.

This PR does not:

Add any GC improvements/more advanced proposal logic/cancelling as discussed. This will be in another PR.

Key places to review:

da.rs, consensus.rs, view_sync.rs to make sure all the cancels are in a good spot.

@@ -465,6 +465,13 @@ impl<
return;
}

// cancel poll for votes
self.network
.inject_consensus_info(ConsensusIntentEvent::CancelPollForViewSyncVotes(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it was correct before, we just timed out consensus for the round and are now maybe entering view sync, we should cancel polling for quorum votes and proposals but that should be handled in the consensus task

@@ -975,6 +993,11 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
return;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Cancel poll for proposal here too, I think

Copy link
Collaborator

@bfish713 bfish713 left a comment

Choose a reason for hiding this comment

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

LGTM, Can you wait for CI to pass before trying to merge

@rob-maron rob-maron merged commit 5554b70 into main Dec 14, 2023
10 checks passed
@rob-maron rob-maron deleted the rm/cancel-polling-2 branch December 14, 2023 01:30
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.

[Stability] - Fix poll cancelling for votes
2 participants