improve supermajority waiting logging (#30479)
make logging for supermajority waiting and stake percent from gossip in sync
This commit is contained in:
parent
31bd695b83
commit
16db984cb5
|
@ -1927,7 +1927,8 @@ fn wait_for_supermajority(
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in 1.. {
|
for i in 1.. {
|
||||||
if i % 10 == 1 {
|
let logging = i % 10 == 1;
|
||||||
|
if logging {
|
||||||
info!(
|
info!(
|
||||||
"Waiting for {}% of activated stake at slot {} to be in gossip...",
|
"Waiting for {}% of activated stake at slot {} to be in gossip...",
|
||||||
WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT,
|
WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT,
|
||||||
|
@ -1936,7 +1937,7 @@ fn wait_for_supermajority(
|
||||||
}
|
}
|
||||||
|
|
||||||
let gossip_stake_percent =
|
let gossip_stake_percent =
|
||||||
get_stake_percent_in_gossip(&bank, cluster_info, i % 10 == 0);
|
get_stake_percent_in_gossip(&bank, cluster_info, logging);
|
||||||
|
|
||||||
*start_progress.write().unwrap() =
|
*start_progress.write().unwrap() =
|
||||||
ValidatorStartProgress::WaitingForSupermajority {
|
ValidatorStartProgress::WaitingForSupermajority {
|
||||||
|
|
|
@ -1651,7 +1651,7 @@ fn test_optimistic_confirmation_violation_detection() {
|
||||||
// from resetting to the parent of `prev_voted_slot` to create an alternative fork because
|
// from resetting to the parent of `prev_voted_slot` to create an alternative fork because
|
||||||
// 1) Validator can't vote on earlier ancestor of last vote due to switch threshold (can't vote
|
// 1) Validator can't vote on earlier ancestor of last vote due to switch threshold (can't vote
|
||||||
// on ancestors of last vote)
|
// on ancestors of last vote)
|
||||||
// 2) Won't reset to this earlier ancestor becasue reset can only happen on same voted fork if
|
// 2) Won't reset to this earlier ancestor because reset can only happen on same voted fork if
|
||||||
// it's for the last vote slot or later
|
// it's for the last vote slot or later
|
||||||
remove_tower(&exited_validator_info.info.ledger_path, &node_to_restart);
|
remove_tower(&exited_validator_info.info.ledger_path, &node_to_restart);
|
||||||
blockstore.set_dead_slot(prev_voted_slot).unwrap();
|
blockstore.set_dead_slot(prev_voted_slot).unwrap();
|
||||||
|
|
|
@ -590,7 +590,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.possible_values(&["none", "lz4", "snappy", "zlib"])
|
.possible_values(&["none", "lz4", "snappy", "zlib"])
|
||||||
.default_value(&default_args.rocksdb_ledger_compression)
|
.default_value(&default_args.rocksdb_ledger_compression)
|
||||||
.help("The compression alrogithm that is used to compress \
|
.help("The compression algorithm that is used to compress \
|
||||||
transaction status data. \
|
transaction status data. \
|
||||||
Turning on compression can save ~10% of the ledger size."),
|
Turning on compression can save ~10% of the ledger size."),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue