improve supermajority waiting logging (#30479)

make logging for supermajority waiting and stake percent from gossip in sync
This commit is contained in:
HaoranYi 2023-03-01 08:57:42 -06:00 committed by GitHub
parent 31bd695b83
commit 16db984cb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -1927,7 +1927,8 @@ fn wait_for_supermajority(
}
for i in 1.. {
if i % 10 == 1 {
let logging = i % 10 == 1;
if logging {
info!(
"Waiting for {}% of activated stake at slot {} to be in gossip...",
WAIT_FOR_SUPERMAJORITY_THRESHOLD_PERCENT,
@ -1936,7 +1937,7 @@ fn wait_for_supermajority(
}
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() =
ValidatorStartProgress::WaitingForSupermajority {

View File

@ -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
// 1) Validator can't vote on earlier ancestor of last vote due to switch threshold (can't 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
remove_tower(&exited_validator_info.info.ledger_path, &node_to_restart);
blockstore.set_dead_slot(prev_voted_slot).unwrap();

View File

@ -590,7 +590,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
.takes_value(true)
.possible_values(&["none", "lz4", "snappy", "zlib"])
.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. \
Turning on compression can save ~10% of the ledger size."),
)