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

Vote every number of ticks #2141

Merged
merged 4 commits into from
Dec 14, 2018
Merged

Vote every number of ticks #2141

merged 4 commits into from
Dec 14, 2018

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Dec 12, 2018

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

@@ -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;
Copy link
Contributor

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 ;)

Copy link
Contributor

@rob-solana rob-solana left a 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

@pgarg66 pgarg66 added the CI Pull Request is ready to enter CI label Dec 13, 2018
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Dec 13, 2018
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)
Copy link
Contributor Author

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)
@pgarg66 pgarg66 added the CI Pull Request is ready to enter CI label Dec 14, 2018
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Dec 14, 2018
@pgarg66 pgarg66 merged commit 091b21f into solana-labs:master Dec 14, 2018
@pgarg66 pgarg66 deleted the voting branch December 14, 2018 02:43
brooksprumo added a commit to brooksprumo/solana that referenced this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants