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

Move vote bubbling before poll termination #2100

Merged
merged 6 commits into from
Sep 28, 2023
Merged

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

The bubble votes optimization means that nodes will be providing multiple preferences in response to consensus queries. However, the early poll termination logic doesn't easily support multiple preferences per response. This PR moves the bubbling of votes to happen prior to registering the result in the poll to ensure only one preference needs to be registered into the poll.

How this works

Moves vote bubbling prior to poll registration. This significantly simples the vote bubbling logic. However, it does make the vote bubbling logic slightly more expensive (because traversals happen per-vote rather than per-poll).

How this was tested

CI

@StephenButtolph StephenButtolph added consensus This involves consensus cleanup Code quality improvement bubble votes labels Sep 26, 2023
@StephenButtolph StephenButtolph added this to the v1.10.12 milestone Sep 26, 2023
@StephenButtolph StephenButtolph changed the title Move vote bubble before poll termination Move vote bubbling before poll termination Sep 26, 2023
StephenButtolph and others added 3 commits September 26, 2023 16:58
Co-authored-by: Dan Laine <daniel.laine@avalabs.org>
Signed-off-by: Stephen Buttolph <stephen@avalabs.org>
@StephenButtolph StephenButtolph merged commit 943f7d1 into dev Sep 28, 2023
14 of 15 checks passed
@StephenButtolph StephenButtolph deleted the early-bubble-votes branch September 28, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bubble votes cleanup Code quality improvement consensus This involves consensus
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants