Skip to content

Commit

Permalink
Make --wait-for-supermajority require --expected-shred-version (#192)
Browse files Browse the repository at this point in the history
In cluster restart scenarios, an important step is scanning the
Blockstore for blocks 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.
  • Loading branch information
steviez authored Mar 12, 2024
1 parent aaf3a91 commit 2ddb50d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions validator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2ddb50d

Please sign in to comment.