Upgrade sim (#972)

* Add progress on duties refactor

* Add simple is_aggregator bool to val subscription

* Add the no-eth1-sim, refactor sim
This commit is contained in:
Paul Hauner
2020-03-30 16:42:03 +11:00
committed by Age Manning
parent aa6f838c3c
commit 7305e9e5d9
6 changed files with 523 additions and 335 deletions

View File

@@ -6,7 +6,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.author("Sigma Prime <contact@sigmaprime.io>")
.about("Options for interacting with simulator")
.subcommand(
SubCommand::with_name("beacon-chain-sim")
SubCommand::with_name("eth1-sim")
.about(
"Lighthouse Beacon Chain Simulator creates `n` beacon node and validator clients, \
each with `v` validators. A deposit contract is deployed at the start of the \
@@ -22,17 +22,48 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.short("n")
.long("nodes")
.takes_value(true)
.help("Number of beacon nodes (default 4)"))
.default_value("4")
.help("Number of beacon nodes"))
.arg(Arg::with_name("validators_per_node")
.short("v")
.long("validators_per_node")
.takes_value(true)
.help("Number of validators (default 20)"))
.default_value("20")
.help("Number of validators"))
.arg(Arg::with_name("speed_up_factor")
.short("s")
.long("speed_up_factor")
.takes_value(true)
.help("Speed up factor (default 4)"))
.default_value("4")
.help("Speed up factor"))
.arg(Arg::with_name("end_after_checks")
.short("e")
.long("end_after_checks")
.takes_value(false)
.help("End after checks (default true)"))
)
.subcommand(
SubCommand::with_name("no-eth1-sim")
.about("Runs a simulator that bypasses the eth1 chain. Useful for faster testing of
components that don't rely upon eth1")
.arg(Arg::with_name("nodes")
.short("n")
.long("nodes")
.takes_value(true)
.default_value("4")
.help("Number of beacon nodes"))
.arg(Arg::with_name("validators_per_node")
.short("v")
.long("validators_per_node")
.takes_value(true)
.default_value("20")
.help("Number of validators"))
.arg(Arg::with_name("speed_up_factor")
.short("s")
.long("speed_up_factor")
.takes_value(true)
.default_value("4")
.help("Speed up factor"))
.arg(Arg::with_name("end_after_checks")
.short("e")
.long("end_after_checks")