From cec2f24446c9e658f3edd0dfa1e394b16be01f17 Mon Sep 17 00:00:00 2001 From: steviez Date: Mon, 11 Mar 2024 16:00:11 -0500 Subject: [PATCH] Make --wait-for-supermajority require --expected-shred-version In cluster restart scenarios, an important is scanning the Blockstore for blocks (shreds) that occur after the chosen restart slot with an incorrect shred version. This check ensures that any blocks that occurred pre-cluster restart and after the chosen restart slot get deleted. If a node skips this step, the node can encounter problems when that block is created again, after the cluster has restarted. This check only occurs if --wait-for-supermajority AND --expected-shred-version are set; however, --expected-... is currently optional when using --wait-... Our restart instructions typically mention that one should specify --expected-... as well, but we should just enforce it at the CLI level to prevent mistakes / wasted time debuggging. --- validator/src/cli.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/validator/src/cli.rs b/validator/src/cli.rs index e3f46309724af7..d1ad63b760f031 100644 --- a/validator/src/cli.rs +++ b/validator/src/cli.rs @@ -745,6 +745,7 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { Arg::with_name("wait_for_supermajority") .long("wait-for-supermajority") .requires("expected_bank_hash") + .requires("expected_shred_version") .value_name("SLOT") .validator(is_slot) .help(