parent
35ec7a5156
commit
b50a3bae72
|
@ -118,6 +118,10 @@ impl Tower {
|
||||||
}
|
}
|
||||||
let vote_state = VoteState::from(&account);
|
let vote_state = VoteState::from(&account);
|
||||||
if vote_state.is_none() {
|
if vote_state.is_none() {
|
||||||
|
info!(
|
||||||
|
"vote state for bank: {}, validator: {} is none",
|
||||||
|
bank_slot, key
|
||||||
|
);
|
||||||
datapoint_warn!(
|
datapoint_warn!(
|
||||||
"tower_warn",
|
"tower_warn",
|
||||||
(
|
(
|
||||||
|
@ -129,6 +133,10 @@ impl Tower {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let mut vote_state = vote_state.unwrap();
|
let mut vote_state = vote_state.unwrap();
|
||||||
|
info!(
|
||||||
|
"Vote states for slot: {}, account: {}, vote_states {:#?}",
|
||||||
|
bank_slot, key, vote_state.votes
|
||||||
|
);
|
||||||
|
|
||||||
if key == self.epoch_stakes.delegate_pubkey
|
if key == self.epoch_stakes.delegate_pubkey
|
||||||
|| vote_state.node_pubkey == self.epoch_stakes.delegate_pubkey
|
|| vote_state.node_pubkey == self.epoch_stakes.delegate_pubkey
|
||||||
|
@ -152,6 +160,10 @@ impl Tower {
|
||||||
let start_root = vote_state.root_slot;
|
let start_root = vote_state.root_slot;
|
||||||
|
|
||||||
vote_state.process_slot_vote_unchecked(bank_slot);
|
vote_state.process_slot_vote_unchecked(bank_slot);
|
||||||
|
info!(
|
||||||
|
"After simultated vote, vote states for slot: {}, account: {}, vote_states {:#?}",
|
||||||
|
bank_slot, key, vote_state.votes
|
||||||
|
);
|
||||||
|
|
||||||
for vote in &vote_state.votes {
|
for vote in &vote_state.votes {
|
||||||
Self::update_ancestor_lockouts(&mut stake_lockouts, &vote, ancestors);
|
Self::update_ancestor_lockouts(&mut stake_lockouts, &vote, ancestors);
|
||||||
|
|
|
@ -340,7 +340,7 @@ impl ReplayStage {
|
||||||
where
|
where
|
||||||
T: 'static + KeypairUtil + Send + Sync,
|
T: 'static + KeypairUtil + Send + Sync,
|
||||||
{
|
{
|
||||||
trace!("handle votable bank {}", bank.slot());
|
info!("voting on bank {}", bank.slot());
|
||||||
if let Some(new_root) = tower.record_vote(bank.slot(), bank.hash()) {
|
if let Some(new_root) = tower.record_vote(bank.slot(), bank.hash()) {
|
||||||
// get the root bank before squash
|
// get the root bank before squash
|
||||||
let root_bank = bank_forks
|
let root_bank = bank_forks
|
||||||
|
@ -361,7 +361,7 @@ impl ReplayStage {
|
||||||
leader_schedule_cache.set_root(rooted_banks.last().unwrap());
|
leader_schedule_cache.set_root(rooted_banks.last().unwrap());
|
||||||
bank_forks.write().unwrap().set_root(new_root);
|
bank_forks.write().unwrap().set_root(new_root);
|
||||||
Self::handle_new_root(&bank_forks, progress);
|
Self::handle_new_root(&bank_forks, progress);
|
||||||
trace!("new root {}", new_root);
|
info!("new root {}", new_root);
|
||||||
if let Err(e) = root_bank_sender.send(rooted_banks) {
|
if let Err(e) = root_bank_sender.send(rooted_banks) {
|
||||||
trace!("root_bank_sender failed: {:?}", e);
|
trace!("root_bank_sender failed: {:?}", e);
|
||||||
Err(e)?;
|
Err(e)?;
|
||||||
|
@ -472,6 +472,9 @@ impl ReplayStage {
|
||||||
.filter(|b| {
|
.filter(|b| {
|
||||||
let is_votable = b.is_votable();
|
let is_votable = b.is_votable();
|
||||||
trace!("bank is votable: {} {}", b.slot(), is_votable);
|
trace!("bank is votable: {} {}", b.slot(), is_votable);
|
||||||
|
if !is_votable {
|
||||||
|
info!("bank is not votable: {}", b.slot());
|
||||||
|
}
|
||||||
is_votable
|
is_votable
|
||||||
})
|
})
|
||||||
.filter(|b| {
|
.filter(|b| {
|
||||||
|
@ -503,6 +506,9 @@ impl ReplayStage {
|
||||||
let vote_threshold = tower.check_vote_stake_threshold(b.slot(), &stake_lockouts);
|
let vote_threshold = tower.check_vote_stake_threshold(b.slot(), &stake_lockouts);
|
||||||
Self::confirm_forks(tower, stake_lockouts, progress, bank_forks);
|
Self::confirm_forks(tower, stake_lockouts, progress, bank_forks);
|
||||||
debug!("bank vote_threshold: {} {}", b.slot(), vote_threshold);
|
debug!("bank vote_threshold: {} {}", b.slot(), vote_threshold);
|
||||||
|
if !vote_threshold {
|
||||||
|
info!("bank failed threshold check: {}", b.slot());
|
||||||
|
}
|
||||||
vote_threshold
|
vote_threshold
|
||||||
})
|
})
|
||||||
.map(|(b, stake_lockouts)| (tower.calculate_weight(&stake_lockouts), b.clone()))
|
.map(|(b, stake_lockouts)| (tower.calculate_weight(&stake_lockouts), b.clone()))
|
||||||
|
|
Loading…
Reference in New Issue