Files
lighthouse/testing/simulator/src/cli.rs
Jimmy Chen b2e8b67e34 Reduce number of basic sim test nodes from 7 to 4 (#7566)
Our basic sim test has been [flaky](https://github.com/sigp/lighthouse/actions/runs/15458818777/job/43515966229) for some time, and seems like it has gotten worse since electra fork was added to it in #7199.

It looks like the github runner is struggling with the load, currently it runs 7 nodes on a 4 CPU runner, which is definitely too much. We could consider moving this to run on our self hosted runner - but I think running 7 nodes is unnecessary and we can probably trim test this down.


  Reduce number of basic sim test nodes from 7 (3 BN + 3 Proposer BN + 1 extra)  to 4 (2 BN + 1 Proposer BN + 1 extra).

If we want to run more nodes, we'd have to consider running on self hosted runners.
2025-06-06 03:51:51 +00:00

150 lines
6.4 KiB
Rust

use clap::{crate_version, Arg, ArgAction, Command};
pub fn cli_app() -> Command {
Command::new("simulator")
.version(crate_version!())
.author("Sigma Prime <contact@sigmaprime.io>")
.about("Options for interacting with simulator")
.subcommand(
Command::new("basic-sim")
.about(
"Runs a Beacon Chain simulation with `n` beacon node and validator clients, \
each with `v` validators. \
The simulation runs with a post-Merge Genesis using `mock-el`. \
As the simulation runs, there are checks made to ensure that all components \
are running correctly. If any of these checks fail, the simulation will \
exit immediately.",
)
.arg(
Arg::new("nodes")
.short('n')
.long("nodes")
.action(ArgAction::Set)
.default_value("2")
.help("Number of beacon nodes"),
)
.arg(
Arg::new("proposer-nodes")
.short('p')
.long("proposer-nodes")
.action(ArgAction::Set)
.default_value("1")
.help("Number of proposer-only beacon nodes"),
)
.arg(
Arg::new("validators-per-node")
.short('v')
.long("validators-per-node")
.action(ArgAction::Set)
.default_value("20")
.help("Number of validators"),
)
.arg(
Arg::new("speed-up-factor")
.short('s')
.long("speed-up-factor")
.action(ArgAction::Set)
.default_value("3")
.help("Speed up factor. Please use a divisor of 12."),
)
.arg(
Arg::new("debug-level")
.short('d')
.long("debug-level")
.action(ArgAction::Set)
.default_value("debug")
.help("Set the severity level of the logs."),
)
.arg(
Arg::new("continue-after-checks")
.short('c')
.long("continue_after_checks")
.action(ArgAction::SetTrue)
.help("Continue after checks (default false)"),
)
.arg(
Arg::new("log-dir")
.long("log-dir")
.action(ArgAction::Set)
.help("Set a path for logs of beacon nodes that run in this simulation."),
)
.arg(
Arg::new("disable-stdout-logging")
.long("disable-stdout-logging")
.action(ArgAction::SetTrue)
.help("Disables stdout logging."),
),
)
.subcommand(
Command::new("fallback-sim")
.about(
"Runs a Beacon Chain simulation with `c` validator clients where each VC is \
connected to `b` beacon nodes with `v` validators. \
During the simulation, all but the last connected BN for each VC are \
disconnected from the execution layer, which causes the VC to fallback to the \
single remaining BN. \
At the end of the simulation, there are checks made to ensure that all VCs \
efficiently performed this fallback, within a certain tolerance. \
Otherwise, the simulation will exit and an error will be reported.",
)
.arg(
Arg::new("vc-count")
.long("vc-count")
.action(ArgAction::Set)
.default_value("3")
.help("Number of validator clients."),
)
.arg(
Arg::new("bns-per-vc")
.short('b')
.long("bns-per-vc")
.action(ArgAction::Set)
.default_value("2")
.help("Number of beacon nodes per validator client."),
)
.arg(
Arg::new("validators-per-vc")
.short('v')
.long("validators-per-vc")
.action(ArgAction::Set)
.default_value("20")
.help("Number of validators per client."),
)
.arg(
Arg::new("speed-up-factor")
.short('s')
.long("speed-up-factor")
.action(ArgAction::Set)
.default_value("3")
.help("Speed up factor. Please use a divisor of 12."),
)
.arg(
Arg::new("debug-level")
.short('d')
.long("debug-level")
.action(ArgAction::Set)
.default_value("debug")
.help("Set the severity level of the logs."),
)
.arg(
Arg::new("continue-after-checks")
.short('c')
.long("continue_after_checks")
.action(ArgAction::SetTrue)
.help("Continue after checks (default false)"),
)
.arg(
Arg::new("log-dir")
.long("log-dir")
.action(ArgAction::Set)
.help("Set a path for logs of beacon nodes that run in this simulation."),
)
.arg(
Arg::new("disable-stdout-logging")
.long("disable-stdout-logging")
.action(ArgAction::SetTrue)
.help("Disables stdout logging."),
),
)
}