Add Accounts hash consistency halting (#8772)

* Accounts hash consistency halting

* Add option to inject account hash faults for testing.

Enable option in local cluster test to see that node halts.
This commit is contained in:
sakridge
2020-03-16 08:37:31 -07:00
committed by GitHub
parent eab4fe50a3
commit dc347dd3d7
10 changed files with 431 additions and 51 deletions

View File

@ -663,6 +663,13 @@ pub fn main() {
.validator(solana_net_utils::is_host)
.help("IP address to bind the RPC port [default: use --bind-address]"),
)
.arg(
clap::Arg::with_name("halt_on_trusted_validators_accounts_hash_mismatch")
.long("halt-on-trusted-validators-accounts-hash-mismatch")
.requires("trusted_validators")
.takes_value(false)
.help("Abort the validator if a bank hash mismatch is detected within trusted validator set"),
)
.get_matches();
let identity_keypair = Arc::new(keypair_of(&matches, "identity").unwrap_or_else(Keypair::new));
@ -821,6 +828,10 @@ pub fn main() {
validator_config.max_ledger_slots = Some(limit_ledger_size);
}
if matches.is_present("halt_on_trusted_validators_accounts_hash_mismatch") {
validator_config.halt_on_trusted_validators_accounts_hash_mismatch = true;
}
if matches.value_of("signer_addr").is_some() {
warn!("--vote-signer-address ignored");
}