forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework the validator scan-for-incorrect-shred-version function (#2851)
This scan is important for ensuring that invalidated blocks are cleared from the Blockstore around cluster outage/restart situations. The scan previously relied on --wait-for-supermajority being set in addition to --expected-shred-version. After a cluster had restarted, nodes could restart by downloading a new snapshot, but still having invalid state in their blockstore that disrupted normal operation. The key modifications from this change are: - The blockstore is always examined, even with wfsm arg - The blockstore bounds are compared to hard forks to evaluate whether or not the blockstore should be scanned for invalid shreds - The blockstore scan is done with computed shred version to avoid any opportunity for an operator setting a bad expected shred version and wiping their ledger out
- Loading branch information
Showing
1 changed file
with
232 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters