mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
feat: adds CLI flags to delay publishing for edge case testing on PeerDAS devnets (#6947)
Closes #6919
This commit is contained in:
@@ -1599,5 +1599,30 @@ pub fn cli_app() -> Command {
|
||||
.action(ArgAction::Set)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
Arg::new("delay-block-publishing")
|
||||
.long("delay-block-publishing")
|
||||
.value_name("SECONDS")
|
||||
.action(ArgAction::Set)
|
||||
.help_heading(FLAG_HEADER)
|
||||
.help("TESTING ONLY: Artificially delay block publishing by the specified number of seconds. \
|
||||
This only works for if `BroadcastValidation::Gossip` is used (default). \
|
||||
DO NOT USE IN PRODUCTION.")
|
||||
.hide(true)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
Arg::new("delay-data-column-publishing")
|
||||
.long("delay-data-column-publishing")
|
||||
.value_name("SECONDS")
|
||||
.action(ArgAction::Set)
|
||||
.help_heading(FLAG_HEADER)
|
||||
.help("TESTING ONLY: Artificially delay data column publishing by the specified number of seconds. \
|
||||
Limitation: If `delay-block-publishing` is also used, data columns will be delayed for a \
|
||||
minimum of `delay-block-publishing` seconds.
|
||||
DO NOT USE IN PRODUCTION.")
|
||||
.hide(true)
|
||||
.display_order(0)
|
||||
)
|
||||
.group(ArgGroup::new("enable_http").args(["http", "gui", "staking"]).multiple(true))
|
||||
}
|
||||
|
||||
@@ -895,6 +895,14 @@ pub fn get_config<E: EthSpec>(
|
||||
.max_gossip_aggregate_batch_size =
|
||||
clap_utils::parse_required(cli_args, "beacon-processor-aggregate-batch-size")?;
|
||||
|
||||
if let Some(delay) = clap_utils::parse_optional(cli_args, "delay-block-publishing")? {
|
||||
client_config.chain.block_publishing_delay = Some(Duration::from_secs_f64(delay));
|
||||
}
|
||||
|
||||
if let Some(delay) = clap_utils::parse_optional(cli_args, "delay-data-column-publishing")? {
|
||||
client_config.chain.data_column_publishing_delay = Some(Duration::from_secs_f64(delay));
|
||||
}
|
||||
|
||||
Ok(client_config)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user