mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
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")
|
||||
@@ -664,14 +640,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")
|
||||
@@ -1248,22 +1216,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")
|
||||
|
||||
@@ -121,13 +121,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);
|
||||
}
|
||||
@@ -241,25 +234,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()
|
||||
@@ -276,20 +250,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();
|
||||
|
||||
@@ -329,7 +289,7 @@ pub fn get_config<E: EthSpec>(
|
||||
.write_all(jwt_secret_key.as_bytes())
|
||||
.map_err(|e| {
|
||||
format!(
|
||||
"Error occured while writing to jwt_secret_key file: {:?}",
|
||||
"Error occurred while writing to jwt_secret_key file: {:?}",
|
||||
e
|
||||
)
|
||||
})?;
|
||||
@@ -365,16 +325,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,
|
||||
@@ -390,10 +340,12 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.trusted_setup = context
|
||||
.eth2_network_config
|
||||
.as_ref()
|
||||
.and_then(|config| config.kzg_trusted_setup.clone());
|
||||
.and_then(|config| config.kzg_trusted_setup.as_ref())
|
||||
.map(|trusted_setup_bytes| serde_json::from_slice(trusted_setup_bytes))
|
||||
.transpose()
|
||||
.map_err(|e| format!("Unable to read trusted setup file: {}", e))?;
|
||||
|
||||
// Override default trusted setup file if required
|
||||
// TODO: consider removing this when we get closer to launch
|
||||
if let Some(trusted_setup_file_path) = cli_args.value_of("trusted-setup-file-override") {
|
||||
let file = std::fs::File::open(trusted_setup_file_path)
|
||||
.map_err(|e| format!("Failed to open trusted setup file: {}", e))?;
|
||||
@@ -758,7 +710,7 @@ pub fn get_config<E: EthSpec>(
|
||||
}
|
||||
|
||||
if cli_args.is_present("validator-monitor-auto") {
|
||||
client_config.validator_monitor_auto = true;
|
||||
client_config.validator_monitor.auto_register = true;
|
||||
}
|
||||
|
||||
if let Some(pubkeys) = cli_args.value_of("validator-monitor-pubkeys") {
|
||||
@@ -768,7 +720,8 @@ pub fn get_config<E: EthSpec>(
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(|e| format!("Invalid --validator-monitor-pubkeys value: {:?}", e))?;
|
||||
client_config
|
||||
.validator_monitor_pubkeys
|
||||
.validator_monitor
|
||||
.validators
|
||||
.extend_from_slice(&pubkeys);
|
||||
}
|
||||
|
||||
@@ -786,14 +739,17 @@ pub fn get_config<E: EthSpec>(
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(|e| format!("Invalid --validator-monitor-file contents: {:?}", e))?;
|
||||
client_config
|
||||
.validator_monitor_pubkeys
|
||||
.validator_monitor
|
||||
.validators
|
||||
.extend_from_slice(&pubkeys);
|
||||
}
|
||||
|
||||
if let Some(count) =
|
||||
clap_utils::parse_optional(cli_args, "validator-monitor-individual-tracking-threshold")?
|
||||
{
|
||||
client_config.validator_monitor_individual_tracking_threshold = count;
|
||||
client_config
|
||||
.validator_monitor
|
||||
.individual_tracking_threshold = count;
|
||||
}
|
||||
|
||||
if cli_args.is_present("disable-lock-timeouts") {
|
||||
@@ -851,22 +807,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");
|
||||
|
||||
@@ -889,7 +829,7 @@ pub fn get_config<E: EthSpec>(
|
||||
// Graphical user interface config.
|
||||
if cli_args.is_present("gui") {
|
||||
client_config.http_api.enabled = true;
|
||||
client_config.validator_monitor_auto = true;
|
||||
client_config.validator_monitor.auto_register = true;
|
||||
}
|
||||
|
||||
// Optimistic finalized sync.
|
||||
|
||||
@@ -89,7 +89,7 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
|
||||
.disk_store(
|
||||
&db_path,
|
||||
&freezer_db_path,
|
||||
blobs_db_path,
|
||||
&blobs_db_path,
|
||||
store_config,
|
||||
log.clone(),
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user