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

v1.18: fix: send votes to the immediate next leader (backport of #2607) #2620

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 16, 2024

Problem

Votes are always sent to the "forward leader" which is defined as the leader of the slot which is 2 slots beyond our latest poh clock slot. This means that a vote for the third slot of a given leader's slot span will always be sent to the following leader for inclusion in the first slot of that leader's slot span. This adds an unnecessary slot of latency to votes because the vote could potentially land in current leader's fourth slot.

Summary of Changes

  • Send votes to the leaders of the next two slots to decrease vote latency

Fixes #


This is an automatic backport of pull request #2607 done by [Mergify](https://mergify.com).

* fix: send votes to the immediate next leader

* feedback

(cherry picked from commit f4e2fa9)

# Conflicts:
#	core/src/next_leader.rs
@mergify mergify bot added the conflicts label Aug 16, 2024
@mergify mergify bot requested a review from a team as a code owner August 16, 2024 02:57
Copy link
Author

mergify bot commented Aug 16, 2024

Cherry-pick of f4e2fa9 has failed:

On branch mergify/bp/v1.18/pr-2607
Your branch is up to date with 'origin/v1.18'.

You are currently cherry-picking commit f4e2fa9fe2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   core/src/voting_service.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   core/src/next_leader.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@jstarry
Copy link

jstarry commented Aug 29, 2024

@AshwinSekar ran the data on testnet vote latencies before/after this change was merged to v2.0 and saw significant improvement in vote inclusion during the 4th slot of leader slot spans so I think we should backport this to v1.18 to improve vote latency on mainnet.

EDIT: link to testnet data: #1851 (comment)

@jstarry jstarry merged commit 1b4370b into v1.18 Aug 29, 2024
35 checks passed
@jstarry jstarry deleted the mergify/bp/v1.18/pr-2607 branch August 29, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants