Advertise --advertise-false-custody-group-count for testing PeerDAS (#7593)

#6973
This commit is contained in:
Jimmy Chen
2025-06-16 12:10:28 +01:00
committed by GitHub
parent 6135f417a2
commit 3d2d65bf8d
9 changed files with 67 additions and 40 deletions

View File

@@ -68,6 +68,16 @@ pub fn cli_app() -> Command {
.hide(true)
.display_order(0)
)
.arg(
// TODO(das): remove this before PeerDAS release
Arg::new("advertise-false-custody-group-count")
.long("advertise-false-custody-group-count")
.action(ArgAction::Set)
.help_heading(FLAG_HEADER)
.help("Advertises a false CGC for testing PeerDAS. Do NOT use in production.")
.hide(true)
.display_order(0)
)
.arg(
Arg::new("enable-sampling")
.long("enable-sampling")

View File

@@ -8,7 +8,7 @@ use beacon_chain::graffiti_calculator::GraffitiOrigin;
use beacon_chain::TrustedSetup;
use clap::{parser::ValueSource, ArgMatches, Id};
use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG;
use clap_utils::{parse_flag, parse_required};
use clap_utils::{parse_flag, parse_optional, parse_required};
use client::{ClientConfig, ClientGenesis};
use directory::{DEFAULT_BEACON_NODE_DIR, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR};
use environment::RuntimeContext;
@@ -1197,6 +1197,12 @@ pub fn set_network_config(
config.import_all_attestations = true;
}
if let Some(advertise_false_custody_group_count) =
parse_optional(cli_args, "advertise-false-custody-group-count")?
{
config.advertise_false_custody_group_count = Some(advertise_false_custody_group_count);
}
if parse_flag(cli_args, "shutdown-after-sync") {
config.shutdown_after_sync = true;
}