mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-28 02:03:32 +00:00
Cell Dissemination (Partial messages) (#8314)
- https://github.com/ethereum/consensus-specs/pull/4558 - https://eips.ethereum.org/EIPS/eip-8136 Co-Authored-By: Daniel Knopik <daniel@dknopik.de> Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com> Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -670,6 +670,15 @@ pub fn cli_app() -> Command {
|
||||
.hide(true)
|
||||
.display_order(0)
|
||||
)
|
||||
.arg(
|
||||
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.")
|
||||
.action(ArgAction::SetTrue)
|
||||
.help_heading(FLAG_HEADER)
|
||||
.display_order(0)
|
||||
)
|
||||
/*
|
||||
* Monitoring metrics
|
||||
*/
|
||||
|
||||
@@ -110,6 +110,21 @@ 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") {
|
||||
// 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 {
|
||||
client_config.network.enable_partial_columns = true;
|
||||
client_config.chain.enable_partial_columns = true;
|
||||
} else {
|
||||
warn!(
|
||||
subnets = spec.data_column_sidecar_subnet_count,
|
||||
columns = E::number_of_columns(),
|
||||
"Not enabling partial columns on networks with multiple columns per subnet"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Parse custody mode from CLI flags
|
||||
let is_supernode = parse_flag(cli_args, "supernode");
|
||||
let is_semi_supernode = parse_flag(cli_args, "semi-supernode");
|
||||
|
||||
Reference in New Issue
Block a user