-
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
Relax gossip to banking stage filtering to allow refreshed votes #31879
Conversation
e71ca56
to
393e005
Compare
b70d380
to
fe9ba09
Compare
effb3bb
to
6354df6
Compare
Codecov Report
@@ Coverage Diff @@
## master #31879 +/- ##
=======================================
Coverage 81.9% 81.9%
=======================================
Files 757 755 -2
Lines 206984 207057 +73
=======================================
+ Hits 169543 169620 +77
+ Misses 37441 37437 -4 |
a511a43
to
800f5b6
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.
lgtm, thanks!
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!
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.
just some nits, lgtm
core/src/verified_vote_packets.rs
Outdated
@@ -185,6 +187,13 @@ impl SingleValidatorVotes { | |||
} | |||
} | |||
|
|||
fn get_latest_gossip_timestamp(&self) -> Option<UnixTimestamp> { |
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.
nit: think we can just name this to get_timestamp
, since it's not necessarily from gossip
core/src/verified_vote_packets.rs
Outdated
assert_eq!(slot, vote_later_ts.last_voted_slot().unwrap()); | ||
assert_eq!(timestamp, vote_later_ts.timestamp); | ||
|
||
// Same vote with no ts should not override |
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.
nit, spell out ts to timestamp
core/src/verified_vote_packets.rs
Outdated
assert_eq!(slot, vote_later_ts.last_voted_slot().unwrap()); | ||
assert_eq!(timestamp, vote_later_ts.timestamp); | ||
|
||
// Same vote with earlier ts should not override |
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.
nit: expand ts to timestamp
be5c1b0
800f5b6
to
be5c1b0
Compare
) (cherry picked from commit 1b79875)
) (cherry picked from commit 1b79875)
) (cherry picked from commit 1b79875)
) (cherry picked from commit 1b79875)
…es (backport of #31879) (#31907) Relax gossip to banking stage filtering to allow refreshed votes (#31879) (cherry picked from commit 1b79875) Co-authored-by: Ashwin Sekar <[email protected]>
…es (backport of #31879) (#31906) Relax gossip to banking stage filtering to allow refreshed votes (#31879) (cherry picked from commit 1b79875) Co-authored-by: Ashwin Sekar <[email protected]>
…es (backport of solana-labs#31879) (solana-labs#31906) Relax gossip to banking stage filtering to allow refreshed votes (solana-labs#31879) (cherry picked from commit 1b79875) Co-authored-by: Ashwin Sekar <[email protected]>
Problem
The feature flag
allow_votes_to_directly_update_vote_state
allows an optimization of only storing one vote per validator before forwarding to banking stage. We store votes for the latest slot - which implicitly drops refreshed votes.Summary of Changes
Create a tiebreaker, if the slot is the same as the latest vote only accept it if it has a later timestamp (refreshed vote)
Fixes #