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

Exit topological sort earlier #2965

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Exit topological sort earlier #2965

merged 2 commits into from
Apr 24, 2024

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

Previously the consensus logic may have marked a node as having more inbound edges than it actually had because the traversal would not exit after hitting a node that was already seen.

This could cause some votes to be dropped which could increase time-to-finality.

How this works

Exits the topological sort as soon as a node that has been previously touched is seen (rather than waiting for a node that previously had inbound edges).

How this was tested

  • Added a new unit test (which previously would fail non-deterministically)
  • CI

@StephenButtolph StephenButtolph added the consensus This involves consensus label Apr 23, 2024
@StephenButtolph StephenButtolph added this to the v1.11.5 milestone Apr 23, 2024
@StephenButtolph StephenButtolph self-assigned this Apr 23, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Apr 24, 2024
Merged via the queue into master with commit 1b90a27 Apr 24, 2024
19 checks passed
@StephenButtolph StephenButtolph deleted the fix-topological-sort branch April 24, 2024 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus This involves consensus
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants