mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Enable partial data columns by default on Hoodi and Sepolia (#9343)
Enable partial data columns by default on Hoodi and Sepolia. Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
This commit is contained in:
@@ -674,11 +674,22 @@ pub fn cli_app() -> Command {
|
||||
Arg::new("enable-partial-columns")
|
||||
.long("enable-partial-columns")
|
||||
.help("Enable partial messages for data columns. This can reduce the amount of \
|
||||
data sent over the network.")
|
||||
data sent over the network. Enabled by default on Hoodi and Sepolia; use \
|
||||
--disable-partial-columns to opt out.")
|
||||
.action(ArgAction::SetTrue)
|
||||
.help_heading(FLAG_HEADER)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
Arg::new("disable-partial-columns")
|
||||
.long("disable-partial-columns")
|
||||
.help("Disable partial messages for data columns. Use this on Hoodi or Sepolia \
|
||||
to opt out of the default-enabled behavior.")
|
||||
.action(ArgAction::SetTrue)
|
||||
.conflicts_with("enable-partial-columns")
|
||||
.help_heading(FLAG_HEADER)
|
||||
.display_order(0)
|
||||
)
|
||||
/*
|
||||
* Monitoring metrics
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,16 @@ pub fn get_config<E: EthSpec>(
|
||||
|
||||
set_network_config(&mut client_config.network, cli_args, &data_dir_ref)?;
|
||||
|
||||
if parse_flag(cli_args, "enable-partial-columns") {
|
||||
let default_partial_columns_enabled = spec
|
||||
.config_name
|
||||
.as_ref()
|
||||
.is_some_and(|name| matches!(name.as_str(), "hoodi" | "sepolia"));
|
||||
let user_disable_partial_columns = parse_flag(cli_args, "disable-partial-columns");
|
||||
let user_enable_partial_columns = parse_flag(cli_args, "enable-partial-columns");
|
||||
let enable_partial_columns = !user_disable_partial_columns
|
||||
&& (user_enable_partial_columns || default_partial_columns_enabled);
|
||||
|
||||
if enable_partial_columns {
|
||||
// Partial messages assume that each subnet maps to exactly one column.
|
||||
// Check this here to avoid weird issues on networks where this is not the case.
|
||||
if spec.data_column_sidecar_subnet_count == E::number_of_columns() as u64 {
|
||||
|
||||
Reference in New Issue
Block a user