mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Merge pull request #4591 from realbigsean/merge-unstable-deneb-aug-9
Merge unstable deneb aug 9
This commit is contained in:
@@ -389,6 +389,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON \
|
||||
MAINNET.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("http-enable-beacon-processor")
|
||||
.long("http-enable-beacon-processor")
|
||||
.value_name("BOOLEAN")
|
||||
.help("The beacon processor is a scheduler which provides quality-of-service and \
|
||||
DoS protection. When set to \"true\", HTTP API requests will be queued and scheduled \
|
||||
alongside other tasks. When set to \"false\", HTTP API responses will be executed \
|
||||
immediately.")
|
||||
.takes_value(true)
|
||||
.default_value("true")
|
||||
)
|
||||
/* Prometheus metrics HTTP server related arguments */
|
||||
.arg(
|
||||
Arg::with_name("metrics")
|
||||
@@ -1201,4 +1212,55 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true)
|
||||
.possible_values(ProgressiveBalancesMode::VARIANTS)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("beacon-processor-max-workers")
|
||||
.long("beacon-processor-max-workers")
|
||||
.value_name("INTEGER")
|
||||
.help("Specifies the maximum concurrent tasks for the task scheduler. Increasing \
|
||||
this value may increase resource consumption. Reducing the value \
|
||||
may result in decreased resource usage and diminished performance. The \
|
||||
default value is the number of logical CPU cores on the host.")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("beacon-processor-work-queue-len")
|
||||
.long("beacon-processor-work-queue-len")
|
||||
.value_name("INTEGER")
|
||||
.help("Specifies the length of the inbound event queue. \
|
||||
Higher values may prevent messages from being dropped while lower values \
|
||||
may help protect the node from becoming overwhelmed.")
|
||||
.default_value("16384")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("beacon-processor-reprocess-queue-len")
|
||||
.long("beacon-processor-reprocess-queue-len")
|
||||
.value_name("INTEGER")
|
||||
.help("Specifies the length of the queue for messages requiring delayed processing. \
|
||||
Higher values may prevent messages from being dropped while lower values \
|
||||
may help protect the node from becoming overwhelmed.")
|
||||
.default_value("12288")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("beacon-processor-attestation-batch-size")
|
||||
.long("beacon-processor-attestation-batch-size")
|
||||
.value_name("INTEGER")
|
||||
.help("Specifies the number of gossip attestations in a signature verification batch. \
|
||||
Higher values may reduce CPU usage in a healthy network whilst lower values may \
|
||||
increase CPU usage in an unhealthy or hostile network.")
|
||||
.default_value("64")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("beacon-processor-aggregate-batch-size")
|
||||
.long("beacon-processor-aggregate-batch-size")
|
||||
.value_name("INTEGER")
|
||||
.help("Specifies the number of gossip aggregate attestations in a signature \
|
||||
verification batch. \
|
||||
Higher values may reduce CPU usage in a healthy network while lower values may \
|
||||
increase CPU usage in an unhealthy or hostile network.")
|
||||
.default_value("64")
|
||||
.takes_value(true)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ use beacon_chain::chain_config::{
|
||||
use beacon_chain::TrustedSetup;
|
||||
use clap::ArgMatches;
|
||||
use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG;
|
||||
use clap_utils::parse_required;
|
||||
use client::{ClientConfig, ClientGenesis};
|
||||
use directory::{DEFAULT_BEACON_NODE_DIR, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR};
|
||||
use environment::RuntimeContext;
|
||||
@@ -149,6 +150,9 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.http_api.allow_sync_stalled = true;
|
||||
}
|
||||
|
||||
client_config.http_api.enable_beacon_processor =
|
||||
parse_required(cli_args, "http-enable-beacon-processor")?;
|
||||
|
||||
if let Some(cache_size) = clap_utils::parse_optional(cli_args, "shuffling-cache-size")? {
|
||||
client_config.chain.shuffling_cache_size = cache_size;
|
||||
}
|
||||
@@ -839,7 +843,7 @@ pub fn get_config<E: EthSpec>(
|
||||
}
|
||||
|
||||
// Backfill sync rate-limiting
|
||||
client_config.chain.enable_backfill_rate_limiting =
|
||||
client_config.beacon_processor.enable_backfill_rate_limiting =
|
||||
!cli_args.is_present("disable-backfill-rate-limiting");
|
||||
|
||||
if let Some(path) = clap_utils::parse_optional(cli_args, "invalid-gossip-verified-blocks-path")?
|
||||
@@ -853,6 +857,28 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.chain.progressive_balances_mode = progressive_balances_mode;
|
||||
}
|
||||
|
||||
if let Some(max_workers) = clap_utils::parse_optional(cli_args, "beacon-processor-max-workers")?
|
||||
{
|
||||
client_config.beacon_processor.max_workers = max_workers;
|
||||
}
|
||||
|
||||
if client_config.beacon_processor.max_workers == 0 {
|
||||
return Err("--beacon-processor-max-workers must be a non-zero value".to_string());
|
||||
}
|
||||
|
||||
client_config.beacon_processor.max_work_event_queue_len =
|
||||
clap_utils::parse_required(cli_args, "beacon-processor-work-queue-len")?;
|
||||
client_config.beacon_processor.max_scheduled_work_queue_len =
|
||||
clap_utils::parse_required(cli_args, "beacon-processor-reprocess-queue-len")?;
|
||||
client_config
|
||||
.beacon_processor
|
||||
.max_gossip_attestation_batch_size =
|
||||
clap_utils::parse_required(cli_args, "beacon-processor-attestation-batch-size")?;
|
||||
client_config
|
||||
.beacon_processor
|
||||
.max_gossip_aggregate_batch_size =
|
||||
clap_utils::parse_required(cli_args, "beacon-processor-aggregate-batch-size")?;
|
||||
|
||||
Ok(client_config)
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
|
||||
let builder = ClientBuilder::new(context.eth_spec_instance.clone())
|
||||
.runtime_context(context)
|
||||
.chain_spec(spec)
|
||||
.beacon_processor(client_config.beacon_processor.clone())
|
||||
.http_api_config(client_config.http_api.clone())
|
||||
.disk_store(
|
||||
&db_path,
|
||||
|
||||
Reference in New Issue
Block a user