-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Don't store votes unless we are leader soon #17803
Conversation
c007bbe to
966cf5d
Compare
966cf5d to
7a51778
Compare
Codecov Report
@@ Coverage Diff @@
## master #17803 +/- ##
=======================================
Coverage 82.7% 82.7%
=======================================
Files 431 431
Lines 120590 120596 +6
=======================================
+ Hits 99839 99844 +5
- Misses 20751 20752 +1 |
|
So the major change here is that leaders will now be more reliant on forwarding to get votes that don't land within 20 slots? Edit: It's also of note since we don't forward vote transactions: https://github.com/solana-labs/solana/blob/master/core/src/banking_stage.rs#L299, then if there's long delays in gossip vote propagation or nodes are drifting and have a bad estimate of when they will next be leader, i.e. forking/delays throw off the I think the concerns above are ok though because:
|
Yea. Ideally the constant of 20 is set such that 99.9% of the time there would be no difference in which votes it sees vs. always keeping them. I'm not sure if that's 20 or something higher or lower, but it seemed like a reasonable starting point. |
(cherry picked from commit 0feac57)
(cherry picked from commit 0feac57) Co-authored-by: sakridge <[email protected]>
Problem
Validator collects votes all the time even if it has no use for them.
Summary of Changes
Only collect votes when the node is the leader.
Fixes #17790