Track votes from gossip for optimistic confirmation (#11209)
* Add check in cluster_info_vote_listenere to see if optimstic conf was achieved Add OptimisticConfirmationVerifier * More fixes * Fix merge conflicts * Remove gossip notificatin * Add dashboards * Fix rebase * Count switch votes as well toward optimistic conf * rename Co-authored-by: Carl <carl@solana.com>
This commit is contained in:
@ -14,13 +14,23 @@ pub fn new_vote_transaction(
|
||||
node_keypair: &Keypair,
|
||||
vote_keypair: &Keypair,
|
||||
authorized_voter_keypair: &Keypair,
|
||||
switch_proof_hash: Option<Hash>,
|
||||
) -> Transaction {
|
||||
let votes = Vote::new(slots, bank_hash);
|
||||
let vote_ix = vote_instruction::vote(
|
||||
&vote_keypair.pubkey(),
|
||||
&authorized_voter_keypair.pubkey(),
|
||||
votes,
|
||||
);
|
||||
let vote_ix = if let Some(switch_proof_hash) = switch_proof_hash {
|
||||
vote_instruction::vote_switch(
|
||||
&vote_keypair.pubkey(),
|
||||
&authorized_voter_keypair.pubkey(),
|
||||
votes,
|
||||
switch_proof_hash,
|
||||
)
|
||||
} else {
|
||||
vote_instruction::vote(
|
||||
&vote_keypair.pubkey(),
|
||||
&authorized_voter_keypair.pubkey(),
|
||||
votes,
|
||||
)
|
||||
};
|
||||
|
||||
let mut vote_tx = Transaction::new_with_payer(&[vote_ix], Some(&node_keypair.pubkey()));
|
||||
|
||||
|
Reference in New Issue
Block a user