-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Use timestamp to tiebreak votes in banking_stage #31925
Use timestamp to tiebreak votes in banking_stage #31925
Conversation
814cfbe
to
39e576d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable to me, but i am not too sure if timestamp is reliable for the purpose.
core/src/latest_unprocessed_votes.rs
Outdated
let latest_slot = latest_vote.read().unwrap().slot(); | ||
if slot > latest_slot { | ||
let latest_timestamp = latest_vote.read().unwrap().timestamp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think we can just take the lock once and grab both these fields
39e576d
to
a59357e
Compare
Codecov Report
@@ Coverage Diff @@
## master #31925 +/- ##
========================================
Coverage 81.9% 81.9%
========================================
Files 760 760
Lines 207407 207513 +106
========================================
+ Hits 169968 170070 +102
- Misses 37439 37443 +4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
(cherry picked from commit 9f62cc1)
…31925) (#31973) Use timestamp to tiebreak votes in banking_stage (#31925) (cherry picked from commit 9f62cc1) Co-authored-by: Ashwin Sekar <[email protected]>
Problem
Refreshed votes are dropped as the deduplication logic doesn't allow new votes for the same slot to entire the queue.
Same bug as #31879 further in the pipeline in banking_stage. This affects both tpu and gossip votes.
Summary of Changes
Allow refreshed votes in banking stage queue by using timestamp to tiebreak.
Note: only affects v1.16.0+ with the
allow_votes_to_directly_update_vote_state
feature enabled.Fixes #