Remove progressive balances mode (#5224)

This commit is contained in:
Michael Sproul
2024-02-14 11:55:27 +11:00
committed by GitHub
parent 9eb1685506
commit b1f7f0aaf9
12 changed files with 23 additions and 118 deletions

View File

@@ -1,6 +1,5 @@
use clap::{App, Arg, ArgGroup};
use strum::VariantNames;
use types::ProgressiveBalancesMode;
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
App::new("beacon_node")
@@ -1265,14 +1264,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
Arg::with_name("progressive-balances")
.long("progressive-balances")
.value_name("MODE")
.help("Control the progressive balances cache mode. The default `fast` mode uses \
the cache to speed up fork choice. A more conservative `checked` mode \
compares the cache's results against results without the cache. If \
there is a mismatch, it falls back to the cache-free result. Using the \
default `fast` mode is recommended unless advised otherwise by the \
Lighthouse team.")
.help("Deprecated. This optimisation is now the default and cannot be disabled.")
.takes_value(true)
.possible_values(ProgressiveBalancesMode::VARIANTS)
.possible_values(&["fast", "disabled", "checked", "strict"])
)
.arg(
Arg::with_name("unsafe-and-dangerous-mode")

View File

@@ -860,10 +860,12 @@ pub fn get_config<E: EthSpec>(
client_config.network.invalid_block_storage = Some(path);
}
if let Some(progressive_balances_mode) =
clap_utils::parse_optional(cli_args, "progressive-balances")?
{
client_config.chain.progressive_balances_mode = progressive_balances_mode;
if cli_args.is_present("progressive-balances") {
warn!(
log,
"Progressive balances mode is deprecated";
"info" => "please remove --progressive-balances"
);
}
if let Some(max_workers) = clap_utils::parse_optional(cli_args, "beacon-processor-max-workers")?