mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 23:04:53 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -1003,6 +1003,16 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true)
|
||||
.default_value("180")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("allow-insecure-genesis-sync")
|
||||
.long("allow-insecure-genesis-sync")
|
||||
.help("Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. \
|
||||
Checkpoint syncing is the preferred method for syncing a node. \
|
||||
Only use this flag when testing. DO NOT use on mainnet!")
|
||||
.conflicts_with("checkpoint-sync-url")
|
||||
.conflicts_with("checkpoint-state")
|
||||
.takes_value(false)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("reconstruct-historic-states")
|
||||
.long("reconstruct-historic-states")
|
||||
@@ -1179,32 +1189,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
Arg::with_name("builder-profit-threshold")
|
||||
.long("builder-profit-threshold")
|
||||
.value_name("WEI_VALUE")
|
||||
.help("The minimum reward in wei provided to the proposer by a block builder for \
|
||||
an external payload to be considered for inclusion in a proposal. If this \
|
||||
threshold is not met, the local EE's payload will be used. This is currently \
|
||||
*NOT* in comparison to the value of the local EE's payload. It simply checks \
|
||||
whether the total proposer reward from an external payload is equal to or \
|
||||
greater than this value. In the future, a comparison to a local payload is \
|
||||
likely to be added. Example: Use 250000000000000000 to set the threshold to \
|
||||
0.25 ETH.")
|
||||
.default_value("0")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("ignore-builder-override-suggestion-threshold")
|
||||
.long("ignore-builder-override-suggestion-threshold")
|
||||
.value_name("PERCENTAGE")
|
||||
.help("When the EE advises Lighthouse to ignore the builder payload, this flag \
|
||||
specifies a percentage threshold for the difference between the reward from \
|
||||
the builder payload and the local EE's payload. This threshold must be met \
|
||||
for Lighthouse to consider ignoring the EE's suggestion. If the reward from \
|
||||
the builder's payload doesn't exceed the local payload by at least this \
|
||||
percentage, the local payload will be used. The conditions under which the \
|
||||
EE may make this suggestion depend on the EE's implementation, with the \
|
||||
primary intent being to safeguard against potential censorship attacks \
|
||||
from builders. Setting this flag to 0 will cause Lighthouse to always \
|
||||
ignore the EE's suggestion. Default: 10.0 (equivalent to 10%).")
|
||||
.default_value("10.0")
|
||||
.help("This flag is deprecated and has no effect.")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
@@ -1256,12 +1241,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.arg(
|
||||
Arg::with_name("always-prefer-builder-payload")
|
||||
.long("always-prefer-builder-payload")
|
||||
.help("If set, the beacon node always uses the payload from the builder instead of the local payload.")
|
||||
// The builder profit threshold flag is used to provide preference
|
||||
// to local payloads, therefore it fundamentally conflicts with
|
||||
// always using the builder.
|
||||
.conflicts_with("builder-profit-threshold")
|
||||
.conflicts_with("ignore-builder-override-suggestion-threshold")
|
||||
.help("This flag is deprecated and has no effect.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("invalid-gossip-verified-blocks-path")
|
||||
@@ -1342,5 +1322,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.default_value("64")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("disable-duplicate-warn-logs")
|
||||
.long("disable-duplicate-warn-logs")
|
||||
.help("Disable warning logs for duplicate gossip messages. The WARN level log is \
|
||||
useful for detecting a duplicate validator key running elsewhere. However, this may \
|
||||
result in excessive warning logs if the validator is broadcasting messages to \
|
||||
multiple beacon nodes via the validator client --broadcast flag. In this case, \
|
||||
disabling these warn logs may be useful.")
|
||||
.takes_value(false)
|
||||
)
|
||||
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
|
||||
}
|
||||
|
||||
@@ -310,6 +310,21 @@ pub fn get_config<E: EthSpec>(
|
||||
clap_utils::parse_optional(cli_args, "builder-user-agent")?;
|
||||
}
|
||||
|
||||
if cli_args.is_present("builder-profit-threshold") {
|
||||
warn!(
|
||||
log,
|
||||
"Ignoring --builder-profit-threshold";
|
||||
"info" => "this flag is deprecated and will be removed"
|
||||
);
|
||||
}
|
||||
if cli_args.is_present("always-prefer-builder-payload") {
|
||||
warn!(
|
||||
log,
|
||||
"Ignoring --always-prefer-builder-payload";
|
||||
"info" => "this flag is deprecated and will be removed"
|
||||
);
|
||||
}
|
||||
|
||||
// Set config values from parse values.
|
||||
el_config.secret_files = vec![secret_file.clone()];
|
||||
el_config.execution_endpoints = vec![execution_endpoint.clone()];
|
||||
@@ -318,12 +333,6 @@ pub fn get_config<E: EthSpec>(
|
||||
el_config.jwt_id = clap_utils::parse_optional(cli_args, "execution-jwt-id")?;
|
||||
el_config.jwt_version = clap_utils::parse_optional(cli_args, "execution-jwt-version")?;
|
||||
el_config.default_datadir = client_config.data_dir().clone();
|
||||
el_config.builder_profit_threshold =
|
||||
clap_utils::parse_required(cli_args, "builder-profit-threshold")?;
|
||||
el_config.always_prefer_builder_payload =
|
||||
cli_args.is_present("always-prefer-builder-payload");
|
||||
el_config.ignore_builder_override_suggestion_threshold =
|
||||
clap_utils::parse_required(cli_args, "ignore-builder-override-suggestion-threshold")?;
|
||||
let execution_timeout_multiplier =
|
||||
clap_utils::parse_required(cli_args, "execution-timeout-multiplier")?;
|
||||
el_config.execution_timeout_multiplier = Some(execution_timeout_multiplier);
|
||||
@@ -529,6 +538,8 @@ pub fn get_config<E: EthSpec>(
|
||||
None
|
||||
};
|
||||
|
||||
client_config.allow_insecure_genesis_sync = cli_args.is_present("allow-insecure-genesis-sync");
|
||||
|
||||
client_config.genesis = if eth2_network_config.genesis_state_is_known() {
|
||||
// Set up weak subjectivity sync, or start from the hardcoded genesis state.
|
||||
if let (Some(initial_state_path), Some(initial_block_path)) = (
|
||||
@@ -1436,6 +1447,9 @@ pub fn set_network_config(
|
||||
Some(config_str.parse()?)
|
||||
}
|
||||
};
|
||||
|
||||
config.disable_duplicate_warn_logs = cli_args.is_present("disable-duplicate-warn-logs");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user