mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add docs for slashing protection (#1760)
## Proposed Changes * Add documentation about slashing protection, including how to troubleshoot issues and move between clients. * Add an error message if the validator client is started with 0 validators. Previously it would hit an error relating to the slashing protection database not existing, which wrongly pushed people towards using the unsafe `--init-slashing-protection` flag.
This commit is contained in:
@@ -107,6 +107,20 @@ impl<T: EthSpec> ProductionValidatorClient<T> {
|
||||
.await
|
||||
.map_err(|e| format!("Unable to initialize validators: {:?}", e))?;
|
||||
|
||||
info!(
|
||||
log,
|
||||
"Initialized validators";
|
||||
"disabled" => validators.num_total().saturating_sub(validators.num_enabled()),
|
||||
"enabled" => validators.num_enabled(),
|
||||
);
|
||||
|
||||
if validators.num_enabled() == 0 {
|
||||
return Err("Cannot run with 0 enabled validators. \
|
||||
Please create or import validators before starting the validator client, \
|
||||
or check your datadir configuration"
|
||||
.to_string());
|
||||
}
|
||||
|
||||
// Initialize slashing protection.
|
||||
let slashing_db_path = config.validator_dir.join(SLASHING_PROTECTION_FILENAME);
|
||||
let slashing_protection = if config.init_slashing_protection {
|
||||
@@ -145,13 +159,6 @@ impl<T: EthSpec> ProductionValidatorClient<T> {
|
||||
})?;
|
||||
}
|
||||
|
||||
info!(
|
||||
log,
|
||||
"Initialized validators";
|
||||
"disabled" => validators.num_total().saturating_sub(validators.num_enabled()),
|
||||
"enabled" => validators.num_enabled(),
|
||||
);
|
||||
|
||||
let beacon_node_url: Url = config
|
||||
.beacon_node
|
||||
.parse()
|
||||
|
||||
Reference in New Issue
Block a user