mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 12:22:51 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -995,6 +995,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true)
|
||||
.requires("checkpoint-state")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("checkpoint-blobs")
|
||||
.long("checkpoint-blobs")
|
||||
.help("Set the checkpoint blobs to start syncing from. Must be aligned and match \
|
||||
--checkpoint-block. Using --checkpoint-sync-url instead is recommended.")
|
||||
.value_name("BLOBS_SSZ")
|
||||
.takes_value(true)
|
||||
.requires("checkpoint-block")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("checkpoint-sync-url")
|
||||
.long("checkpoint-sync-url")
|
||||
@@ -1328,11 +1337,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.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.")
|
||||
.help("This flag is deprecated and has no effect.")
|
||||
.takes_value(false)
|
||||
)
|
||||
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
|
||||
|
||||
@@ -163,6 +163,10 @@ pub fn get_config<E: EthSpec>(
|
||||
cli_args.is_present("light-client-server");
|
||||
}
|
||||
|
||||
if cli_args.is_present("light-client-server") {
|
||||
client_config.chain.enable_light_client_server = true;
|
||||
}
|
||||
|
||||
if let Some(cache_size) = clap_utils::parse_optional(cli_args, "shuffling-cache-size")? {
|
||||
client_config.chain.shuffling_cache_size = cache_size;
|
||||
}
|
||||
@@ -539,9 +543,10 @@ pub fn get_config<E: EthSpec>(
|
||||
|
||||
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)) = (
|
||||
if let (Some(initial_state_path), Some(initial_block_path), opt_initial_blobs_path) = (
|
||||
cli_args.value_of("checkpoint-state"),
|
||||
cli_args.value_of("checkpoint-block"),
|
||||
cli_args.value_of("checkpoint-blobs"),
|
||||
) {
|
||||
let read = |path: &str| {
|
||||
use std::fs::File;
|
||||
@@ -557,10 +562,12 @@ pub fn get_config<E: EthSpec>(
|
||||
|
||||
let anchor_state_bytes = read(initial_state_path)?;
|
||||
let anchor_block_bytes = read(initial_block_path)?;
|
||||
let anchor_blobs_bytes = opt_initial_blobs_path.map(read).transpose()?;
|
||||
|
||||
ClientGenesis::WeakSubjSszBytes {
|
||||
anchor_state_bytes,
|
||||
anchor_block_bytes,
|
||||
anchor_blobs_bytes,
|
||||
}
|
||||
} else if let Some(remote_bn_url) = cli_args.value_of("checkpoint-sync-url") {
|
||||
let url = SensitiveUrl::parse(remote_bn_url)
|
||||
@@ -1151,8 +1158,6 @@ pub fn set_network_config(
|
||||
config.target_peers = target_peers_str
|
||||
.parse::<usize>()
|
||||
.map_err(|_| format!("Invalid number of target peers: {}", target_peers_str))?;
|
||||
} else {
|
||||
config.target_peers = 80; // default value
|
||||
}
|
||||
|
||||
if let Some(value) = cli_args.value_of("network-load") {
|
||||
@@ -1454,9 +1459,6 @@ 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