Remove --disable-partial-columns in favour of bool argument to --enable... (#9478)

Similar to https://github.com/sigp/lighthouse/pull/9476, partial columns is a feature expected to become the default soon, so instead of introducing a CLI option that will be removed again soon, consolidate into `--enable-partial-columns` which now takes a boolean argument.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
This commit is contained in:
Daniel Knopik
2026-06-17 02:45:30 +02:00
committed by GitHub
parent 9de2e9e6e1
commit e8472b9d77
4 changed files with 29 additions and 42 deletions

View File

@@ -684,21 +684,13 @@ pub fn cli_app() -> Command {
.arg(
Arg::new("enable-partial-columns")
.long("enable-partial-columns")
.value_name("BOOLEAN")
.help("Enable partial messages for data columns. This can reduce the amount of \
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)
data sent over the network. Enabled by default on Hoodi and Sepolia; set to \
\"false\" to opt out.")
.action(ArgAction::Set)
.num_args(0..=1)
.default_missing_value("true")
.display_order(0)
)
/*

View File

@@ -112,10 +112,8 @@ pub fn get_config<E: EthSpec>(
.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);
let enable_partial_columns = clap_utils::parse_optional(cli_args, "enable-partial-columns")?
.unwrap_or(default_partial_columns_enabled);
if enable_partial_columns {
// Partial messages assume that each subnet maps to exactly one column.

View File

@@ -88,6 +88,10 @@ Options:
Enables the mplex multiplexer alongside yamux. Yamux is preferred when
both are available. Enabled by default; set to "false" to disable.
[default: true]
--enable-partial-columns [<BOOLEAN>]
Enable partial messages for data columns. This can reduce the amount
of data sent over the network. Enabled by default on Hoodi and
Sepolia; set to "false" to opt out.
--enr-address <ADDRESS>...
The IP address/ DNS address to broadcast to other peers on how to
reach this node. If a DNS address is provided, the enr-address is set
@@ -475,9 +479,6 @@ Flags:
--disable-packet-filter
Disables the discovery packet filter. Useful for testing in smaller
networks
--disable-partial-columns
Disable partial messages for data columns. Use this on Hoodi or
Sepolia to opt out of the default-enabled behavior.
--disable-proposer-reorgs
Do not attempt to reorg late blocks from other validators when
proposing.
@@ -493,10 +494,6 @@ Flags:
Sets the local ENR IP address and port to match those set for
lighthouse. Specifically, the IP address will be the value of
--listen-address and the UDP port will be --discovery-port.
--enable-partial-columns
Enable partial messages for data columns. This can reduce the amount
of data sent over the network. Enabled by default on Hoodi and
Sepolia; use --disable-partial-columns to opt out.
--enable-private-discovery
Lighthouse by default does not discover private IP addresses. Set this
flag to enable connection attempts to local addresses.

View File

@@ -2827,7 +2827,7 @@ fn enable_mplex_no_value() {
#[test]
fn partial_columns() {
CommandLineTest::new()
.flag("enable-partial-columns", None)
.flag("enable-partial-columns", Some("true"))
.run_with_zero_port()
.with_config(|config| {
assert!(config.network.enable_partial_columns);
@@ -2842,6 +2842,18 @@ fn partial_columns() {
})
}
#[test]
fn partial_columns_no_value() {
// Passing the flag without a value should enable partial columns.
CommandLineTest::new()
.flag("enable-partial-columns", None)
.run_with_zero_port()
.with_config(|config| {
assert!(config.network.enable_partial_columns);
assert!(config.chain.enable_partial_columns);
});
}
#[test]
fn partial_columns_default_hoodi() {
CommandLineTest::new()
@@ -2865,10 +2877,10 @@ fn partial_columns_default_sepolia() {
}
#[test]
fn partial_columns_disable_overrides_hoodi_default() {
fn partial_columns_false_overrides_hoodi_default() {
CommandLineTest::new()
.flag("network", Some("hoodi"))
.flag("disable-partial-columns", None)
.flag("enable-partial-columns", Some("false"))
.run_with_zero_port()
.with_config(|config| {
assert!(!config.network.enable_partial_columns);
@@ -2877,24 +2889,12 @@ fn partial_columns_disable_overrides_hoodi_default() {
}
#[test]
fn partial_columns_disable_on_mainnet_no_op() {
fn partial_columns_false_on_mainnet() {
CommandLineTest::new()
.flag("disable-partial-columns", None)
.flag("enable-partial-columns", Some("false"))
.run_with_zero_port()
.with_config(|config| {
assert!(!config.network.enable_partial_columns);
assert!(!config.chain.enable_partial_columns);
});
}
#[test]
fn partial_columns_enable_disable_conflict() {
let mut cmd = base_cmd();
cmd.arg("--enable-partial-columns")
.arg("--disable-partial-columns");
let output = cmd.output().expect("should run command");
assert!(
!output.status.success(),
"expected clap to reject --enable-partial-columns and --disable-partial-columns together",
);
}