mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Delete deprecated cli flags (#4906)
* Delete BN spec flag and VC beacon-node flag * Remove warn * slog * add warn * delete eth1-endpoint * delete server from vc cli.rs * delete server flag in config.rs * delete delete-lockfiles in vc * delete allow-unsynced flag in VC * delete strict-fee-recipient in VC and warn log * delete merge flag in bn (hidden) * delete count-unrealized and count-unrealized-full in bn (hidden) * delete http-disable-legacy-spec in bn (hidden) * delete eth1-endpoint in lcli * delete warn message lcli * delete eth1-endpoints * delete minify in slashing protection * delete minify related * Remove mut * add back warn! log * Indentation * Delete count-unrealized * Delete eth1-endpoints * Delete eth1-endpoint test * delete eth1-endpints test * delete allow-unsynced test * Add back lcli eth1-endpoint --------- Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -388,12 +388,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
address of this server (e.g., http://localhost:5052).")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-disable-legacy-spec")
|
||||
.long("http-disable-legacy-spec")
|
||||
.requires("enable_http")
|
||||
.hidden(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-spec-fork")
|
||||
.long("http-spec-fork")
|
||||
@@ -569,24 +563,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.help("If present, uses an eth1 backend that generates static dummy data.\
|
||||
Identical to the method used at the 2019 Canada interop.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("eth1-endpoint")
|
||||
.long("eth1-endpoint")
|
||||
.value_name("HTTP-ENDPOINT")
|
||||
.help("Deprecated. Use --eth1-endpoints.")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("eth1-endpoints")
|
||||
.long("eth1-endpoints")
|
||||
.value_name("HTTP-ENDPOINTS")
|
||||
.conflicts_with("eth1-endpoint")
|
||||
.help("One http endpoint for a web3 connection to an execution node. \
|
||||
Note: This flag is now only useful for testing, use `--execution-endpoint` \
|
||||
flag to connect to an execution node on mainnet and testnets.
|
||||
Defaults to http://127.0.0.1:8545.")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("eth1-purge-cache")
|
||||
.long("eth1-purge-cache")
|
||||
@@ -649,14 +625,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
/*
|
||||
* Execution Layer Integration
|
||||
*/
|
||||
.arg(
|
||||
Arg::with_name("merge")
|
||||
.long("merge")
|
||||
.help("Deprecated. The feature activates automatically when --execution-endpoint \
|
||||
is supplied.")
|
||||
.takes_value(false)
|
||||
.hidden(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("execution-endpoint")
|
||||
.long("execution-endpoint")
|
||||
@@ -1200,22 +1168,6 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.requires("builder")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("count-unrealized")
|
||||
.long("count-unrealized")
|
||||
.hidden(true)
|
||||
.help("This flag is deprecated and has no effect.")
|
||||
.takes_value(true)
|
||||
.default_value("true")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("count-unrealized-full")
|
||||
.long("count-unrealized-full")
|
||||
.hidden(true)
|
||||
.help("This flag is deprecated and has no effect.")
|
||||
.takes_value(true)
|
||||
.default_value("false")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("reset-payload-statuses")
|
||||
.long("reset-payload-statuses")
|
||||
|
||||
@@ -120,13 +120,6 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.http_api.allow_origin = Some(allow_origin.to_string());
|
||||
}
|
||||
|
||||
if cli_args.is_present("http-disable-legacy-spec") {
|
||||
warn!(
|
||||
log,
|
||||
"The flag --http-disable-legacy-spec is deprecated and will be removed"
|
||||
);
|
||||
}
|
||||
|
||||
if let Some(fork_name) = clap_utils::parse_optional(cli_args, "http-spec-fork")? {
|
||||
client_config.http_api.spec_fork_name = Some(fork_name);
|
||||
}
|
||||
@@ -240,25 +233,6 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.sync_eth1_chain = true;
|
||||
}
|
||||
|
||||
// Defines the URL to reach the eth1 node.
|
||||
if let Some(endpoint) = cli_args.value_of("eth1-endpoint") {
|
||||
warn!(
|
||||
log,
|
||||
"The --eth1-endpoint flag is deprecated";
|
||||
"msg" => "please use --eth1-endpoints instead"
|
||||
);
|
||||
client_config.sync_eth1_chain = true;
|
||||
|
||||
let endpoint = SensitiveUrl::parse(endpoint)
|
||||
.map_err(|e| format!("eth1-endpoint was an invalid URL: {:?}", e))?;
|
||||
client_config.eth1.endpoint = Eth1Endpoint::NoAuth(endpoint);
|
||||
} else if let Some(endpoint) = cli_args.value_of("eth1-endpoints") {
|
||||
client_config.sync_eth1_chain = true;
|
||||
let endpoint = SensitiveUrl::parse(endpoint)
|
||||
.map_err(|e| format!("eth1-endpoints contains an invalid URL {:?}", e))?;
|
||||
client_config.eth1.endpoint = Eth1Endpoint::NoAuth(endpoint);
|
||||
}
|
||||
|
||||
if let Some(val) = cli_args.value_of("eth1-blocks-per-log-query") {
|
||||
client_config.eth1.blocks_per_log_query = val
|
||||
.parse()
|
||||
@@ -275,20 +249,6 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.eth1.cache_follow_distance = Some(follow_distance);
|
||||
}
|
||||
|
||||
if cli_args.is_present("merge") {
|
||||
if cli_args.is_present("execution-endpoint") {
|
||||
warn!(
|
||||
log,
|
||||
"The --merge flag is deprecated";
|
||||
"info" => "the --execution-endpoint flag automatically enables this feature"
|
||||
)
|
||||
} else {
|
||||
return Err("The --merge flag is deprecated. \
|
||||
Supply a value to --execution-endpoint instead."
|
||||
.into());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(endpoints) = cli_args.value_of("execution-endpoint") {
|
||||
let mut el_config = execution_layer::Config::default();
|
||||
|
||||
@@ -364,16 +324,6 @@ pub fn get_config<E: EthSpec>(
|
||||
clap_utils::parse_required(cli_args, "execution-timeout-multiplier")?;
|
||||
el_config.execution_timeout_multiplier = Some(execution_timeout_multiplier);
|
||||
|
||||
// If `--execution-endpoint` is provided, we should ignore any `--eth1-endpoints` values and
|
||||
// use `--execution-endpoint` instead. Also, log a deprecation warning.
|
||||
if cli_args.is_present("eth1-endpoints") || cli_args.is_present("eth1-endpoint") {
|
||||
warn!(
|
||||
log,
|
||||
"Ignoring --eth1-endpoints flag";
|
||||
"info" => "the value for --execution-endpoint will be used instead. \
|
||||
--eth1-endpoints has been deprecated for post-merge configurations"
|
||||
);
|
||||
}
|
||||
client_config.eth1.endpoint = Eth1Endpoint::Auth {
|
||||
endpoint: execution_endpoint,
|
||||
jwt_path: secret_file,
|
||||
@@ -816,22 +766,6 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.chain.fork_choice_before_proposal_timeout_ms = timeout;
|
||||
}
|
||||
|
||||
if !clap_utils::parse_required::<bool>(cli_args, "count-unrealized")? {
|
||||
warn!(
|
||||
log,
|
||||
"The flag --count-unrealized is deprecated and will be removed";
|
||||
"info" => "any use of the flag will have no effect"
|
||||
);
|
||||
}
|
||||
|
||||
if clap_utils::parse_required::<bool>(cli_args, "count-unrealized-full")? {
|
||||
warn!(
|
||||
log,
|
||||
"The flag --count-unrealized-full is deprecated and will be removed";
|
||||
"info" => "setting it to `true` has no effect"
|
||||
);
|
||||
}
|
||||
|
||||
client_config.chain.always_reset_payload_statuses =
|
||||
cli_args.is_present("reset-payload-statuses");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user