-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Vote every number of ticks #2141
Conversation
src/replay_stage.rs
Outdated
@@ -25,6 +25,9 @@ use std::thread::{self, Builder, JoinHandle}; | |||
use std::time::Duration; | |||
use std::time::Instant; | |||
|
|||
pub const NUM_TICK_PER_VOTE: u64 = 8; |
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.
please call this BLOCK_ to harmonize with book terminology ;)
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.
assuming this looks good in your testnet, approved unless you get a better name for BLOCK
inc_new_counter_info!("validator-vote_sent", 1); | ||
vote_blob_sender.send(vec![shared_blob])?; | ||
|
||
if let Ok(shared_blob) = create_new_signed_vote_blob(&last_id, vote_account, bank, cluster_info) |
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.
Filed an issue to store failed votes: #2152
(as votes will be cached and transmitted when leader is available)
Problem
Validators are voting once per second. Voting should happen every block period (number of ticks)
Summary of Changes
Validators check current tick count and vote if its modulo block period.
Also, cap number of entries that are being processed in replay stage.
Fixes #1428