From 3b8fd4a315db3f33c4ca7225b6e44251ebd94db9 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 20 Feb 2024 23:46:40 +0200 Subject: [PATCH 01/46] upgrade clap to v4.5 --- Cargo.lock | 131 +++- Cargo.toml | 2 +- account_manager/src/lib.rs | 17 +- account_manager/src/validator/create.rs | 52 +- account_manager/src/validator/exit.rs | 34 +- account_manager/src/validator/import.rs | 35 +- account_manager/src/validator/list.rs | 6 +- account_manager/src/validator/mod.rs | 29 +- account_manager/src/validator/modify.rs | 35 +- account_manager/src/validator/recover.rs | 36 +- .../src/validator/slashing_protection.rs | 32 +- account_manager/src/wallet/create.rs | 38 +- account_manager/src/wallet/list.rs | 6 +- account_manager/src/wallet/mod.rs | 21 +- account_manager/src/wallet/recover.rs | 32 +- beacon_node/src/cli.rs | 607 +++++++++--------- beacon_node/src/config.rs | 243 +++---- beacon_node/src/lib.rs | 3 +- boot_node/src/cli.rs | 163 ++++- boot_node/src/config.rs | 8 +- boot_node/src/lib.rs | 8 +- boot_node/src/server.rs | 6 +- common/clap_utils/src/lib.rs | 19 +- common/directory/src/lib.rs | 4 +- database_manager/src/lib.rs | 141 ++-- lcli/src/change_genesis_time.rs | 4 +- lcli/src/create_payload_header.rs | 4 +- lcli/src/deploy_deposit_contract.rs | 2 +- lcli/src/eth1_genesis.rs | 10 +- lcli/src/interop_genesis.rs | 4 +- lcli/src/main.rs | 514 ++++++++------- lcli/src/new_testnet.rs | 6 +- lcli/src/parse_ssz.rs | 10 +- lcli/src/replace_state_pubkeys.rs | 4 +- lcli/src/skip_slots.rs | 2 +- lcli/src/transition_blocks.rs | 6 +- lighthouse/src/main.rs | 208 +++--- lighthouse/tests/beacon_node.rs | 4 +- lighthouse/tests/validator_manager.rs | 30 +- testing/simulator/src/cli.rs | 102 +-- testing/simulator/src/eth1_sim.rs | 20 +- testing/simulator/src/main.rs | 7 +- testing/simulator/src/no_eth1_sim.rs | 16 +- testing/simulator/src/sync_sim.rs | 8 +- validator_client/src/cli.rs | 179 +++--- validator_client/src/config.rs | 64 +- validator_client/src/lib.rs | 2 +- validator_manager/src/create_validators.rs | 84 +-- validator_manager/src/import_validators.rs | 29 +- validator_manager/src/lib.rs | 21 +- validator_manager/src/move_validators.rs | 71 +- watch/Cargo.toml | 1 + watch/src/cli.rs | 27 +- 53 files changed, 1695 insertions(+), 1452 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46fd981aa77..907f6473425 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ version = "0.3.5" dependencies = [ "account_utils", "bls", - "clap", + "clap 4.5.1", "clap_utils", "directory", "environment", @@ -289,12 +289,51 @@ dependencies = [ ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "anstream" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ - "winapi", + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", ] [[package]] @@ -944,7 +983,7 @@ name = "beacon_node" version = "4.6.0" dependencies = [ "beacon_chain", - "clap", + "clap 4.5.1", "clap_utils", "client", "directory", @@ -1197,7 +1236,7 @@ name = "boot_node" version = "4.6.0" dependencies = [ "beacon_node", - "clap", + "clap 4.5.1", "clap_utils", "eth2_network_config", "ethereum_ssz", @@ -1457,20 +1496,43 @@ version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "ansi_term", - "atty", "bitflags 1.3.2", - "strsim 0.8.0", "textwrap", "unicode-width", - "vec_map", ] +[[package]] +name = "clap" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.0", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + [[package]] name = "clap_utils" version = "0.1.0" dependencies = [ - "clap", + "clap 4.5.1", "dirs", "eth2_network_config", "ethereum-types 0.14.1", @@ -1535,6 +1597,12 @@ dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "compare_fields" version = "0.2.0" @@ -1642,7 +1710,7 @@ checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" dependencies = [ "atty", "cast", - "clap", + "clap 2.34.0", "criterion-plot", "csv", "itertools", @@ -1935,7 +2003,7 @@ version = "0.1.0" dependencies = [ "beacon_chain", "beacon_node", - "clap", + "clap 4.5.1", "clap_utils", "environment", "hex", @@ -2128,7 +2196,7 @@ dependencies = [ name = "directory" version = "0.1.0" dependencies = [ - "clap", + "clap 4.5.1", "clap_utils", "eth2_network_config", ] @@ -4529,7 +4597,7 @@ dependencies = [ "account_utils", "beacon_chain", "bls", - "clap", + "clap 4.5.1", "clap_utils", "deposit_contract", "directory", @@ -5108,7 +5176,7 @@ dependencies = [ "beacon_processor", "bls", "boot_node", - "clap", + "clap 4.5.1", "clap_utils", "database_manager", "directory", @@ -7829,7 +7897,7 @@ dependencies = [ name = "simulator" version = "0.2.0" dependencies = [ - "clap", + "clap 4.5.1", "env_logger 0.9.3", "eth1", "eth1_test_rig", @@ -8218,15 +8286,15 @@ dependencies = [ [[package]] name = "strsim" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "strum" @@ -9181,6 +9249,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" @@ -9198,7 +9272,7 @@ dependencies = [ "account_utils", "bincode", "bls", - "clap", + "clap 4.5.1", "clap_utils", "deposit_contract", "directory", @@ -9271,7 +9345,7 @@ version = "0.1.0" dependencies = [ "account_utils", "bls", - "clap", + "clap 4.5.1", "clap_utils", "environment", "eth2", @@ -9308,12 +9382,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -9519,7 +9587,8 @@ dependencies = [ "beacon_node", "bls", "byteorder", - "clap", + "clap 4.5.1", + "clap_utils", "diesel", "diesel_migrations", "env_logger 0.9.3", diff --git a/Cargo.toml b/Cargo.toml index a7f44551ee8..7f462991c93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ bincode = "1" bitvec = "1" byteorder = "1" bytes = "1" -clap = "2" +clap = "4.5.1" compare_fields_derive = { path = "common/compare_fields_derive" } criterion = "0.3" delay_map = "0.3" diff --git a/account_manager/src/lib.rs b/account_manager/src/lib.rs index a032a85f71e..8323bd01961 100644 --- a/account_manager/src/lib.rs +++ b/account_manager/src/lib.rs @@ -2,8 +2,8 @@ mod common; pub mod validator; pub mod wallet; -use clap::App; use clap::ArgMatches; +use clap::Command; use environment::Environment; use types::EthSpec; @@ -13,25 +13,26 @@ pub const VALIDATOR_DIR_FLAG: &str = "validator-dir"; pub const VALIDATOR_DIR_FLAG_ALIAS: &str = "validators-dir"; pub const WALLETS_DIR_FLAG: &str = "wallets-dir"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) - .visible_aliases(&["a", "am", "account", CMD]) +pub fn cli_app() -> Command { + Command::new(CMD) + .visible_aliases(["a", "am", "account", CMD]) .about("Utilities for generating and managing Ethereum 2.0 accounts.") .subcommand(wallet::cli_app()) .subcommand(validator::cli_app()) } /// Run the account manager, returning an error if the operation did not succeed. -pub fn run(matches: &ArgMatches<'_>, env: Environment) -> Result<(), String> { +pub fn run(matches: &ArgMatches, env: Environment) -> Result<(), String> { match matches.subcommand() { - (wallet::CMD, Some(matches)) => wallet::cli_run(matches)?, - (validator::CMD, Some(matches)) => validator::cli_run(matches, env)?, - (unknown, _) => { + Some((wallet::CMD, matches)) => wallet::cli_run(matches)?, + Some((validator::CMD, matches)) => validator::cli_run(matches, env)?, + Some((unknown, _)) => { return Err(format!( "{} is not a valid {} command. See --help.", unknown, CMD )); } + _ => return Err("No subcommand provided, see --help for options".to_string()), } Ok(()) diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index da01121055e..ef6e97ac314 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -4,7 +4,7 @@ use crate::{SECRETS_DIR_FLAG, WALLETS_DIR_FLAG}; use account_utils::{ random_password, read_password_from_user, strip_off_newlines, validator_definitions, PlainText, }; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use directory::{ ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR, }; @@ -26,36 +26,36 @@ pub const COUNT_FLAG: &str = "count"; pub const AT_MOST_FLAG: &str = "at-most"; pub const WALLET_PASSWORD_PROMPT: &str = "Enter your wallet's password:"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about( "Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key \ derivation scheme.", ) .arg( - Arg::with_name(WALLET_NAME_FLAG) + Arg::new(WALLET_NAME_FLAG) .long(WALLET_NAME_FLAG) .value_name("WALLET_NAME") .help("Use the wallet identified by this name") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(WALLET_PASSWORD_FLAG) + Arg::new(WALLET_PASSWORD_FLAG) .long(WALLET_PASSWORD_FLAG) .value_name("WALLET_PASSWORD_PATH") .help("A path to a file containing the password which will unlock the wallet.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(WALLETS_DIR_FLAG) + Arg::new(WALLETS_DIR_FLAG) .long(WALLETS_DIR_FLAG) .value_name(WALLETS_DIR_FLAG) .help("A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("datadir"), ) .arg( - Arg::with_name(SECRETS_DIR_FLAG) + Arg::new(SECRETS_DIR_FLAG) .long(SECRETS_DIR_FLAG) .value_name("SECRETS_DIR") .help( @@ -63,20 +63,20 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Defaults to ~/.lighthouse/{network}/secrets", ) .conflicts_with("datadir") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(DEPOSIT_GWEI_FLAG) + Arg::new(DEPOSIT_GWEI_FLAG) .long(DEPOSIT_GWEI_FLAG) .value_name("DEPOSIT_GWEI") .help( "The GWEI value of the deposit amount. Defaults to the minimum amount \ required for an active validator (MAX_EFFECTIVE_BALANCE)", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(STORE_WITHDRAW_FLAG) + Arg::new(STORE_WITHDRAW_FLAG) .long(STORE_WITHDRAW_FLAG) .help( "If present, the withdrawal keystore will be stored alongside the voting \ @@ -85,15 +85,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(COUNT_FLAG) + Arg::new(COUNT_FLAG) .long(COUNT_FLAG) .value_name("VALIDATOR_COUNT") .help("The number of validators to create, regardless of how many already exist") .conflicts_with("at-most") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(AT_MOST_FLAG) + Arg::new(AT_MOST_FLAG) .long(AT_MOST_FLAG) .value_name("AT_MOST_VALIDATORS") .help( @@ -101,12 +101,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { reach the given count. Never deletes an existing validator.", ) .conflicts_with("count") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) @@ -120,15 +120,15 @@ pub fn cli_run( let spec = env.core_context().eth2_config.spec; let name: Option = clap_utils::parse_optional(matches, WALLET_NAME_FLAG)?; - let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG); + let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG); - let wallet_base_dir = if matches.value_of("datadir").is_some() { + let wallet_base_dir = if matches.get_one::("datadir").is_some() { let path: PathBuf = clap_utils::parse_required(matches, "datadir")?; path.join(DEFAULT_WALLET_DIR) } else { parse_path_or_default_with_flag(matches, WALLETS_DIR_FLAG, DEFAULT_WALLET_DIR)? }; - let secrets_dir = if matches.value_of("datadir").is_some() { + let secrets_dir = if matches.get_one::("datadir").is_some() { let path: PathBuf = clap_utils::parse_required(matches, "datadir")?; path.join(DEFAULT_SECRET_DIR) } else { @@ -145,7 +145,7 @@ pub fn cli_run( return Err(format!( "No wallet directory at {:?}. Use the `lighthouse --network {} {} {} {}` command to create a wallet", wallet_base_dir, - matches.value_of("network").unwrap_or(""), + matches.get_one::("network").unwrap_or(&String::from("")), crate::CMD, crate::wallet::CMD, crate::wallet::create::CMD @@ -246,7 +246,7 @@ pub fn cli_run( .voting_keystore(keystores.voting, voting_password.as_bytes()) .withdrawal_keystore(keystores.withdrawal, withdrawal_password.as_bytes()) .create_eth1_tx_data(deposit_gwei, &spec) - .store_withdrawal_keystore(matches.is_present(STORE_WITHDRAW_FLAG)) + .store_withdrawal_keystore(matches.get_flag(STORE_WITHDRAW_FLAG)) .build() .map_err(|e| format!("Unable to build validator directory: {:?}", e))?; diff --git a/account_manager/src/validator/exit.rs b/account_manager/src/validator/exit.rs index bc9e0ee1dd6..c54e1a33b42 100644 --- a/account_manager/src/validator/exit.rs +++ b/account_manager/src/validator/exit.rs @@ -1,6 +1,6 @@ use crate::wallet::create::STDIN_INPUTS_FLAG; use bls::{Keypair, PublicKey}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use environment::Environment; use eth2::{ types::{GenesisData, StateId, ValidatorData, ValidatorId, ValidatorStatus}, @@ -28,46 +28,46 @@ pub const DEFAULT_BEACON_NODE: &str = "http://localhost:5052/"; pub const CONFIRMATION_PHRASE: &str = "Exit my validator"; pub const WEBSITE_URL: &str = "https://lighthouse-book.sigmaprime.io/voluntary-exit.html"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("exit") +pub fn cli_app() -> Command { + Command::new("exit") .about("Submits a VoluntaryExit to the beacon chain for a given validator keystore.") .arg( - Arg::with_name(KEYSTORE_FLAG) + Arg::new(KEYSTORE_FLAG) .long(KEYSTORE_FLAG) .value_name("KEYSTORE_PATH") .help("The path to the EIP-2335 voting keystore for the validator") - .takes_value(true) + .action(ArgAction::Set) .required(true), ) .arg( - Arg::with_name(PASSWORD_FILE_FLAG) + Arg::new(PASSWORD_FILE_FLAG) .long(PASSWORD_FILE_FLAG) .value_name("PASSWORD_FILE_PATH") .help("The path to the password file which unlocks the validator voting keystore") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(BEACON_SERVER_FLAG) + Arg::new(BEACON_SERVER_FLAG) .long(BEACON_SERVER_FLAG) .value_name("NETWORK_ADDRESS") .help("Address to a beacon node HTTP API") .default_value(DEFAULT_BEACON_NODE) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(NO_WAIT) + Arg::new(NO_WAIT) .long(NO_WAIT) .help("Exits after publishing the voluntary exit without waiting for confirmation that the exit was included in the beacon chain") ) .arg( - Arg::with_name(NO_CONFIRMATION) + Arg::new(NO_CONFIRMATION) .long(NO_CONFIRMATION) .help("Exits without prompting for confirmation that you understand the implications of a voluntary exit. This should be used with caution") ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) @@ -78,9 +78,9 @@ pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result< let password_file_path: Option = clap_utils::parse_optional(matches, PASSWORD_FILE_FLAG)?; - let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG); - let no_wait = matches.is_present(NO_WAIT); - let no_confirmation = matches.is_present(NO_CONFIRMATION); + let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG); + let no_wait = matches.get_flag(NO_WAIT); + let no_confirmation = matches.get_flag(NO_CONFIRMATION); let spec = env.eth2_config().spec.clone(); let server_url: String = clap_utils::parse_required(matches, BEACON_SERVER_FLAG)?; diff --git a/account_manager/src/validator/import.rs b/account_manager/src/validator/import.rs index bf000385f3a..573442c0b73 100644 --- a/account_manager/src/validator/import.rs +++ b/account_manager/src/validator/import.rs @@ -9,7 +9,7 @@ use account_utils::{ }, ZeroizeString, }; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME}; use std::fs; use std::path::PathBuf; @@ -25,8 +25,8 @@ pub const PASSWORD_PROMPT: &str = "Enter the keystore password, or press enter t pub const KEYSTORE_REUSE_WARNING: &str = "DO NOT USE THE ORIGINAL KEYSTORES TO VALIDATE WITH \ ANOTHER CLIENT, OR YOU WILL GET SLASHED."; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about( "Imports one or more EIP-2335 passwords into a Lighthouse VC directory, \ requesting passwords interactively. The directory flag provides a convenient \ @@ -34,16 +34,16 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Python utility.", ) .arg( - Arg::with_name(KEYSTORE_FLAG) + Arg::new(KEYSTORE_FLAG) .long(KEYSTORE_FLAG) .value_name("KEYSTORE_PATH") .help("Path to a single keystore to be imported.") .conflicts_with(DIR_FLAG) - .required_unless(DIR_FLAG) - .takes_value(true), + .required_unless_present(DIR_FLAG) + .action(ArgAction::Set), ) .arg( - Arg::with_name(DIR_FLAG) + Arg::new(DIR_FLAG) .long(DIR_FLAG) .value_name("KEYSTORES_DIRECTORY") .help( @@ -53,23 +53,24 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { has the '.json' extension will be attempted to be imported.", ) .conflicts_with(KEYSTORE_FLAG) - .required_unless(KEYSTORE_FLAG) - .takes_value(true), + .required_unless_present(KEYSTORE_FLAG) + .action(ArgAction::Set), ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) .arg( - Arg::with_name(REUSE_PASSWORD_FLAG) + Arg::new(REUSE_PASSWORD_FLAG) .long(REUSE_PASSWORD_FLAG) + .action(ArgAction::SetTrue) .help("If present, the same password will be used for all imported keystores."), ) .arg( - Arg::with_name(PASSWORD_FLAG) + Arg::new(PASSWORD_FLAG) .long(PASSWORD_FLAG) .value_name("KEYSTORE_PASSWORD_PATH") .requires(REUSE_PASSWORD_FLAG) @@ -79,15 +80,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { The password will be copied to the `validator_definitions.yml` file, so after \ import we strongly recommend you delete the file at KEYSTORE_PASSWORD_PATH.", ) - .takes_value(true), + .action(ArgAction::Set), ) } pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), String> { let keystore: Option = clap_utils::parse_optional(matches, KEYSTORE_FLAG)?; let keystores_dir: Option = clap_utils::parse_optional(matches, DIR_FLAG)?; - let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG); - let reuse_password = matches.is_present(REUSE_PASSWORD_FLAG); + let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG); + let reuse_password = matches.get_flag(REUSE_PASSWORD_FLAG); let keystore_password_path: Option = clap_utils::parse_optional(matches, PASSWORD_FLAG)?; diff --git a/account_manager/src/validator/list.rs b/account_manager/src/validator/list.rs index 33857283695..d082a49590b 100644 --- a/account_manager/src/validator/list.rs +++ b/account_manager/src/validator/list.rs @@ -1,11 +1,11 @@ use account_utils::validator_definitions::ValidatorDefinitions; -use clap::App; +use clap::Command; use std::path::PathBuf; pub const CMD: &str = "list"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD).about("Lists the public keys of all validators.") +pub fn cli_app() -> Command { + Command::new(CMD).about("Lists the public keys of all validators.") } pub fn cli_run(validator_dir: PathBuf) -> Result<(), String> { diff --git a/account_manager/src/validator/mod.rs b/account_manager/src/validator/mod.rs index 4f1bde07952..65ef36a1d06 100644 --- a/account_manager/src/validator/mod.rs +++ b/account_manager/src/validator/mod.rs @@ -7,7 +7,7 @@ pub mod recover; pub mod slashing_protection; use crate::{VALIDATOR_DIR_FLAG, VALIDATOR_DIR_FLAG_ALIAS}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use directory::{parse_path_or_default_with_flag, DEFAULT_VALIDATOR_DIR}; use environment::Environment; use std::path::PathBuf; @@ -15,11 +15,11 @@ use types::EthSpec; pub const CMD: &str = "validator"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about("Provides commands for managing Eth2 validators.") .arg( - Arg::with_name(VALIDATOR_DIR_FLAG) + Arg::new(VALIDATOR_DIR_FLAG) .long(VALIDATOR_DIR_FLAG) .alias(VALIDATOR_DIR_FLAG_ALIAS) .value_name("VALIDATOR_DIRECTORY") @@ -27,7 +27,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { "The path to search for validator directories. \ Defaults to ~/.lighthouse/{network}/validators", ) - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("datadir"), ) .subcommand(create::cli_app()) @@ -40,7 +40,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { } pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result<(), String> { - let validator_base_dir = if matches.value_of("datadir").is_some() { + let validator_base_dir = if matches.get_one::("datadir").is_some() { let path: PathBuf = clap_utils::parse_required(matches, "datadir")?; path.join(DEFAULT_VALIDATOR_DIR) } else { @@ -49,18 +49,19 @@ pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result< eprintln!("validator-dir path: {:?}", validator_base_dir); match matches.subcommand() { - (create::CMD, Some(matches)) => create::cli_run::(matches, env, validator_base_dir), - (modify::CMD, Some(matches)) => modify::cli_run(matches, validator_base_dir), - (import::CMD, Some(matches)) => import::cli_run(matches, validator_base_dir), - (list::CMD, Some(_)) => list::cli_run(validator_base_dir), - (recover::CMD, Some(matches)) => recover::cli_run(matches, validator_base_dir), - (slashing_protection::CMD, Some(matches)) => { + Some((create::CMD, matches)) => create::cli_run::(matches, env, validator_base_dir), + Some((modify::CMD, matches)) => modify::cli_run(matches, validator_base_dir), + Some((import::CMD, matches)) => import::cli_run(matches, validator_base_dir), + Some((list::CMD, _)) => list::cli_run(validator_base_dir), + Some((recover::CMD, matches)) => recover::cli_run(matches, validator_base_dir), + Some((slashing_protection::CMD, matches)) => { slashing_protection::cli_run(matches, env, validator_base_dir) } - (exit::CMD, Some(matches)) => exit::cli_run(matches, env), - (unknown, _) => Err(format!( + Some((exit::CMD, matches)) => exit::cli_run(matches, env), + Some((unknown, _)) => Err(format!( "{} does not have a {} command. See --help", CMD, unknown )), + _ => Err(format!("No command provided for {}. See --help", CMD)), } } diff --git a/account_manager/src/validator/modify.rs b/account_manager/src/validator/modify.rs index bd4ae4d8f49..962c40ad87c 100644 --- a/account_manager/src/validator/modify.rs +++ b/account_manager/src/validator/modify.rs @@ -1,6 +1,6 @@ use account_utils::validator_definitions::ValidatorDefinitions; use bls::PublicKey; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use std::{collections::HashSet, path::PathBuf}; pub const CMD: &str = "modify"; @@ -10,42 +10,42 @@ pub const DISABLE: &str = "disable"; pub const PUBKEY_FLAG: &str = "pubkey"; pub const ALL: &str = "all"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about("Modify validator status in validator_definitions.yml.") .subcommand( - App::new(ENABLE) + Command::new(ENABLE) .about("Enable validator(s) in validator_definitions.yml.") .arg( - Arg::with_name(PUBKEY_FLAG) + Arg::new(PUBKEY_FLAG) .long(PUBKEY_FLAG) .value_name("PUBKEY") .help("Validator pubkey to enable") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(ALL) + Arg::new(ALL) .long(ALL) .help("Enable all validators in the validator directory") - .takes_value(false) + .action(ArgAction::SetTrue) .conflicts_with(PUBKEY_FLAG), ), ) .subcommand( - App::new(DISABLE) + Command::new(DISABLE) .about("Disable validator(s) in validator_definitions.yml.") .arg( - Arg::with_name(PUBKEY_FLAG) + Arg::new(PUBKEY_FLAG) .long(PUBKEY_FLAG) .value_name("PUBKEY") .help("Validator pubkey to disable") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(ALL) + Arg::new(ALL) .long(ALL) .help("Disable all validators in the validator directory") - .takes_value(false) + .action(ArgAction::SetTrue) .conflicts_with(PUBKEY_FLAG), ), ) @@ -55,14 +55,15 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin // `true` implies we are setting `validator_definition.enabled = true` and // vice versa. let (enabled, sub_matches) = match matches.subcommand() { - (ENABLE, Some(sub_matches)) => (true, sub_matches), - (DISABLE, Some(sub_matches)) => (false, sub_matches), - (unknown, _) => { + Some((ENABLE, sub_matches)) => (true, sub_matches), + Some((DISABLE, sub_matches)) => (false, sub_matches), + Some((unknown, _)) => { return Err(format!( "{} does not have a {} command. See --help", CMD, unknown )) } + _ => return Err(format!("No command provided for {}. See --help", CMD)), }; let mut defs = ValidatorDefinitions::open(&validator_dir).map_err(|e| { format!( @@ -70,7 +71,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin validator_dir, e ) })?; - let pubkeys_to_modify = if sub_matches.is_present(ALL) { + let pubkeys_to_modify = if sub_matches.get_flag(ALL) { defs.as_slice() .iter() .map(|def| def.voting_public_key.clone()) diff --git a/account_manager/src/validator/recover.rs b/account_manager/src/validator/recover.rs index 33d3b189266..9a0aab742f5 100644 --- a/account_manager/src/validator/recover.rs +++ b/account_manager/src/validator/recover.rs @@ -4,7 +4,7 @@ use crate::wallet::create::STDIN_INPUTS_FLAG; use crate::SECRETS_DIR_FLAG; use account_utils::eth2_keystore::{keypair_from_secret, Keystore, KeystoreBuilder}; use account_utils::{random_password, read_mnemonic_from_cli}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use directory::ensure_dir_exists; use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR}; use eth2_wallet::bip39::Seed; @@ -15,52 +15,52 @@ pub const CMD: &str = "recover"; pub const FIRST_INDEX_FLAG: &str = "first-index"; pub const MNEMONIC_FLAG: &str = "mnemonic-path"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about( "Recovers validator private keys given a BIP-39 mnemonic phrase. \ If you did not specify a `--first-index` or count `--count`, by default this will \ only recover the keys associated with the validator at index 0 for an HD wallet \ in accordance with the EIP-2333 spec.") .arg( - Arg::with_name(FIRST_INDEX_FLAG) + Arg::new(FIRST_INDEX_FLAG) .long(FIRST_INDEX_FLAG) .value_name("FIRST_INDEX") .help("The first of consecutive key indexes you wish to recover.") - .takes_value(true) + .action(ArgAction::Set) .required(false) .default_value("0"), ) .arg( - Arg::with_name(COUNT_FLAG) + Arg::new(COUNT_FLAG) .long(COUNT_FLAG) .value_name("COUNT") .help("The number of validator keys you wish to recover. Counted consecutively from the provided `--first_index`.") - .takes_value(true) + .action(ArgAction::Set) .required(false) .default_value("1"), ) .arg( - Arg::with_name(MNEMONIC_FLAG) + Arg::new(MNEMONIC_FLAG) .long(MNEMONIC_FLAG) .value_name("MNEMONIC_PATH") .help( "If present, the mnemonic will be read in from this file.", ) - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name(SECRETS_DIR_FLAG) + Arg::new(SECRETS_DIR_FLAG) .long(SECRETS_DIR_FLAG) .value_name("SECRETS_DIR") .help( "The path where the validator keystore passwords will be stored. \ Defaults to ~/.lighthouse/{network}/secrets", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(STORE_WITHDRAW_FLAG) + Arg::new(STORE_WITHDRAW_FLAG) .long(STORE_WITHDRAW_FLAG) .help( "If present, the withdrawal keystore will be stored alongside the voting \ @@ -69,16 +69,16 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) } pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), String> { - let secrets_dir = if matches.value_of("datadir").is_some() { + let secrets_dir = if matches.get_one::("datadir").is_some() { let path: PathBuf = clap_utils::parse_required(matches, "datadir")?; path.join(DEFAULT_SECRET_DIR) } else { @@ -87,7 +87,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin let first_index: u32 = clap_utils::parse_required(matches, FIRST_INDEX_FLAG)?; let count: u32 = clap_utils::parse_required(matches, COUNT_FLAG)?; let mnemonic_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?; - let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG); + let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG); eprintln!("secrets-dir path: {:?}", secrets_dir); @@ -131,7 +131,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin .password_dir(secrets_dir.clone()) .voting_keystore(keystores.voting, voting_password.as_bytes()) .withdrawal_keystore(keystores.withdrawal, withdrawal_password.as_bytes()) - .store_withdrawal_keystore(matches.is_present(STORE_WITHDRAW_FLAG)) + .store_withdrawal_keystore(matches.get_flag(STORE_WITHDRAW_FLAG)) .build() .map_err(|e| format!("Unable to build validator directory: {:?}", e))?; diff --git a/account_manager/src/validator/slashing_protection.rs b/account_manager/src/validator/slashing_protection.rs index 0a98a452b8b..46e46d018f4 100644 --- a/account_manager/src/validator/slashing_protection.rs +++ b/account_manager/src/validator/slashing_protection.rs @@ -1,4 +1,4 @@ -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use environment::Environment; use slashing_protection::{ interchange::Interchange, InterchangeError, InterchangeImportOutcome, SlashingDatabase, @@ -18,32 +18,32 @@ pub const EXPORT_FILE_ARG: &str = "EXPORT-FILE"; pub const PUBKEYS_FLAG: &str = "pubkeys"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about("Import or export slashing protection data to or from another client") .subcommand( - App::new(IMPORT_CMD) + Command::new(IMPORT_CMD) .about("Import an interchange file") .arg( - Arg::with_name(IMPORT_FILE_ARG) - .takes_value(true) + Arg::new(IMPORT_FILE_ARG) + .action(ArgAction::Set) .value_name("FILE") .help("The slashing protection interchange file to import (.json)"), ) ) .subcommand( - App::new(EXPORT_CMD) + Command::new(EXPORT_CMD) .about("Export an interchange file") .arg( - Arg::with_name(EXPORT_FILE_ARG) - .takes_value(true) + Arg::new(EXPORT_FILE_ARG) + .action(ArgAction::Set) .value_name("FILE") .help("The filename to export the interchange file to"), ) .arg( - Arg::with_name(PUBKEYS_FLAG) + Arg::new(PUBKEYS_FLAG) .long(PUBKEYS_FLAG) - .takes_value(true) + .action(ArgAction::Set) .value_name("PUBKEYS") .help( "List of public keys to export history for. Keys should be 0x-prefixed, \ @@ -54,7 +54,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { } pub fn cli_run( - matches: &ArgMatches<'_>, + matches: &ArgMatches, env: Environment, validator_base_dir: PathBuf, ) -> Result<(), String> { @@ -68,7 +68,7 @@ pub fn cli_run( .ok_or_else(|| "Unable to get genesis state, has genesis occurred?".to_string())?; match matches.subcommand() { - (IMPORT_CMD, Some(matches)) => { + Some((IMPORT_CMD, matches)) => { let import_filename: PathBuf = clap_utils::parse_required(matches, IMPORT_FILE_ARG)?; let import_file = File::open(&import_filename).map_err(|e| { format!( @@ -168,7 +168,7 @@ pub fn cli_run( Ok(()) } - (EXPORT_CMD, Some(matches)) => { + Some((EXPORT_CMD, matches)) => { let export_filename: PathBuf = clap_utils::parse_required(matches, EXPORT_FILE_ARG)?; let selected_pubkeys = if let Some(pubkeys) = @@ -215,7 +215,7 @@ pub fn cli_run( Ok(()) } - ("", _) => Err("No subcommand provided, see --help for options".to_string()), - (command, _) => Err(format!("No such subcommand `{}`", command)), + Some((command, _)) => Err(format!("No such subcommand `{}`", command)), + _ => Err("No subcommand provided, see --help for options".to_string()), } } diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs index accee11b5a2..1b771b31ae4 100644 --- a/account_manager/src/wallet/create.rs +++ b/account_manager/src/wallet/create.rs @@ -3,7 +3,7 @@ use crate::WALLETS_DIR_FLAG; use account_utils::{ is_password_sufficiently_complex, random_password, read_password_from_user, strip_off_newlines, }; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use eth2_wallet::{ bip39::{Language, Mnemonic, MnemonicType}, PlainText, @@ -33,21 +33,21 @@ pub const NEW_WALLET_PASSWORD_PROMPT: &str = "Enter a password for your new wallet that is at least 12 characters long:"; pub const RETYPE_PASSWORD_PROMPT: &str = "Please re-enter your wallet's new password:"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about("Creates a new HD (hierarchical-deterministic) EIP-2386 wallet.") .arg( - Arg::with_name(NAME_FLAG) + Arg::new(NAME_FLAG) .long(NAME_FLAG) .value_name("WALLET_NAME") .help( "The wallet will be created with this name. It is not allowed to \ create two wallets with the same name for the same --base-dir.", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(PASSWORD_FLAG) + Arg::new(PASSWORD_FLAG) .long(PASSWORD_FLAG) .value_name("WALLET_PASSWORD_PATH") .help( @@ -56,43 +56,43 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { saved at that path. To avoid confusion, if the file does not already \ exist it must include a '.pass' suffix.", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(TYPE_FLAG) + Arg::new(TYPE_FLAG) .long(TYPE_FLAG) .value_name("WALLET_TYPE") .help( "The type of wallet to create. Only HD (hierarchical-deterministic) \ wallets are supported presently..", ) - .takes_value(true) - .possible_values(&[HD_TYPE]) + .action(ArgAction::Set) + .value_parser([HD_TYPE]) .default_value(HD_TYPE), ) .arg( - Arg::with_name(MNEMONIC_FLAG) + Arg::new(MNEMONIC_FLAG) .long(MNEMONIC_FLAG) .value_name("MNEMONIC_PATH") .help( "If present, the mnemonic will be saved to this file. DO NOT SHARE THE MNEMONIC.", ) - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) .arg( - Arg::with_name(MNEMONIC_LENGTH_FLAG) + Arg::new(MNEMONIC_LENGTH_FLAG) .long(MNEMONIC_LENGTH_FLAG) .value_name("MNEMONIC_LENGTH") .help("The number of words to use for the mnemonic phrase.") - .takes_value(true) - .validator(|len| { + .action(ArgAction::Set) + .value_parser(|len: &str| { match len.parse::().ok().and_then(|words| MnemonicType::for_word_count(words).ok()) { Some(_) => Ok(()), None => Err(format!("Mnemonic length must be one of {}", MNEMONIC_TYPES.iter().map(|t| t.word_count().to_string()).collect::>().join(", "))), @@ -153,7 +153,7 @@ pub fn create_wallet_from_mnemonic( let name: Option = clap_utils::parse_optional(matches, NAME_FLAG)?; let wallet_password_path: Option = clap_utils::parse_optional(matches, PASSWORD_FLAG)?; let type_field: String = clap_utils::parse_required(matches, TYPE_FLAG)?; - let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG); + let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG); let wallet_type = match type_field.as_ref() { HD_TYPE => WalletType::Hd, unknown => return Err(format!("--{} {} is not supported", TYPE_FLAG, unknown)), diff --git a/account_manager/src/wallet/list.rs b/account_manager/src/wallet/list.rs index 9190de3915d..a551ffae128 100644 --- a/account_manager/src/wallet/list.rs +++ b/account_manager/src/wallet/list.rs @@ -1,12 +1,12 @@ use crate::WALLETS_DIR_FLAG; -use clap::App; +use clap::Command; use eth2_wallet_manager::WalletManager; use std::path::PathBuf; pub const CMD: &str = "list"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD).about("Lists the names of all wallets.") +pub fn cli_app() -> Command { + Command::new(CMD).about("Lists the names of all wallets.") } pub fn cli_run(wallet_base_dir: PathBuf) -> Result<(), String> { diff --git a/account_manager/src/wallet/mod.rs b/account_manager/src/wallet/mod.rs index dfadebf57f3..19ad5713ebe 100644 --- a/account_manager/src/wallet/mod.rs +++ b/account_manager/src/wallet/mod.rs @@ -3,21 +3,21 @@ pub mod list; pub mod recover; use crate::WALLETS_DIR_FLAG; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use directory::{ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_WALLET_DIR}; use std::path::PathBuf; pub const CMD: &str = "wallet"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about("Manage wallets, from which validator keys can be derived.") .arg( - Arg::with_name(WALLETS_DIR_FLAG) + Arg::new(WALLETS_DIR_FLAG) .long(WALLETS_DIR_FLAG) .value_name("WALLETS_DIRECTORY") .help("A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("datadir"), ) .subcommand(create::cli_app()) @@ -26,7 +26,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { } pub fn cli_run(matches: &ArgMatches) -> Result<(), String> { - let wallet_base_dir = if matches.value_of("datadir").is_some() { + let wallet_base_dir = if matches.get_one::("datadir").is_some() { let path: PathBuf = clap_utils::parse_required(matches, "datadir")?; path.join(DEFAULT_WALLET_DIR) } else { @@ -37,12 +37,13 @@ pub fn cli_run(matches: &ArgMatches) -> Result<(), String> { eprintln!("wallet-dir path: {:?}", wallet_base_dir); match matches.subcommand() { - (create::CMD, Some(matches)) => create::cli_run(matches, wallet_base_dir), - (list::CMD, Some(_)) => list::cli_run(wallet_base_dir), - (recover::CMD, Some(matches)) => recover::cli_run(matches, wallet_base_dir), - (unknown, _) => Err(format!( + Some((create::CMD, matches)) => create::cli_run(matches, wallet_base_dir), + Some((list::CMD, _)) => list::cli_run(wallet_base_dir), + Some((recover::CMD, matches)) => recover::cli_run(matches, wallet_base_dir), + Some((unknown, _)) => Err(format!( "{} does not have a {} command. See --help", CMD, unknown )), + _ => Err("No subcommand provided, see --help for options".to_string()), } } diff --git a/account_manager/src/wallet/recover.rs b/account_manager/src/wallet/recover.rs index 6e047aca8d2..0f58d89c4e1 100644 --- a/account_manager/src/wallet/recover.rs +++ b/account_manager/src/wallet/recover.rs @@ -1,27 +1,27 @@ use crate::wallet::create::{create_wallet_from_mnemonic, STDIN_INPUTS_FLAG}; use crate::wallet::create::{HD_TYPE, NAME_FLAG, PASSWORD_FLAG, TYPE_FLAG}; use account_utils::read_mnemonic_from_cli; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use std::path::PathBuf; pub const CMD: &str = "recover"; pub const MNEMONIC_FLAG: &str = "mnemonic-path"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about("Recovers an EIP-2386 wallet from a given a BIP-39 mnemonic phrase.") .arg( - Arg::with_name(NAME_FLAG) + Arg::new(NAME_FLAG) .long(NAME_FLAG) .value_name("WALLET_NAME") .help( "The wallet will be created with this name. It is not allowed to \ create two wallets with the same name for the same --base-dir.", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(PASSWORD_FLAG) + Arg::new(PASSWORD_FLAG) .long(PASSWORD_FLAG) .value_name("PASSWORD_FILE_PATH") .help( @@ -31,31 +31,31 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { saved at that path. To avoid confusion, if the file does not already \ exist it must include a '.pass' suffix.", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(MNEMONIC_FLAG) + Arg::new(MNEMONIC_FLAG) .long(MNEMONIC_FLAG) .value_name("MNEMONIC_PATH") .help("If present, the mnemonic will be read in from this file.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(TYPE_FLAG) + Arg::new(TYPE_FLAG) .long(TYPE_FLAG) .value_name("WALLET_TYPE") .help( "The type of wallet to create. Only HD (hierarchical-deterministic) \ wallets are supported presently..", ) - .takes_value(true) - .possible_values(&[HD_TYPE]) + .action(ArgAction::Set) + .value_parser([HD_TYPE]) .default_value(HD_TYPE), ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) @@ -63,7 +63,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { pub fn cli_run(matches: &ArgMatches, wallet_base_dir: PathBuf) -> Result<(), String> { let mnemonic_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?; - let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG); + let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG); eprintln!(); eprintln!("WARNING: KEY RECOVERY CAN LEAD TO DUPLICATING VALIDATORS KEYS, WHICH CAN LEAD TO SLASHING."); diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index fa4edc34d22..5efb8051278 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1,13 +1,14 @@ -use clap::{App, Arg, ArgGroup}; +use clap::{builder::ArgPredicate, Arg, ArgAction, ArgGroup, Command}; +use clap_utils::{self, get_color_style}; use strum::VariantNames; use types::ProgressiveBalancesMode; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("beacon_node") - .visible_aliases(&["b", "bn", "beacon"]) - .version(crate_version!()) +pub fn cli_app() -> Command { + Command::new("beacon_node") + .visible_aliases(["b", "bn", "beacon"]) + //.version(crate_version!()) .author("Sigma Prime ") - .setting(clap::AppSettings::ColoredHelp) + .styles(get_color_style()) .about("The primary component which connects to the Ethereum 2.0 P2P network and \ downloads, verifies and stores blocks. Provides a HTTP API for querying \ the beacon chain and publishing messages to the network.") @@ -15,68 +16,69 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { * Configuration directory locations. */ .arg( - Arg::with_name("network-dir") + Arg::new("network-dir") .long("network-dir") .value_name("DIR") .help("Data directory for network keys. Defaults to network/ inside the beacon node \ dir.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("freezer-dir") + Arg::new("freezer-dir") .long("freezer-dir") .value_name("DIR") .help("Data directory for the freezer database.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("blobs-dir") + Arg::new("blobs-dir") .long("blobs-dir") .value_name("DIR") .help("Data directory for the blobs database.") - .takes_value(true) + .action(ArgAction::Set) ) /* * Network parameters. */ .arg( - Arg::with_name("subscribe-all-subnets") + Arg::new("subscribe-all-subnets") .long("subscribe-all-subnets") + .action(ArgAction::SetTrue) .help("Subscribe to all subnets regardless of validator count. \ This will also advertise the beacon node as being long-lived subscribed to all subnets.") - .takes_value(false), ) .arg( - Arg::with_name("import-all-attestations") + Arg::new("import-all-attestations") .long("import-all-attestations") .help("Import and aggregate all attestations, regardless of validator subscriptions. \ This will only import attestations from already-subscribed subnets, use with \ --subscribe-all-subnets to ensure all attestations are received for import.") - .takes_value(false), + .action(ArgAction::SetTrue) + .global(true) ) .arg( - Arg::with_name("disable-packet-filter") + Arg::new("disable-packet-filter") .long("disable-packet-filter") .help("Disables the discovery packet filter. Useful for testing in smaller networks") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("shutdown-after-sync") + Arg::new("shutdown-after-sync") .long("shutdown-after-sync") .help("Shutdown beacon node as soon as sync is completed. Backfill sync will \ not be performed before shutdown.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("zero-ports") + Arg::new("zero-ports") .long("zero-ports") - .short("z") + .short('z') .help("Sets all listening TCP/UDP ports to 0, allowing the OS to choose some \ arbitrary free ports.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("listen-address") + Arg::new("listen-address") .long("listen-address") .value_name("ADDRESS") .help("The address lighthouse will listen for UDP and TCP connections. To listen \ @@ -87,13 +89,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - --listen-address '0.0.0.0' --listen-address '::' will listen over both \ IPv4 and IPv6. The order of the given addresses is not relevant. However, \ multiple IPv4, or multiple IPv6 addresses will not be accepted.") - .multiple(true) - .max_values(2) + .action(ArgAction::Append) + // .max_values(2) .default_value("0.0.0.0") - .takes_value(true) ) .arg( - Arg::with_name("port") + Arg::new("port") .long("port") .value_name("PORT") .help("The TCP/UDP ports to listen on. There are two UDP ports. \ @@ -101,134 +102,134 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag \ will apply to the IPv4 address and --port6 to the IPv6 address.") .default_value("9000") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("port6") + Arg::new("port6") .long("port6") .value_name("PORT") .help("The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and \ IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1.") .default_value("9090") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("discovery-port") + Arg::new("discovery-port") .long("discovery-port") .value_name("PORT") .help("The UDP port that discovery will listen on. Defaults to `port`") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("quic-port") + Arg::new("quic-port") .long("quic-port") .value_name("PORT") .help("The UDP port that quic will listen on. Defaults to `port` + 1") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("discovery-port6") + Arg::new("discovery-port6") .long("discovery-port6") .value_name("PORT") .help("The UDP port that discovery will listen on over IPv6 if listening over \ both IPv4 and IPv6. Defaults to `port6`") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("quic-port6") + Arg::new("quic-port6") .long("quic-port6") .value_name("PORT") .help("The UDP port that quic will listen on over IPv6 if listening over \ both IPv4 and IPv6. Defaults to `port6` + 1") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("target-peers") + Arg::new("target-peers") .long("target-peers") .help("The target number of peers.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("boot-nodes") + Arg::new("boot-nodes") .long("boot-nodes") .allow_hyphen_values(true) .value_name("ENR/MULTIADDR LIST") .help("One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("network-load") + Arg::new("network-load") .long("network-load") .value_name("INTEGER") .help("Lighthouse's network can be tuned for bandwidth/performance. Setting this to a high value, will increase the bandwidth lighthouse uses, increasing the likelihood of redundant information in exchange for faster communication. This can increase profit of validators marginally by receiving messages faster on the network. Lower values decrease bandwidth usage, but makes communication slower which can lead to validator performance reduction. Values are in the range [1,5].") .default_value("3") - .set(clap::ArgSettings::Hidden) - .takes_value(true), + .hide(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("disable-upnp") + Arg::new("disable-upnp") .long("disable-upnp") .help("Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("private") + Arg::new("private") .long("private") .help("Prevents sending various client identification information.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("enr-udp-port") + Arg::new("enr-udp-port") .long("enr-udp-port") .value_name("PORT") .help("The UDP4 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv4.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("enr-quic-port") + Arg::new("enr-quic-port") .long("enr-quic-port") .value_name("PORT") .help("The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv4.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("enr-udp6-port") + Arg::new("enr-udp6-port") .long("enr-udp6-port") .value_name("PORT") .help("The UDP6 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv6.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("enr-quic6-port") + Arg::new("enr-quic6-port") .long("enr-quic6-port") .value_name("PORT") .help("The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv6.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("enr-tcp-port") + Arg::new("enr-tcp-port") .long("enr-tcp-port") .value_name("PORT") .help("The TCP4 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv4. The --port flag is \ used if this is not set.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("enr-tcp6-port") + Arg::new("enr-tcp6-port") .long("enr-tcp6-port") .value_name("PORT") .help("The TCP6 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv6. The --port6 flag is \ used if this is not set.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("enr-address") + Arg::new("enr-address") .long("enr-address") .value_name("ADDRESS") .help("The IP address/ DNS address to broadcast to other peers on how to reach \ @@ -237,75 +238,78 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { discovery. Set this only if you are sure other nodes can connect to your \ local node on this address. This will update the `ip4` or `ip6` ENR fields \ accordingly. To update both, set this flag twice with the different values.") - .multiple(true) - .max_values(2) - .takes_value(true), + .action(ArgAction::Append) + // .max_values(2) ) .arg( - Arg::with_name("enr-match") - .short("e") + Arg::new("enr-match") + .short('e') .long("enr-match") + .action(ArgAction::SetTrue) .help("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.") ) .arg( - Arg::with_name("disable-enr-auto-update") - .short("x") + Arg::new("disable-enr-auto-update") + .short('x') + .action(ArgAction::SetTrue) .long("disable-enr-auto-update") .help("Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. \ - This disables this feature, fixing the ENR's IP/PORT to those specified on boot."), + This disables this feature, fixing the ENR's IP/PORT to those specified on boot.") ) .arg( - Arg::with_name("libp2p-addresses") + Arg::new("libp2p-addresses") .long("libp2p-addresses") .value_name("MULTIADDR") .help("One or more comma-delimited multiaddrs to manually connect to a libp2p peer \ without an ENR.") - .takes_value(true), + .action(ArgAction::Set) ) - // NOTE: This is hidden because it is primarily a developer feature for testnets and + // NOTE: This is hide because it is primarily a developer feature for testnets and // debugging. We remove it from the list to avoid clutter. .arg( - Arg::with_name("disable-discovery") + Arg::new("disable-discovery") .long("disable-discovery") + .action(ArgAction::SetTrue) .help("Disables the discv5 discovery protocol. The node will not search for new peers or participate in the discovery protocol.") - .hidden(true) + .hide(true) ) .arg( - Arg::with_name("disable-quic") + Arg::new("disable-quic") .long("disable-quic") + .action(ArgAction::SetTrue) .help("Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections.") ) .arg( - Arg::with_name("disable-peer-scoring") + Arg::new("disable-peer-scoring") .long("disable-peer-scoring") .help("Disables peer scoring in lighthouse. WARNING: This is a dev only flag is only meant to be used in local testing scenarios \ Using this flag on a real network may cause your node to become eclipsed and see a different view of the network") - .takes_value(false) - .hidden(true), + .action(ArgAction::SetTrue) + .hide(true) ) .arg( - Arg::with_name("trusted-peers") + Arg::new("trusted-peers") .long("trusted-peers") .value_name("TRUSTED_PEERS") .help("One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("genesis-backfill") + Arg::new("genesis-backfill") .long("genesis-backfill") .help("Attempts to download blocks all the way back to genesis when checkpoint syncing.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("enable-private-discovery") + Arg::new("enable-private-discovery") .long("enable-private-discovery") .help("Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("self-limiter") + Arg::new("self-limiter") .long("self-limiter") .help( "Enables the outbound rate limiter (requests made by this node).\ @@ -316,19 +320,20 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { present in the configuration, the quotas used for the inbound rate limiter will be \ used." ) - .min_values(0) - .hidden(true) + .action(ArgAction::Set) + // .min_values(0) + .hide(true) ) .arg( - Arg::with_name("proposer-only") + Arg::new("proposer-only") .long("proposer-only") .help("Sets this beacon node at be a block proposer only node. \ This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag should be used \ for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("inbound-rate-limiter") + Arg::new("inbound-rate-limiter") .long("inbound-rate-limiter") .help( "Configures the inbound rate limiter (requests received by this node).\ @@ -341,44 +346,44 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { This is enabled by default, using default quotas. To disable rate limiting pass \ `disabled` to this option instead." ) - .takes_value(true) - .hidden(true) + .action(ArgAction::Set) + .hide(true) ) .arg( - Arg::with_name("disable-backfill-rate-limiting") + Arg::new("disable-backfill-rate-limiting") .long("disable-backfill-rate-limiting") .help("Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast \ as possible, however it can result in resource contention which degrades staking performance. Stakers \ should generally choose to avoid this flag since backfill sync is not required for staking.") - .takes_value(false), + .action(ArgAction::SetTrue) ) /* REST API related arguments */ .arg( - Arg::with_name("http") + Arg::new("http") .long("http") .help("Enable the RESTful HTTP API server. Disabled by default.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("http-address") + Arg::new("http-address") .long("http-address") .requires("enable_http") .value_name("ADDRESS") .help("Set the listen address for the RESTful HTTP API server.") - .default_value_if("enable_http", None, "127.0.0.1") - .takes_value(true), + .default_value_if("enable_http", ArgPredicate::IsPresent, "127.0.0.1") + .action(ArgAction::Set) ) .arg( - Arg::with_name("http-port") + Arg::new("http-port") .long("http-port") .requires("enable_http") .value_name("PORT") .help("Set the listen TCP port for the RESTful HTTP API server.") - .default_value_if("enable_http", None, "5052") - .takes_value(true), + .default_value_if("enable_http", ArgPredicate::IsPresent, "5052") + .action(ArgAction::Set) ) .arg( - Arg::with_name("http-allow-origin") + Arg::new("http-allow-origin") .long("http-allow-origin") .requires("enable_http") .value_name("ORIGIN") @@ -386,72 +391,73 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Use * to allow any origin (not recommended in production). \ If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5052).") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("http-spec-fork") + Arg::new("http-spec-fork") .long("http-spec-fork") .requires("enable_http") .value_name("FORK") .help("Serve the spec for a specific hard fork on /eth/v1/config/spec. It should \ not be necessary to set this flag.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("http-enable-tls") + Arg::new("http-enable-tls") .long("http-enable-tls") .help("Serves the RESTful HTTP API server over TLS. This feature is currently \ experimental.") - .takes_value(false) + .action(ArgAction::SetTrue) .requires("http-tls-cert") .requires("http-tls-key") ) .arg( - Arg::with_name("http-tls-cert") + Arg::new("http-tls-cert") .long("http-tls-cert") .requires("enable_http") .help("The path of the certificate to be used when serving the HTTP API server \ over TLS.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("http-tls-key") + Arg::new("http-tls-key") .long("http-tls-key") .requires("enable_http") .help("The path of the private key to be used when serving the HTTP API server \ over TLS. Must not be password-protected.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("http-allow-sync-stalled") + Arg::new("http-allow-sync-stalled") .long("http-allow-sync-stalled") + .action(ArgAction::SetTrue) .requires("enable_http") .help("Forces the HTTP to indicate that the node is synced when sync is actually \ stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON \ MAINNET.") ) .arg( - Arg::with_name("http-sse-capacity-multiplier") + Arg::new("http-sse-capacity-multiplier") .long("http-sse-capacity-multiplier") .requires("enable_http") - .takes_value(true) - .default_value_if("enable_http", None, "1") + .action(ArgAction::Set) + .default_value_if("enable_http", ArgPredicate::IsPresent, "1") .value_name("N") .help("Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. \ Increasing this value can prevent messages from being dropped.") ) .arg( - Arg::with_name("http-duplicate-block-status") + Arg::new("http-duplicate-block-status") .long("http-duplicate-block-status") .requires("enable_http") - .takes_value(true) - .default_value_if("enable_http", None, "202") + .action(ArgAction::Set) + .default_value_if("enable_http", ArgPredicate::IsPresent, "202") .value_name("STATUS_CODE") .help("Status code to send when a block that is already known is POSTed to the \ HTTP API.") ) .arg( - Arg::with_name("http-enable-beacon-processor") + Arg::new("http-enable-beacon-processor") .long("http-enable-beacon-processor") .requires("enable_http") .value_name("BOOLEAN") @@ -459,36 +465,36 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { DoS protection. When set to \"true\", HTTP API requests will be queued and scheduled \ alongside other tasks. When set to \"false\", HTTP API responses will be executed \ immediately.") - .takes_value(true) - .default_value_if("enable_http", None, "true") + .action(ArgAction::Set) + .default_value_if("enable_http", ArgPredicate::IsPresent, "true") ) /* Prometheus metrics HTTP server related arguments */ .arg( - Arg::with_name("metrics") + Arg::new("metrics") .long("metrics") .help("Enable the Prometheus metrics HTTP server. Disabled by default.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("metrics-address") + Arg::new("metrics-address") .long("metrics-address") .value_name("ADDRESS") .requires("metrics") .help("Set the listen address for the Prometheus metrics HTTP server.") - .default_value_if("metrics", None, "127.0.0.1") - .takes_value(true), + .default_value_if("metrics", ArgPredicate::IsPresent, "127.0.0.1") + .action(ArgAction::Set) ) .arg( - Arg::with_name("metrics-port") + Arg::new("metrics-port") .long("metrics-port") .requires("metrics") .value_name("PORT") .help("Set the listen TCP port for the Prometheus metrics HTTP server.") - .default_value_if("metrics", None, "5054") - .takes_value(true), + .default_value_if("metrics", ArgPredicate::IsPresent, "5054") + .action(ArgAction::Set) ) .arg( - Arg::with_name("metrics-allow-origin") + Arg::new("metrics-allow-origin") .long("metrics-allow-origin") .value_name("ORIGIN") .requires("metrics") @@ -496,15 +502,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Use * to allow any origin (not recommended in production). \ If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5054).") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("shuffling-cache-size") + Arg::new("shuffling-cache-size") .long("shuffling-cache-size") .help("Some HTTP API requests can be optimised by caching the shufflings at each epoch. \ This flag allows the user to set the shuffling cache size in epochs. \ Shufflings are dependent on validator count and setting this value to a large number can consume a large amount of memory.") - .takes_value(true) + .action(ArgAction::Set) ) /* @@ -512,7 +518,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { */ .arg( - Arg::with_name("monitoring-endpoint") + Arg::new("monitoring-endpoint") .long("monitoring-endpoint") .value_name("ADDRESS") .help("Enables the monitoring service for sending system metrics to a remote endpoint. \ @@ -521,16 +527,16 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Note: This will send information to a remote sever which may identify and associate your \ validators, IP address and other personal information. Always use a HTTPS connection \ and never provide an untrusted URL.") - .takes_value(true), + .action(ArgAction::Set) ) .arg( - Arg::with_name("monitoring-endpoint-period") + Arg::new("monitoring-endpoint-period") .long("monitoring-endpoint-period") .value_name("SECONDS") .help("Defines how many seconds to wait between each message sent to \ the monitoring-endpoint. Default: 60s") .requires("monitoring-endpoint") - .takes_value(true), + .action(ArgAction::Set) ) /* @@ -538,115 +544,116 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { */ .arg( - Arg::with_name("staking") + Arg::new("staking") .long("staking") .help("Standard option for a staking beacon node. This will enable the HTTP server \ on localhost:5052 and import deposit logs from the execution node. This is \ equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge") - .takes_value(false) + .action(ArgAction::SetTrue) ) /* * Eth1 Integration */ .arg( - Arg::with_name("eth1") + Arg::new("eth1") .long("eth1") .help("If present the node will connect to an eth1 node. This is required for \ block production, you must use this flag if you wish to serve a validator.") - .takes_value(false), + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("dummy-eth1") + Arg::new("dummy-eth1") .long("dummy-eth1") + .action(ArgAction::SetTrue) .conflicts_with("eth1") .help("If present, uses an eth1 backend that generates static dummy data.\ Identical to the method used at the 2019 Canada interop.") ) .arg( - Arg::with_name("eth1-purge-cache") + Arg::new("eth1-purge-cache") .long("eth1-purge-cache") .value_name("PURGE-CACHE") .help("Purges the eth1 block and deposit caches") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("eth1-blocks-per-log-query") + Arg::new("eth1-blocks-per-log-query") .long("eth1-blocks-per-log-query") .value_name("BLOCKS") .help("Specifies the number of blocks that a deposit log query should span. \ This will reduce the size of responses from the Eth1 endpoint.") .default_value("1000") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("eth1-cache-follow-distance") + Arg::new("eth1-cache-follow-distance") .long("eth1-cache-follow-distance") .value_name("BLOCKS") .help("Specifies the distance between the Eth1 chain head and the last block which \ should be imported into the cache. Setting this value lower can help \ compensate for irregular Proof-of-Work block times, but setting it too low \ can make the node vulnerable to re-orgs.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slots-per-restore-point") + Arg::new("slots-per-restore-point") .long("slots-per-restore-point") .value_name("SLOT_COUNT") .help("Specifies how often a freezer DB restore point should be stored. \ Cannot be changed after initialization. \ [default: 8192 (mainnet) or 64 (minimal)]") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("epochs-per-migration") + Arg::new("epochs-per-migration") .long("epochs-per-migration") .value_name("N") .help("The number of epochs to wait between running the migration of data from the \ hot DB to the cold DB. Less frequent runs can be useful for minimizing disk \ writes") .default_value("1") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("block-cache-size") + Arg::new("block-cache-size") .long("block-cache-size") .value_name("SIZE") .help("Specifies how many blocks the database should cache in memory [default: 5]") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("historic-state-cache-size") + Arg::new("historic-state-cache-size") .long("historic-state-cache-size") .value_name("SIZE") .help("Specifies how many states from the freezer database should cache in memory [default: 1]") - .takes_value(true) + .action(ArgAction::Set) ) /* * Execution Layer Integration */ .arg( - Arg::with_name("execution-endpoint") + Arg::new("execution-endpoint") .long("execution-endpoint") .value_name("EXECUTION-ENDPOINT") .alias("execution-endpoints") .help("Server endpoint for an execution layer JWT-authenticated HTTP \ JSON-RPC connection. Uses the same endpoint to populate the \ deposit cache.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("execution-jwt") + Arg::new("execution-jwt") .long("execution-jwt") .value_name("EXECUTION-JWT") .alias("jwt-secrets") .help("File path which contains the hex-encoded JWT secret for the \ execution endpoint provided in the --execution-endpoint flag.") .requires("execution-endpoint") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("execution-jwt-secret-key") + Arg::new("execution-jwt-secret-key") .long("execution-jwt-secret-key") .value_name("EXECUTION-JWT-SECRET-KEY") .alias("jwt-secret-key") @@ -654,10 +661,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { execution endpoint provided in the --execution-endpoint flag.") .requires("execution-endpoint") .conflicts_with("execution-jwt") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("execution-jwt-id") + Arg::new("execution-jwt-id") .long("execution-jwt-id") .value_name("EXECUTION-JWT-ID") .alias("jwt-id") @@ -665,10 +672,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { during JWT authentication. It corresponds to the 'id' field in the JWT claims object.\ Set to empty by default") .requires("execution-jwt") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("execution-jwt-version") + Arg::new("execution-jwt-version") .long("execution-jwt-version") .value_name("EXECUTION-JWT-VERSION") .alias("jwt-version") @@ -676,101 +683,103 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.\ Set to empty by default") .requires("execution-jwt") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("suggested-fee-recipient") + Arg::new("suggested-fee-recipient") .long("suggested-fee-recipient") .value_name("SUGGESTED-FEE-RECIPIENT") .help("Emergency fallback fee recipient for use in case the validator client does \ not have one configured. You should set this flag on the validator \ client instead of (or in addition to) setting it here.") .requires("execution-endpoint") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("builder") + Arg::new("builder") .long("builder") .alias("payload-builder") .alias("payload-builders") .help("The URL of a service compatible with the MEV-boost API.") .requires("execution-endpoint") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("execution-timeout-multiplier") + Arg::new("execution-timeout-multiplier") .long("execution-timeout-multiplier") .value_name("NUM") .help("Unsigned integer to multiply the default execution timeouts by.") .default_value("1") - .takes_value(true) + .action(ArgAction::Set) ) /* Deneb settings */ .arg( - Arg::with_name("trusted-setup-file-override") + Arg::new("trusted-setup-file-override") .long("trusted-setup-file-override") .value_name("FILE") .help("Path to a json file containing the trusted setup params. \ NOTE: This will override the trusted setup that is generated \ from the mainnet kzg ceremony. Use with caution") - .takes_value(true) + .action(ArgAction::Set) ) /* * Database purging and compaction. */ .arg( - Arg::with_name("purge-db") + Arg::new("purge-db") .long("purge-db") + .action(ArgAction::SetTrue) .help("If present, the chain database will be deleted. Use with caution.") ) .arg( - Arg::with_name("compact-db") + Arg::new("compact-db") .long("compact-db") + .action(ArgAction::SetTrue) .help("If present, apply compaction to the database on start-up. Use with caution. \ It is generally not recommended unless auto-compaction is disabled.") ) .arg( - Arg::with_name("auto-compact-db") + Arg::new("auto-compact-db") .long("auto-compact-db") .help("Enable or disable automatic compaction of the database on finalization.") - .takes_value(true) + .action(ArgAction::Set) .default_value("true") ) .arg( - Arg::with_name("prune-payloads") + Arg::new("prune-payloads") .long("prune-payloads") .help("Prune execution payloads from Lighthouse's database. This saves space but \ imposes load on the execution client, as payloads need to be \ reconstructed and sent to syncing peers.") - .takes_value(true) + .action(ArgAction::Set) .default_value("true") ) .arg( - Arg::with_name("prune-blobs") + Arg::new("prune-blobs") .long("prune-blobs") .value_name("BOOLEAN") .help("Prune blobs from Lighthouse's database when they are older than the data \ data availability boundary relative to the current epoch.") - .takes_value(true) + .action(ArgAction::Set) .default_value("true") ) .arg( - Arg::with_name("epochs-per-blob-prune") + Arg::new("epochs-per-blob-prune") .long("epochs-per-blob-prune") .value_name("EPOCHS") .help("The epoch interval with which to prune blobs from Lighthouse's \ database when they are older than the data availability boundary \ relative to the current epoch.") - .takes_value(true) + .action(ArgAction::Set) .default_value("1") ) .arg( - Arg::with_name("blob-prune-margin-epochs") + Arg::new("blob-prune-margin-epochs") .long("blob-prune-margin-epochs") .value_name("EPOCHS") .help("The margin for blob pruning in epochs. The oldest blobs are pruned \ up until data_availability_boundary - blob_prune_margin_epochs.") - .takes_value(true) + .action(ArgAction::Set) .default_value("0") ) @@ -778,17 +787,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { * Misc. */ .arg( - Arg::with_name("graffiti") + Arg::new("graffiti") .long("graffiti") .help( "Specify your custom graffiti to be included in blocks. \ Defaults to the current version and commit, truncated to fit in 32 bytes. " ) .value_name("GRAFFITI") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("max-skip-slots") + Arg::new("max-skip-slots") .long("max-skip-slots") .help( "Refuse to skip more than this many slots when processing an attestation. \ @@ -796,43 +805,43 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { but could also cause unnecessary consensus failures, so is disabled by default." ) .value_name("NUM_SLOTS") - .takes_value(true) + .action(ArgAction::Set) ) /* * Slasher. */ .arg( - Arg::with_name("slasher") + Arg::new("slasher") .long("slasher") .help( "Run a slasher alongside the beacon node. It is currently only recommended for \ expert users because of the immaturity of the slasher UX and the extra \ resources required." ) - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("slasher-dir") + Arg::new("slasher-dir") .long("slasher-dir") .help( "Set the slasher's database directory." ) .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .requires("slasher") ) .arg( - Arg::with_name("slasher-update-period") + Arg::new("slasher-update-period") .long("slasher-update-period") .help( "Configure how often the slasher runs batch processing." ) .value_name("SECONDS") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-slot-offset") + Arg::new("slasher-slot-offset") .long("slasher-slot-offset") .help( "Set the delay from the start of the slot at which the slasher should ingest \ @@ -841,10 +850,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) .value_name("SECONDS") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-history-length") + Arg::new("slasher-history-length") .long("slasher-history-length") .help( "Configure how many epochs of history the slasher keeps. Immutable after \ @@ -852,65 +861,65 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) .value_name("EPOCHS") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-max-db-size") + Arg::new("slasher-max-db-size") .long("slasher-max-db-size") .help( "Maximum size of the MDBX database used by the slasher." ) .value_name("GIGABYTES") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-att-cache-size") + Arg::new("slasher-att-cache-size") .long("slasher-att-cache-size") .help("Set the maximum number of attestation roots for the slasher to cache") .value_name("COUNT") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-chunk-size") + Arg::new("slasher-chunk-size") .long("slasher-chunk-size") .help( "Number of epochs per validator per chunk stored on disk." ) .value_name("EPOCHS") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-validator-chunk-size") + Arg::new("slasher-validator-chunk-size") .long("slasher-validator-chunk-size") .help( "Number of validators per chunk stored on disk." ) .value_name("NUM_VALIDATORS") .requires("slasher") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("slasher-broadcast") + Arg::new("slasher-broadcast") .long("slasher-broadcast") .help("Broadcast slashings found by the slasher to the rest of the network \ [Enabled by default].") - .takes_value(true) + .action(ArgAction::Set) .default_value("true") ) .arg( - Arg::with_name("slasher-backend") + Arg::new("slasher-backend") .long("slasher-backend") .value_name("DATABASE") .help("Set the database backend to be used by the slasher.") - .takes_value(true) - .possible_values(slasher::DatabaseBackend::VARIANTS) + .action(ArgAction::Set) + .value_parser(slasher::DatabaseBackend::VARIANTS.to_vec()) .requires("slasher") ) .arg( - Arg::with_name("wss-checkpoint") + Arg::new("wss-checkpoint") .long("wss-checkpoint") .help( "Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify \ @@ -919,94 +928,95 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { state use --checkpoint-sync-url." ) .value_name("WSS_CHECKPOINT") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("checkpoint-state") + Arg::new("checkpoint-state") .long("checkpoint-state") .help("Set a checkpoint state to start syncing from. Must be aligned and match \ --checkpoint-block. Using --checkpoint-sync-url instead is recommended.") .value_name("STATE_SSZ") - .takes_value(true) + .action(ArgAction::Set) .requires("checkpoint-block") ) .arg( - Arg::with_name("checkpoint-block") + Arg::new("checkpoint-block") .long("checkpoint-block") .help("Set a checkpoint block to start syncing from. Must be aligned and match \ --checkpoint-state. Using --checkpoint-sync-url instead is recommended.") .value_name("BLOCK_SSZ") - .takes_value(true) + .action(ArgAction::Set) .requires("checkpoint-state") ) .arg( - Arg::with_name("checkpoint-blobs") + Arg::new("checkpoint-blobs") .long("checkpoint-blobs") .help("Set the checkpoint blobs to start syncing from. Must be aligned and match \ --checkpoint-block. Using --checkpoint-sync-url instead is recommended.") .value_name("BLOBS_SSZ") - .takes_value(true) + .action(ArgAction::Set) .requires("checkpoint-block") ) .arg( - Arg::with_name("checkpoint-sync-url") + Arg::new("checkpoint-sync-url") .long("checkpoint-sync-url") .help("Set the remote beacon node HTTP endpoint to use for checkpoint sync.") .value_name("BEACON_NODE") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("checkpoint-state") ) .arg( - Arg::with_name("checkpoint-sync-url-timeout") + Arg::new("checkpoint-sync-url-timeout") .long("checkpoint-sync-url-timeout") .help("Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint.") .value_name("SECONDS") - .takes_value(true) + .action(ArgAction::Set) .default_value("180") ) .arg( - Arg::with_name("allow-insecure-genesis-sync") + Arg::new("allow-insecure-genesis-sync") .long("allow-insecure-genesis-sync") .help("Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. \ Checkpoint syncing is the preferred method for syncing a node. \ Only use this flag when testing. DO NOT use on mainnet!") .conflicts_with("checkpoint-sync-url") .conflicts_with("checkpoint-state") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("reconstruct-historic-states") + Arg::new("reconstruct-historic-states") .long("reconstruct-historic-states") .help("After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("validator-monitor-auto") + Arg::new("validator-monitor-auto") .long("validator-monitor-auto") + .action(ArgAction::SetTrue) .help("Enables the automatic detection and monitoring of validators connected to the \ HTTP API and using the subnet subscription endpoint. This generally has the \ effect of providing additional logging and metrics for locally controlled \ validators.") ) .arg( - Arg::with_name("validator-monitor-pubkeys") + Arg::new("validator-monitor-pubkeys") .long("validator-monitor-pubkeys") .help("A comma-separated list of 0x-prefixed validator public keys. \ These validators will receive special monitoring and additional \ logging.") .value_name("PUBKEYS") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("validator-monitor-file") + Arg::new("validator-monitor-file") .long("validator-monitor-file") .help("As per --validator-monitor-pubkeys, but the comma-separated list is \ contained within a file at the given path.") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("validator-monitor-individual-tracking-threshold") + Arg::new("validator-monitor-individual-tracking-threshold") .long("validator-monitor-individual-tracking-threshold") .help("Once the validator monitor reaches this number of local validators \ it will stop collecting per-validator Prometheus metrics and issuing \ @@ -1014,42 +1024,45 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { This avoids infeasibly high cardinality in the Prometheus database and \ high log volume when using many validators. Defaults to 64.") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("disable-lock-timeouts") + Arg::new("disable-lock-timeouts") .long("disable-lock-timeouts") .help("Disable the timeouts applied to some internal locks by default. This can \ lead to less spurious failures on slow hardware but is considered \ experimental as it may obscure performance issues.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("disable-proposer-reorgs") + Arg::new("disable-proposer-reorgs") .long("disable-proposer-reorgs") .help("Do not attempt to reorg late blocks from other validators when proposing.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("proposer-reorg-threshold") + Arg::new("proposer-reorg-threshold") .long("proposer-reorg-threshold") + .action(ArgAction::Set) .value_name("PERCENT") .help("Percentage of vote weight below which to attempt a proposer reorg. \ Default: 20%") .conflicts_with("disable-proposer-reorgs") ) .arg( - Arg::with_name("proposer-reorg-epochs-since-finalization") + Arg::new("proposer-reorg-epochs-since-finalization") .long("proposer-reorg-epochs-since-finalization") + .action(ArgAction::Set) .value_name("EPOCHS") .help("Maximum number of epochs since finalization at which proposer reorgs are \ allowed. Default: 2") .conflicts_with("disable-proposer-reorgs") ) .arg( - Arg::with_name("proposer-reorg-cutoff") + Arg::new("proposer-reorg-cutoff") .long("proposer-reorg-cutoff") .value_name("MILLISECONDS") + .action(ArgAction::Set) .help("Maximum delay after the start of the slot at which to propose a reorging \ block. Lower values can prevent failed reorgs by ensuring the block has \ ample time to propagate and be processed by the network. The default is \ @@ -1057,8 +1070,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .conflicts_with("disable-proposer-reorgs") ) .arg( - Arg::with_name("proposer-reorg-disallowed-offsets") + Arg::new("proposer-reorg-disallowed-offsets") .long("proposer-reorg-disallowed-offsets") + .action(ArgAction::Set) .value_name("N1,N2,...") .help("Comma-separated list of integer offsets which can be used to avoid \ proposing reorging blocks at certain slots. An offset of N means that \ @@ -1069,64 +1083,64 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .conflicts_with("disable-proposer-reorgs") ) .arg( - Arg::with_name("prepare-payload-lookahead") + Arg::new("prepare-payload-lookahead") .long("prepare-payload-lookahead") .value_name("MILLISECONDS") .help("The time before the start of a proposal slot at which payload attributes \ should be sent. Low values are useful for execution nodes which don't \ improve their payload after the first call, and high values are useful \ for ensuring the EL is given ample notice. Default: 1/3 of a slot.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("always-prepare-payload") + Arg::new("always-prepare-payload") .long("always-prepare-payload") .help("Send payload attributes with every fork choice update. This is intended for \ use by block builders, relays and developers. You should set a fee \ recipient on this BN and also consider adjusting the \ --prepare-payload-lookahead flag.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("fork-choice-before-proposal-timeout") + Arg::new("fork-choice-before-proposal-timeout") .long("fork-choice-before-proposal-timeout") .help("Set the maximum number of milliseconds to wait for fork choice before \ proposing a block. You can prevent waiting at all by setting the timeout \ to 0, however you risk proposing atop the wrong parent block.") .default_value("250") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("paranoid-block-proposal") + Arg::new("paranoid-block-proposal") .long("paranoid-block-proposal") .help("Paranoid enough to be reading the source? Nice. This flag reverts some \ block proposal optimisations and forces the node to check every attestation \ it includes super thoroughly. This may be useful in an emergency, but not \ otherwise.") - .hidden(true) - .takes_value(false) + .hide(true) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("builder-fallback-skips") + Arg::new("builder-fallback-skips") .long("builder-fallback-skips") .help("If this node is proposing a block and has seen this number of skip slots \ on the canonical chain in a row, it will NOT query any connected builders, \ and will use the local execution engine for payload construction.") .default_value("3") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("builder-fallback-skips-per-epoch") + Arg::new("builder-fallback-skips-per-epoch") .long("builder-fallback-skips-per-epoch") .help("If this node is proposing a block and has seen this number of skip slots \ on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query \ any connected builders, and will use the local execution engine for \ payload construction.") .default_value("8") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("builder-fallback-epochs-since-finalization") + Arg::new("builder-fallback-epochs-since-finalization") .long("builder-fallback-epochs-since-finalization") .help("If this node is proposing a block and the chain has not finalized within \ this number of epochs, it will NOT query any connected builders, \ @@ -1136,76 +1150,79 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { if there are skips slots at the start of an epoch, right before this node \ is set to propose.") .default_value("3") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("builder-fallback-disable-checks") + Arg::new("builder-fallback-disable-checks") .long("builder-fallback-disable-checks") .help("This flag disables all checks related to chain health. This means the builder \ API will always be used for payload construction, regardless of recent chain \ conditions.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("builder-profit-threshold") + Arg::new("builder-profit-threshold") .long("builder-profit-threshold") .value_name("WEI_VALUE") .help("This flag is deprecated and has no effect.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("builder-user-agent") + Arg::new("builder-user-agent") .long("builder-user-agent") .value_name("STRING") .help("The HTTP user agent to send alongside requests to the builder URL. The \ default is Lighthouse's version string.") .requires("builder") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("reset-payload-statuses") + Arg::new("reset-payload-statuses") .long("reset-payload-statuses") .help("When present, Lighthouse will forget the payload statuses of any \ already-imported blocks. This can assist in the recovery from a consensus \ failure caused by the execution layer.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("disable-deposit-contract-sync") + Arg::new("disable-deposit-contract-sync") .long("disable-deposit-contract-sync") .help("Explicitly disables syncing of deposit logs from the execution node. \ This overrides any previous option that depends on it. \ Useful if you intend to run a non-validating beacon node.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("disable-optimistic-finalized-sync") + Arg::new("disable-optimistic-finalized-sync") .long("disable-optimistic-finalized-sync") + .action(ArgAction::SetTrue) .help("Force Lighthouse to verify every execution block hash with the execution \ client during finalized sync. By default block hashes will be checked in \ Lighthouse and only passed to the EL if initial verification fails.") ) .arg( - Arg::with_name("light-client-server") + Arg::new("light-client-server") .long("light-client-server") .help("Act as a full node supporting light clients on the p2p network \ [experimental]") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("gui") + Arg::new("gui") .long("gui") .help("Enable the graphical user interface and all its requirements. \ This enables --http and --validator-monitor-auto and enables SSE logging.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("always-prefer-builder-payload") + Arg::new("always-prefer-builder-payload") + .action(ArgAction::SetTrue) .long("always-prefer-builder-payload") .help("This flag is deprecated and has no effect.") ) .arg( - Arg::with_name("invalid-gossip-verified-blocks-path") + Arg::new("invalid-gossip-verified-blocks-path") + .action(ArgAction::Set) .long("invalid-gossip-verified-blocks-path") .value_name("PATH") .help("If a block succeeds gossip validation whilst failing full validation, store \ @@ -1214,7 +1231,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { filling up their disks.") ) .arg( - Arg::with_name("progressive-balances") + Arg::new("progressive-balances") .long("progressive-balances") .value_name("MODE") .help("Control the progressive balances cache mode. The default `fast` mode uses \ @@ -1223,51 +1240,51 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { there is a mismatch, it falls back to the cache-free result. Using the \ default `fast` mode is recommended unless advised otherwise by the \ Lighthouse team.") - .takes_value(true) - .possible_values(ProgressiveBalancesMode::VARIANTS) + .action(ArgAction::Set) + .value_parser(ProgressiveBalancesMode::VARIANTS.to_vec()) ) .arg( - Arg::with_name("beacon-processor-max-workers") + Arg::new("beacon-processor-max-workers") .long("beacon-processor-max-workers") .value_name("INTEGER") .help("Specifies the maximum concurrent tasks for the task scheduler. Increasing \ this value may increase resource consumption. Reducing the value \ may result in decreased resource usage and diminished performance. The \ default value is the number of logical CPU cores on the host.") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("beacon-processor-work-queue-len") + Arg::new("beacon-processor-work-queue-len") .long("beacon-processor-work-queue-len") .value_name("INTEGER") .help("Specifies the length of the inbound event queue. \ Higher values may prevent messages from being dropped while lower values \ may help protect the node from becoming overwhelmed.") .default_value("16384") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("beacon-processor-reprocess-queue-len") + Arg::new("beacon-processor-reprocess-queue-len") .long("beacon-processor-reprocess-queue-len") .value_name("INTEGER") .help("Specifies the length of the queue for messages requiring delayed processing. \ Higher values may prevent messages from being dropped while lower values \ may help protect the node from becoming overwhelmed.") .default_value("12288") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("beacon-processor-attestation-batch-size") + Arg::new("beacon-processor-attestation-batch-size") .long("beacon-processor-attestation-batch-size") .value_name("INTEGER") .help("Specifies the number of gossip attestations in a signature verification batch. \ Higher values may reduce CPU usage in a healthy network whilst lower values may \ increase CPU usage in an unhealthy or hostile network.") .default_value("64") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("beacon-processor-aggregate-batch-size") + Arg::new("beacon-processor-aggregate-batch-size") .long("beacon-processor-aggregate-batch-size") .value_name("INTEGER") .help("Specifies the number of gossip aggregate attestations in a signature \ @@ -1275,13 +1292,13 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Higher values may reduce CPU usage in a healthy network while lower values may \ increase CPU usage in an unhealthy or hostile network.") .default_value("64") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("disable-duplicate-warn-logs") + Arg::new("disable-duplicate-warn-logs") .long("disable-duplicate-warn-logs") .help("This flag is deprecated and has no effect.") - .takes_value(false) + .action(ArgAction::SetTrue) ) - .group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true)) + .group(ArgGroup::new("enable_http").args(["http", "gui", "staking"]).multiple(true)) } diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index fc6132f8c9b..7aa82d04b32 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -48,7 +48,7 @@ pub fn get_config( client_config.set_data_dir(get_data_dir(cli_args)); // If necessary, remove any existing database and configuration - if client_config.data_dir().exists() && cli_args.is_present("purge-db") { + if client_config.data_dir().exists() && cli_args.get_flag("purge-db") { // Remove the chain_db. let chain_db = client_config.get_db_path(); if chain_db.exists() { @@ -94,7 +94,7 @@ pub fn get_config( * Note: the config values set here can be overwritten by other more specific cli params */ - if cli_args.is_present("staking") { + if cli_args.get_flag("staking") { client_config.http_api.enabled = true; client_config.sync_eth1_chain = true; } @@ -103,22 +103,22 @@ pub fn get_config( * Http API server */ - if cli_args.is_present("enable_http") { + if cli_args.contains_id("enable_http") { client_config.http_api.enabled = true; - if let Some(address) = cli_args.value_of("http-address") { + if let Some(address) = cli_args.get_one::("http-address") { client_config.http_api.listen_addr = address .parse::() .map_err(|_| "http-address is not a valid IP address.")?; } - if let Some(port) = cli_args.value_of("http-port") { + if let Some(port) = cli_args.get_one::("http-port") { client_config.http_api.listen_port = port .parse::() .map_err(|_| "http-port is not a valid u16.")?; } - if let Some(allow_origin) = cli_args.value_of("http-allow-origin") { + if let Some(allow_origin) = cli_args.get_one::("http-allow-origin") { // Pre-validate the config value to give feedback to the user on node startup, instead of // as late as when the first API response is produced. hyper::header::HeaderValue::from_str(allow_origin) @@ -131,22 +131,22 @@ pub fn get_config( client_config.http_api.spec_fork_name = Some(fork_name); } - if cli_args.is_present("http-enable-tls") { + if cli_args.get_flag("http-enable-tls") { client_config.http_api.tls_config = Some(TlsConfig { cert: cli_args - .value_of("http-tls-cert") + .get_one::("http-tls-cert") .ok_or("--http-tls-cert was not provided.")? .parse::() .map_err(|_| "http-tls-cert is not a valid path name.")?, key: cli_args - .value_of("http-tls-key") + .get_one::("http-tls-key") .ok_or("--http-tls-key was not provided.")? .parse::() .map_err(|_| "http-tls-key is not a valid path name.")?, }); } - if cli_args.is_present("http-allow-sync-stalled") { + if cli_args.get_flag("http-allow-sync-stalled") { client_config.http_api.allow_sync_stalled = true; } @@ -160,10 +160,10 @@ pub fn get_config( parse_required(cli_args, "http-duplicate-block-status")?; client_config.http_api.enable_light_client_server = - cli_args.is_present("light-client-server"); + cli_args.get_flag("light-client-server"); } - if cli_args.is_present("light-client-server") { + if cli_args.get_flag("light-client-server") { client_config.chain.enable_light_client_server = true; } @@ -175,23 +175,23 @@ pub fn get_config( * Prometheus metrics HTTP server */ - if cli_args.is_present("metrics") { + if cli_args.get_flag("metrics") { client_config.http_metrics.enabled = true; } - if let Some(address) = cli_args.value_of("metrics-address") { + if let Some(address) = cli_args.get_one::("metrics-address") { client_config.http_metrics.listen_addr = address .parse::() .map_err(|_| "metrics-address is not a valid IP address.")?; } - if let Some(port) = cli_args.value_of("metrics-port") { + if let Some(port) = cli_args.get_one::("metrics-port") { client_config.http_metrics.listen_port = port .parse::() .map_err(|_| "metrics-port is not a valid u16.")?; } - if let Some(allow_origin) = cli_args.value_of("metrics-allow-origin") { + if let Some(allow_origin) = cli_args.get_one::("metrics-allow-origin") { // Pre-validate the config value to give feedback to the user on node startup, instead of // as late as when the first API response is produced. hyper::header::HeaderValue::from_str(allow_origin) @@ -203,7 +203,7 @@ pub fn get_config( /* * Explorer metrics */ - if let Some(monitoring_endpoint) = cli_args.value_of("monitoring-endpoint") { + if let Some(monitoring_endpoint) = cli_args.get_one::("monitoring-endpoint") { let update_period_secs = clap_utils::parse_optional(cli_args, "monitoring-endpoint-period")?; @@ -217,7 +217,7 @@ pub fn get_config( // Log a warning indicating an open HTTP server if it wasn't specified explicitly // (e.g. using the --staking flag). - if cli_args.is_present("staking") { + if cli_args.get_flag("staking") { warn!( log, "Running HTTP server on port {}", client_config.http_api.listen_port @@ -225,7 +225,7 @@ pub fn get_config( } // Do not scrape for malloc metrics if we've disabled tuning malloc as it may cause panics. - if cli_args.is_present(DISABLE_MALLOC_TUNING_FLAG) { + if cli_args.get_flag(DISABLE_MALLOC_TUNING_FLAG) { client_config.http_metrics.allocator_metrics_enabled = false; } @@ -236,24 +236,24 @@ pub fn get_config( // When present, use an eth1 backend that generates deterministic junk. // // Useful for running testnets without the overhead of a deposit contract. - if cli_args.is_present("dummy-eth1") { + if cli_args.get_flag("dummy-eth1") { client_config.dummy_eth1_backend = true; } // When present, attempt to sync to an eth1 node. // // Required for block production. - if cli_args.is_present("eth1") { + if cli_args.get_flag("eth1") { client_config.sync_eth1_chain = true; } - if let Some(val) = cli_args.value_of("eth1-blocks-per-log-query") { + if let Some(val) = cli_args.get_one::("eth1-blocks-per-log-query") { client_config.eth1.blocks_per_log_query = val .parse() .map_err(|_| "eth1-blocks-per-log-query is not a valid integer".to_string())?; } - if cli_args.is_present("eth1-purge-cache") { + if cli_args.get_flag("eth1-purge-cache") { client_config.eth1.purge_cache = true; } @@ -263,7 +263,7 @@ pub fn get_config( client_config.eth1.cache_follow_distance = Some(follow_distance); } - if let Some(endpoints) = cli_args.value_of("execution-endpoint") { + if let Some(endpoints) = cli_args.get_one::("execution-endpoint") { let mut el_config = execution_layer::Config::default(); // Always follow the deposit contract when there is an execution endpoint. @@ -286,13 +286,14 @@ pub fn get_config( let secret_file: PathBuf; // Parse a single JWT secret from a given file_path, logging warnings if multiple are supplied. - if let Some(secret_files) = cli_args.value_of("execution-jwt") { + if let Some(secret_files) = cli_args.get_one::("execution-jwt") { secret_file = parse_only_one_value(secret_files, PathBuf::from_str, "--execution-jwt", log)?; // Check if the JWT secret key is passed directly via cli flag and persist it to the default // file location. - } else if let Some(jwt_secret_key) = cli_args.value_of("execution-jwt-secret-key") { + } else if let Some(jwt_secret_key) = cli_args.get_one::("execution-jwt-secret-key") + { use std::fs::File; use std::io::Write; secret_file = client_config.data_dir().join(DEFAULT_JWT_FILE); @@ -311,7 +312,7 @@ pub fn get_config( } // Parse and set the payload builder, if any. - if let Some(endpoint) = cli_args.value_of("builder") { + if let Some(endpoint) = cli_args.get_one::("builder") { let payload_builder = parse_only_one_value(endpoint, SensitiveUrl::parse, "--builder", log)?; el_config.builder_url = Some(payload_builder); @@ -320,14 +321,14 @@ pub fn get_config( clap_utils::parse_optional(cli_args, "builder-user-agent")?; } - if cli_args.is_present("builder-profit-threshold") { + if cli_args.contains_id("builder-profit-threshold") { warn!( log, "Ignoring --builder-profit-threshold"; "info" => "this flag is deprecated and will be removed" ); } - if cli_args.is_present("always-prefer-builder-payload") { + if cli_args.get_flag("always-prefer-builder-payload") { warn!( log, "Ignoring --always-prefer-builder-payload"; @@ -368,7 +369,8 @@ pub fn get_config( .map_err(|e| format!("Unable to read trusted setup file: {}", e))?; // Override default trusted setup file if required - if let Some(trusted_setup_file_path) = cli_args.value_of("trusted-setup-file-override") { + if let Some(trusted_setup_file_path) = cli_args.get_one::("trusted-setup-file-override") + { let file = std::fs::File::open(trusted_setup_file_path) .map_err(|e| format!("Failed to open trusted setup file: {}", e))?; let trusted_setup: TrustedSetup = serde_json::from_reader(file) @@ -376,11 +378,11 @@ pub fn get_config( client_config.trusted_setup = Some(trusted_setup); } - if let Some(freezer_dir) = cli_args.value_of("freezer-dir") { + if let Some(freezer_dir) = cli_args.get_one::("freezer-dir") { client_config.freezer_db_path = Some(PathBuf::from(freezer_dir)); } - if let Some(blobs_db_dir) = cli_args.value_of("blobs-dir") { + if let Some(blobs_db_dir) = cli_args.get_one::("blobs-dir") { client_config.blobs_db_path = Some(PathBuf::from(blobs_db_dir)); } @@ -388,20 +390,21 @@ pub fn get_config( client_config.store.slots_per_restore_point = sprp; client_config.store.slots_per_restore_point_set_explicitly = sprp_explicit; - if let Some(block_cache_size) = cli_args.value_of("block-cache-size") { + if let Some(block_cache_size) = cli_args.get_one::("block-cache-size") { client_config.store.block_cache_size = block_cache_size .parse() .map_err(|_| "block-cache-size is not a valid integer".to_string())?; } - if let Some(historic_state_cache_size) = cli_args.value_of("historic-state-cache-size") { + if let Some(historic_state_cache_size) = cli_args.get_one::("historic-state-cache-size") + { client_config.store.historic_state_cache_size = historic_state_cache_size .parse() .map_err(|_| "historic-state-cache-size is not a valid integer".to_string())?; } - client_config.store.compact_on_init = cli_args.is_present("compact-db"); - if let Some(compact_on_prune) = cli_args.value_of("auto-compact-db") { + client_config.store.compact_on_init = cli_args.get_flag("compact-db"); + if let Some(compact_on_prune) = cli_args.get_one::("auto-compact-db") { client_config.store.compact_on_prune = compact_on_prune .parse() .map_err(|_| "auto-compact-db takes a boolean".to_string())?; @@ -442,7 +445,7 @@ pub fn get_config( * from lighthouse. * Discovery address is set to localhost by default. */ - if cli_args.is_present("zero-ports") { + if cli_args.get_flag("zero-ports") { client_config.http_api.listen_port = 0; client_config.http_metrics.listen_port = 0; } @@ -508,14 +511,14 @@ pub fn get_config( None }; - client_config.allow_insecure_genesis_sync = cli_args.is_present("allow-insecure-genesis-sync"); + client_config.allow_insecure_genesis_sync = cli_args.get_flag("allow-insecure-genesis-sync"); client_config.genesis = if eth2_network_config.genesis_state_is_known() { // Set up weak subjectivity sync, or start from the hardcoded genesis state. if let (Some(initial_state_path), Some(initial_block_path), opt_initial_blobs_path) = ( - cli_args.value_of("checkpoint-state"), - cli_args.value_of("checkpoint-block"), - cli_args.value_of("checkpoint-blobs"), + cli_args.get_one::("checkpoint-state"), + cli_args.get_one::("checkpoint-block"), + cli_args.get_one::("checkpoint-blobs"), ) { let read = |path: &str| { use std::fs::File; @@ -531,14 +534,14 @@ pub fn get_config( let anchor_state_bytes = read(initial_state_path)?; let anchor_block_bytes = read(initial_block_path)?; - let anchor_blobs_bytes = opt_initial_blobs_path.map(read).transpose()?; + let anchor_blobs_bytes = opt_initial_blobs_path.map(|s| read(s)).transpose()?; ClientGenesis::WeakSubjSszBytes { anchor_state_bytes, anchor_block_bytes, anchor_blobs_bytes, } - } else if let Some(remote_bn_url) = cli_args.value_of("checkpoint-sync-url") { + } else if let Some(remote_bn_url) = cli_args.get_one::("checkpoint-sync-url") { let url = SensitiveUrl::parse(remote_bn_url) .map_err(|e| format!("Invalid checkpoint sync URL: {:?}", e))?; @@ -547,7 +550,7 @@ pub fn get_config( ClientGenesis::GenesisState } } else { - if cli_args.is_present("checkpoint-state") || cli_args.is_present("checkpoint-sync-url") { + if cli_args.contains_id("checkpoint-state") || cli_args.contains_id("checkpoint-sync-url") { return Err( "Checkpoint sync is not available for this network as no genesis state is known" .to_string(), @@ -556,12 +559,12 @@ pub fn get_config( ClientGenesis::DepositContract }; - if cli_args.is_present("reconstruct-historic-states") { + if cli_args.get_flag("reconstruct-historic-states") { client_config.chain.reconstruct_historic_states = true; client_config.chain.genesis_backfill = true; } - let raw_graffiti = if let Some(graffiti) = cli_args.value_of("graffiti") { + let raw_graffiti = if let Some(graffiti) = cli_args.get_one::("graffiti") { if graffiti.len() > GRAFFITI_BYTES_LEN { return Err(format!( "Your graffiti is too long! {} bytes maximum!", @@ -570,7 +573,7 @@ pub fn get_config( } graffiti.as_bytes() - } else if cli_args.is_present("private") { + } else if cli_args.get_flag("private") { b"" } else { lighthouse_version::VERSION.as_bytes() @@ -580,7 +583,7 @@ pub fn get_config( client_config.graffiti.0[..trimmed_graffiti_len] .copy_from_slice(&raw_graffiti[..trimmed_graffiti_len]); - if let Some(wss_checkpoint) = cli_args.value_of("wss-checkpoint") { + if let Some(wss_checkpoint) = cli_args.get_one::("wss-checkpoint") { let mut split = wss_checkpoint.split(':'); let root_str = split .next() @@ -615,8 +618,8 @@ pub fn get_config( client_config.chain.weak_subjectivity_checkpoint = Some(Checkpoint { epoch, root }) } - if let Some(max_skip_slots) = cli_args.value_of("max-skip-slots") { - client_config.chain.import_max_skip_slots = match max_skip_slots { + if let Some(max_skip_slots) = cli_args.get_one::("max-skip-slots") { + client_config.chain.import_max_skip_slots = match max_skip_slots.as_str() { "none" => None, n => Some( n.parse() @@ -630,8 +633,8 @@ pub fn get_config( spec.gossip_max_size as usize, ); - if cli_args.is_present("slasher") { - let slasher_dir = if let Some(slasher_dir) = cli_args.value_of("slasher-dir") { + if cli_args.get_flag("slasher") { + let slasher_dir = if let Some(slasher_dir) = cli_args.get_one::("slasher-dir") { PathBuf::from(slasher_dir) } else { client_config.data_dir().join("slasher_db") @@ -696,11 +699,11 @@ pub fn get_config( client_config.slasher = Some(slasher_config); } - if cli_args.is_present("validator-monitor-auto") { + if cli_args.get_flag("validator-monitor-auto") { client_config.validator_monitor.auto_register = true; } - if let Some(pubkeys) = cli_args.value_of("validator-monitor-pubkeys") { + if let Some(pubkeys) = cli_args.get_one::("validator-monitor-pubkeys") { let pubkeys = pubkeys .split(',') .map(PublicKeyBytes::from_str) @@ -712,7 +715,7 @@ pub fn get_config( .extend_from_slice(&pubkeys); } - if let Some(path) = cli_args.value_of("validator-monitor-file") { + if let Some(path) = cli_args.get_one::("validator-monitor-file") { let string = fs::read(path) .map_err(|e| format!("Unable to read --validator-monitor-file: {}", e)) .and_then(|bytes| { @@ -739,11 +742,11 @@ pub fn get_config( .individual_tracking_threshold = count; } - if cli_args.is_present("disable-lock-timeouts") { + if cli_args.get_flag("disable-lock-timeouts") { client_config.chain.enable_lock_timeouts = false; } - if cli_args.is_present("disable-proposer-reorgs") { + if cli_args.get_flag("disable-proposer-reorgs") { client_config.chain.re_org_threshold = None; } else { client_config.chain.re_org_threshold = Some( @@ -774,7 +777,7 @@ pub fn get_config( } // Note: This overrides any previous flags that enable this option. - if cli_args.is_present("disable-deposit-contract-sync") { + if cli_args.get_flag("disable-deposit-contract-sync") { client_config.sync_eth1_chain = false; } @@ -786,7 +789,7 @@ pub fn get_config( / DEFAULT_PREPARE_PAYLOAD_LOOKAHEAD_FACTOR }); - client_config.chain.always_prepare_payload = cli_args.is_present("always-prepare-payload"); + client_config.chain.always_prepare_payload = cli_args.get_flag("always-prepare-payload"); if let Some(timeout) = clap_utils::parse_optional(cli_args, "fork-choice-before-proposal-timeout")? @@ -795,9 +798,9 @@ pub fn get_config( } client_config.chain.always_reset_payload_statuses = - cli_args.is_present("reset-payload-statuses"); + cli_args.get_flag("reset-payload-statuses"); - client_config.chain.paranoid_block_proposal = cli_args.is_present("paranoid-block-proposal"); + client_config.chain.paranoid_block_proposal = cli_args.get_flag("paranoid-block-proposal"); /* * Builder fallback configs. @@ -811,25 +814,25 @@ pub fn get_config( .builder_fallback_epochs_since_finalization = clap_utils::parse_required(cli_args, "builder-fallback-epochs-since-finalization")?; client_config.chain.builder_fallback_disable_checks = - cli_args.is_present("builder-fallback-disable-checks"); + cli_args.get_flag("builder-fallback-disable-checks"); // Graphical user interface config. - if cli_args.is_present("gui") { + if cli_args.get_flag("gui") { client_config.http_api.enabled = true; client_config.validator_monitor.auto_register = true; } // Optimistic finalized sync. client_config.chain.optimistic_finalized_sync = - !cli_args.is_present("disable-optimistic-finalized-sync"); + !cli_args.get_flag("disable-optimistic-finalized-sync"); - if cli_args.is_present("genesis-backfill") { + if cli_args.get_flag("genesis-backfill") { client_config.chain.genesis_backfill = true; } // Backfill sync rate-limiting client_config.beacon_processor.enable_backfill_rate_limiting = - !cli_args.is_present("disable-backfill-rate-limiting"); + !cli_args.get_flag("disable-backfill-rate-limiting"); if let Some(path) = clap_utils::parse_optional(cli_args, "invalid-gossip-verified-blocks-path")? { @@ -873,10 +876,9 @@ pub fn parse_listening_addresses( log: &Logger, ) -> Result { let listen_addresses_str = cli_args - .values_of("listen-address") + .get_many::("listen-address") .expect("--listen_addresses has a default value"); - - let use_zero_ports = cli_args.is_present("zero-ports"); + let use_zero_ports = cli_args.get_flag("zero-ports"); // parse the possible ips let mut maybe_ipv4 = None; @@ -910,28 +912,30 @@ pub fn parse_listening_addresses( // parse the possible tcp ports let port = cli_args - .value_of("port") + .get_one::("port") .expect("--port has a default value") .parse::() .map_err(|parse_error| format!("Failed to parse --port as an integer: {parse_error}"))?; let port6 = cli_args - .value_of("port6") - .map(str::parse::) + .get_one::("port6") + .map(|s| str::parse::(s)) .transpose() .map_err(|parse_error| format!("Failed to parse --port6 as an integer: {parse_error}"))? .unwrap_or(9090); + println!("{}", port); + // parse the possible discovery ports. let maybe_disc_port = cli_args - .value_of("discovery-port") - .map(str::parse::) + .get_one::("discovery-port") + .map(|s| str::parse::(s)) .transpose() .map_err(|parse_error| { format!("Failed to parse --discovery-port as an integer: {parse_error}") })?; let maybe_disc6_port = cli_args - .value_of("discovery-port6") - .map(str::parse::) + .get_one::("discovery-port6") + .map(|s| str::parse::(s)) .transpose() .map_err(|parse_error| { format!("Failed to parse --discovery-port6 as an integer: {parse_error}") @@ -939,8 +943,8 @@ pub fn parse_listening_addresses( // parse the possible quic port. let maybe_quic_port = cli_args - .value_of("quic-port") - .map(str::parse::) + .get_one::("quic-port") + .map(|s| str::parse::(s)) .transpose() .map_err(|parse_error| { format!("Failed to parse --quic-port as an integer: {parse_error}") @@ -948,13 +952,14 @@ pub fn parse_listening_addresses( // parse the possible quic port. let maybe_quic6_port = cli_args - .value_of("quic-port6") - .map(str::parse::) + .get_one::("quic-port6") + .map(|s| str::parse::(s)) .transpose() .map_err(|parse_error| { format!("Failed to parse --quic6-port as an integer: {parse_error}") })?; + // Now put everything together let listening_addresses = match (maybe_ipv4, maybe_ipv6) { (None, None) => { @@ -964,7 +969,7 @@ pub fn parse_listening_addresses( (None, Some(ipv6)) => { // A single ipv6 address was provided. Set the ports - if cli_args.is_present("port6") { + if cli_args.contains_id("port6") { warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored.") } // use zero ports if required. If not, use the given port. @@ -1052,6 +1057,7 @@ pub fn parse_listening_addresses( ipv4_tcp_port + 1 }); + // Defaults to 9090 when required let ipv6_tcp_port = use_zero_ports .then(unused_port::unused_tcp6_port) @@ -1100,41 +1106,41 @@ pub fn set_network_config( log: &Logger, ) -> Result<(), String> { // If a network dir has been specified, override the `datadir` definition. - if let Some(dir) = cli_args.value_of("network-dir") { + if let Some(dir) = cli_args.get_one::("network-dir") { config.network_dir = PathBuf::from(dir); } else { config.network_dir = data_dir.join(DEFAULT_NETWORK_DIR); }; - if cli_args.is_present("subscribe-all-subnets") { + if cli_args.get_flag("subscribe-all-subnets") { config.subscribe_all_subnets = true; } - if cli_args.is_present("import-all-attestations") { + if cli_args.get_flag("import-all-attestations") { config.import_all_attestations = true; } - if cli_args.is_present("shutdown-after-sync") { + if cli_args.get_flag("shutdown-after-sync") { config.shutdown_after_sync = true; } config.set_listening_addr(parse_listening_addresses(cli_args, log)?); // A custom target-peers command will overwrite the --proposer-only default. - if let Some(target_peers_str) = cli_args.value_of("target-peers") { + if let Some(target_peers_str) = cli_args.get_one::("target-peers") { config.target_peers = target_peers_str .parse::() .map_err(|_| format!("Invalid number of target peers: {}", target_peers_str))?; } - if let Some(value) = cli_args.value_of("network-load") { + if let Some(value) = cli_args.get_one::("network-load") { let network_load = value .parse::() .map_err(|_| format!("Invalid integer: {}", value))?; config.network_load = network_load; } - if let Some(boot_enr_str) = cli_args.value_of("boot-nodes") { + if let Some(boot_enr_str) = cli_args.get_one::("boot-nodes") { let mut enrs: Vec = vec![]; let mut multiaddrs: Vec = vec![]; for addr in boot_enr_str.split(',') { @@ -1159,7 +1165,7 @@ pub fn set_network_config( config.boot_nodes_multiaddr = multiaddrs; } - if let Some(libp2p_addresses_str) = cli_args.value_of("libp2p-addresses") { + if let Some(libp2p_addresses_str) = cli_args.get_one::("libp2p-addresses") { config.libp2p_nodes = libp2p_addresses_str .split(',') .map(|multiaddr| { @@ -1170,11 +1176,11 @@ pub fn set_network_config( .collect::, _>>()?; } - if cli_args.is_present("disable-peer-scoring") { + if cli_args.get_flag("disable-peer-scoring") { config.disable_peer_scoring = true; } - if let Some(trusted_peers_str) = cli_args.value_of("trusted-peers") { + if let Some(trusted_peers_str) = cli_args.get_one::("trusted-peers") { config.trusted_peers = trusted_peers_str .split(',') .map(|peer_id| { @@ -1188,7 +1194,7 @@ pub fn set_network_config( } } - if let Some(enr_udp_port_str) = cli_args.value_of("enr-udp-port") { + if let Some(enr_udp_port_str) = cli_args.get_one::("enr-udp-port") { config.enr_udp4_port = Some( enr_udp_port_str .parse::() @@ -1196,7 +1202,7 @@ pub fn set_network_config( ); } - if let Some(enr_quic_port_str) = cli_args.value_of("enr-quic-port") { + if let Some(enr_quic_port_str) = cli_args.get_one::("enr-quic-port") { config.enr_quic4_port = Some( enr_quic_port_str .parse::() @@ -1204,7 +1210,7 @@ pub fn set_network_config( ); } - if let Some(enr_tcp_port_str) = cli_args.value_of("enr-tcp-port") { + if let Some(enr_tcp_port_str) = cli_args.get_one::("enr-tcp-port") { config.enr_tcp4_port = Some( enr_tcp_port_str .parse::() @@ -1212,7 +1218,7 @@ pub fn set_network_config( ); } - if let Some(enr_udp_port_str) = cli_args.value_of("enr-udp6-port") { + if let Some(enr_udp_port_str) = cli_args.get_one::("enr-udp6-port") { config.enr_udp6_port = Some( enr_udp_port_str .parse::() @@ -1220,7 +1226,7 @@ pub fn set_network_config( ); } - if let Some(enr_quic_port_str) = cli_args.value_of("enr-quic6-port") { + if let Some(enr_quic_port_str) = cli_args.get_one::("enr-quic6-port") { config.enr_quic6_port = Some( enr_quic_port_str .parse::() @@ -1228,7 +1234,7 @@ pub fn set_network_config( ); } - if let Some(enr_tcp_port_str) = cli_args.value_of("enr-tcp6-port") { + if let Some(enr_tcp_port_str) = cli_args.get_one::("enr-tcp6-port") { config.enr_tcp6_port = Some( enr_tcp_port_str .parse::() @@ -1236,7 +1242,7 @@ pub fn set_network_config( ); } - if cli_args.is_present("enr-match") { + if cli_args.get_flag("enr-match") { // Match the IP and UDP port in the ENR. if let Some(ipv4_addr) = config.listen_addrs().v4().cloned() { @@ -1274,7 +1280,7 @@ pub fn set_network_config( } } - if let Some(enr_addresses) = cli_args.values_of("enr-address") { + if let Some(enr_addresses) = cli_args.get_many::("enr-address") { let mut enr_ip4 = None; let mut enr_ip6 = None; let mut resolved_enr_ip4 = None; @@ -1352,58 +1358,58 @@ pub fn set_network_config( } } - if cli_args.is_present("disable-enr-auto-update") { + if cli_args.get_flag("disable-enr-auto-update") { config.discv5_config.enr_update = false; } - if cli_args.is_present("disable-packet-filter") { + if cli_args.get_flag("disable-packet-filter") { warn!(log, "Discv5 packet filter is disabled"); config.discv5_config.enable_packet_filter = false; } - if cli_args.is_present("disable-discovery") { + if cli_args.get_flag("disable-discovery") { config.disable_discovery = true; warn!(log, "Discovery is disabled. New peers will not be found"); } - if cli_args.is_present("disable-quic") { + if cli_args.get_flag("disable-quic") { config.disable_quic_support = true; } - if cli_args.is_present("disable-upnp") { + if cli_args.get_flag("disable-upnp") { config.upnp_enabled = false; } - if cli_args.is_present("private") { + if cli_args.get_flag("private") { config.private = true; } - if cli_args.is_present("metrics") { + if cli_args.get_flag("metrics") { config.metrics_enabled = true; } - if cli_args.is_present("enable-private-discovery") { + if cli_args.get_flag("enable-private-discovery") { config.discv5_config.table_filter = |_| true; } // Light client server config. - config.enable_light_client_server = cli_args.is_present("light-client-server"); + config.enable_light_client_server = cli_args.get_flag("light-client-server"); // The self limiter is disabled by default. // This flag can be used both with or without a value. Try to parse it first with a value, if // no value is defined but the flag is present, use the default params. config.outbound_rate_limiter_config = clap_utils::parse_optional(cli_args, "self-limiter")?; - if cli_args.is_present("self-limiter") && config.outbound_rate_limiter_config.is_none() { + if cli_args.contains_id("self-limiter") && config.outbound_rate_limiter_config.is_none() { config.outbound_rate_limiter_config = Some(Default::default()); } // Proposer-only mode overrides a number of previous configuration parameters. // Specifically, we avoid subscribing to long-lived subnets and wish to maintain a minimal set // of peers. - if cli_args.is_present("proposer-only") { + if cli_args.get_flag("proposer-only") { config.subscribe_all_subnets = false; - if cli_args.value_of("target-peers").is_none() { + if cli_args.get_one::("target-peers").is_none() { // If a custom value is not set, change the default to 15 config.target_peers = 15; } @@ -1412,18 +1418,19 @@ pub fn set_network_config( } // The inbound rate limiter is enabled by default unless `disabled` is passed to the // `inbound-rate-limiter` flag. Any other value should be parsed as a configuration string. - config.inbound_rate_limiter_config = match cli_args.value_of("inbound-rate-limiter") { + config.inbound_rate_limiter_config = match cli_args.get_one::("inbound-rate-limiter") { None => { // Enabled by default, with default values Some(Default::default()) } - Some("disabled") => { - // Explicitly disabled - None - } Some(config_str) => { + if config_str.as_str() == "disabled" { + None + } else { + Some(config_str.parse()?) + } // Enabled with a custom configuration - Some(config_str.parse()?) + // Some(config_str.parse()?) } }; Ok(()) @@ -1437,7 +1444,7 @@ pub fn get_data_dir(cli_args: &ArgMatches) -> PathBuf { // directory and the testnet name onto it. cli_args - .value_of("datadir") + .get_one::("datadir") .map(|path| PathBuf::from(path).join(DEFAULT_BEACON_NODE_DIR)) .or_else(|| { dirs::home_dir().map(|home| { diff --git a/beacon_node/src/lib.rs b/beacon_node/src/lib.rs index ee782c650e2..4ca084c3165 100644 --- a/beacon_node/src/lib.rs +++ b/beacon_node/src/lib.rs @@ -1,4 +1,3 @@ -#[macro_use] extern crate clap; mod cli; @@ -44,7 +43,7 @@ impl ProductionBeaconNode { /// configurations hosted remotely. pub async fn new_from_cli( context: RuntimeContext, - matches: ArgMatches<'static>, + matches: ArgMatches, ) -> Result { let client_config = get_config::(&matches, &context)?; Self::new(context, client_config).await diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index d7ea5ab0b35..b40a5697f9d 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -1,18 +1,19 @@ //! Simple logic for spawning a Lighthouse BootNode. -use clap::{App, Arg}; +use clap::{Arg, ArgAction, Command}; +use clap_utils::get_color_style; // TODO: Add DOS prevention CLI params -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("boot_node") +pub fn cli_app() -> Command { + Command::new("boot_node") .about("Start a special Lighthouse process that only serves as a discv5 boot-node. This \ process will *not* import blocks or perform most typical beacon node functions. Instead, it \ will simply run the discv5 service and assist nodes on the network to discover each other. \ This is the recommended way to provide a network boot-node since it has a reduced attack \ surface compared to a full beacon node.") - .settings(&[clap::AppSettings::ColoredHelp]) + .styles(get_color_style()) .arg( - Arg::with_name("enr-address") + Arg::new("enr-address") .long("enr-address") .value_name("ADDRESS") .help("The IP address/ DNS address to broadcast to other peers on how to reach \ @@ -21,31 +22,30 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { discovery. Set this only if you are sure other nodes can connect to your \ local node on this address. This will update the `ip4` or `ip6` ENR fields \ accordingly. To update both, set this flag twice with the different values.") - .multiple(true) - .max_values(2) + .action(ArgAction::Append) + // .max_values(2) .required(true) .conflicts_with("network-dir") - .takes_value(true), ) .arg( - Arg::with_name("port") + Arg::new("port") .long("port") .value_name("PORT") .help("The UDP port to listen on.") .default_value("9000") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("port6") + Arg::new("port6") .long("port6") .value_name("PORT") .help("The UDP port to listen on over IpV6 when listening over both Ipv4 and \ Ipv6. Defaults to 9090 when required.") .default_value("9090") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("listen-address") + Arg::new("listen-address") .long("listen-address") .value_name("ADDRESS") .help("The address the bootnode will listen for UDP communications. To listen \ @@ -56,53 +56,162 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - --listen-address '0.0.0.0' --listen-address '::' will listen over both \ Ipv4 and Ipv6. The order of the given addresses is not relevant. However, \ multiple Ipv4, or multiple Ipv6 addresses will not be accepted.") - .multiple(true) - .max_values(2) + // .multiple(true) + // .max_values(2) .default_value("0.0.0.0") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("boot-nodes") + Arg::new("boot-nodes") .long("boot-nodes") .allow_hyphen_values(true) .value_name("ENR-LIST/Multiaddr") .help("One or more comma-delimited base64-encoded ENR's or multiaddr strings of peers to initially add to the local routing table") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("enr-udp-port") + Arg::new("enr-udp-port") .long("enr-port") .value_name("PORT") .help("The UDP port of the boot node's ENR. This is the port that external peers will dial to reach this boot node. Set this only if the external port differs from the listening port.") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("network-dir") ) .arg( - Arg::with_name("enr-udp6-port") + Arg::new("enr-udp6-port") .long("enr-udp6-port") .value_name("PORT") .help("The UDP6 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IpV6.") .conflicts_with("network-dir") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("enable-enr-auto-update") - .short("x") + Arg::new("enable-enr-auto-update") + .short('x') + .action(ArgAction::SetTrue) .long("enable-enr-auto-update") .help("Discovery can automatically update the node's local ENR with an external IP address and port as seen by other peers on the network. \ This enables this feature.") ) .arg( - Arg::with_name("disable-packet-filter") + Arg::new("disable-packet-filter") + .action(ArgAction::SetTrue) .long("disable-packet-filter") .help("Disables discv5 packet filter. Useful for testing in smaller networks") ) .arg( - Arg::with_name("network-dir") + Arg::new("network-dir") .value_name("NETWORK_DIR") .long("network-dir") .help("The directory which contains the enr and it's associated private key") - .takes_value(true) + .action(ArgAction::Set) + ) + .arg( + Arg::new("subscribe-all-subnets") + .long("subscribe-all-subnets") + .action(ArgAction::SetTrue) + .help("Subscribe to all subnets regardless of validator count. \ + This will also advertise the beacon node as being long-lived subscribed to all subnets.") + ) + .arg( + Arg::new("import-all-attestations") + .long("import-all-attestations") + .help("Import and aggregate all attestations, regardless of validator subscriptions. \ + This will only import attestations from already-subscribed subnets, use with \ + --subscribe-all-subnets to ensure all attestations are received for import.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("shutdown-after-sync") + .long("shutdown-after-sync") + .help("Shutdown beacon node as soon as sync is completed. Backfill sync will \ + not be performed before shutdown.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("zero-ports") + .long("zero-ports") + .short('z') + .help("Sets all listening TCP/UDP ports to 0, allowing the OS to choose some \ + arbitrary free ports.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("disable-peer-scoring") + .long("disable-peer-scoring") + .help("Disables peer scoring in lighthouse. WARNING: This is a dev only flag is only meant to be used in local testing scenarios \ + Using this flag on a real network may cause your node to become eclipsed and see a different view of the network") + .action(ArgAction::SetTrue) + .hide(true) + ) + .arg( + Arg::new("enr-match") + .short('e') + .long("enr-match") + .action(ArgAction::SetTrue) + .help("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.") + ) + .arg( + Arg::new("disable-enr-auto-update") + .short('x') + .action(ArgAction::SetTrue) + .long("disable-enr-auto-update") + .help("Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. \ + This disables this feature, fixing the ENR's IP/PORT to those specified on boot.") + ) + .arg( + Arg::new("disable-discovery") + .long("disable-discovery") + .action(ArgAction::SetTrue) + .help("Disables the discv5 discovery protocol. The node will not search for new peers or participate in the discovery protocol.") + .hide(true) + ) + .arg( + Arg::new("disable-quic") + .long("disable-quic") + .action(ArgAction::SetTrue) + .help("Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections.") + ) + .arg( + Arg::new("disable-upnp") + .long("disable-upnp") + .help("Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("private") + .long("private") + .help("Prevents sending various client identification information.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("metrics") + .long("metrics") + .help("Enable the Prometheus metrics HTTP server. Disabled by default.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("enable-private-discovery") + .long("enable-private-discovery") + .help("Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses.") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("light-client-server") + .long("light-client-server") + .help("Act as a full node supporting light clients on the p2p network \ + [experimental]") + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("proposer-only") + .long("proposer-only") + .help("Sets this beacon node at be a block proposer only node. \ + This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag should be used \ + for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups.") + .action(ArgAction::SetTrue) ) } diff --git a/boot_node/src/config.rs b/boot_node/src/config.rs index 6fb1ea9bf56..ca5680da2dd 100644 --- a/boot_node/src/config.rs +++ b/boot_node/src/config.rs @@ -25,7 +25,7 @@ pub struct BootNodeConfig { impl BootNodeConfig { pub async fn new( - matches: &ArgMatches<'_>, + matches: &ArgMatches, eth2_network_config: &Eth2NetworkConfig, ) -> Result { let data_dir = get_data_dir(matches); @@ -39,7 +39,7 @@ impl BootNodeConfig { boot_nodes.extend_from_slice(enr); } - if let Some(nodes) = matches.value_of("boot-nodes") { + if let Some(nodes) = matches.get_one::("boot-nodes") { boot_nodes.extend_from_slice( &nodes .split(',') @@ -81,14 +81,14 @@ impl BootNodeConfig { }; // By default this is enabled. If it is not set, revert to false. - if !matches.is_present("enable-enr-auto-update") { + if !matches.get_flag("enable-enr-auto-update") { network_config.discv5_config.enr_update = false; } let private_key = load_private_key(&network_config, &logger); let local_key = CombinedKey::from_libp2p(private_key)?; - let local_enr = if let Some(dir) = matches.value_of("network-dir") { + let local_enr = if let Some(dir) = matches.get_one::("network-dir") { let network_dir: PathBuf = dir.into(); load_enr_from_disk(&network_dir)? } else { diff --git a/boot_node/src/lib.rs b/boot_node/src/lib.rs index 0421ce2684d..dcde7c5a39c 100644 --- a/boot_node/src/lib.rs +++ b/boot_node/src/lib.rs @@ -14,8 +14,8 @@ const LOG_CHANNEL_SIZE: usize = 2048; /// Run the bootnode given the CLI configuration. pub fn run( - lh_matches: &ArgMatches<'_>, - bn_matches: &ArgMatches<'_>, + lh_matches: &ArgMatches, + bn_matches: &ArgMatches, eth_spec_id: EthSpecId, eth2_network_config: &Eth2NetworkConfig, debug_level: String, @@ -67,8 +67,8 @@ pub fn run( } fn main( - lh_matches: &ArgMatches<'_>, - bn_matches: &ArgMatches<'_>, + lh_matches: &ArgMatches, + bn_matches: &ArgMatches, eth2_network_config: &Eth2NetworkConfig, log: slog::Logger, ) -> Result<(), String> { diff --git a/boot_node/src/server.rs b/boot_node/src/server.rs index 8260038a0be..64aa6acf3b6 100644 --- a/boot_node/src/server.rs +++ b/boot_node/src/server.rs @@ -12,8 +12,8 @@ use slog::info; use types::EthSpec; pub async fn run( - lh_matches: &ArgMatches<'_>, - bn_matches: &ArgMatches<'_>, + lh_matches: &ArgMatches, + bn_matches: &ArgMatches, eth2_network_config: &Eth2NetworkConfig, log: slog::Logger, ) -> Result<(), String> { @@ -28,7 +28,7 @@ pub async fn run( ð2_network_config.chain_spec::()?, )?; - if lh_matches.is_present("immediate-shutdown") { + if lh_matches.get_flag("immediate-shutdown") { return Ok(()); } diff --git a/common/clap_utils/src/lib.rs b/common/clap_utils/src/lib.rs index 1ebd2b1740f..66b79e7e54d 100644 --- a/common/clap_utils/src/lib.rs +++ b/common/clap_utils/src/lib.rs @@ -1,5 +1,6 @@ //! A helper library for parsing values from `clap::ArgMatches`. +use clap::builder::styling::*; use clap::ArgMatches; use eth2_network_config::{Eth2NetworkConfig, DEFAULT_HARDCODED_NETWORK}; use ethereum_types::U256 as Uint256; @@ -18,9 +19,9 @@ pub const BAD_TESTNET_DIR_MESSAGE: &str = "The hard-coded testnet directory was /// Try to parse the eth2 network config from the `network`, `testnet-dir` flags in that order. /// Returns the default hardcoded testnet if neither flags are set. pub fn get_eth2_network_config(cli_args: &ArgMatches) -> Result { - let optional_network_config = if cli_args.is_present("network") { + let optional_network_config = if cli_args.contains_id("network") { parse_hardcoded_network(cli_args, "network")? - } else if cli_args.is_present("testnet-dir") { + } else if cli_args.contains_id("testnet-dir") { parse_testnet_dir(cli_args, "testnet-dir")? } else { // if neither is present, assume the default network @@ -92,7 +93,7 @@ pub fn parse_path_with_default_in_home_dir( default: PathBuf, ) -> Result { matches - .value_of(name) + .get_one::(name) .map(|dir| { dir.parse::() .map_err(|e| format!("Unable to parse {}: {}", name, e)) @@ -122,7 +123,7 @@ where ::Err: std::fmt::Display, { matches - .value_of(name) + .get_one::(name) .map(|val| { val.parse() .map_err(|e| format!("Unable to parse {}: {}", name, e)) @@ -150,7 +151,7 @@ pub fn parse_ssz_optional( name: &'static str, ) -> Result, String> { matches - .value_of(name) + .get_one::(name) .map(|val| { if let Some(stripped) = val.strip_prefix("0x") { let vec = hex::decode(stripped) @@ -190,3 +191,11 @@ where } Ok(()) } + +pub fn get_color_style() -> Styles { + Styles::styled() + .header(AnsiColor::Yellow.on_default()) + .usage(AnsiColor::Green.on_default()) + .literal(AnsiColor::Green.on_default()) + .placeholder(AnsiColor::Green.on_default()) +} diff --git a/common/directory/src/lib.rs b/common/directory/src/lib.rs index e8585c504a0..df03b4f9a4e 100644 --- a/common/directory/src/lib.rs +++ b/common/directory/src/lib.rs @@ -21,9 +21,9 @@ pub const CUSTOM_TESTNET_DIR: &str = "custom"; /// if not present, then checks the "testnet-dir" flag and returns a custom name /// If neither flags are present, returns the default hardcoded network name. pub fn get_network_dir(matches: &ArgMatches) -> String { - if let Some(network_name) = matches.value_of("network") { + if let Some(network_name) = matches.get_one::("network") { network_name.to_string() - } else if matches.value_of("testnet-dir").is_some() { + } else if matches.get_one::("testnet-dir").is_some() { CUSTOM_TESTNET_DIR.to_string() } else { eth2_network_config::DEFAULT_HARDCODED_NETWORK.to_string() diff --git a/database_manager/src/lib.rs b/database_manager/src/lib.rs index 3583d9e2792..e4928cb7f27 100644 --- a/database_manager/src/lib.rs +++ b/database_manager/src/lib.rs @@ -3,7 +3,8 @@ use beacon_chain::{ slot_clock::SystemTimeSlotClock, }; use beacon_node::{get_data_dir, get_slots_per_restore_point, ClientConfig}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::get_color_style; use environment::{Environment, RuntimeContext}; use slog::{info, warn, Logger}; use std::fs; @@ -20,147 +21,147 @@ use types::{BeaconState, EthSpec, Slot}; pub const CMD: &str = "database_manager"; -pub fn version_cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("version") - .visible_aliases(&["v"]) - .setting(clap::AppSettings::ColoredHelp) +pub fn version_cli_app() -> Command { + Command::new("version") + .visible_aliases(["v"]) + .styles(get_color_style()) .about("Display database schema version") } -pub fn migrate_cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("migrate") - .setting(clap::AppSettings::ColoredHelp) +pub fn migrate_cli_app() -> Command { + Command::new("migrate") + .styles(get_color_style()) .about("Migrate the database to a specific schema version") .arg( - Arg::with_name("to") + Arg::new("to") .long("to") .value_name("VERSION") .help("Schema version to migrate to") - .takes_value(true) + .action(ArgAction::Set) .required(true), ) } -pub fn inspect_cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("inspect") - .setting(clap::AppSettings::ColoredHelp) +pub fn inspect_cli_app() -> Command { + Command::new("inspect") + .styles(get_color_style()) .about("Inspect raw database values") .arg( - Arg::with_name("column") + Arg::new("column") .long("column") .value_name("TAG") .help("3-byte column ID (see `DBColumn`)") - .takes_value(true) + .action(ArgAction::Set) .required(true), ) .arg( - Arg::with_name("output") + Arg::new("output") .long("output") .value_name("TARGET") .help("Select the type of output to show") .default_value("sizes") - .possible_values(InspectTarget::VARIANTS), + .value_parser(InspectTarget::VARIANTS.to_vec()), ) .arg( - Arg::with_name("skip") + Arg::new("skip") .long("skip") .value_name("N") .help("Skip over the first N keys"), ) .arg( - Arg::with_name("limit") + Arg::new("limit") .long("limit") .value_name("N") .help("Output at most N keys"), ) .arg( - Arg::with_name("freezer") + Arg::new("freezer") .long("freezer") .help("Inspect the freezer DB rather than the hot DB") - .takes_value(false) + .action(ArgAction::SetTrue) .conflicts_with("blobs-db"), ) .arg( - Arg::with_name("blobs-db") + Arg::new("blobs-db") .long("blobs-db") .help("Inspect the blobs DB rather than the hot DB") - .takes_value(false) + .action(ArgAction::SetTrue) .conflicts_with("freezer"), ) .arg( - Arg::with_name("output-dir") + Arg::new("output-dir") .long("output-dir") .value_name("DIR") .help("Base directory for the output files. Defaults to the current directory") - .takes_value(true), + .action(ArgAction::Set), ) } -pub fn compact_cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("compact") - .setting(clap::AppSettings::ColoredHelp) +pub fn compact_cli_app() -> Command { + Command::new("compact") + .styles(get_color_style()) .about("Compact database manually") .arg( - Arg::with_name("column") + Arg::new("column") .long("column") .value_name("TAG") .help("3-byte column ID (see `DBColumn`)") - .takes_value(true) + .action(ArgAction::Set) .required(true), ) .arg( - Arg::with_name("freezer") + Arg::new("freezer") .long("freezer") .help("Inspect the freezer DB rather than the hot DB") - .takes_value(false) + .action(ArgAction::SetTrue) .conflicts_with("blobs-db"), ) .arg( - Arg::with_name("blobs-db") + Arg::new("blobs-db") .long("blobs-db") .help("Inspect the blobs DB rather than the hot DB") - .takes_value(false) + .action(ArgAction::SetTrue) .conflicts_with("freezer"), ) } -pub fn prune_payloads_app<'a, 'b>() -> App<'a, 'b> { - App::new("prune-payloads") +pub fn prune_payloads_app() -> Command { + Command::new("prune-payloads") .alias("prune_payloads") - .setting(clap::AppSettings::ColoredHelp) + .styles(get_color_style()) .about("Prune finalized execution payloads") } -pub fn prune_blobs_app<'a, 'b>() -> App<'a, 'b> { - App::new("prune-blobs") +pub fn prune_blobs_app() -> Command { + Command::new("prune-blobs") .alias("prune_blobs") - .setting(clap::AppSettings::ColoredHelp) + .styles(get_color_style()) .about("Prune blobs older than data availability boundary") } -pub fn prune_states_app<'a, 'b>() -> App<'a, 'b> { - App::new("prune-states") +pub fn prune_states_app() -> Command { + Command::new("prune-states") .alias("prune_states") .arg( - Arg::with_name("confirm") + Arg::new("confirm") .long("confirm") .help( "Commit to pruning states irreversably. Without this flag the command will \ just check that the database is capable of being pruned.", ) - .takes_value(false), + .action(ArgAction::SetTrue), ) - .setting(clap::AppSettings::ColoredHelp) + .styles(get_color_style()) .about("Prune all beacon states from the freezer database") } -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) - .visible_aliases(&["db"]) - .setting(clap::AppSettings::ColoredHelp) +pub fn cli_app() -> Command { + Command::new(CMD) + .visible_aliases(["db"]) + .styles(get_color_style()) .about("Manage a beacon node database") .arg( - Arg::with_name("slots-per-restore-point") + Arg::new("slots-per-restore-point") .long("slots-per-restore-point") .value_name("SLOT_COUNT") .help( @@ -168,32 +169,32 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Cannot be changed after initialization. \ [default: 2048 (mainnet) or 64 (minimal)]", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("freezer-dir") + Arg::new("freezer-dir") .long("freezer-dir") .value_name("DIR") .help("Data directory for the freezer database.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("blob-prune-margin-epochs") + Arg::new("blob-prune-margin-epochs") .long("blob-prune-margin-epochs") .value_name("EPOCHS") .help( "The margin for blob pruning in epochs. The oldest blobs are pruned \ up until data_availability_boundary - blob_prune_margin_epochs.", ) - .takes_value(true) + .action(ArgAction::Set) .default_value("0"), ) .arg( - Arg::with_name("blobs-dir") + Arg::new("blobs-dir") .long("blobs-dir") .value_name("DIR") .help("Data directory for the blobs database.") - .takes_value(true), + .action(ArgAction::Set), ) .subcommand(migrate_cli_app()) .subcommand(version_cli_app()) @@ -298,8 +299,8 @@ fn parse_inspect_config(cli_args: &ArgMatches) -> Result let target = clap_utils::parse_required(cli_args, "output")?; let skip = clap_utils::parse_optional(cli_args, "skip")?; let limit = clap_utils::parse_optional(cli_args, "limit")?; - let freezer = cli_args.is_present("freezer"); - let blobs_db = cli_args.is_present("blobs-db"); + let freezer = cli_args.get_flag("freezer"); + let blobs_db = cli_args.get_flag("blobs-db"); let output_dir: PathBuf = clap_utils::parse_optional(cli_args, "output-dir")?.unwrap_or_else(PathBuf::new); @@ -421,8 +422,8 @@ pub struct CompactConfig { fn parse_compact_config(cli_args: &ArgMatches) -> Result { let column = clap_utils::parse_required(cli_args, "column")?; - let freezer = cli_args.is_present("freezer"); - let blobs_db = cli_args.is_present("blobs-db"); + let freezer = cli_args.get_flag("freezer"); + let blobs_db = cli_args.get_flag("blobs-db"); Ok(CompactConfig { column, freezer, @@ -566,7 +567,7 @@ pub struct PruneStatesConfig { } fn parse_prune_states_config(cli_args: &ArgMatches) -> Result { - let confirm = cli_args.is_present("confirm"); + let confirm = cli_args.get_flag("confirm"); Ok(PruneStatesConfig { confirm }) } @@ -645,33 +646,33 @@ pub fn prune_states( } /// Run the database manager, returning an error string if the operation did not succeed. -pub fn run(cli_args: &ArgMatches<'_>, env: Environment) -> Result<(), String> { +pub fn run(cli_args: &ArgMatches, env: Environment) -> Result<(), String> { let client_config = parse_client_config(cli_args, &env)?; let context = env.core_context(); let log = context.log().clone(); let format_err = |e| format!("Fatal error: {:?}", e); match cli_args.subcommand() { - ("version", Some(_)) => { + Some(("version", _)) => { display_db_version(client_config, &context, log).map_err(format_err) } - ("migrate", Some(cli_args)) => { + Some(("migrate", cli_args)) => { let migrate_config = parse_migrate_config(cli_args)?; migrate_db(migrate_config, client_config, &context, log).map_err(format_err) } - ("inspect", Some(cli_args)) => { + Some(("inspect", cli_args)) => { let inspect_config = parse_inspect_config(cli_args)?; inspect_db::(inspect_config, client_config) } - ("compact", Some(cli_args)) => { + Some(("compact", cli_args)) => { let compact_config = parse_compact_config(cli_args)?; compact_db::(compact_config, client_config, log).map_err(format_err) } - ("prune-payloads", Some(_)) => { + Some(("prune-payloads", _)) => { prune_payloads(client_config, &context, log).map_err(format_err) } - ("prune-blobs", Some(_)) => prune_blobs(client_config, &context, log).map_err(format_err), - ("prune-states", Some(cli_args)) => { + Some(("prune-blobs", _)) => prune_blobs(client_config, &context, log).map_err(format_err), + Some(("prune-states", cli_args)) => { let executor = env.core_context().executor; let network_config = context .eth2_network_config diff --git a/lcli/src/change_genesis_time.rs b/lcli/src/change_genesis_time.rs index 6b7b812e878..7f06c10a2a0 100644 --- a/lcli/src/change_genesis_time.rs +++ b/lcli/src/change_genesis_time.rs @@ -8,13 +8,13 @@ use types::{BeaconState, EthSpec}; pub fn run(testnet_dir: PathBuf, matches: &ArgMatches) -> Result<(), String> { let path = matches - .value_of("ssz-state") + .get_one::("ssz-state") .ok_or("ssz-state not specified")? .parse::() .map_err(|e| format!("Unable to parse ssz-state: {}", e))?; let genesis_time = matches - .value_of("genesis-time") + .get_one::("genesis-time") .ok_or("genesis-time not specified")? .parse::() .map_err(|e| format!("Unable to parse genesis-time: {}", e))?; diff --git a/lcli/src/create_payload_header.rs b/lcli/src/create_payload_header.rs index 5c96035851e..ef823d69637 100644 --- a/lcli/src/create_payload_header.rs +++ b/lcli/src/create_payload_header.rs @@ -19,7 +19,9 @@ pub fn run(matches: &ArgMatches) -> Result<(), String> { ); let base_fee_per_gas = parse_required(matches, "base-fee-per-gas")?; let gas_limit = parse_required(matches, "gas-limit")?; - let file_name = matches.value_of("file").ok_or("No file supplied")?; + let file_name = matches + .get_one::("file") + .ok_or("No file supplied")?; let fork_name: ForkName = parse_optional(matches, "fork")?.unwrap_or(ForkName::Merge); let execution_payload_header: ExecutionPayloadHeader = match fork_name { diff --git a/lcli/src/deploy_deposit_contract.rs b/lcli/src/deploy_deposit_contract.rs index 8919ebdaf54..b373dd88caf 100644 --- a/lcli/src/deploy_deposit_contract.rs +++ b/lcli/src/deploy_deposit_contract.rs @@ -4,7 +4,7 @@ use types::EthSpec; use eth1_test_rig::{Http, Provider}; -pub fn run(env: Environment, matches: &ArgMatches<'_>) -> Result<(), String> { +pub fn run(env: Environment, matches: &ArgMatches) -> Result<(), String> { let eth1_http: String = clap_utils::parse_required(matches, "eth1-http")?; let confirmations: usize = clap_utils::parse_required(matches, "confirmations")?; let validator_count: Option = clap_utils::parse_optional(matches, "validator-count")?; diff --git a/lcli/src/eth1_genesis.rs b/lcli/src/eth1_genesis.rs index bddd4baad8b..264da585271 100644 --- a/lcli/src/eth1_genesis.rs +++ b/lcli/src/eth1_genesis.rs @@ -15,15 +15,19 @@ pub const ETH1_GENESIS_UPDATE_INTERVAL: Duration = Duration::from_millis(7_000); pub fn run( env: Environment, testnet_dir: PathBuf, - matches: &ArgMatches<'_>, + matches: &ArgMatches, ) -> Result<(), String> { let endpoints = matches - .value_of("eth1-endpoint") + .get_one::("eth1-endpoint") .map(|e| { warn!("The --eth1-endpoint flag is deprecated. Please use --eth1-endpoints instead"); String::from(e) }) - .or_else(|| matches.value_of("eth1-endpoints").map(String::from)); + .or_else(|| { + matches + .get_one::("eth1-endpoints") + .map(String::from) + }); let mut eth2_network_config = Eth2NetworkConfig::load(testnet_dir.clone())?; diff --git a/lcli/src/interop_genesis.rs b/lcli/src/interop_genesis.rs index 1a0b81fcb7f..06d0b6b600f 100644 --- a/lcli/src/interop_genesis.rs +++ b/lcli/src/interop_genesis.rs @@ -9,12 +9,12 @@ use types::{test_utils::generate_deterministic_keypairs, EthSpec, Hash256}; pub fn run(testnet_dir: PathBuf, matches: &ArgMatches) -> Result<(), String> { let validator_count = matches - .value_of("validator-count") + .get_one::("validator-count") .ok_or("validator-count not specified")? .parse::() .map_err(|e| format!("Unable to parse validator-count: {}", e))?; - let genesis_time = if let Some(genesis_time) = matches.value_of("genesis-time") { + let genesis_time = if let Some(genesis_time) = matches.get_one::("genesis-time") { genesis_time .parse::() .map_err(|e| format!("Unable to parse genesis-time: {}", e))? diff --git a/lcli/src/main.rs b/lcli/src/main.rs index 17fafe6ec1e..e9d6eaa22b2 100644 --- a/lcli/src/main.rs +++ b/lcli/src/main.rs @@ -19,7 +19,7 @@ mod skip_slots; mod state_root; mod transition_blocks; -use clap::{App, Arg, ArgMatches, SubCommand}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use clap_utils::parse_optional; use environment::{EnvironmentBuilder, LoggerConfig}; use eth2_network_config::Eth2NetworkConfig; @@ -32,264 +32,264 @@ use types::{EthSpec, EthSpecId}; fn main() { env_logger::init(); - let matches = App::new("Lighthouse CLI Tool") + let matches = Command::new("Lighthouse CLI Tool") .version(lighthouse_version::VERSION) .about("Performs various testing-related tasks, including defining testnets.") .arg( - Arg::with_name("spec") - .short("s") + Arg::new("spec") + .short('s') .long("spec") .value_name("STRING") - .takes_value(true) - .possible_values(&["minimal", "mainnet", "gnosis"]) + .action(ArgAction::Set) + .value_parser(["minimal", "mainnet", "gnosis"]) .default_value("mainnet") .global(true), ) .arg( - Arg::with_name("testnet-dir") - .short("d") + Arg::new("testnet-dir") + .short('d') .long("testnet-dir") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .global(true) .help("The testnet dir."), ) .arg( - Arg::with_name("network") + Arg::new("network") .long("network") .value_name("NAME") - .takes_value(true) + .action(ArgAction::Set) .global(true) .help("The network to use. Defaults to mainnet.") .conflicts_with("testnet-dir") ) .subcommand( - SubCommand::with_name("skip-slots") + Command::new("skip-slots") .about( "Performs a state transition from some state across some number of skip slots", ) .arg( - Arg::with_name("output-path") + Arg::new("output-path") .long("output-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .help("Path to output a SSZ file."), ) .arg( - Arg::with_name("pre-state-path") + Arg::new("pre-state-path") .long("pre-state-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("beacon-url") .help("Path to a SSZ file of the pre-state."), ) .arg( - Arg::with_name("beacon-url") + Arg::new("beacon-url") .long("beacon-url") .value_name("URL") - .takes_value(true) + .action(ArgAction::Set) .help("URL to a beacon-API provider."), ) .arg( - Arg::with_name("state-id") + Arg::new("state-id") .long("state-id") .value_name("STATE_ID") - .takes_value(true) + .action(ArgAction::Set) .requires("beacon-url") .help("Identifier for a state as per beacon-API standards (slot, root, etc.)"), ) .arg( - Arg::with_name("runs") + Arg::new("runs") .long("runs") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .default_value("1") .help("Number of repeat runs, useful for benchmarking."), ) .arg( - Arg::with_name("state-root") + Arg::new("state-root") .long("state-root") .value_name("HASH256") - .takes_value(true) + .action(ArgAction::Set) .help("Tree hash root of the provided state, to avoid computing it."), ) .arg( - Arg::with_name("slots") + Arg::new("slots") .long("slots") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("Number of slots to skip forward."), ) .arg( - Arg::with_name("partial-state-advance") + Arg::new("partial-state-advance") .long("partial-state-advance") - .takes_value(false) + .action(ArgAction::SetTrue) .help("If present, don't compute state roots when skipping forward."), ) ) .subcommand( - SubCommand::with_name("transition-blocks") + Command::new("transition-blocks") .about("Performs a state transition given a pre-state and block") .arg( - Arg::with_name("pre-state-path") + Arg::new("pre-state-path") .long("pre-state-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("beacon-url") .requires("block-path") .help("Path to load a BeaconState from as SSZ."), ) .arg( - Arg::with_name("block-path") + Arg::new("block-path") .long("block-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("beacon-url") .requires("pre-state-path") .help("Path to load a SignedBeaconBlock from as SSZ."), ) .arg( - Arg::with_name("post-state-output-path") + Arg::new("post-state-output-path") .long("post-state-output-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .help("Path to output the post-state."), ) .arg( - Arg::with_name("pre-state-output-path") + Arg::new("pre-state-output-path") .long("pre-state-output-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .help("Path to output the pre-state, useful when used with --beacon-url."), ) .arg( - Arg::with_name("block-output-path") + Arg::new("block-output-path") .long("block-output-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .help("Path to output the block, useful when used with --beacon-url."), ) .arg( - Arg::with_name("beacon-url") + Arg::new("beacon-url") .long("beacon-url") .value_name("URL") - .takes_value(true) + .action(ArgAction::Set) .help("URL to a beacon-API provider."), ) .arg( - Arg::with_name("block-id") + Arg::new("block-id") .long("block-id") .value_name("BLOCK_ID") - .takes_value(true) + .action(ArgAction::Set) .requires("beacon-url") .help("Identifier for a block as per beacon-API standards (slot, root, etc.)"), ) .arg( - Arg::with_name("runs") + Arg::new("runs") .long("runs") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .default_value("1") .help("Number of repeat runs, useful for benchmarking."), ) .arg( - Arg::with_name("no-signature-verification") + Arg::new("no-signature-verification") .long("no-signature-verification") - .takes_value(false) + .action(ArgAction::SetTrue) .help("Disable signature verification.") ) .arg( - Arg::with_name("exclude-cache-builds") + Arg::new("exclude-cache-builds") .long("exclude-cache-builds") - .takes_value(false) + .action(ArgAction::SetTrue) .help("If present, pre-build the committee and tree-hash caches without \ including them in the timings."), ) .arg( - Arg::with_name("exclude-post-block-thc") + Arg::new("exclude-post-block-thc") .long("exclude-post-block-thc") - .takes_value(false) + .action(ArgAction::SetTrue) .help("If present, don't rebuild the tree-hash-cache after applying \ the block."), ) ) .subcommand( - SubCommand::with_name("pretty-ssz") + Command::new("pretty-ssz") .about("Parses SSZ-encoded data from a file") .arg( - Arg::with_name("format") - .short("f") + Arg::new("format") + .short('f') .long("format") .value_name("FORMAT") - .takes_value(true) + .action(ArgAction::Set) .required(true) .default_value("json") - .possible_values(&["json", "yaml"]) + .value_parser(["json", "yaml"]) .help("Output format to use") ) .arg( - Arg::with_name("type") + Arg::new("type") .value_name("TYPE") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("Type to decode"), ) .arg( - Arg::with_name("ssz-file") + Arg::new("ssz-file") .value_name("FILE") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("Path to SSZ bytes"), ) ) .subcommand( - SubCommand::with_name("deploy-deposit-contract") + Command::new("deploy-deposit-contract") .about( "Deploy a testing eth1 deposit contract.", ) .arg( - Arg::with_name("eth1-http") + Arg::new("eth1-http") .long("eth1-http") - .short("e") + .short('e') .value_name("ETH1_HTTP_PATH") .help("Path to an Eth1 JSON-RPC IPC endpoint") - .takes_value(true) + .action(ArgAction::Set) .required(true) ) .arg( - Arg::with_name("confirmations") + Arg::new("confirmations") .value_name("INTEGER") .long("confirmations") - .takes_value(true) + .action(ArgAction::Set) .default_value("3") .help("The number of block confirmations before declaring the contract deployed."), ) .arg( - Arg::with_name("validator-count") + Arg::new("validator-count") .value_name("VALIDATOR_COUNT") .long("validator-count") - .takes_value(true) + .action(ArgAction::Set) .help("If present, makes `validator_count` number of INSECURE deterministic deposits after \ deploying the deposit contract." ), ) ) .subcommand( - SubCommand::with_name("eth1-genesis") + Command::new("eth1-genesis") .about("Listens to the eth1 chain and finds the genesis beacon state") .arg( - Arg::with_name("eth1-endpoint") - .short("e") + Arg::new("eth1-endpoint") + .short('e') .long("eth1-endpoint") .value_name("HTTP_SERVER") - .takes_value(true) + .action(ArgAction::Set) .help("Deprecated. Use --eth1-endpoints."), ) .arg( - Arg::with_name("eth1-endpoints") + Arg::new("eth1-endpoints") .long("eth1-endpoints") .value_name("HTTP_SERVER_LIST") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("eth1-endpoint") .help( "One or more comma-delimited URLs to eth1 JSON-RPC http APIs. \ @@ -299,30 +299,30 @@ fn main() { ), ) .subcommand( - SubCommand::with_name("interop-genesis") + Command::new("interop-genesis") .about("Produces an interop-compatible genesis state using deterministic keypairs") .arg( - Arg::with_name("validator-count") + Arg::new("validator-count") .long("validator-count") .index(1) .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .default_value("1024") .help("The number of validators in the genesis state."), ) .arg( - Arg::with_name("genesis-time") + Arg::new("genesis-time") .long("genesis-time") - .short("t") + .short('t') .value_name("UNIX_EPOCH") - .takes_value(true) + .action(ArgAction::Set) .help("The value for state.genesis_time. Defaults to now."), ) .arg( - Arg::with_name("genesis-fork-version") + Arg::new("genesis-fork-version") .long("genesis-fork-version") .value_name("HEX") - .takes_value(true) + .action(ArgAction::Set) .help( "Used to avoid reply attacks between testnets. Recommended to set to non-default.", @@ -330,29 +330,29 @@ fn main() { ), ) .subcommand( - SubCommand::with_name("change-genesis-time") + Command::new("change-genesis-time") .about( "Loads a file with an SSZ-encoded BeaconState and modifies the genesis time.", ) .arg( - Arg::with_name("ssz-state") + Arg::new("ssz-state") .index(1) .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The path to the SSZ file"), ) .arg( - Arg::with_name("genesis-time") + Arg::new("genesis-time") .index(2) .value_name("UNIX_EPOCH") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The value for state.genesis_time."), ), ) .subcommand( - SubCommand::with_name("replace-state-pubkeys") + Command::new("replace-state-pubkeys") .about( "Loads a file with an SSZ-encoded BeaconState and replaces \ all the validator pubkeys with ones derived from the mnemonic \ @@ -360,18 +360,18 @@ fn main() { derivation paths.", ) .arg( - Arg::with_name("ssz-state") + Arg::new("ssz-state") .index(1) .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The path to the SSZ file"), ) .arg( - Arg::with_name("mnemonic") + Arg::new("mnemonic") .index(2) .value_name("BIP39_MNENMONIC") - .takes_value(true) + .action(ArgAction::Set) .default_value( "replace nephew blur decorate waste convince soup column \ orient excite play baby", @@ -380,15 +380,15 @@ fn main() { ), ) .subcommand( - SubCommand::with_name("create-payload-header") + Command::new("create-payload-header") .about("Generates an SSZ file containing bytes for an `ExecutionPayloadHeader`. \ Useful as input for `lcli new-testnet --execution-payload-header FILE`. If `--fork` \ is not provided, a payload header for the `Bellatrix` fork will be created.") .arg( - Arg::with_name("execution-block-hash") + Arg::new("execution-block-hash") .long("execution-block-hash") .value_name("BLOCK_HASH") - .takes_value(true) + .action(ArgAction::Set) .help("The block hash used when generating an execution payload. This \ value is used for `execution_payload_header.block_hash` as well as \ `execution_payload_header.random`") @@ -397,185 +397,185 @@ fn main() { ), ) .arg( - Arg::with_name("genesis-time") + Arg::new("genesis-time") .long("genesis-time") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The genesis time when generating an execution payload.") ) .arg( - Arg::with_name("base-fee-per-gas") + Arg::new("base-fee-per-gas") .long("base-fee-per-gas") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The base fee per gas field in the execution payload generated.") .default_value("1000000000"), ) .arg( - Arg::with_name("gas-limit") + Arg::new("gas-limit") .long("gas-limit") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The gas limit field in the execution payload generated.") .default_value("30000000"), ) .arg( - Arg::with_name("file") + Arg::new("file") .long("file") .value_name("FILE") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("Output file"), ).arg( - Arg::with_name("fork") + Arg::new("fork") .long("fork") .value_name("FORK") - .takes_value(true) + .action(ArgAction::Set) .default_value("bellatrix") .help("The fork for which the execution payload header should be created.") - .possible_values(&["merge", "bellatrix", "capella", "deneb"]) + .value_parser(["merge", "bellatrix", "capella", "deneb"]) ) ) .subcommand( - SubCommand::with_name("new-testnet") + Command::new("new-testnet") .about( "Produce a new testnet directory. If any of the optional flags are not supplied the values will remain the default for the --spec flag", ) .arg( - Arg::with_name("force") + Arg::new("force") .long("force") - .short("f") - .takes_value(false) + .short('f') + .action(ArgAction::SetTrue) .help("Overwrites any previous testnet configurations"), ) .arg( - Arg::with_name("interop-genesis-state") + Arg::new("interop-genesis-state") .long("interop-genesis-state") - .takes_value(false) + .action(ArgAction::SetTrue) .help( "If present, a interop-style genesis.ssz file will be generated.", ), ) .arg( - Arg::with_name("derived-genesis-state") + Arg::new("derived-genesis-state") .long("derived-genesis-state") - .takes_value(false) + .action(ArgAction::SetTrue) .help( "If present, a genesis.ssz file will be generated with keys generated from a given mnemonic.", ), ) .arg( - Arg::with_name("mnemonic-phrase") + Arg::new("mnemonic-phrase") .long("mnemonic-phrase") .value_name("MNEMONIC_PHRASE") - .takes_value(true) + .action(ArgAction::Set) .requires("derived-genesis-state") .help("The mnemonic with which we generate the validator keys for a derived genesis state"), ) .arg( - Arg::with_name("min-genesis-time") + Arg::new("min-genesis-time") .long("min-genesis-time") .value_name("UNIX_SECONDS") - .takes_value(true) + .action(ArgAction::Set) .help( "The minimum permitted genesis time. For non-eth1 testnets will be the genesis time. Defaults to now.", ), ) .arg( - Arg::with_name("min-genesis-active-validator-count") + Arg::new("min-genesis-active-validator-count") .long("min-genesis-active-validator-count") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The number of validators required to trigger eth2 genesis."), ) .arg( - Arg::with_name("genesis-delay") + Arg::new("genesis-delay") .long("genesis-delay") .value_name("SECONDS") - .takes_value(true) + .action(ArgAction::Set) .help("The delay between sufficient eth1 deposits and eth2 genesis."), ) .arg( - Arg::with_name("min-deposit-amount") + Arg::new("min-deposit-amount") .long("min-deposit-amount") .value_name("GWEI") - .takes_value(true) + .action(ArgAction::Set) .help("The minimum permitted deposit amount."), ) .arg( - Arg::with_name("max-effective-balance") + Arg::new("max-effective-balance") .long("max-effective-balance") .value_name("GWEI") - .takes_value(true) + .action(ArgAction::Set) .help("The amount required to become a validator."), ) .arg( - Arg::with_name("effective-balance-increment") + Arg::new("effective-balance-increment") .long("effective-balance-increment") .value_name("GWEI") - .takes_value(true) + .action(ArgAction::Set) .help("The steps in effective balance calculation."), ) .arg( - Arg::with_name("ejection-balance") + Arg::new("ejection-balance") .long("ejection-balance") .value_name("GWEI") - .takes_value(true) + .action(ArgAction::Set) .help("The balance at which a validator gets ejected."), ) .arg( - Arg::with_name("eth1-follow-distance") + Arg::new("eth1-follow-distance") .long("eth1-follow-distance") .value_name("ETH1_BLOCKS") - .takes_value(true) + .action(ArgAction::Set) .help("The distance to follow behind the eth1 chain head."), ) .arg( - Arg::with_name("genesis-fork-version") + Arg::new("genesis-fork-version") .long("genesis-fork-version") .value_name("HEX") - .takes_value(true) + .action(ArgAction::Set) .help( "Used to avoid reply attacks between testnets. Recommended to set to non-default.", ), ) .arg( - Arg::with_name("seconds-per-slot") + Arg::new("seconds-per-slot") .long("seconds-per-slot") .value_name("SECONDS") - .takes_value(true) + .action(ArgAction::Set) .help("Eth2 slot time"), ) .arg( - Arg::with_name("seconds-per-eth1-block") + Arg::new("seconds-per-eth1-block") .long("seconds-per-eth1-block") .value_name("SECONDS") - .takes_value(true) + .action(ArgAction::Set) .help("Eth1 block time"), ) .arg( - Arg::with_name("eth1-id") + Arg::new("eth1-id") .long("eth1-id") .value_name("ETH1_ID") - .takes_value(true) + .action(ArgAction::Set) .help("The chain id and network id for the eth1 testnet."), ) .arg( - Arg::with_name("deposit-contract-address") + Arg::new("deposit-contract-address") .long("deposit-contract-address") .value_name("ETH1_ADDRESS") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The address of the deposit contract."), ) .arg( - Arg::with_name("deposit-contract-deploy-block") + Arg::new("deposit-contract-deploy-block") .long("deposit-contract-deploy-block") .value_name("ETH1_BLOCK_NUMBER") - .takes_value(true) + .action(ArgAction::Set) .default_value("0") .help( "The block the deposit contract was deployed. Setting this is a huge @@ -583,105 +583,105 @@ fn main() { ), ) .arg( - Arg::with_name("altair-fork-epoch") + Arg::new("altair-fork-epoch") .long("altair-fork-epoch") .value_name("EPOCH") - .takes_value(true) + .action(ArgAction::Set) .help( "The epoch at which to enable the Altair hard fork", ), ) .arg( - Arg::with_name("bellatrix-fork-epoch") + Arg::new("bellatrix-fork-epoch") .long("bellatrix-fork-epoch") .value_name("EPOCH") - .takes_value(true) + .action(ArgAction::Set) .help( "The epoch at which to enable the Merge hard fork", ), ) .arg( - Arg::with_name("capella-fork-epoch") + Arg::new("capella-fork-epoch") .long("capella-fork-epoch") .value_name("EPOCH") - .takes_value(true) + .action(ArgAction::Set) .help( "The epoch at which to enable the Capella hard fork", ), ) .arg( - Arg::with_name("deneb-fork-epoch") + Arg::new("deneb-fork-epoch") .long("deneb-fork-epoch") .value_name("EPOCH") - .takes_value(true) + .action(ArgAction::Set) .help( "The epoch at which to enable the deneb hard fork", ), ) .arg( - Arg::with_name("ttd") + Arg::new("ttd") .long("ttd") .value_name("TTD") - .takes_value(true) + .action(ArgAction::Set) .help( "The terminal total difficulty", ), ) .arg( - Arg::with_name("eth1-block-hash") + Arg::new("eth1-block-hash") .long("eth1-block-hash") .value_name("BLOCK_HASH") - .takes_value(true) + .action(ArgAction::Set) .help("The eth1 block hash used when generating a genesis state."), ) .arg( - Arg::with_name("execution-payload-header") + Arg::new("execution-payload-header") .long("execution-payload-header") .value_name("FILE") - .takes_value(true) + .action(ArgAction::Set) .required(false) .help("Path to file containing `ExecutionPayloadHeader` SSZ bytes to be \ used in the genesis state."), ) .arg( - Arg::with_name("validator-count") + Arg::new("validator-count") .long("validator-count") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The number of validators when generating a genesis state."), ) .arg( - Arg::with_name("genesis-time") + Arg::new("genesis-time") .long("genesis-time") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The genesis time when generating a genesis state."), ) .arg( - Arg::with_name("proposer-score-boost") + Arg::new("proposer-score-boost") .long("proposer-score-boost") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The proposer score boost to apply as a percentage, e.g. 70 = 70%"), ) ) .subcommand( - SubCommand::with_name("check-deposit-data") + Command::new("check-deposit-data") .about("Checks the integrity of some deposit data.") .arg( - Arg::with_name("deposit-amount") + Arg::new("deposit-amount") .index(1) .value_name("GWEI") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The amount (in Gwei) that was deposited"), ) .arg( - Arg::with_name("deposit-data") + Arg::new("deposit-data") .index(2) .value_name("HEX") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help( "A 0x-prefixed hex string of the deposit data. Should include the @@ -690,47 +690,47 @@ fn main() { ), ) .subcommand( - SubCommand::with_name("generate-bootnode-enr") + Command::new("generate-bootnode-enr") .about("Generates an ENR address to be used as a pre-genesis boot node.") .arg( - Arg::with_name("ip") + Arg::new("ip") .long("ip") .value_name("IP_ADDRESS") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The IP address to be included in the ENR and used for discovery"), ) .arg( - Arg::with_name("udp-port") + Arg::new("udp-port") .long("udp-port") .value_name("UDP_PORT") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The UDP port to be included in the ENR and used for discovery"), ) .arg( - Arg::with_name("tcp-port") + Arg::new("tcp-port") .long("tcp-port") .value_name("TCP_PORT") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help( "The TCP port to be included in the ENR and used for application comms", ), ) .arg( - Arg::with_name("output-dir") + Arg::new("output-dir") .long("output-dir") .value_name("OUTPUT_DIRECTORY") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The directory in which to create the network dir"), ) .arg( - Arg::with_name("genesis-fork-version") + Arg::new("genesis-fork-version") .long("genesis-fork-version") .value_name("HEX") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help( "Used to avoid reply attacks between testnets. Recommended to set to @@ -739,210 +739,210 @@ fn main() { ), ) .subcommand( - SubCommand::with_name("insecure-validators") + Command::new("insecure-validators") .about("Produces validator directories with INSECURE, deterministic keypairs.") .arg( - Arg::with_name("count") + Arg::new("count") .long("count") .value_name("COUNT") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("Produces validators in the range of 0..count."), ) .arg( - Arg::with_name("base-dir") + Arg::new("base-dir") .long("base-dir") .value_name("BASE_DIR") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The base directory where validator keypairs and secrets are stored"), ) .arg( - Arg::with_name("node-count") + Arg::new("node-count") .long("node-count") .value_name("NODE_COUNT") - .takes_value(true) + .action(ArgAction::Set) .help("The number of nodes to divide the validator keys to"), ) ) .subcommand( - SubCommand::with_name("mnemonic-validators") + Command::new("mnemonic-validators") .about("Produces validator directories by deriving the keys from \ a mnemonic. For testing purposes only, DO NOT USE IN \ PRODUCTION!") .arg( - Arg::with_name("count") + Arg::new("count") .long("count") .value_name("COUNT") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("Produces validators in the range of 0..count."), ) .arg( - Arg::with_name("base-dir") + Arg::new("base-dir") .long("base-dir") .value_name("BASE_DIR") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The base directory where validator keypairs and secrets are stored"), ) .arg( - Arg::with_name("node-count") + Arg::new("node-count") .long("node-count") .value_name("NODE_COUNT") - .takes_value(true) + .action(ArgAction::Set) .help("The number of nodes to divide the validator keys to"), ) .arg( - Arg::with_name("mnemonic-phrase") + Arg::new("mnemonic-phrase") .long("mnemonic-phrase") .value_name("MNEMONIC_PHRASE") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("The mnemonic with which we generate the validator keys"), ) ) .subcommand( - SubCommand::with_name("indexed-attestations") + Command::new("indexed-attestations") .about("Convert attestations to indexed form, using the committees from a state.") .arg( - Arg::with_name("state") + Arg::new("state") .long("state") .value_name("SSZ_STATE") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("BeaconState to generate committees from (SSZ)"), ) .arg( - Arg::with_name("attestations") + Arg::new("attestations") .long("attestations") .value_name("JSON_ATTESTATIONS") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("List of Attestations to convert to indexed form (JSON)"), ) ) .subcommand( - SubCommand::with_name("block-root") + Command::new("block-root") .about("Computes the block root of some block.") .arg( - Arg::with_name("block-path") + Arg::new("block-path") .long("block-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("beacon-url") .help("Path to load a SignedBeaconBlock from as SSZ."), ) .arg( - Arg::with_name("beacon-url") + Arg::new("beacon-url") .long("beacon-url") .value_name("URL") - .takes_value(true) + .action(ArgAction::Set) .help("URL to a beacon-API provider."), ) .arg( - Arg::with_name("block-id") + Arg::new("block-id") .long("block-id") .value_name("BLOCK_ID") - .takes_value(true) + .action(ArgAction::Set) .requires("beacon-url") .help("Identifier for a block as per beacon-API standards (slot, root, etc.)"), ) .arg( - Arg::with_name("runs") + Arg::new("runs") .long("runs") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .default_value("1") .help("Number of repeat runs, useful for benchmarking."), ) ) .subcommand( - SubCommand::with_name("state-root") + Command::new("state-root") .about("Computes the state root of some state.") .arg( - Arg::with_name("state-path") + Arg::new("state-path") .long("state-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("beacon-url") .help("Path to load a BeaconState from as SSZ."), ) .arg( - Arg::with_name("beacon-url") + Arg::new("beacon-url") .long("beacon-url") .value_name("URL") - .takes_value(true) + .action(ArgAction::Set) .help("URL to a beacon-API provider."), ) .arg( - Arg::with_name("state-id") + Arg::new("state-id") .long("state-id") .value_name("BLOCK_ID") - .takes_value(true) + .action(ArgAction::Set) .requires("beacon-url") .help("Identifier for a state as per beacon-API standards (slot, root, etc.)"), ) .arg( - Arg::with_name("runs") + Arg::new("runs") .long("runs") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .default_value("1") .help("Number of repeat runs, useful for benchmarking."), ) ) .subcommand( - SubCommand::with_name("mock-el") + Command::new("mock-el") .about("Creates a mock execution layer server. This is NOT SAFE and should only \ be used for testing and development on testnets. Do not use in production. Do not \ use on mainnet. It cannot perform validator duties.") .arg( - Arg::with_name("jwt-output-path") + Arg::new("jwt-output-path") .long("jwt-output-path") .value_name("PATH") - .takes_value(true) + .action(ArgAction::Set) .required(true) .help("Path to write the JWT secret."), ) .arg( - Arg::with_name("listen-address") + Arg::new("listen-address") .long("listen-address") .value_name("IP_ADDRESS") - .takes_value(true) + .action(ArgAction::Set) .help("The server will listen on this address.") .default_value("127.0.0.1") ) .arg( - Arg::with_name("listen-port") + Arg::new("listen-port") .long("listen-port") .value_name("PORT") - .takes_value(true) + .action(ArgAction::Set) .help("The server will listen on this port.") .default_value("8551") ) .arg( - Arg::with_name("all-payloads-valid") + Arg::new("all-payloads-valid") .long("all-payloads-valid") - .takes_value(true) + .action(ArgAction::Set) .help("Controls the response to newPayload and forkchoiceUpdated. \ Set to 'true' to return VALID. Set to 'false' to return SYNCING.") .default_value("false") - .hidden(true) + .hide(true) ) .arg( - Arg::with_name("shanghai-time") + Arg::new("shanghai-time") .long("shanghai-time") .value_name("UNIX_TIMESTAMP") - .takes_value(true) + .action(ArgAction::Set) .help("The payload timestamp that enables Shanghai. Defaults to the mainnet value.") .default_value("1681338479") ) .arg( - Arg::with_name("cancun-time") + Arg::new("cancun-time") .long("cancun-time") .value_name("UNIX_TIMESTAMP") - .takes_value(true) + .action(ArgAction::Set) .help("The payload timestamp that enables Cancun. No default is provided \ until Cancun is triggered on mainnet.") ) @@ -950,9 +950,9 @@ fn main() { .get_matches(); let result = matches - .value_of("spec") + .get_one::("spec") .ok_or_else(|| "Missing --spec flag".to_string()) - .and_then(FromStr::from_str) + .and_then(|s| FromStr::from_str(s)) .and_then(|eth_spec_id| match eth_spec_id { EthSpecId::Minimal => run(EnvironmentBuilder::minimal(), &matches), EthSpecId::Mainnet => run(EnvironmentBuilder::mainnet(), &matches), @@ -968,10 +968,7 @@ fn main() { } } -fn run( - env_builder: EnvironmentBuilder, - matches: &ArgMatches<'_>, -) -> Result<(), String> { +fn run(env_builder: EnvironmentBuilder, matches: &ArgMatches) -> Result<(), String> { let env = env_builder .multi_threaded_tokio_runtime() .map_err(|e| format!("should start tokio runtime: {:?}", e))? @@ -1022,74 +1019,75 @@ fn run( }; match matches.subcommand() { - ("transition-blocks", Some(matches)) => { + Some(("transition-blocks", matches)) => { let network_config = get_network_config()?; transition_blocks::run::(env, network_config, matches) .map_err(|e| format!("Failed to transition blocks: {}", e)) } - ("skip-slots", Some(matches)) => { + Some(("skip-slots", matches)) => { let network_config = get_network_config()?; skip_slots::run::(env, network_config, matches) .map_err(|e| format!("Failed to skip slots: {}", e)) } - ("pretty-ssz", Some(matches)) => { + Some(("pretty-ssz", matches)) => { let network_config = get_network_config()?; run_parse_ssz::(network_config, matches) .map_err(|e| format!("Failed to pretty print hex: {}", e)) } - ("deploy-deposit-contract", Some(matches)) => { + Some(("deploy-deposit-contract", matches)) => { deploy_deposit_contract::run::(env, matches) .map_err(|e| format!("Failed to run deploy-deposit-contract command: {}", e)) } - ("eth1-genesis", Some(matches)) => { + Some(("eth1-genesis", matches)) => { let testnet_dir = get_testnet_dir()?; eth1_genesis::run::(env, testnet_dir, matches) .map_err(|e| format!("Failed to run eth1-genesis command: {}", e)) } - ("interop-genesis", Some(matches)) => { + Some(("interop-genesis", matches)) => { let testnet_dir = get_testnet_dir()?; interop_genesis::run::(testnet_dir, matches) .map_err(|e| format!("Failed to run interop-genesis command: {}", e)) } - ("change-genesis-time", Some(matches)) => { + Some(("change-genesis-time", matches)) => { let testnet_dir = get_testnet_dir()?; change_genesis_time::run::(testnet_dir, matches) .map_err(|e| format!("Failed to run change-genesis-time command: {}", e)) } - ("create-payload-header", Some(matches)) => create_payload_header::run::(matches) + Some(("create-payload-header", matches)) => create_payload_header::run::(matches) .map_err(|e| format!("Failed to run create-payload-header command: {}", e)), - ("replace-state-pubkeys", Some(matches)) => { + Some(("replace-state-pubkeys", matches)) => { let testnet_dir = get_testnet_dir()?; replace_state_pubkeys::run::(testnet_dir, matches) .map_err(|e| format!("Failed to run replace-state-pubkeys command: {}", e)) } - ("new-testnet", Some(matches)) => { + Some(("new-testnet", matches)) => { let testnet_dir = get_testnet_dir()?; new_testnet::run::(testnet_dir, matches) .map_err(|e| format!("Failed to run new_testnet command: {}", e)) } - ("check-deposit-data", Some(matches)) => check_deposit_data::run(matches) + Some(("check-deposit-data", matches)) => check_deposit_data::run(matches) .map_err(|e| format!("Failed to run check-deposit-data command: {}", e)), - ("generate-bootnode-enr", Some(matches)) => generate_bootnode_enr::run::(matches) + Some(("generate-bootnode-enr", matches)) => generate_bootnode_enr::run::(matches) .map_err(|e| format!("Failed to run generate-bootnode-enr command: {}", e)), - ("insecure-validators", Some(matches)) => insecure_validators::run(matches) + Some(("insecure-validators", matches)) => insecure_validators::run(matches) .map_err(|e| format!("Failed to run insecure-validators command: {}", e)), - ("mnemonic-validators", Some(matches)) => mnemonic_validators::run(matches) + Some(("mnemonic-validators", matches)) => mnemonic_validators::run(matches) .map_err(|e| format!("Failed to run mnemonic-validators command: {}", e)), - ("indexed-attestations", Some(matches)) => indexed_attestations::run::(matches) + Some(("indexed-attestations", matches)) => indexed_attestations::run::(matches) .map_err(|e| format!("Failed to run indexed-attestations command: {}", e)), - ("block-root", Some(matches)) => { + Some(("block-root", matches)) => { let network_config = get_network_config()?; block_root::run::(env, network_config, matches) .map_err(|e| format!("Failed to run block-root command: {}", e)) } - ("state-root", Some(matches)) => { + Some(("state-root", matches)) => { let network_config = get_network_config()?; state_root::run::(env, network_config, matches) .map_err(|e| format!("Failed to run state-root command: {}", e)) } - ("mock-el", Some(matches)) => mock_el::run::(env, matches) + Some(("mock-el", matches)) => mock_el::run::(env, matches) .map_err(|e| format!("Failed to run mock-el command: {}", e)), - (other, _) => Err(format!("Unknown subcommand {}. See --help.", other)), + Some((other, _)) => Err(format!("Unknown subcommand {}. See --help.", other)), + _ => Err("No subcommand provided. See --help.".to_string()), } } diff --git a/lcli/src/new_testnet.rs b/lcli/src/new_testnet.rs index 47db1036d98..e07e8c1c4e8 100644 --- a/lcli/src/new_testnet.rs +++ b/lcli/src/new_testnet.rs @@ -29,7 +29,7 @@ pub fn run(testnet_dir_path: PathBuf, matches: &ArgMatches) -> Resul let deposit_contract_address: Address = parse_required(matches, "deposit-contract-address")?; let deposit_contract_deploy_block = parse_required(matches, "deposit-contract-deploy-block")?; - let overwrite_files = matches.is_present("force"); + let overwrite_files = matches.get_flag("force"); if testnet_dir_path.exists() && !overwrite_files { return Err(format!( @@ -145,7 +145,7 @@ pub fn run(testnet_dir_path: PathBuf, matches: &ArgMatches) -> Resul (eth1_block_hash, genesis_time) }; - let genesis_state_bytes = if matches.is_present("interop-genesis-state") { + let genesis_state_bytes = if matches.get_flag("interop-genesis-state") { let keypairs = generate_deterministic_keypairs(validator_count); let keypairs: Vec<_> = keypairs.into_iter().map(|kp| (kp.clone(), kp)).collect(); @@ -158,7 +158,7 @@ pub fn run(testnet_dir_path: PathBuf, matches: &ArgMatches) -> Resul )?; Some(genesis_state.as_ssz_bytes()) - } else if matches.is_present("derived-genesis-state") { + } else if matches.get_flag("derived-genesis-state") { let mnemonic_phrase: String = clap_utils::parse_required(matches, "mnemonic-phrase")?; let mnemonic = Mnemonic::from_phrase(&mnemonic_phrase, Language::English).map_err(|e| { format!( diff --git a/lcli/src/parse_ssz.rs b/lcli/src/parse_ssz.rs index 453169cdc51..dfefb86aa2c 100644 --- a/lcli/src/parse_ssz.rs +++ b/lcli/src/parse_ssz.rs @@ -31,8 +31,12 @@ pub fn run_parse_ssz( network_config: Eth2NetworkConfig, matches: &ArgMatches, ) -> Result<(), String> { - let type_str = matches.value_of("type").ok_or("No type supplied")?; - let filename = matches.value_of("ssz-file").ok_or("No file supplied")?; + let type_str = matches + .get_one::("type") + .ok_or("No type supplied")?; + let filename = matches + .get_one::("ssz-file") + .ok_or("No file supplied")?; let format = parse_required(matches, "format")?; let bytes = if filename.ends_with("ssz_snappy") { @@ -58,7 +62,7 @@ pub fn run_parse_ssz( // More fork-specific decoders may need to be added in future, but shouldn't be 100% necessary, // as the fork-generic decoder will always be available (requires correct --network flag). - match type_str { + match type_str.as_str() { "SignedBeaconBlock" => decode_and_print::>( &bytes, |bytes| SignedBeaconBlock::from_ssz_bytes(bytes, spec), diff --git a/lcli/src/replace_state_pubkeys.rs b/lcli/src/replace_state_pubkeys.rs index e9e3388c065..a17915665ea 100644 --- a/lcli/src/replace_state_pubkeys.rs +++ b/lcli/src/replace_state_pubkeys.rs @@ -13,13 +13,13 @@ use types::{BeaconState, DepositData, EthSpec, Hash256, SignatureBytes, DEPOSIT_ pub fn run(testnet_dir: PathBuf, matches: &ArgMatches) -> Result<(), String> { let path = matches - .value_of("ssz-state") + .get_one::("ssz-state") .ok_or("ssz-state not specified")? .parse::() .map_err(|e| format!("Unable to parse ssz-state: {}", e))?; let mnemonic_phrase = matches - .value_of("mnemonic") + .get_one::("mnemonic") .ok_or("mnemonic not specified")?; let eth2_network_config = Eth2NetworkConfig::load(testnet_dir)?; diff --git a/lcli/src/skip_slots.rs b/lcli/src/skip_slots.rs index cdbacfe4d52..2796b4042f9 100644 --- a/lcli/src/skip_slots.rs +++ b/lcli/src/skip_slots.rs @@ -74,7 +74,7 @@ pub fn run( let runs: usize = parse_required(matches, "runs")?; let slots: u64 = parse_required(matches, "slots")?; let cli_state_root: Option = parse_optional(matches, "state-root")?; - let partial: bool = matches.is_present("partial-state-advance"); + let partial: bool = matches.get_flag("partial-state-advance"); info!("Using {} spec", T::spec_name()); info!("Advancing {} slots", slots); diff --git a/lcli/src/transition_blocks.rs b/lcli/src/transition_blocks.rs index 23b0ae26206..6a92f7a8ac6 100644 --- a/lcli/src/transition_blocks.rs +++ b/lcli/src/transition_blocks.rs @@ -117,9 +117,9 @@ pub fn run( let beacon_url: Option = parse_optional(matches, "beacon-url")?; let runs: usize = parse_required(matches, "runs")?; let config = Config { - no_signature_verification: matches.is_present("no-signature-verification"), - exclude_cache_builds: matches.is_present("exclude-cache-builds"), - exclude_post_block_thc: matches.is_present("exclude-post-block-thc"), + no_signature_verification: matches.get_flag("no-signature-verification"), + exclude_cache_builds: matches.get_flag("exclude-cache-builds"), + exclude_post_block_thc: matches.get_flag("exclude-post-block-thc"), }; info!("Using {} spec", T::spec_name()); diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index d646b9764cd..1ddb233b216 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -1,13 +1,14 @@ mod metrics; use beacon_node::ProductionBeaconNode; -use clap::{App, Arg, ArgMatches}; -use clap_utils::{flags::DISABLE_MALLOC_TUNING_FLAG, get_eth2_network_config}; +use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::{flags::DISABLE_MALLOC_TUNING_FLAG, get_color_style, get_eth2_network_config}; use directory::{parse_path_or_default, DEFAULT_BEACON_NODE_DIR, DEFAULT_VALIDATOR_DIR}; use environment::{EnvironmentBuilder, LoggerConfig}; use eth2_network_config::{Eth2NetworkConfig, DEFAULT_HARDCODED_NETWORK, HARDCODED_NET_NAMES}; use ethereum_hashing::have_sha_extensions; use futures::TryFutureExt; +use lazy_static::lazy_static; use lighthouse_version::VERSION; use malloc_utils::configure_memory_allocator; use slog::{crit, info}; @@ -18,6 +19,25 @@ use task_executor::ShutdownReason; use types::{EthSpec, EthSpecId}; use validator_client::ProductionValidatorClient; +lazy_static! { + pub static ref SHORT_VERSION: String = VERSION.replace("Lighthouse/", ""); + pub static ref LONG_VERSION: String = format!( + "{}\n\ + BLS library: {}\n\ + SHA256 hardware acceleration: {}\n\ + Allocator: {}\n\ + Profile: {}\n\ + Specs: mainnet (true), minimal ({}), gnosis ({})", + SHORT_VERSION.as_str(), + bls_library_name(), + have_sha_extensions(), + allocator_name(), + build_profile_name(), + cfg!(feature = "spec-minimal"), + cfg!(feature = "gnosis"), + ); +} + fn bls_library_name() -> &'static str { if cfg!(feature = "portable") { "blst-portable" @@ -56,41 +76,25 @@ fn main() { } // Parse the CLI parameters. - let matches = App::new("Lighthouse") - .version(VERSION.replace("Lighthouse/", "").as_str()) + let matches = Command::new("Lighthouse") + .version(SHORT_VERSION.as_str()) .author("Sigma Prime ") - .setting(clap::AppSettings::ColoredHelp) + .styles(get_color_style()) .about( "Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon \ node, a validator client and utilities for managing validator accounts.", ) - .long_version( - format!( - "{}\n\ - BLS library: {}\n\ - SHA256 hardware acceleration: {}\n\ - Allocator: {}\n\ - Profile: {}\n\ - Specs: mainnet (true), minimal ({}), gnosis ({})", - VERSION.replace("Lighthouse/", ""), - bls_library_name(), - have_sha_extensions(), - allocator_name(), - build_profile_name(), - cfg!(feature = "spec-minimal"), - cfg!(feature = "gnosis"), - ).as_str() - ) + .long_version(LONG_VERSION.as_str()) .arg( - Arg::with_name("env_log") - .short("l") + Arg::new("env_log") + .short('l') .help( "DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p", ) - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("logfile") + Arg::new("logfile") .long("logfile") .value_name("FILE") .help( @@ -99,61 +103,63 @@ fn main() { future logs are stored. \ Once the number of log files exceeds the value specified in \ `--logfile-max-number` the oldest log file will be overwritten.") - .takes_value(true) + .action(ArgAction::Set) .global(true), ) .arg( - Arg::with_name("logfile-debug-level") + Arg::new("logfile-debug-level") .long("logfile-debug-level") .value_name("LEVEL") .help("The verbosity level used when emitting logs to the log file.") - .takes_value(true) - .possible_values(&["info", "debug", "trace", "warn", "error", "crit"]) + .action(ArgAction::Set) + .value_parser(["info", "debug", "trace", "warn", "error", "crit"]) .default_value("debug") .global(true), ) .arg( - Arg::with_name("logfile-format") + Arg::new("logfile-format") .long("logfile-format") .value_name("FORMAT") .help("Specifies the log format used when emitting logs to the logfile.") - .possible_values(&["DEFAULT", "JSON"]) - .takes_value(true) + .value_parser(["DEFAULT", "JSON"]) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("logfile-max-size") + Arg::new("logfile-max-size") .long("logfile-max-size") .value_name("SIZE") .help( "The maximum size (in MB) each log file can grow to before rotating. If set \ to 0, background file logging is disabled.") - .takes_value(true) + .action(ArgAction::Set) .default_value("200") .global(true), ) .arg( - Arg::with_name("logfile-max-number") + Arg::new("logfile-max-number") .long("logfile-max-number") .value_name("COUNT") .help( "The maximum number of log files that will be stored. If set to 0, \ background file logging is disabled.") - .takes_value(true) + .action(ArgAction::Set) .default_value("5") .global(true), ) .arg( - Arg::with_name("logfile-compress") + Arg::new("logfile-compress") .long("logfile-compress") + .action(ArgAction::SetTrue) .help( "If present, compress old log files. This can help reduce the space needed \ to store old logs.") .global(true), ) .arg( - Arg::with_name("logfile-no-restricted-perms") + Arg::new("logfile-no-restricted-perms") .long("logfile-no-restricted-perms") + .action(ArgAction::SetTrue) .help( "If present, log files will be generated as world-readable meaning they can be read by \ any user on the machine. Note that logs can often contain sensitive information \ @@ -162,52 +168,54 @@ fn main() { .global(true), ) .arg( - Arg::with_name("log-format") + Arg::new("log-format") .long("log-format") .value_name("FORMAT") .help("Specifies the log format used when emitting logs to the terminal.") - .possible_values(&["JSON"]) - .takes_value(true) + .value_parser(["JSON"]) + .action(ArgAction::Set) .global(true), ) .arg( - Arg::with_name("log-color") + Arg::new("log-color") .long("log-color") .alias("log-colour") .help("Force outputting colors when emitting logs to the terminal.") + .action(ArgAction::SetTrue) .global(true), ) .arg( - Arg::with_name("disable-log-timestamp") + Arg::new("disable-log-timestamp") .long("disable-log-timestamp") + .action(ArgAction::SetTrue) .help("If present, do not include timestamps in logging output.") .global(true), ) .arg( - Arg::with_name("debug-level") + Arg::new("debug-level") .long("debug-level") .value_name("LEVEL") .help("Specifies the verbosity level used when emitting logs to the terminal.") - .takes_value(true) - .possible_values(&["info", "debug", "trace", "warn", "error", "crit"]) + .action(ArgAction::Set) + .value_parser(["info", "debug", "trace", "warn", "error", "crit"]) .global(true) .default_value("info"), ) .arg( - Arg::with_name("datadir") + Arg::new("datadir") .long("datadir") - .short("d") + .short('d') .value_name("DIR") .global(true) .help( "Used to specify a custom root data directory for lighthouse keys and databases. \ Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag \ Note: Users should specify separate custom datadirs for different networks.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("testnet-dir") - .short("t") + Arg::new("testnet-dir") + .short('t') .long("testnet-dir") .value_name("DIR") .help( @@ -215,57 +223,59 @@ fn main() { a hard-coded Lighthouse testnet. Only effective if there is no \ existing database.", ) - .takes_value(true) + .action(ArgAction::Set) .global(true), ) .arg( - Arg::with_name("network") + Arg::new("network") .long("network") .value_name("network") .help("Name of the Eth2 chain Lighthouse will sync and follow.") - .possible_values(HARDCODED_NET_NAMES) + .value_parser(HARDCODED_NET_NAMES.to_vec()) .conflicts_with("testnet-dir") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("dump-config") + Arg::new("dump-config") .long("dump-config") - .hidden(true) + .hide(true) .help("Dumps the config to a desired location. Used for testing only.") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("dump-chain-config") + Arg::new("dump-chain-config") .long("dump-chain-config") - .hidden(true) + .hide(true) .help("Dumps the chain config to a desired location. Used for testing only.") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("immediate-shutdown") + Arg::new("immediate-shutdown") .long("immediate-shutdown") - .hidden(true) + .hide(true) + .action(ArgAction::SetTrue) .help( "Shuts down immediately after the Beacon Node or Validator has successfully launched. \ Used for testing only, DO NOT USE IN PRODUCTION.") .global(true) ) .arg( - Arg::with_name(DISABLE_MALLOC_TUNING_FLAG) + Arg::new(DISABLE_MALLOC_TUNING_FLAG) .long(DISABLE_MALLOC_TUNING_FLAG) .help( "If present, do not configure the system allocator. Providing this flag will \ generally increase memory usage, it should only be provided when debugging \ specific memory allocation issues." ) + .action(ArgAction::SetTrue) .global(true), ) .arg( - Arg::with_name("terminal-total-difficulty-override") + Arg::new("terminal-total-difficulty-override") .long("terminal-total-difficulty-override") .value_name("INTEGER") .help("Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. \ @@ -274,11 +284,11 @@ fn main() { the broad Ethereum community has elected to override the terminal difficulty. \ Incorrect use of this flag will cause your node to experience a consensus \ failure. Be extremely careful with this flag.") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("terminal-block-hash-override") + Arg::new("terminal-block-hash-override") .long("terminal-block-hash-override") .value_name("TERMINAL_BLOCK_HASH") .help("Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. \ @@ -287,11 +297,11 @@ fn main() { Incorrect use of this flag will cause your node to experience a consensus \ failure. Be extremely careful with this flag.") .requires("terminal-block-hash-epoch-override") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("terminal-block-hash-epoch-override") + Arg::new("terminal-block-hash-epoch-override") .long("terminal-block-hash-epoch-override") .value_name("EPOCH") .help("Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH \ @@ -300,11 +310,11 @@ fn main() { Incorrect use of this flag will cause your node to experience a consensus \ failure. Be extremely careful with this flag.") .requires("terminal-block-hash-override") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("safe-slots-to-import-optimistically") + Arg::new("safe-slots-to-import-optimistically") .long("safe-slots-to-import-optimistically") .value_name("INTEGER") .help("Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY \ @@ -313,11 +323,11 @@ fn main() { of an attack at the PoS transition block. Incorrect use of this flag can cause your \ node to possibly accept an invalid chain or sync more slowly. Be extremely careful with \ this flag.") - .takes_value(true) + .action(ArgAction::Set) .global(true) ) .arg( - Arg::with_name("genesis-state-url") + Arg::new("genesis-state-url") .long("genesis-state-url") .value_name("URL") .help( @@ -326,17 +336,17 @@ fn main() { If not supplied, a default URL or the --checkpoint-sync-url may be used. \ If the genesis state is already included in this binary then this value will be ignored.", ) - .takes_value(true) + .action(ArgAction::Set) .global(true), ) .arg( - Arg::with_name("genesis-state-url-timeout") + Arg::new("genesis-state-url-timeout") .long("genesis-state-url-timeout") .value_name("SECONDS") .help( "The timeout in seconds for the request to --genesis-state-url.", ) - .takes_value(true) + .action(ArgAction::Set) .default_value("180") .global(true), ) @@ -354,7 +364,7 @@ fn main() { // Only apply this optimization for the beacon node. It's the only process with a substantial // memory footprint. let is_beacon_node = matches.subcommand_name() == Some("beacon_node"); - if is_beacon_node && !matches.is_present(DISABLE_MALLOC_TUNING_FLAG) { + if is_beacon_node && !matches.get_flag(DISABLE_MALLOC_TUNING_FLAG) { if let Err(e) = configure_memory_allocator() { eprintln!( "Unable to configure the memory allocator: {} \n\ @@ -372,7 +382,7 @@ fn main() { if let Some(bootnode_matches) = matches.subcommand_matches("boot_node") { // The bootnode uses the main debug-level flag let debug_info = matches - .value_of("debug-level") + .get_one::("debug-level") .expect("Debug-level must be present") .into(); @@ -432,53 +442,53 @@ fn run( } let debug_level = matches - .value_of("debug-level") + .get_one::("debug-level") .ok_or("Expected --debug-level flag")?; - let log_format = matches.value_of("log-format"); + let log_format = matches.get_one::("log-format"); - let log_color = matches.is_present("log-color"); + let log_color = matches.get_flag("log-color"); - let disable_log_timestamp = matches.is_present("disable-log-timestamp"); + let disable_log_timestamp = matches.get_flag("disable-log-timestamp"); let logfile_debug_level = matches - .value_of("logfile-debug-level") + .get_one::("logfile-debug-level") .ok_or("Expected --logfile-debug-level flag")?; let logfile_format = matches - .value_of("logfile-format") + .get_one::("logfile-format") // Ensure that `logfile-format` defaults to the value of `log-format`. - .or_else(|| matches.value_of("log-format")); + .or_else(|| matches.get_one::("log-format")); let logfile_max_size: u64 = matches - .value_of("logfile-max-size") + .get_one::("logfile-max-size") .ok_or("Expected --logfile-max-size flag")? .parse() .map_err(|e| format!("Failed to parse `logfile-max-size`: {:?}", e))?; let logfile_max_number: usize = matches - .value_of("logfile-max-number") + .get_one::("logfile-max-number") .ok_or("Expected --logfile-max-number flag")? .parse() .map_err(|e| format!("Failed to parse `logfile-max-number`: {:?}", e))?; - let logfile_compress = matches.is_present("logfile-compress"); + let logfile_compress = matches.get_flag("logfile-compress"); - let logfile_restricted = !matches.is_present("logfile-no-restricted-perms"); + let logfile_restricted = !matches.get_flag("logfile-no-restricted-perms"); // Construct the path to the log file. let mut log_path: Option = clap_utils::parse_optional(matches, "logfile")?; if log_path.is_none() { log_path = match matches.subcommand() { - ("beacon_node", _) => Some( + Some(("beacon_node", _)) => Some( parse_path_or_default(matches, "datadir")? .join(DEFAULT_BEACON_NODE_DIR) .join("logs") .join("beacon") .with_extension("log"), ), - ("validator_client", Some(vc_matches)) => { - let base_path = if vc_matches.is_present("validators-dir") { + Some(("validator_client", vc_matches)) => { + let base_path = if vc_matches.contains_id("validators-dir") { parse_path_or_default(vc_matches, "validators-dir")? } else { parse_path_or_default(matches, "datadir")?.join(DEFAULT_VALIDATOR_DIR) @@ -497,9 +507,9 @@ fn run( let sse_logging = { if let Some(bn_matches) = matches.subcommand_matches("beacon_node") { - bn_matches.is_present("gui") + bn_matches.get_flag("gui") } else if let Some(vc_matches) = matches.subcommand_matches("validator_client") { - vc_matches.is_present("http") + vc_matches.get_flag("http") } else { false } @@ -628,13 +638,13 @@ fn run( ); match matches.subcommand() { - ("beacon_node", Some(matches)) => { + Some(("beacon_node", matches)) => { let context = environment.core_context(); let log = context.log().clone(); let executor = context.executor.clone(); let mut config = beacon_node::get_config::(matches, &context)?; config.logger_config = logger_config; - let shutdown_flag = matches.is_present("immediate-shutdown"); + let shutdown_flag = matches.get_flag("immediate-shutdown"); // Dump configs if `dump-config` or `dump-chain-config` flags are set clap_utils::check_dump_configs::<_, E>(matches, &config, &context.eth2_config.spec)?; executor.clone().spawn( @@ -655,13 +665,13 @@ fn run( "beacon_node", ); } - ("validator_client", Some(matches)) => { + Some(("validator_client", matches)) => { let context = environment.core_context(); let log = context.log().clone(); let executor = context.executor.clone(); let config = validator_client::Config::from_cli(matches, context.log()) .map_err(|e| format!("Unable to initialize validator config: {}", e))?; - let shutdown_flag = matches.is_present("immediate-shutdown"); + let shutdown_flag = matches.get_flag("immediate-shutdown"); // Dump configs if `dump-config` or `dump-chain-config` flags are set clap_utils::check_dump_configs::<_, E>(matches, &config, &context.eth2_config.spec)?; if !shutdown_flag { diff --git a/lighthouse/tests/beacon_node.rs b/lighthouse/tests/beacon_node.rs index 94996eb1a26..ece52627a00 100644 --- a/lighthouse/tests/beacon_node.rs +++ b/lighthouse/tests/beacon_node.rs @@ -2252,7 +2252,7 @@ fn proposer_re_org_disallowed_offsets_default() { #[test] fn proposer_re_org_disallowed_offsets_override() { CommandLineTest::new() - .flag("--proposer-reorg-disallowed-offsets", Some("1,2,3")) + .flag("proposer-reorg-disallowed-offsets", Some("1,2,3")) .run_with_zero_port() .with_config(|config| { assert_eq!( @@ -2266,7 +2266,7 @@ fn proposer_re_org_disallowed_offsets_override() { #[should_panic] fn proposer_re_org_disallowed_offsets_invalid() { CommandLineTest::new() - .flag("--proposer-reorg-disallowed-offsets", Some("32,33,34")) + .flag("proposer-reorg-disallowed-offsets", Some("32,33,34")) .run_with_zero_port(); } diff --git a/lighthouse/tests/validator_manager.rs b/lighthouse/tests/validator_manager.rs index fab1cfebf4b..cc5bd293b38 100644 --- a/lighthouse/tests/validator_manager.rs +++ b/lighthouse/tests/validator_manager.rs @@ -136,21 +136,21 @@ pub fn validator_create_defaults() { #[test] pub fn validator_create_misc_flags() { CommandLineTest::validators_create() - .flag("--output-path", Some("./meow")) - .flag("--deposit-gwei", Some("42")) - .flag("--first-index", Some("12")) - .flag("--count", Some("9")) - .flag("--mnemonic-path", Some("./woof")) - .flag("--stdin-inputs", None) - .flag("--specify-voting-keystore-password", None) - .flag("--eth1-withdrawal-address", Some(EXAMPLE_ETH1_ADDRESS)) - .flag("--builder-proposals", Some("true")) - .flag("--prefer-builder-proposals", Some("true")) - .flag("--builder-boost-factor", Some("150")) - .flag("--suggested-fee-recipient", Some(EXAMPLE_ETH1_ADDRESS)) - .flag("--gas-limit", Some("1337")) - .flag("--beacon-node", Some("http://localhost:1001")) - .flag("--force-bls-withdrawal-credentials", None) + .flag("output-path", Some("./meow")) + .flag("deposit-gwei", Some("42")) + .flag("first-index", Some("12")) + .flag("count", Some("9")) + .flag("mnemonic-path", Some("./woof")) + .flag("stdin-inputs", None) + .flag("specify-voting-keystore-password", None) + .flag("eth1-withdrawal-address", Some(EXAMPLE_ETH1_ADDRESS)) + .flag("builder-proposals", Some("true")) + .flag("prefer-builder-proposals", Some("true")) + .flag("builder-boost-factor", Some("150")) + .flag("suggested-fee-recipient", Some(EXAMPLE_ETH1_ADDRESS)) + .flag("gas-limit", Some("1337")) + .flag("beacon-node", Some("http://localhost:1001")) + .flag("force-bls-withdrawal-credentials", None) .assert_success(|config| { let expected = CreateConfig { output_path: PathBuf::from("./meow"), diff --git a/testing/simulator/src/cli.rs b/testing/simulator/src/cli.rs index ff80201051f..4f76b90d6ae 100644 --- a/testing/simulator/src/cli.rs +++ b/testing/simulator/src/cli.rs @@ -1,12 +1,12 @@ -use clap::{App, Arg, SubCommand}; +use clap::{Arg, ArgAction, Command}; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("simulator") - .version(crate_version!()) +pub fn cli_app() -> Command { + Command::new("simulator") + // .version(crate_version!()) .author("Sigma Prime ") .about("Options for interacting with simulator") .subcommand( - SubCommand::with_name("eth1-sim") + Command::new("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 \ @@ -18,107 +18,107 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { are running correctly. If any of these checks fail, the simulation will \ exit immediately.", ) - .arg(Arg::with_name("nodes") - .short("n") + .arg(Arg::new("nodes") + .short('n') .long("nodes") - .takes_value(true) + .action(ArgAction::Set) .default_value("4") .help("Number of beacon nodes")) - .arg(Arg::with_name("proposer-nodes") - .short("p") + .arg(Arg::new("proposer-nodes") + .short('p') .long("proposer_nodes") - .takes_value(true) + .action(ArgAction::Set) .default_value("2") .help("Number of proposer-only beacon nodes")) - .arg(Arg::with_name("validators_per_node") - .short("v") + .arg(Arg::new("validators_per_node") + .short('v') .long("validators_per_node") - .takes_value(true) + .action(ArgAction::Set) .default_value("20") .help("Number of validators")) - .arg(Arg::with_name("speed_up_factor") - .short("s") + .arg(Arg::new("speed_up_factor") + .short('s') .long("speed_up_factor") - .takes_value(true) + .action(ArgAction::Set) .default_value("3") .help("Speed up factor. Please use a divisor of 12.")) - .arg(Arg::with_name("post-merge") - .short("m") + .arg(Arg::new("post-merge") + .short('m') .long("post-merge") - .takes_value(false) + .action(ArgAction::SetTrue) .help("Simulate the merge transition")) - .arg(Arg::with_name("continue_after_checks") - .short("c") + .arg(Arg::new("continue_after_checks") + .short('c') .long("continue_after_checks") - .takes_value(false) + .action(ArgAction::SetTrue) .help("Continue after checks (default false)")) ) .subcommand( - SubCommand::with_name("no-eth1-sim") + Command::new("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") + .arg(Arg::new("nodes") + .short('n') .long("nodes") - .takes_value(true) + .action(ArgAction::Set) .default_value("4") .help("Number of beacon nodes")) - .arg(Arg::with_name("proposer-nodes") - .short("p") + .arg(Arg::new("proposer-nodes") + .short('p') .long("proposer_nodes") - .takes_value(true) + .action(ArgAction::Set) .default_value("2") .help("Number of proposer-only beacon nodes")) - .arg(Arg::with_name("validators_per_node") - .short("v") + .arg(Arg::new("validators_per_node") + .short('v') .long("validators_per_node") - .takes_value(true) + .action(ArgAction::Set) .default_value("20") .help("Number of validators")) - .arg(Arg::with_name("speed_up_factor") - .short("s") + .arg(Arg::new("speed_up_factor") + .short('s') .long("speed_up_factor") - .takes_value(true) + .action(ArgAction::Set) .default_value("3") .help("Speed up factor")) - .arg(Arg::with_name("continue_after_checks") - .short("c") + .arg(Arg::new("continue_after_checks") + .short('c') .long("continue_after_checks") - .takes_value(false) + .action(ArgAction::SetTrue) .help("Continue after checks (default false)")) ) .subcommand( - SubCommand::with_name("syncing-sim") + Command::new("syncing-sim") .about("Run the syncing simulation") .arg( - Arg::with_name("speedup") - .short("s") + Arg::new("speedup") + .short('s') .long("speedup") - .takes_value(true) + .action(ArgAction::Set) .default_value("15") .help("Speed up factor for eth1 blocks and slot production"), ) .arg( - Arg::with_name("initial_delay") - .short("i") + Arg::new("initial_delay") + .short('i') .long("initial_delay") - .takes_value(true) + .action(ArgAction::Set) .default_value("5") .help("Epoch delay for new beacon node to start syncing"), ) .arg( - Arg::with_name("sync_timeout") + Arg::new("sync_timeout") .long("sync_timeout") - .takes_value(true) + .action(ArgAction::Set) .default_value("10") .help("Number of epochs after which newly added beacon nodes must be synced"), ) .arg( - Arg::with_name("strategy") + Arg::new("strategy") .long("strategy") - .takes_value(true) + .action(ArgAction::Set) .default_value("all") - .possible_values(&["one-node", "two-nodes", "mixed", "all"]) + .value_parser(["one-node", "two-nodes", "mixed", "all"]) .help("Sync verification strategy to run."), ), ) diff --git a/testing/simulator/src/eth1_sim.rs b/testing/simulator/src/eth1_sim.rs index 8d6ffc42ffa..3db3e39d944 100644 --- a/testing/simulator/src/eth1_sim.rs +++ b/testing/simulator/src/eth1_sim.rs @@ -29,15 +29,21 @@ const SUGGESTED_FEE_RECIPIENT: [u8; 20] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> { - let node_count = value_t!(matches, "nodes", usize).expect("missing nodes default"); - let proposer_nodes = value_t!(matches, "proposer-nodes", usize).unwrap_or(0); + let node_count = *matches + .get_one::("nodes") + .expect("missing nodes default"); + let proposer_nodes = *matches + .get_one::("proposer-nodes") + .unwrap_or(&0); println!("PROPOSER-NODES: {}", proposer_nodes); - let validators_per_node = value_t!(matches, "validators_per_node", usize) + let validators_per_node = *matches + .get_one::("validators_per_node") .expect("missing validators_per_node default"); - let speed_up_factor = - value_t!(matches, "speed_up_factor", u64).expect("missing speed_up_factor default"); - let continue_after_checks = matches.is_present("continue_after_checks"); - let post_merge_sim = matches.is_present("post-merge"); + let speed_up_factor = *matches + .get_one::("speed_up_factor") + .expect("missing speed_up_factor default"); + let continue_after_checks = matches.get_flag("continue_after_checks"); + let post_merge_sim = matches.get_flag("post-merge"); println!("Beacon Chain Simulator:"); println!(" nodes:{}, proposer_nodes: {}", node_count, proposer_nodes); diff --git a/testing/simulator/src/main.rs b/testing/simulator/src/main.rs index e8af9c18067..3ee58261150 100644 --- a/testing/simulator/src/main.rs +++ b/testing/simulator/src/main.rs @@ -13,7 +13,6 @@ //! easy-to-find files and stdout only contained info from the simulation. //! -#[macro_use] extern crate clap; mod checks; @@ -37,21 +36,21 @@ fn main() { let matches = cli_app().get_matches(); match matches.subcommand() { - ("eth1-sim", Some(matches)) => match eth1_sim::run_eth1_sim(matches) { + Some(("eth1-sim", matches)) => match eth1_sim::run_eth1_sim(matches) { Ok(()) => println!("Simulation exited successfully"), Err(e) => { eprintln!("Simulation exited with error: {}", e); std::process::exit(1) } }, - ("no-eth1-sim", Some(matches)) => match no_eth1_sim::run_no_eth1_sim(matches) { + Some(("no-eth1-sim", matches)) => match no_eth1_sim::run_no_eth1_sim(matches) { Ok(()) => println!("Simulation exited successfully"), Err(e) => { eprintln!("Simulation exited with error: {}", e); std::process::exit(1) } }, - ("syncing-sim", Some(matches)) => match sync_sim::run_syncing_sim(matches) { + Some(("syncing-sim", matches)) => match sync_sim::run_syncing_sim(matches) { Ok(()) => println!("Simulation exited successfully"), Err(e) => { eprintln!("Simulation exited with error: {}", e); diff --git a/testing/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs index fc18b1cd489..bf36de6b7e0 100644 --- a/testing/simulator/src/no_eth1_sim.rs +++ b/testing/simulator/src/no_eth1_sim.rs @@ -13,12 +13,16 @@ use tokio::time::sleep; use types::{Epoch, EthSpec, MainnetEthSpec}; pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { - let node_count = value_t!(matches, "nodes", usize).expect("missing nodes default"); - let validators_per_node = value_t!(matches, "validators_per_node", usize) + let node_count = matches + .get_one::("nodes") + .expect("missing nodes default"); + let validators_per_node = matches + .get_one::("validators_per_node") .expect("missing validators_per_node default"); - let speed_up_factor = - value_t!(matches, "speed_up_factor", u64).expect("missing speed_up_factor default"); - let continue_after_checks = matches.is_present("continue_after_checks"); + let speed_up_factor = matches + .get_one::("speed_up_factor") + .expect("missing speed_up_factor default"); + let continue_after_checks = matches.get_flag("continue_after_checks"); println!("Beacon Chain Simulator:"); println!(" nodes:{}", node_count); @@ -26,7 +30,7 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { println!(" continue_after_checks:{}", continue_after_checks); // Generate the directories and keystores required for the validator clients. - let validator_files = (0..node_count) + let validator_files = (0..*node_count) .into_par_iter() .map(|i| { println!( diff --git a/testing/simulator/src/sync_sim.rs b/testing/simulator/src/sync_sim.rs index 78f7e1ee9fb..58ee0a97ac1 100644 --- a/testing/simulator/src/sync_sim.rs +++ b/testing/simulator/src/sync_sim.rs @@ -13,10 +13,10 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; use types::{Epoch, EthSpec}; pub fn run_syncing_sim(matches: &ArgMatches) -> Result<(), String> { - let initial_delay = value_t!(matches, "initial_delay", u64).unwrap(); - let sync_timeout = value_t!(matches, "sync_timeout", u64).unwrap(); - let speed_up_factor = value_t!(matches, "speedup", u64).unwrap(); - let strategy = value_t!(matches, "strategy", String).unwrap(); + let initial_delay = *matches.get_one::("initial_delay").unwrap(); + let sync_timeout = *matches.get_one::("sync_timeout").unwrap(); + let speed_up_factor = *matches.get_one::("speedup").unwrap(); + let strategy = matches.get_one::("strategy").unwrap().clone(); println!("Syncing Simulator:"); println!(" initial_delay:{}", initial_delay); diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index 16a265212e5..e0bf5595c29 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -1,34 +1,35 @@ -use clap::{App, Arg}; +use clap::{builder::ArgPredicate, Arg, ArgAction, Command}; +use clap_utils::get_color_style; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new("validator_client") - .visible_aliases(&["v", "vc", "validator"]) - .setting(clap::AppSettings::ColoredHelp) +pub fn cli_app() -> Command { + Command::new("validator_client") + .visible_aliases(["v", "vc", "validator"]) + .styles(get_color_style()) .about( "When connected to a beacon node, performs the duties of a staked \ validator (e.g., proposing blocks and attestations).", ) .arg( - Arg::with_name("beacon-nodes") + Arg::new("beacon-nodes") .long("beacon-nodes") .value_name("NETWORK_ADDRESSES") .help("Comma-separated addresses to one or more beacon node HTTP APIs. \ Default is http://localhost:5052." ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("proposer-nodes") + Arg::new("proposer-nodes") .long("proposer-nodes") .value_name("NETWORK_ADDRESSES") .help("Comma-separated addresses to one or more beacon node HTTP APIs. \ These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes." ) - .takes_value(true), + .action(ArgAction::Set), ) // TODO remove this flag in a future release .arg( - Arg::with_name("disable-run-on-all") + Arg::new("disable-run-on-all") .long("disable-run-on-all") .value_name("DISABLE_RUN_ON_ALL") .help("DEPRECATED. Use --broadcast. \ @@ -36,10 +37,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { and proposer preparation messages to all beacon nodes provided in the \ `--beacon-nodes flag`. This option changes that behaviour such that these \ api calls only go out to the first available and synced beacon node") - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("broadcast") + Arg::new("broadcast") .long("broadcast") .value_name("API_TOPICS") .help("Comma-separated list of beacon API topics to broadcast to all beacon nodes. \ @@ -47,10 +48,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { sync-committee. Default (when flag is omitted) is to broadcast \ subscriptions only." ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("validators-dir") + Arg::new("validators-dir") .long("validators-dir") .alias("validator-dir") .value_name("VALIDATORS_DIR") @@ -59,11 +60,11 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { each validator along with the common slashing protection database \ and the validator_definitions.yml" ) - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("datadir") ) .arg( - Arg::with_name("secrets-dir") + Arg::new("secrets-dir") .long("secrets-dir") .value_name("SECRETS_DIRECTORY") .help( @@ -72,12 +73,13 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { name is the 0x-prefixed hex representation of the validators voting public \ key. Defaults to ~/.lighthouse/{network}/secrets.", ) - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("datadir") ) .arg( - Arg::with_name("init-slashing-protection") + Arg::new("init-slashing-protection") .long("init-slashing-protection") + .action(ArgAction::SetTrue) .help( "If present, do not require the slashing protection database to exist before \ running. You SHOULD NOT use this flag unless you're certain that a new \ @@ -87,25 +89,27 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) ) .arg( - Arg::with_name("disable-auto-discover") + Arg::new("disable-auto-discover") .long("disable-auto-discover") + .action(ArgAction::SetTrue) .help( "If present, do not attempt to discover new validators in the validators-dir. Validators \ will need to be manually added to the validator_definitions.yml file." ) ) .arg( - Arg::with_name("use-long-timeouts") + Arg::new("use-long-timeouts") .long("use-long-timeouts") + .action(ArgAction::SetTrue) .help("If present, the validator client will use longer timeouts for requests \ made to the beacon node. This flag is generally not recommended, \ longer timeouts can cause missed duties when fallbacks are used.") ) .arg( - Arg::with_name("beacon-nodes-tls-certs") + Arg::new("beacon-nodes-tls-certs") .long("beacon-nodes-tls-certs") .value_name("CERTIFICATE-FILES") - .takes_value(true) + .action(ArgAction::Set) .help("Comma-separated paths to custom TLS certificates to use when connecting \ to a beacon node (and/or proposer node). These certificates must be in PEM format and are used \ in addition to the OS trust store. Commas must only be used as a \ @@ -113,50 +117,50 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) // This overwrites the graffiti configured in the beacon node. .arg( - Arg::with_name("graffiti") + Arg::new("graffiti") .long("graffiti") .help("Specify your custom graffiti to be included in blocks.") .value_name("GRAFFITI") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("graffiti-file") + Arg::new("graffiti-file") .long("graffiti-file") .help("Specify a graffiti file to load validator graffitis from.") .value_name("GRAFFITI-FILE") - .takes_value(true) + .action(ArgAction::Set) .conflicts_with("graffiti") ) .arg( - Arg::with_name("suggested-fee-recipient") + Arg::new("suggested-fee-recipient") .long("suggested-fee-recipient") .help("Once the merge has happened, this address will receive transaction fees \ from blocks proposed by this validator client. If a fee recipient is \ configured in the validator definitions it takes priority over this value.") .value_name("FEE-RECIPIENT") - .takes_value(true) + .action(ArgAction::Set) ) .arg( - Arg::with_name("produce-block-v3") + Arg::new("produce-block-v3") .long("produce-block-v3") .help("Enable block production via the block v3 endpoint for this validator client. \ This should only be enabled when paired with a beacon node \ that has this endpoint implemented. This flag will be enabled by default in \ future.") - .takes_value(false) + .action(ArgAction::SetTrue) ) .arg( - Arg::with_name("distributed") + Arg::new("distributed") .long("distributed") .help("Enables functionality required for running the validator in a distributed validator cluster.") - .takes_value(false) + .action(ArgAction::SetTrue) ) /* REST API related arguments */ .arg( - Arg::with_name("http") + Arg::new("http") .long("http") .help("Enable the RESTful HTTP API server. Disabled by default.") - .takes_value(false), + .action(ArgAction::SetTrue), ) /* * Note: The HTTP server is **not** encrypted (i.e., not HTTPS) and therefore it is @@ -166,7 +170,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { * must also be used in order to make it clear to the user that this is unsafe. */ .arg( - Arg::with_name("http-address") + Arg::new("http-address") .long("http-address") .requires("http") .value_name("ADDRESS") @@ -179,23 +183,24 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .requires("unencrypted-http-transport"), ) .arg( - Arg::with_name("unencrypted-http-transport") - .long("unencrypted-http-transport") - .help("This is a safety flag to ensure that the user is aware that the http \ - transport is unencrypted and using a custom HTTP address is unsafe.") - .requires("http-address"), + Arg::new("unencrypted-http-transport") + .long("unencrypted-http-transport") + .help("This is a safety flag to ensure that the user is aware that the http \ + transport is unencrypted and using a custom HTTP address is unsafe.") + .action(ArgAction::SetTrue) + .requires("http-address"), ) .arg( - Arg::with_name("http-port") + Arg::new("http-port") .long("http-port") .requires("http") .value_name("PORT") .help("Set the listen TCP port for the RESTful HTTP API server.") - .default_value_if("http", None, "5062") - .takes_value(true), + .default_value_if("http", ArgPredicate::IsPresent, "5062") + .action(ArgAction::Set), ) .arg( - Arg::with_name("http-allow-origin") + Arg::new("http-allow-origin") .long("http-allow-origin") .requires("http") .value_name("ORIGIN") @@ -203,10 +208,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Use * to allow any origin (not recommended in production). \ If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5062).") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("http-allow-keystore-export") + Arg::new("http-allow-keystore-export") .long("http-allow-keystore-export") .requires("http") .help("If present, allow access to the DELETE /lighthouse/keystores HTTP \ @@ -214,44 +219,44 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { consumers who have access to the API token. This method is useful for \ exporting validators, however it should be used with caution since it \ exposes private key data to authorized users.") - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("http-store-passwords-in-secrets-dir") + Arg::new("http-store-passwords-in-secrets-dir") .long("http-store-passwords-in-secrets-dir") .requires("http") .help("If present, any validators created via the HTTP will have keystore \ passwords stored in the secrets-dir rather than the validator \ definitions file.") - .takes_value(false), + .action(ArgAction::SetTrue), ) /* Prometheus metrics HTTP server related arguments */ .arg( - Arg::with_name("metrics") + Arg::new("metrics") .long("metrics") .help("Enable the Prometheus metrics HTTP server. Disabled by default.") - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("metrics-address") + Arg::new("metrics-address") .long("metrics-address") .requires("metrics") .value_name("ADDRESS") .help("Set the listen address for the Prometheus metrics HTTP server.") - .default_value_if("metrics", None, "127.0.0.1") - .takes_value(true), + .default_value_if("metrics", ArgPredicate::IsPresent, "127.0.0.1") + .action(ArgAction::Set), ) .arg( - Arg::with_name("metrics-port") + Arg::new("metrics-port") .long("metrics-port") .requires("metrics") .value_name("PORT") .help("Set the listen TCP port for the Prometheus metrics HTTP server.") - .default_value_if("metrics", None, "5064") - .takes_value(true), + .default_value_if("metrics", ArgPredicate::IsPresent, "5064") + .action(ArgAction::Set), ) .arg( - Arg::with_name("metrics-allow-origin") + Arg::new("metrics-allow-origin") .long("metrics-allow-origin") .requires("metrics") .value_name("ORIGIN") @@ -259,22 +264,22 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Use * to allow any origin (not recommended in production). \ If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5064).") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("enable-high-validator-count-metrics") + Arg::new("enable-high-validator-count-metrics") .long("enable-high-validator-count-metrics") .help("Enable per validator metrics for > 64 validators. \ Note: This flag is automatically enabled for <= 64 validators. \ Enabling this metric for higher validator counts will lead to higher volume \ of prometheus metrics being collected.") - .takes_value(false), + .action(ArgAction::SetTrue), ) /* * Explorer metrics */ .arg( - Arg::with_name("monitoring-endpoint") + Arg::new("monitoring-endpoint") .long("monitoring-endpoint") .value_name("ADDRESS") .help("Enables the monitoring service for sending system metrics to a remote endpoint. \ @@ -283,19 +288,19 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { Note: This will send information to a remote sever which may identify and associate your \ validators, IP address and other personal information. Always use a HTTPS connection \ and never provide an untrusted URL.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("monitoring-endpoint-period") + Arg::new("monitoring-endpoint-period") .long("monitoring-endpoint-period") .value_name("SECONDS") .help("Defines how many seconds to wait between each message sent to \ the monitoring-endpoint. Default: 60s") .requires("monitoring-endpoint") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("enable-doppelganger-protection") + Arg::new("enable-doppelganger-protection") .long("enable-doppelganger-protection") .value_name("ENABLE_DOPPELGANGER_PROTECTION") .help("If this flag is set, Lighthouse will delay startup for three epochs and \ @@ -307,56 +312,56 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { to avoid potentially committing a slashable offense. Use this flag in order to \ ENABLE this functionality, without this flag Lighthouse will begin attesting \ immediately.") - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("builder-proposals") + Arg::new("builder-proposals") .long("builder-proposals") .alias("private-tx-proposals") .help("If this flag is set, Lighthouse will query the Beacon Node for only block \ headers during proposals and will sign over headers. Useful for outsourcing \ execution payload construction during proposals.") - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("builder-registration-timestamp-override") + Arg::new("builder-registration-timestamp-override") .long("builder-registration-timestamp-override") .alias("builder-registration-timestamp-override") .help("This flag takes a unix timestamp value that will be used to override the \ timestamp used in the builder api registration") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("gas-limit") + Arg::new("gas-limit") .long("gas-limit") .value_name("INTEGER") - .takes_value(true) + .action(ArgAction::Set) .help("The gas limit to be used in all builder proposals for all validators managed \ by this validator client. Note this will not necessarily be used if the gas limit \ set here moves too far from the previous block's gas limit. [default: 30,000,000]") .requires("builder-proposals"), ) .arg( - Arg::with_name("latency-measurement-service") + Arg::new("latency-measurement-service") .long("latency-measurement-service") .value_name("BOOLEAN") .help("Set to 'true' to enable a service that periodically attempts to measure latency to BNs. \ Set to 'false' to disable.") .default_value("true") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("validator-registration-batch-size") + Arg::new("validator-registration-batch-size") .long("validator-registration-batch-size") .value_name("INTEGER") .help("Defines the number of validators per \ validator/register_validator request sent to the BN. This value \ can be reduced to avoid timeouts from builders.") .default_value("500") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("builder-boost-factor") + Arg::new("builder-boost-factor") .long("builder-boost-factor") .value_name("UINT64") .help("Defines the boost factor, \ @@ -364,17 +369,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { when choosing between a builder payload header and payload from \ the local execution node.") .conflicts_with("prefer-builder-proposals") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("prefer-builder-proposals") + Arg::new("prefer-builder-proposals") .long("prefer-builder-proposals") .help("If this flag is set, Lighthouse will always prefer blocks \ constructed by builders, regardless of payload value.") - .takes_value(false), + .action(ArgAction::SetTrue), ) .arg( - Arg::with_name("disable-slashing-protection-web3signer") + Arg::new("disable-slashing-protection-web3signer") .long("disable-slashing-protection-web3signer") .help("Disable Lighthouse's slashing protection for all web3signer keys. This can \ reduce the I/O burden on the VC but is only safe if slashing protection \ @@ -382,26 +387,26 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON \ THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT \ ENABLING WEB3SIGNER'S SLASHING PROTECTION.") - .takes_value(false) + .action(ArgAction::SetTrue) ) /* * Experimental/development options. */ .arg( - Arg::with_name("web3-signer-keep-alive-timeout") + Arg::new("web3-signer-keep-alive-timeout") .long("web3-signer-keep-alive-timeout") .value_name("MILLIS") .default_value("90000") .help("Keep-alive timeout for each web3signer connection. Set to 'null' to never \ timeout") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name("web3-signer-max-idle-connections") + Arg::new("web3-signer-max-idle-connections") .long("web3-signer-max-idle-connections") .value_name("COUNT") .help("Maximum number of idle connections to maintain per web3signer host. Default \ is unlimited.") - .takes_value(true), + .action(ArgAction::Set), ) } diff --git a/validator_client/src/config.rs b/validator_client/src/config.rs index ae59829a3e6..2cfe1b2c8d5 100644 --- a/validator_client/src/config.rs +++ b/validator_client/src/config.rs @@ -150,15 +150,15 @@ impl Config { .unwrap_or_else(|| PathBuf::from(".")); let (mut validator_dir, mut secrets_dir) = (None, None); - if cli_args.value_of("datadir").is_some() { + if cli_args.get_one::("datadir").is_some() { let base_dir: PathBuf = parse_required(cli_args, "datadir")?; validator_dir = Some(base_dir.join(DEFAULT_VALIDATOR_DIR)); secrets_dir = Some(base_dir.join(DEFAULT_SECRET_DIR)); } - if cli_args.value_of("validators-dir").is_some() { + if cli_args.get_one::("validators-dir").is_some() { validator_dir = Some(parse_required(cli_args, "validators-dir")?); } - if cli_args.value_of("secrets-dir").is_some() { + if cli_args.get_one::("secrets-dir").is_some() { secrets_dir = Some(parse_required(cli_args, "secrets-dir")?); } @@ -194,11 +194,11 @@ impl Config { .map_err(|e| format!("Unable to parse proposer node URL: {:?}", e))?; } - config.disable_auto_discover = cli_args.is_present("disable-auto-discover"); - config.init_slashing_protection = cli_args.is_present("init-slashing-protection"); - config.use_long_timeouts = cli_args.is_present("use-long-timeouts"); + config.disable_auto_discover = cli_args.get_flag("disable-auto-discover"); + config.init_slashing_protection = cli_args.get_flag("init-slashing-protection"); + config.use_long_timeouts = cli_args.get_flag("use-long-timeouts"); - if let Some(graffiti_file_path) = cli_args.value_of("graffiti-file") { + if let Some(graffiti_file_path) = cli_args.get_one::("graffiti-file") { let mut graffiti_file = GraffitiFile::new(graffiti_file_path.into()); graffiti_file .read_graffiti_file() @@ -207,7 +207,7 @@ impl Config { info!(log, "Successfully loaded graffiti file"; "path" => graffiti_file_path); } - if let Some(input_graffiti) = cli_args.value_of("graffiti") { + if let Some(input_graffiti) = cli_args.get_one::("graffiti") { let graffiti_bytes = input_graffiti.as_bytes(); if graffiti_bytes.len() > GRAFFITI_BYTES_LEN { return Err(format!( @@ -236,11 +236,11 @@ impl Config { config.beacon_nodes_tls_certs = Some(tls_certs.split(',').map(PathBuf::from).collect()); } - if cli_args.is_present("distributed") { + if cli_args.get_flag("distributed") { config.distributed = true; } - if cli_args.is_present("disable-run-on-all") { + if cli_args.get_flag("disable-run-on-all") { warn!( log, "The --disable-run-on-all flag is deprecated"; @@ -248,7 +248,7 @@ impl Config { ); config.broadcast_topics = vec![]; } - if let Some(broadcast_topics) = cli_args.value_of("broadcast") { + if let Some(broadcast_topics) = cli_args.get_one::("broadcast") { config.broadcast_topics = broadcast_topics .split(',') .filter(|t| *t != "none") @@ -280,12 +280,12 @@ impl Config { * Http API server */ - if cli_args.is_present("http") { + if cli_args.get_flag("http") { config.http_api.enabled = true; } - if let Some(address) = cli_args.value_of("http-address") { - if cli_args.is_present("unencrypted-http-transport") { + if let Some(address) = cli_args.get_one::("http-address") { + if cli_args.get_flag("unencrypted-http-transport") { config.http_api.listen_addr = address .parse::() .map_err(|_| "http-address is not a valid IP address.")?; @@ -297,13 +297,13 @@ impl Config { } } - if let Some(port) = cli_args.value_of("http-port") { + if let Some(port) = cli_args.get_one::("http-port") { config.http_api.listen_port = port .parse::() .map_err(|_| "http-port is not a valid u16.")?; } - if let Some(allow_origin) = cli_args.value_of("http-allow-origin") { + if let Some(allow_origin) = cli_args.get_one::("http-allow-origin") { // Pre-validate the config value to give feedback to the user on node startup, instead of // as late as when the first API response is produced. hyper::header::HeaderValue::from_str(allow_origin) @@ -312,11 +312,11 @@ impl Config { config.http_api.allow_origin = Some(allow_origin.to_string()); } - if cli_args.is_present("http-allow-keystore-export") { + if cli_args.get_flag("http-allow-keystore-export") { config.http_api.allow_keystore_export = true; } - if cli_args.is_present("http-store-passwords-in-secrets-dir") { + if cli_args.get_flag("http-store-passwords-in-secrets-dir") { config.http_api.store_passwords_in_secrets_dir = true; } @@ -324,27 +324,27 @@ impl Config { * Prometheus metrics HTTP server */ - if cli_args.is_present("metrics") { + if cli_args.get_flag("metrics") { config.http_metrics.enabled = true; } - if cli_args.is_present("enable-high-validator-count-metrics") { + if cli_args.get_flag("enable-high-validator-count-metrics") { config.enable_high_validator_count_metrics = true; } - if let Some(address) = cli_args.value_of("metrics-address") { + if let Some(address) = cli_args.get_one::("metrics-address") { config.http_metrics.listen_addr = address .parse::() .map_err(|_| "metrics-address is not a valid IP address.")?; } - if let Some(port) = cli_args.value_of("metrics-port") { + if let Some(port) = cli_args.get_one::("metrics-port") { config.http_metrics.listen_port = port .parse::() .map_err(|_| "metrics-port is not a valid u16.")?; } - if let Some(allow_origin) = cli_args.value_of("metrics-allow-origin") { + if let Some(allow_origin) = cli_args.get_one::("metrics-allow-origin") { // Pre-validate the config value to give feedback to the user on node startup, instead of // as late as when the first API response is produced. hyper::header::HeaderValue::from_str(allow_origin) @@ -353,14 +353,14 @@ impl Config { config.http_metrics.allow_origin = Some(allow_origin.to_string()); } - if cli_args.is_present(DISABLE_MALLOC_TUNING_FLAG) { + if cli_args.get_flag(DISABLE_MALLOC_TUNING_FLAG) { config.http_metrics.allocator_metrics_enabled = false; } /* * Explorer metrics */ - if let Some(monitoring_endpoint) = cli_args.value_of("monitoring-endpoint") { + if let Some(monitoring_endpoint) = cli_args.get_one::("monitoring-endpoint") { let update_period_secs = clap_utils::parse_optional(cli_args, "monitoring-endpoint-period")?; config.monitoring_api = Some(monitoring_api::Config { @@ -371,24 +371,24 @@ impl Config { }); } - if cli_args.is_present("enable-doppelganger-protection") { + if cli_args.get_flag("enable-doppelganger-protection") { config.enable_doppelganger_protection = true; } - if cli_args.is_present("builder-proposals") { + if cli_args.get_flag("builder-proposals") { config.builder_proposals = true; } - if cli_args.is_present("produce-block-v3") { + if cli_args.get_flag("produce-block-v3") { config.produce_block_v3 = true; } - if cli_args.is_present("prefer-builder-proposals") { + if cli_args.get_flag("prefer-builder-proposals") { config.prefer_builder_proposals = true; } config.gas_limit = cli_args - .value_of("gas-limit") + .get_one::("gas-limit") .map(|gas_limit| { gas_limit .parse::() @@ -397,7 +397,7 @@ impl Config { .transpose()?; if let Some(registration_timestamp_override) = - cli_args.value_of("builder-registration-timestamp-override") + cli_args.get_one::("builder-registration-timestamp-override") { config.builder_registration_timestamp_override = Some( registration_timestamp_override @@ -418,7 +418,7 @@ impl Config { } config.enable_web3signer_slashing_protection = - if cli_args.is_present("disable-slashing-protection-web3signer") { + if cli_args.get_flag("disable-slashing-protection-web3signer") { warn!( log, "Slashing protection for remote keys disabled"; diff --git a/validator_client/src/lib.rs b/validator_client/src/lib.rs index 52de95a3735..1a89f07d702 100644 --- a/validator_client/src/lib.rs +++ b/validator_client/src/lib.rs @@ -109,7 +109,7 @@ impl ProductionValidatorClient { /// and attestation production. pub async fn new_from_cli( context: RuntimeContext, - cli_args: &ArgMatches<'_>, + cli_args: &ArgMatches, ) -> Result { let config = Config::from_cli(cli_args, context.log()) .map_err(|e| format!("Unable to initialize config: {}", e))?; diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index 8ab3303d366..e215986cd5c 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -1,7 +1,7 @@ use super::common::*; use crate::DumpConfig; use account_utils::{random_password_string, read_mnemonic_from_cli, read_password_from_user}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use eth2::{ lighthouse_vc::std_types::KeystoreJsonStr, types::{StateId, ValidatorId}, @@ -35,8 +35,8 @@ pub const DEPOSITS_FILENAME: &str = "deposits.json"; const BEACON_NODE_HTTP_TIMEOUT: Duration = Duration::from_secs(2); -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about( "Creates new validators from BIP-39 mnemonic. A JSON file will be created which \ contains all the validator keystores and other validator data. This file can then \ @@ -45,7 +45,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { deposits in the same format as the \"ethereum/staking-deposit-cli\" tool.", ) .arg( - Arg::with_name(OUTPUT_PATH_FLAG) + Arg::new(OUTPUT_PATH_FLAG) .long(OUTPUT_PATH_FLAG) .value_name("DIRECTORY") .help( @@ -53,10 +53,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { files will be created. The directory will be created if it does not exist.", ) .required(true) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(DEPOSIT_GWEI_FLAG) + Arg::new(DEPOSIT_GWEI_FLAG) .long(DEPOSIT_GWEI_FLAG) .value_name("DEPOSIT_GWEI") .help( @@ -64,41 +64,41 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { required for an active validator (MAX_EFFECTIVE_BALANCE)", ) .conflicts_with(DISABLE_DEPOSITS_FLAG) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(FIRST_INDEX_FLAG) + Arg::new(FIRST_INDEX_FLAG) .long(FIRST_INDEX_FLAG) .value_name("FIRST_INDEX") .help("The first of consecutive key indexes you wish to create.") - .takes_value(true) + .action(ArgAction::Set) .required(false) .default_value("0"), ) .arg( - Arg::with_name(COUNT_FLAG) + Arg::new(COUNT_FLAG) .long(COUNT_FLAG) .value_name("VALIDATOR_COUNT") .help("The number of validators to create, regardless of how many already exist") .conflicts_with("at-most") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(MNEMONIC_FLAG) + Arg::new(MNEMONIC_FLAG) .long(MNEMONIC_FLAG) .value_name("MNEMONIC_PATH") .help("If present, the mnemonic will be read in from this file.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) .arg( - Arg::with_name(DISABLE_DEPOSITS_FLAG) + Arg::new(DISABLE_DEPOSITS_FLAG) .long(DISABLE_DEPOSITS_FLAG) .help( "When provided don't generate the deposits JSON file that is \ @@ -108,7 +108,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG) + Arg::new(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG) .long(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG) .help( "If present, the user will be prompted to enter the voting keystore \ @@ -119,7 +119,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(ETH1_WITHDRAWAL_ADDRESS_FLAG) + Arg::new(ETH1_WITHDRAWAL_ADDRESS_FLAG) .long(ETH1_WITHDRAWAL_ADDRESS_FLAG) .value_name("ETH1_ADDRESS") .help( @@ -128,10 +128,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { with the mnemonic-derived withdrawal public key in EIP-2334 format.", ) .conflicts_with(DISABLE_DEPOSITS_FLAG) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(GAS_LIMIT_FLAG) + Arg::new(GAS_LIMIT_FLAG) .long(GAS_LIMIT_FLAG) .value_name("UINT64") .help( @@ -139,10 +139,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { to leave this as the default value by not specifying this flag.", ) .required(false) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(FEE_RECIPIENT_FLAG) + Arg::new(FEE_RECIPIENT_FLAG) .long(FEE_RECIPIENT_FLAG) .value_name("ETH1_ADDRESS") .help( @@ -150,21 +150,21 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { fee recipient. Omit this flag to use the default value from the VC.", ) .required(false) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(BUILDER_PROPOSALS_FLAG) + Arg::new(BUILDER_PROPOSALS_FLAG) .long(BUILDER_PROPOSALS_FLAG) .help( "When provided, all created validators will attempt to create \ blocks via builder rather than the local EL.", ) .required(false) - .possible_values(&["true", "false"]) - .takes_value(true), + .value_parser(["true", "false"]) + .action(ArgAction::Set), ) .arg( - Arg::with_name(BEACON_NODE_FLAG) + Arg::new(BEACON_NODE_FLAG) .long(BEACON_NODE_FLAG) .value_name("HTTP_ADDRESS") .help( @@ -174,11 +174,11 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { prevent the same validator being created twice and therefore slashable \ conditions.", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(FORCE_BLS_WITHDRAWAL_CREDENTIALS) - .takes_value(false) + Arg::new(FORCE_BLS_WITHDRAWAL_CREDENTIALS) + .action(ArgAction::SetTrue) .long(FORCE_BLS_WITHDRAWAL_CREDENTIALS) .help( "If present, allows BLS withdrawal credentials rather than an execution \ @@ -186,9 +186,9 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(BUILDER_BOOST_FACTOR_FLAG) + Arg::new(BUILDER_BOOST_FACTOR_FLAG) .long(BUILDER_BOOST_FACTOR_FLAG) - .takes_value(true) + .action(ArgAction::Set) .value_name("UINT64") .required(false) .help( @@ -199,15 +199,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(PREFER_BUILDER_PROPOSALS_FLAG) + Arg::new(PREFER_BUILDER_PROPOSALS_FLAG) .long(PREFER_BUILDER_PROPOSALS_FLAG) .help( "If this flag is set, Lighthouse will always prefer blocks \ constructed by builders, regardless of payload value.", ) .required(false) - .possible_values(&["true", "false"]) - .takes_value(true), + .value_parser(["true", "false"]) + .action(ArgAction::Set), ) } @@ -242,10 +242,10 @@ impl CreateConfig { first_index: clap_utils::parse_required(matches, FIRST_INDEX_FLAG)?, count: clap_utils::parse_required(matches, COUNT_FLAG)?, mnemonic_path: clap_utils::parse_optional(matches, MNEMONIC_FLAG)?, - stdin_inputs: cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG), - disable_deposits: matches.is_present(DISABLE_DEPOSITS_FLAG), + stdin_inputs: cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG), + disable_deposits: matches.get_flag(DISABLE_DEPOSITS_FLAG), specify_voting_keystore_password: matches - .is_present(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG), + .get_flag(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG), eth1_withdrawal_address: clap_utils::parse_optional( matches, ETH1_WITHDRAWAL_ADDRESS_FLAG, @@ -259,7 +259,7 @@ impl CreateConfig { fee_recipient: clap_utils::parse_optional(matches, FEE_RECIPIENT_FLAG)?, gas_limit: clap_utils::parse_optional(matches, GAS_LIMIT_FLAG)?, bn_url: clap_utils::parse_optional(matches, BEACON_NODE_FLAG)?, - force_bls_withdrawal_credentials: matches.is_present(FORCE_BLS_WITHDRAWAL_CREDENTIALS), + force_bls_withdrawal_credentials: matches.get_flag(FORCE_BLS_WITHDRAWAL_CREDENTIALS), }) } } @@ -516,8 +516,8 @@ impl ValidatorsAndDeposits { } } -pub async fn cli_run<'a, T: EthSpec>( - matches: &'a ArgMatches<'a>, +pub async fn cli_run( + matches: &ArgMatches, spec: &ChainSpec, dump_config: DumpConfig, ) -> Result<(), String> { diff --git a/validator_manager/src/import_validators.rs b/validator_manager/src/import_validators.rs index 4b924189f20..e5bb7343785 100644 --- a/validator_manager/src/import_validators.rs +++ b/validator_manager/src/import_validators.rs @@ -1,6 +1,6 @@ use super::common::*; use crate::DumpConfig; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use eth2::{lighthouse_vc::std_types::ImportKeystoreStatus, SensitiveUrl}; use serde::{Deserialize, Serialize}; use std::fs; @@ -13,15 +13,15 @@ pub const VC_TOKEN_FLAG: &str = "vc-token"; pub const DETECTED_DUPLICATE_MESSAGE: &str = "Duplicate validator detected!"; -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about( "Uploads validators to a validator client using the HTTP API. The validators \ are defined in a JSON file which can be generated using the \"create-validators\" \ command.", ) .arg( - Arg::with_name(VALIDATORS_FILE_FLAG) + Arg::new(VALIDATORS_FILE_FLAG) .long(VALIDATORS_FILE_FLAG) .value_name("PATH_TO_JSON_FILE") .help( @@ -30,10 +30,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { \"validators.json\".", ) .required(true) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(VC_URL_FLAG) + Arg::new(VC_URL_FLAG) .long(VC_URL_FLAG) .value_name("HTTP_ADDRESS") .help( @@ -43,18 +43,18 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) .default_value("http://localhost:5062") .requires(VC_TOKEN_FLAG) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(VC_TOKEN_FLAG) + Arg::new(VC_TOKEN_FLAG) .long(VC_TOKEN_FLAG) .value_name("PATH") .help("The file containing a token required by the validator client.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(IGNORE_DUPLICATES_FLAG) - .takes_value(false) + Arg::new(IGNORE_DUPLICATES_FLAG) + .action(ArgAction::SetTrue) .long(IGNORE_DUPLICATES_FLAG) .help( "If present, ignore any validators which already exist on the VC. \ @@ -81,15 +81,12 @@ impl ImportConfig { validators_file_path: clap_utils::parse_required(matches, VALIDATORS_FILE_FLAG)?, vc_url: clap_utils::parse_required(matches, VC_URL_FLAG)?, vc_token_path: clap_utils::parse_required(matches, VC_TOKEN_FLAG)?, - ignore_duplicates: matches.is_present(IGNORE_DUPLICATES_FLAG), + ignore_duplicates: matches.get_flag(IGNORE_DUPLICATES_FLAG), }) } } -pub async fn cli_run<'a>( - matches: &'a ArgMatches<'a>, - dump_config: DumpConfig, -) -> Result<(), String> { +pub async fn cli_run(matches: &ArgMatches, dump_config: DumpConfig) -> Result<(), String> { let config = ImportConfig::from_cli(matches)?; if dump_config.should_exit_early(&config)? { Ok(()) diff --git a/validator_manager/src/lib.rs b/validator_manager/src/lib.rs index 6889ee79d2c..4c4f5a3ebc4 100644 --- a/validator_manager/src/lib.rs +++ b/validator_manager/src/lib.rs @@ -1,5 +1,4 @@ -use clap::App; -use clap::ArgMatches; +use clap::{ArgMatches, Command}; use common::write_to_json_file; use environment::Environment; use serde::Serialize; @@ -38,9 +37,9 @@ impl DumpConfig { } } -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) - .visible_aliases(&["vm", "validator-manager", CMD]) +pub fn cli_app() -> Command { + Command::new(CMD) + .visible_aliases(["vm", "validator-manager", CMD]) .about("Utilities for managing a Lighthouse validator client via the HTTP API.") .subcommand(create_validators::cli_app()) .subcommand(import_validators::cli_app()) @@ -48,7 +47,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { } /// Run the account manager, returning an error if the operation did not succeed. -pub fn run<'a, T: EthSpec>(matches: &'a ArgMatches<'a>, env: Environment) -> Result<(), String> { +pub fn run(matches: &ArgMatches, env: Environment) -> Result<(), String> { let context = env.core_context(); let spec = context.eth2_config.spec; let dump_config = clap_utils::parse_optional(matches, DUMP_CONFIGS_FLAG)? @@ -63,20 +62,20 @@ pub fn run<'a, T: EthSpec>(matches: &'a ArgMatches<'a>, env: Environment) -> .block_on_dangerous( async { match matches.subcommand() { - (create_validators::CMD, Some(matches)) => { + Some((create_validators::CMD, matches)) => { create_validators::cli_run::(matches, &spec, dump_config).await } - (import_validators::CMD, Some(matches)) => { + Some((import_validators::CMD, matches)) => { import_validators::cli_run(matches, dump_config).await } - (move_validators::CMD, Some(matches)) => { + Some((move_validators::CMD, matches)) => { move_validators::cli_run(matches, dump_config).await } - ("", _) => Err("No command supplied. See --help.".to_string()), - (unknown, _) => Err(format!( + Some((unknown, _)) => Err(format!( "{} is not a valid {} command. See --help.", unknown, CMD )), + _ => Err("No command supplied. See --help.".to_string()), } }, "validator_manager", diff --git a/validator_manager/src/move_validators.rs b/validator_manager/src/move_validators.rs index 5826f2756be..db94ec5c94b 100644 --- a/validator_manager/src/move_validators.rs +++ b/validator_manager/src/move_validators.rs @@ -1,7 +1,7 @@ use super::common::*; use crate::DumpConfig; use account_utils::{read_password_from_user, ZeroizeString}; -use clap::{App, Arg, ArgMatches}; +use clap::{Arg, ArgAction, ArgMatches, Command}; use eth2::{ lighthouse_vc::{ std_types::{ @@ -66,8 +66,8 @@ impl PasswordSource { } } -pub fn cli_app<'a, 'b>() -> App<'a, 'b> { - App::new(CMD) +pub fn cli_app() -> Command { + Command::new(CMD) .about( "Uploads validators to a validator client using the HTTP API. The validators \ are defined in a JSON file which can be generated using the \"create-validators\" \ @@ -75,7 +75,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { file system (i.e., not Web3Signer validators).", ) .arg( - Arg::with_name(SRC_VC_URL_FLAG) + Arg::new(SRC_VC_URL_FLAG) .long(SRC_VC_URL_FLAG) .value_name("HTTP_ADDRESS") .help( @@ -85,17 +85,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) .required(true) .requires(SRC_VC_TOKEN_FLAG) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(SRC_VC_TOKEN_FLAG) + Arg::new(SRC_VC_TOKEN_FLAG) .long(SRC_VC_TOKEN_FLAG) .value_name("PATH") .help("The file containing a token required by the source validator client.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(DEST_VC_URL_FLAG) + Arg::new(DEST_VC_URL_FLAG) .long(DEST_VC_URL_FLAG) .value_name("HTTP_ADDRESS") .help( @@ -105,35 +105,35 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ) .required(true) .requires(DEST_VC_TOKEN_FLAG) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(DEST_VC_TOKEN_FLAG) + Arg::new(DEST_VC_TOKEN_FLAG) .long(DEST_VC_TOKEN_FLAG) .value_name("PATH") .help("The file containing a token required by the destination validator client.") - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(VALIDATORS_FLAG) + Arg::new(VALIDATORS_FLAG) .long(VALIDATORS_FLAG) .value_name("STRING") .help( "The validators to be moved. Either a list of 0x-prefixed \ validator pubkeys or the keyword \"all\".", ) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(COUNT_FLAG) + Arg::new(COUNT_FLAG) .long(COUNT_FLAG) .value_name("VALIDATOR_COUNT") .help("The number of validators to move.") .conflicts_with(VALIDATORS_FLAG) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(GAS_LIMIT_FLAG) + Arg::new(GAS_LIMIT_FLAG) .long(GAS_LIMIT_FLAG) .value_name("UINT64") .help( @@ -141,10 +141,10 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { to leave this as the default value by not specifying this flag.", ) .required(false) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(FEE_RECIPIENT_FLAG) + Arg::new(FEE_RECIPIENT_FLAG) .long(FEE_RECIPIENT_FLAG) .value_name("ETH1_ADDRESS") .help( @@ -152,30 +152,30 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { fee recipient. Omit this flag to use the default value from the VC.", ) .required(false) - .takes_value(true), + .action(ArgAction::Set), ) .arg( - Arg::with_name(BUILDER_PROPOSALS_FLAG) + Arg::new(BUILDER_PROPOSALS_FLAG) .long(BUILDER_PROPOSALS_FLAG) .help( "When provided, all created validators will attempt to create \ blocks via builder rather than the local EL.", ) .required(false) - .possible_values(&["true", "false"]) - .takes_value(true), + .value_parser(["true", "false"]) + .action(ArgAction::Set), ) .arg( - Arg::with_name(STDIN_INPUTS_FLAG) - .takes_value(false) - .hidden(cfg!(windows)) + Arg::new(STDIN_INPUTS_FLAG) + .action(ArgAction::SetTrue) + .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty."), ) .arg( - Arg::with_name(BUILDER_BOOST_FACTOR_FLAG) + Arg::new(BUILDER_BOOST_FACTOR_FLAG) .long(BUILDER_BOOST_FACTOR_FLAG) - .takes_value(true) + .action(ArgAction::Set) .value_name("UINT64") .required(false) .help( @@ -186,15 +186,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { ), ) .arg( - Arg::with_name(PREFER_BUILDER_PROPOSALS_FLAG) + Arg::new(PREFER_BUILDER_PROPOSALS_FLAG) .long(PREFER_BUILDER_PROPOSALS_FLAG) .help( "If this flag is set, Lighthouse will always prefer blocks \ constructed by builders, regardless of payload value.", ) .required(false) - .possible_values(&["true", "false"]) - .takes_value(true), + .value_parser(["true", "false"]) + .action(ArgAction::Set), ) } @@ -223,10 +223,10 @@ pub struct MoveConfig { impl MoveConfig { fn from_cli(matches: &ArgMatches) -> Result { let count_flag = clap_utils::parse_optional(matches, COUNT_FLAG)?; - let validators_flag = matches.value_of(VALIDATORS_FLAG); + let validators_flag = matches.get_one::(VALIDATORS_FLAG); let validators = match (count_flag, validators_flag) { (Some(count), None) => Validators::Count(count), - (None, Some(string)) => match string { + (None, Some(string)) => match string.as_str() { "all" => Validators::All, pubkeys => pubkeys .split(',') @@ -257,16 +257,13 @@ impl MoveConfig { fee_recipient: clap_utils::parse_optional(matches, FEE_RECIPIENT_FLAG)?, gas_limit: clap_utils::parse_optional(matches, GAS_LIMIT_FLAG)?, password_source: PasswordSource::Interactive { - stdin_inputs: cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG), + stdin_inputs: cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG), }, }) } } -pub async fn cli_run<'a>( - matches: &'a ArgMatches<'a>, - dump_config: DumpConfig, -) -> Result<(), String> { +pub async fn cli_run(matches: &ArgMatches, dump_config: DumpConfig) -> Result<(), String> { let config = MoveConfig::from_cli(matches)?; if dump_config.should_exit_early(&config)? { Ok(()) diff --git a/watch/Cargo.toml b/watch/Cargo.toml index aaaf50aa40a..e12f5cd7814 100644 --- a/watch/Cargo.toml +++ b/watch/Cargo.toml @@ -15,6 +15,7 @@ path = "src/main.rs" [dependencies] clap = { workspace = true } +clap_utils = { workspace = true } log = { workspace = true } env_logger = { workspace = true } types = { workspace = true } diff --git a/watch/src/cli.rs b/watch/src/cli.rs index 97dc2172933..b7179efe5d4 100644 --- a/watch/src/cli.rs +++ b/watch/src/cli.rs @@ -1,28 +1,29 @@ use crate::{config::Config, logger, server, updater}; -use clap::{App, Arg}; +use clap::{Arg, ArgAction, Command}; +use clap_utils::get_color_style; pub const SERVE: &str = "serve"; pub const RUN_UPDATER: &str = "run-updater"; pub const CONFIG: &str = "config"; -fn run_updater<'a, 'b>() -> App<'a, 'b> { - App::new(RUN_UPDATER).setting(clap::AppSettings::ColoredHelp) +fn run_updater() -> Command { + Command::new(RUN_UPDATER).styles(get_color_style()) } -fn serve<'a, 'b>() -> App<'a, 'b> { - App::new(SERVE).setting(clap::AppSettings::ColoredHelp) +fn serve() -> Command { + Command::new(SERVE).styles(get_color_style()) } -pub fn app<'a, 'b>() -> App<'a, 'b> { - App::new("beacon_watch_daemon") +pub fn app() -> Command { + Command::new("beacon_watch_daemon") .author("Sigma Prime ") - .setting(clap::AppSettings::ColoredHelp) + .styles(get_color_style()) .arg( - Arg::with_name(CONFIG) + Arg::new(CONFIG) .long(CONFIG) .value_name("PATH_TO_CONFIG") .help("Path to configuration file") - .takes_value(true) + .action(ArgAction::Set) .global(true), ) .subcommand(run_updater()) @@ -32,7 +33,7 @@ pub fn app<'a, 'b>() -> App<'a, 'b> { pub async fn run() -> Result<(), String> { let matches = app().get_matches(); - let config = match matches.value_of(CONFIG) { + let config = match matches.get_one::(CONFIG) { Some(path) => Config::load_from_file(path.to_string())?, None => Config::default(), }; @@ -40,10 +41,10 @@ pub async fn run() -> Result<(), String> { logger::init_logger(&config.log_level); match matches.subcommand() { - (RUN_UPDATER, Some(_)) => updater::run_updater(config) + Some((RUN_UPDATER, _)) => updater::run_updater(config) .await .map_err(|e| format!("Failure: {:?}", e)), - (SERVE, Some(_)) => server::serve(config) + Some((SERVE, _)) => server::serve(config) .await .map_err(|e| format!("Failure: {:?}", e)), _ => Err("Unsupported subcommand. See --help".into()), From 1de4880bfd392d133711d4b791cd650e8f810c60 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 22 Feb 2024 09:14:20 +0200 Subject: [PATCH 02/46] cli fixes --- account_manager/src/validator/create.rs | 3 +- account_manager/src/validator/recover.rs | 3 +- account_manager/src/wallet/create.rs | 13 ++++---- beacon_node/src/cli.rs | 6 ++-- beacon_node/src/config.rs | 5 +-- common/clap_utils/src/lib.rs | 3 +- lighthouse/tests/beacon_node.rs | 1 - lighthouse/tests/validator_client.rs | 13 +++++--- lighthouse/tests/validator_manager.rs | 37 ++++++++++++---------- validator_client/src/cli.rs | 4 +-- validator_client/src/config.rs | 3 +- validator_manager/src/create_validators.rs | 14 ++++++-- 12 files changed, 64 insertions(+), 41 deletions(-) diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index ef6e97ac314..cbdace8cb76 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -82,7 +82,8 @@ pub fn cli_app() -> Command { "If present, the withdrawal keystore will be stored alongside the voting \ keypair. It is generally recommended to *not* store the withdrawal key and \ instead generate them from the wallet seed when required.", - ), + ) + .action(ArgAction::SetTrue) ) .arg( Arg::new(COUNT_FLAG) diff --git a/account_manager/src/validator/recover.rs b/account_manager/src/validator/recover.rs index 9a0aab742f5..cc3359dc775 100644 --- a/account_manager/src/validator/recover.rs +++ b/account_manager/src/validator/recover.rs @@ -66,7 +66,8 @@ pub fn cli_app() -> Command { "If present, the withdrawal keystore will be stored alongside the voting \ keypair. It is generally recommended to *not* store the withdrawal key and \ instead generate them from the wallet seed when required.", - ), + ) + .action(ArgAction::SetTrue) ) .arg( Arg::new(STDIN_INPUTS_FLAG) diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs index 1b771b31ae4..deab21b96f7 100644 --- a/account_manager/src/wallet/create.rs +++ b/account_manager/src/wallet/create.rs @@ -92,12 +92,13 @@ pub fn cli_app() -> Command { .value_name("MNEMONIC_LENGTH") .help("The number of words to use for the mnemonic phrase.") .action(ArgAction::Set) - .value_parser(|len: &str| { - match len.parse::().ok().and_then(|words| MnemonicType::for_word_count(words).ok()) { - Some(_) => Ok(()), - None => Err(format!("Mnemonic length must be one of {}", MNEMONIC_TYPES.iter().map(|t| t.word_count().to_string()).collect::>().join(", "))), - } - }) + // TODO + // .value_parser(|len: &str| { + // match len.parse::().ok().and_then(|words| MnemonicType::for_word_count(words).ok()) { + // Some(_) => Ok(()), + // None => Err(format!("Mnemonic length must be one of {}", MNEMONIC_TYPES.iter().map(|t| t.word_count().to_string()).collect::>().join(", "))), + // } + // }) .default_value("24"), ) } diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 5efb8051278..81b7772a7d7 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -320,8 +320,10 @@ pub fn cli_app() -> Command { present in the configuration, the quotas used for the inbound rate limiter will be \ used." ) - .action(ArgAction::Set) - // .min_values(0) + .default_missing_value("true") + .require_equals(false) + // TODO this is dangerous without requires_equals = true + .num_args(0..1) .hide(true) ) .arg( diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 7aa82d04b32..fd94d54c3fa 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -1398,9 +1398,10 @@ pub fn set_network_config( // The self limiter is disabled by default. // This flag can be used both with or without a value. Try to parse it first with a value, if // no value is defined but the flag is present, use the default params. - config.outbound_rate_limiter_config = clap_utils::parse_optional(cli_args, "self-limiter")?; - if cli_args.contains_id("self-limiter") && config.outbound_rate_limiter_config.is_none() { + if cli_args.try_get_one::("self_limiter").is_ok() { config.outbound_rate_limiter_config = Some(Default::default()); + } else { + config.outbound_rate_limiter_config = clap_utils::parse_optional(cli_args, "self-limiter")?; } // Proposer-only mode overrides a number of previous configuration parameters. diff --git a/common/clap_utils/src/lib.rs b/common/clap_utils/src/lib.rs index 66b79e7e54d..cb79321bd5f 100644 --- a/common/clap_utils/src/lib.rs +++ b/common/clap_utils/src/lib.rs @@ -123,7 +123,8 @@ where ::Err: std::fmt::Display, { matches - .get_one::(name) + .try_get_one::(name) + .map_err(|e| format!("Unable to parse {}: {}", name, e))? .map(|val| { val.parse() .map_err(|e| format!("Unable to parse {}: {}", name, e)) diff --git a/lighthouse/tests/beacon_node.rs b/lighthouse/tests/beacon_node.rs index ece52627a00..7dee80cedea 100644 --- a/lighthouse/tests/beacon_node.rs +++ b/lighthouse/tests/beacon_node.rs @@ -2084,7 +2084,6 @@ fn slasher_broadcast_flag_no_args() { CommandLineTest::new() .flag("slasher", None) .flag("slasher-max-db-size", Some("1")) - .flag("slasher-broadcast", None) .run_with_zero_port() .with_config(|config| { let slasher_config = config diff --git a/lighthouse/tests/validator_client.rs b/lighthouse/tests/validator_client.rs index 764fd87ccdf..a929c8cd7d0 100644 --- a/lighthouse/tests/validator_client.rs +++ b/lighthouse/tests/validator_client.rs @@ -593,9 +593,6 @@ fn wrong_broadcast_flag() { #[test] fn latency_measurement_service() { - CommandLineTest::new().run().with_config(|config| { - assert!(config.enable_latency_measurement_service); - }); CommandLineTest::new() .flag("latency-measurement-service", None) .run() @@ -603,13 +600,19 @@ fn latency_measurement_service() { assert!(config.enable_latency_measurement_service); }); CommandLineTest::new() - .flag("latency-measurement-service", Some("true")) + .flag("latency-measurement-service", None) + .run() + .with_config(|config| { + assert!(config.enable_latency_measurement_service); + }); + CommandLineTest::new() + .flag("latency-measurement-service", None) .run() .with_config(|config| { assert!(config.enable_latency_measurement_service); }); CommandLineTest::new() - .flag("latency-measurement-service", Some("false")) + // .flag("latency-measurement-service", Some("false")) .run() .with_config(|config| { assert!(!config.enable_latency_measurement_service); diff --git a/lighthouse/tests/validator_manager.rs b/lighthouse/tests/validator_manager.rs index cc5bd293b38..bca6a18ab56 100644 --- a/lighthouse/tests/validator_manager.rs +++ b/lighthouse/tests/validator_manager.rs @@ -55,7 +55,12 @@ impl CommandLineTest { } fn run(mut cmd: Command, should_succeed: bool) { - let output = cmd.output().expect("process should complete"); + let output = cmd + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .output() + .expect("process should complete"); if output.status.success() != should_succeed { let stdout = String::from_utf8(output.stdout).unwrap(); let stderr = String::from_utf8(output.stderr).unwrap(); @@ -136,21 +141,21 @@ pub fn validator_create_defaults() { #[test] pub fn validator_create_misc_flags() { CommandLineTest::validators_create() - .flag("output-path", Some("./meow")) - .flag("deposit-gwei", Some("42")) - .flag("first-index", Some("12")) - .flag("count", Some("9")) - .flag("mnemonic-path", Some("./woof")) - .flag("stdin-inputs", None) - .flag("specify-voting-keystore-password", None) - .flag("eth1-withdrawal-address", Some(EXAMPLE_ETH1_ADDRESS)) - .flag("builder-proposals", Some("true")) - .flag("prefer-builder-proposals", Some("true")) - .flag("builder-boost-factor", Some("150")) - .flag("suggested-fee-recipient", Some(EXAMPLE_ETH1_ADDRESS)) - .flag("gas-limit", Some("1337")) - .flag("beacon-node", Some("http://localhost:1001")) - .flag("force-bls-withdrawal-credentials", None) + .flag("--output-path", Some("./meow")) + .flag("--deposit-gwei", Some("42")) + .flag("--first-index", Some("12")) + .flag("--count", Some("9")) + .flag("--mnemonic-path", Some("./woof")) + .flag("--stdin-inputs", None) + .flag("--specify-voting-keystore-password", None) + .flag("--eth1-withdrawal-address", Some(EXAMPLE_ETH1_ADDRESS)) + .flag("--builder-proposals", Some("true")) + .flag("--prefer-builder-proposals", Some("true")) + .flag("--builder-boost-factor", Some("150")) + .flag("--suggested-fee-recipient", Some(EXAMPLE_ETH1_ADDRESS)) + .flag("--gas-limit", Some("1337")) + .flag("--beacon-node", Some("http://localhost:1001")) + .flag("--force-bls-withdrawal-credentials", None) .assert_success(|config| { let expected = CreateConfig { output_path: PathBuf::from("./meow"), diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index e0bf5595c29..86ec520a00e 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -342,13 +342,13 @@ pub fn cli_app() -> Command { .requires("builder-proposals"), ) .arg( + // TODO take note here Arg::new("latency-measurement-service") .long("latency-measurement-service") .value_name("BOOLEAN") .help("Set to 'true' to enable a service that periodically attempts to measure latency to BNs. \ Set to 'false' to disable.") - .default_value("true") - .action(ArgAction::Set), + .action(ArgAction::SetTrue), ) .arg( Arg::new("validator-registration-batch-size") diff --git a/validator_client/src/config.rs b/validator_client/src/config.rs index 2cfe1b2c8d5..66399371dd5 100644 --- a/validator_client/src/config.rs +++ b/validator_client/src/config.rs @@ -408,8 +408,7 @@ impl Config { config.builder_boost_factor = parse_optional(cli_args, "builder-boost-factor")?; - config.enable_latency_measurement_service = - parse_optional(cli_args, "latency-measurement-service")?.unwrap_or(true); + config.enable_latency_measurement_service = cli_args.get_flag("latency-measurement-service"); config.validator_registration_batch_size = parse_required(cli_args, "validator-registration-batch-size")?; diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index e215986cd5c..b11099e8133 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -105,7 +105,8 @@ pub fn cli_app() -> Command { commonly used for submitting validator deposits via a web UI. \ Using this flag will save several seconds per validator if the \ user has an alternate strategy for submitting deposits.", - ), + ) + .action(ArgAction::SetTrue) ) .arg( Arg::new(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG) @@ -116,7 +117,8 @@ pub fn cli_app() -> Command { flag is not provided, a random password will be used. It is not \ necessary to keep backups of voting keystore passwords if the \ mnemonic is safely backed up.", - ), + ) + .action(ArgAction::SetTrue) ) .arg( Arg::new(ETH1_WITHDRAWAL_ADDRESS_FLAG) @@ -209,6 +211,14 @@ pub fn cli_app() -> Command { .value_parser(["true", "false"]) .action(ArgAction::Set), ) + .arg( + Arg::new("dump-config") + .long("dump-config") + .hide(true) + .help("Dumps the config to a desired location. Used for testing only.") + .action(ArgAction::Set) + .global(true) + ) } /// The CLI arguments are parsed into this struct before running the application. This step of From e05b856e8f6b9cf936cea61269792d87c2107590 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Sat, 24 Feb 2024 09:33:28 +0200 Subject: [PATCH 03/46] value parser for mnemonic --- account_manager/src/wallet/create.rs | 26 ++++++++++++++++------ beacon_node/src/config.rs | 7 ++---- lighthouse/src/main.rs | 2 +- testing/simulator/src/eth1_sim.rs | 4 +--- validator_client/src/config.rs | 3 ++- validator_manager/src/create_validators.rs | 6 ++--- 6 files changed, 28 insertions(+), 20 deletions(-) diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs index deab21b96f7..e90bb61fcdb 100644 --- a/account_manager/src/wallet/create.rs +++ b/account_manager/src/wallet/create.rs @@ -92,17 +92,29 @@ pub fn cli_app() -> Command { .value_name("MNEMONIC_LENGTH") .help("The number of words to use for the mnemonic phrase.") .action(ArgAction::Set) - // TODO - // .value_parser(|len: &str| { - // match len.parse::().ok().and_then(|words| MnemonicType::for_word_count(words).ok()) { - // Some(_) => Ok(()), - // None => Err(format!("Mnemonic length must be one of {}", MNEMONIC_TYPES.iter().map(|t| t.word_count().to_string()).collect::>().join(", "))), - // } - // }) + .value_parser(check_mnemonic_length) .default_value("24"), ) } +fn check_mnemonic_length(len: &str) -> Result { + match len + .parse::() + .ok() + .and_then(|words| MnemonicType::for_word_count(words).ok()) + { + Some(_) => Ok(len.to_string()), + None => Err(format!( + "Mnemonic length must be one of {}", + MNEMONIC_TYPES + .iter() + .map(|t| t.word_count().to_string()) + .collect::>() + .join(", ") + )), + } +} + pub fn cli_run(matches: &ArgMatches, wallet_base_dir: PathBuf) -> Result<(), String> { let mnemonic_output_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?; diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index fd94d54c3fa..6711a780cb9 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -797,8 +797,7 @@ pub fn get_config( client_config.chain.fork_choice_before_proposal_timeout_ms = timeout; } - client_config.chain.always_reset_payload_statuses = - cli_args.get_flag("reset-payload-statuses"); + client_config.chain.always_reset_payload_statuses = cli_args.get_flag("reset-payload-statuses"); client_config.chain.paranoid_block_proposal = cli_args.get_flag("paranoid-block-proposal"); @@ -959,7 +958,6 @@ pub fn parse_listening_addresses( format!("Failed to parse --quic6-port as an integer: {parse_error}") })?; - // Now put everything together let listening_addresses = match (maybe_ipv4, maybe_ipv6) { (None, None) => { @@ -1057,7 +1055,6 @@ pub fn parse_listening_addresses( ipv4_tcp_port + 1 }); - // Defaults to 9090 when required let ipv6_tcp_port = use_zero_ports .then(unused_port::unused_tcp6_port) @@ -1428,7 +1425,7 @@ pub fn set_network_config( if config_str.as_str() == "disabled" { None } else { - Some(config_str.parse()?) + Some(config_str.parse()?) } // Enabled with a custom configuration // Some(config_str.parse()?) diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index 1ddb233b216..3e1bb1c9da0 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -28,7 +28,7 @@ lazy_static! { Allocator: {}\n\ Profile: {}\n\ Specs: mainnet (true), minimal ({}), gnosis ({})", - SHORT_VERSION.as_str(), + SHORT_VERSION.as_str(), bls_library_name(), have_sha_extensions(), allocator_name(), diff --git a/testing/simulator/src/eth1_sim.rs b/testing/simulator/src/eth1_sim.rs index 3db3e39d944..1c2df14ef2d 100644 --- a/testing/simulator/src/eth1_sim.rs +++ b/testing/simulator/src/eth1_sim.rs @@ -32,9 +32,7 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> { let node_count = *matches .get_one::("nodes") .expect("missing nodes default"); - let proposer_nodes = *matches - .get_one::("proposer-nodes") - .unwrap_or(&0); + let proposer_nodes = *matches.get_one::("proposer-nodes").unwrap_or(&0); println!("PROPOSER-NODES: {}", proposer_nodes); let validators_per_node = *matches .get_one::("validators_per_node") diff --git a/validator_client/src/config.rs b/validator_client/src/config.rs index 66399371dd5..3c602da9030 100644 --- a/validator_client/src/config.rs +++ b/validator_client/src/config.rs @@ -408,7 +408,8 @@ impl Config { config.builder_boost_factor = parse_optional(cli_args, "builder-boost-factor")?; - config.enable_latency_measurement_service = cli_args.get_flag("latency-measurement-service"); + config.enable_latency_measurement_service = + cli_args.get_flag("latency-measurement-service"); config.validator_registration_batch_size = parse_required(cli_args, "validator-registration-batch-size")?; diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index b11099e8133..5ef9646aa45 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -106,7 +106,7 @@ pub fn cli_app() -> Command { Using this flag will save several seconds per validator if the \ user has an alternate strategy for submitting deposits.", ) - .action(ArgAction::SetTrue) + .action(ArgAction::SetTrue), ) .arg( Arg::new(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG) @@ -118,7 +118,7 @@ pub fn cli_app() -> Command { necessary to keep backups of voting keystore passwords if the \ mnemonic is safely backed up.", ) - .action(ArgAction::SetTrue) + .action(ArgAction::SetTrue), ) .arg( Arg::new(ETH1_WITHDRAWAL_ADDRESS_FLAG) @@ -217,7 +217,7 @@ pub fn cli_app() -> Command { .hide(true) .help("Dumps the config to a desired location. Used for testing only.") .action(ArgAction::Set) - .global(true) + .global(true), ) } From c3d6edec116b1bd54e147dc34571abc7cc7895c5 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 12 Mar 2024 17:31:58 +0200 Subject: [PATCH 04/46] merge unstable --- beacon_node/src/cli.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 1e3ceba5636..fb7240f378c 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -632,11 +632,11 @@ pub fn cli_app() -> Command { .action(ArgAction::Set) ) .arg( - Arg::with_name("state-cache-size") + Arg::new("state-cache-size") .long("state-cache-size") .value_name("STATE_CACHE_SIZE") .help("Specifies the size of the snapshot cache [default: 3]") - .takes_value(true) + .action(ArgAction::Set) ) /* * Execution Layer Integration From acc8c6d8c4f879cc98680c9450d24caaa8027c3a Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 12 Mar 2024 20:02:12 +0200 Subject: [PATCH 05/46] default --format val --- lcli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcli/src/main.rs b/lcli/src/main.rs index e9d6eaa22b2..b733ae8d003 100644 --- a/lcli/src/main.rs +++ b/lcli/src/main.rs @@ -222,7 +222,7 @@ fn main() { .long("format") .value_name("FORMAT") .action(ArgAction::Set) - .required(true) + .required(false) .default_value("json") .value_parser(["json", "yaml"]) .help("Output format to use") From 1f45d1f8e2df712200d5eecd0b36c46c248f5d93 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Wed, 13 Mar 2024 15:24:33 +0200 Subject: [PATCH 06/46] fix eth sim --- testing/simulator/src/eth1_sim.rs | 18 ++++++++++++------ testing/simulator/src/no_eth1_sim.rs | 14 ++++++++++---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/testing/simulator/src/eth1_sim.rs b/testing/simulator/src/eth1_sim.rs index 1c2df14ef2d..295d98bfa9e 100644 --- a/testing/simulator/src/eth1_sim.rs +++ b/testing/simulator/src/eth1_sim.rs @@ -29,16 +29,22 @@ const SUGGESTED_FEE_RECIPIENT: [u8; 20] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> { - let node_count = *matches - .get_one::("nodes") + let node_count = matches + .get_one::("nodes") + .expect("missing nodes default") + .parse::() .expect("missing nodes default"); let proposer_nodes = *matches.get_one::("proposer-nodes").unwrap_or(&0); println!("PROPOSER-NODES: {}", proposer_nodes); - let validators_per_node = *matches - .get_one::("validators_per_node") + let validators_per_node = matches + .get_one::("validators_per_node") + .expect("missing validators_per_node default") + .parse::() .expect("missing validators_per_node default"); - let speed_up_factor = *matches - .get_one::("speed_up_factor") + let speed_up_factor = matches + .get_one::("speed_up_factor") + .expect("missing speed_up_factor default") + .parse::() .expect("missing speed_up_factor default"); let continue_after_checks = matches.get_flag("continue_after_checks"); let post_merge_sim = matches.get_flag("post-merge"); diff --git a/testing/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs index bf36de6b7e0..b8f6b2254ee 100644 --- a/testing/simulator/src/no_eth1_sim.rs +++ b/testing/simulator/src/no_eth1_sim.rs @@ -14,13 +14,19 @@ use types::{Epoch, EthSpec, MainnetEthSpec}; pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { let node_count = matches - .get_one::("nodes") + .get_one::("nodes") + .expect("missing nodes default") + .parse::() .expect("missing nodes default"); let validators_per_node = matches - .get_one::("validators_per_node") + .get_one::("validators_per_node") + .expect("missing validators_per_node default") + .parse::() .expect("missing validators_per_node default"); let speed_up_factor = matches - .get_one::("speed_up_factor") + .get_one::("speed_up_factor") + .expect("missing speed_up_factor default") + .parse::() .expect("missing speed_up_factor default"); let continue_after_checks = matches.get_flag("continue_after_checks"); @@ -30,7 +36,7 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { println!(" continue_after_checks:{}", continue_after_checks); // Generate the directories and keystores required for the validator clients. - let validator_files = (0..*node_count) + let validator_files = (0..node_count) .into_par_iter() .map(|i| { println!( From f4447b7856dcc5c13ea5c7127fb037c36581bd2d Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Wed, 13 Mar 2024 15:42:14 +0200 Subject: [PATCH 07/46] fix eth sim --- testing/simulator/src/eth1_sim.rs | 6 +++++- testing/simulator/src/sync_sim.rs | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/testing/simulator/src/eth1_sim.rs b/testing/simulator/src/eth1_sim.rs index 295d98bfa9e..112c9cad9b1 100644 --- a/testing/simulator/src/eth1_sim.rs +++ b/testing/simulator/src/eth1_sim.rs @@ -34,7 +34,11 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> { .expect("missing nodes default") .parse::() .expect("missing nodes default"); - let proposer_nodes = *matches.get_one::("proposer-nodes").unwrap_or(&0); + let proposer_nodes = matches + .get_one::("proposer-nodes") + .unwrap_or(&String::from("0")) + .parse::() + .unwrap_or(0); println!("PROPOSER-NODES: {}", proposer_nodes); let validators_per_node = matches .get_one::("validators_per_node") diff --git a/testing/simulator/src/sync_sim.rs b/testing/simulator/src/sync_sim.rs index 58ee0a97ac1..3b40491e291 100644 --- a/testing/simulator/src/sync_sim.rs +++ b/testing/simulator/src/sync_sim.rs @@ -13,9 +13,21 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; use types::{Epoch, EthSpec}; pub fn run_syncing_sim(matches: &ArgMatches) -> Result<(), String> { - let initial_delay = *matches.get_one::("initial_delay").unwrap(); - let sync_timeout = *matches.get_one::("sync_timeout").unwrap(); - let speed_up_factor = *matches.get_one::("speedup").unwrap(); + let initial_delay = matches + .get_one::("initial_delay") + .unwrap() + .parse::() + .unwrap(); + let sync_timeout = matches + .get_one::("sync_timeout") + .unwrap() + .parse::() + .unwrap(); + let speed_up_factor = matches + .get_one::("speedup") + .unwrap() + .parse::() + .unwrap(); let strategy = matches.get_one::("strategy").unwrap().clone(); println!("Syncing Simulator:"); From d00855eb8ad99e72afb0880faa9c064345fea88d Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Wed, 3 Apr 2024 02:12:02 +0300 Subject: [PATCH 08/46] resolve beta compiler issue --- beacon_node/src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index e8237f4d76a..c88530636b4 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1,5 +1,5 @@ use clap::{builder::ArgPredicate, Arg, ArgAction, ArgGroup, Command}; -use clap_utils::{self, get_color_style}; +use clap_utils::get_color_style; use strum::VariantNames; use types::ProgressiveBalancesMode; From 7b558bdf6f60da04253bb8ad793a95e0455dc677 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Wed, 3 Apr 2024 15:02:58 +0300 Subject: [PATCH 09/46] add num args, version --- Cargo.toml | 2 +- account_manager/src/wallet/create.rs | 36 +++++++++++++--------------- beacon_node/src/cli.rs | 8 +++---- beacon_node/src/config.rs | 3 +-- boot_node/src/cli.rs | 7 +++--- testing/simulator/src/cli.rs | 4 ++-- 6 files changed, 28 insertions(+), 32 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f9f5801c497..e308714eb47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,7 @@ bincode = "1" bitvec = "1" byteorder = "1" bytes = "1" -clap = "4.5.1" +clap = { version = "4.5.1", features = ["cargo"] } compare_fields_derive = { path = "common/compare_fields_derive" } criterion = "0.3" delay_map = "0.3" diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs index e90bb61fcdb..7d7d9720424 100644 --- a/account_manager/src/wallet/create.rs +++ b/account_manager/src/wallet/create.rs @@ -92,29 +92,27 @@ pub fn cli_app() -> Command { .value_name("MNEMONIC_LENGTH") .help("The number of words to use for the mnemonic phrase.") .action(ArgAction::Set) - .value_parser(check_mnemonic_length) + .value_parser(|len: &str| { + match len + .parse::() + .ok() + .and_then(|words| MnemonicType::for_word_count(words).ok()) + { + Some(_) => Ok(len.to_string()), + None => Err(format!( + "Mnemonic length must be one of {}", + MNEMONIC_TYPES + .iter() + .map(|t| t.word_count().to_string()) + .collect::>() + .join(", ") + )), + } + }) .default_value("24"), ) } -fn check_mnemonic_length(len: &str) -> Result { - match len - .parse::() - .ok() - .and_then(|words| MnemonicType::for_word_count(words).ok()) - { - Some(_) => Ok(len.to_string()), - None => Err(format!( - "Mnemonic length must be one of {}", - MNEMONIC_TYPES - .iter() - .map(|t| t.word_count().to_string()) - .collect::>() - .join(", ") - )), - } -} - pub fn cli_run(matches: &ArgMatches, wallet_base_dir: PathBuf) -> Result<(), String> { let mnemonic_output_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?; diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index c88530636b4..a0694f02d04 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1,4 +1,4 @@ -use clap::{builder::ArgPredicate, Arg, ArgAction, ArgGroup, Command}; +use clap::{builder::ArgPredicate, Arg, ArgAction, ArgGroup, Command, crate_version}; use clap_utils::get_color_style; use strum::VariantNames; use types::ProgressiveBalancesMode; @@ -6,7 +6,7 @@ use types::ProgressiveBalancesMode; pub fn cli_app() -> Command { Command::new("beacon_node") .visible_aliases(["b", "bn", "beacon"]) - //.version(crate_version!()) + .version(crate_version!()) .author("Sigma Prime ") .styles(get_color_style()) .about("The primary component which connects to the Ethereum 2.0 P2P network and \ @@ -90,7 +90,7 @@ pub fn cli_app() -> Command { IPv4 and IPv6. The order of the given addresses is not relevant. However, \ multiple IPv4, or multiple IPv6 addresses will not be accepted.") .action(ArgAction::Append) - // .max_values(2) + .num_args(0..=2) .default_value("0.0.0.0") ) .arg( @@ -239,7 +239,7 @@ pub fn cli_app() -> Command { local node on this address. This will update the `ip4` or `ip6` ENR fields \ accordingly. To update both, set this flag twice with the different values.") .action(ArgAction::Append) - // .max_values(2) + .num_args(0..=2) ) .arg( Arg::new("enr-match") diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index c62b27c53fe..bf619547b26 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -1430,10 +1430,9 @@ pub fn set_network_config( if config_str.as_str() == "disabled" { None } else { + // Enabled with a custom configuration Some(config_str.parse()?) } - // Enabled with a custom configuration - // Some(config_str.parse()?) } }; Ok(()) diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index b40a5697f9d..4a7c8877388 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -23,7 +23,7 @@ pub fn cli_app() -> Command { local node on this address. This will update the `ip4` or `ip6` ENR fields \ accordingly. To update both, set this flag twice with the different values.") .action(ArgAction::Append) - // .max_values(2) + .num_args(0..=2) .required(true) .conflicts_with("network-dir") ) @@ -56,10 +56,9 @@ pub fn cli_app() -> Command { - --listen-address '0.0.0.0' --listen-address '::' will listen over both \ Ipv4 and Ipv6. The order of the given addresses is not relevant. However, \ multiple Ipv4, or multiple Ipv6 addresses will not be accepted.") - // .multiple(true) - // .max_values(2) + .num_args(0..=2) .default_value("0.0.0.0") - .action(ArgAction::Set) + .action(ArgAction::Append) ) .arg( Arg::new("boot-nodes") diff --git a/testing/simulator/src/cli.rs b/testing/simulator/src/cli.rs index 4f76b90d6ae..1a2c17431a8 100644 --- a/testing/simulator/src/cli.rs +++ b/testing/simulator/src/cli.rs @@ -1,8 +1,8 @@ -use clap::{Arg, ArgAction, Command}; +use clap::{Arg, ArgAction, Command, crate_version}; pub fn cli_app() -> Command { Command::new("simulator") - // .version(crate_version!()) + .version(crate_version!()) .author("Sigma Prime ") .about("Options for interacting with simulator") .subcommand( From 7b50109407b08f7e16dcaf8b47d740454a6d0f85 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Wed, 3 Apr 2024 23:23:59 +0300 Subject: [PATCH 10/46] add custom flag parser, make rate limiter flags clap friendly --- beacon_node/src/cli.rs | 43 ++++++--- beacon_node/src/config.rs | 82 ++++++++-------- boot_node/src/cli.rs | 107 --------------------- boot_node/src/config.rs | 1 - common/clap_utils/src/lib.rs | 6 ++ lighthouse/tests/beacon_node.rs | 2 +- testing/simulator/src/cli.rs | 2 +- validator_client/src/cli.rs | 8 +- validator_client/src/config.rs | 2 +- validator_manager/src/create_validators.rs | 8 -- 10 files changed, 82 insertions(+), 179 deletions(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index a0694f02d04..48431b16776 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1,4 +1,4 @@ -use clap::{builder::ArgPredicate, Arg, ArgAction, ArgGroup, Command, crate_version}; +use clap::{builder::ArgPredicate, crate_version, Arg, ArgAction, ArgGroup, Command}; use clap_utils::get_color_style; use strum::VariantNames; use types::ProgressiveBalancesMode; @@ -311,6 +311,18 @@ pub fn cli_app() -> Command { .arg( Arg::new("self-limiter") .long("self-limiter") + .help( + "Enables the outbound rate limiter (requests made by this node). \ + Use the self-limiter-protocol flag to set per protocol configurations. \ + If the self rate limiter is enabled and a protocol is not \ + present in the configuration, the quotas used for the inbound rate limiter will be \ + used." + ) + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("self-limiter-protocols") + .long("self-limiter-protocols") .help( "Enables the outbound rate limiter (requests made by this node).\ \ @@ -320,11 +332,9 @@ pub fn cli_app() -> Command { present in the configuration, the quotas used for the inbound rate limiter will be \ used." ) - .default_missing_value("true") - .require_equals(false) - // TODO this is dangerous without requires_equals = true - .num_args(0..1) - .hide(true) + .action(ArgAction::Append) + .value_delimiter(';') + .requires("self-limiter") ) .arg( Arg::new("proposer-only") @@ -335,21 +345,28 @@ pub fn cli_app() -> Command { .action(ArgAction::SetTrue) ) .arg( - Arg::new("inbound-rate-limiter") - .long("inbound-rate-limiter") + Arg::new("disable-inbound-rate-limiter") + .long("disable-inbound-rate-limiter") + .help( + "Disables the inbound rate limiter (requests received by this node)." + ) + .action(ArgAction::SetTrue) + ) + .arg( + Arg::new("inbound-rate-limiter-protocols") + .long("inbound-rate-limiter-protocols") .help( "Configures the inbound rate limiter (requests received by this node).\ \ Rate limit quotas per protocol can be set in the form of \ :/. To set quotas for multiple protocols, \ - separate them by ';'. If the inbound rate limiter is enabled and a protocol is not \ - present in the configuration, the default quotas will be used. \ + separate them by ';'. \ \ - This is enabled by default, using default quotas. To disable rate limiting pass \ - `disabled` to this option instead." + This is enabled by default, using default quotas. To disable rate limiting use \ + the disable-inbound-rate-limiter flag instead." ) .action(ArgAction::Set) - .hide(true) + .conflicts_with("disable-inbound-rate-limiter") ) .arg( Arg::new("disable-backfill-rate-limiting") diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index bf619547b26..07292e3e527 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -5,7 +5,7 @@ use beacon_chain::chain_config::{ use beacon_chain::TrustedSetup; use clap::ArgMatches; use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG; -use clap_utils::parse_required; +use clap_utils::{parse_flag, parse_required}; use client::{ClientConfig, ClientGenesis}; use directory::{DEFAULT_BEACON_NODE_DIR, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR}; use environment::RuntimeContext; @@ -103,7 +103,7 @@ pub fn get_config( * Http API server */ - if cli_args.contains_id("enable_http") { + if parse_flag(cli_args, "enable_http") { client_config.http_api.enabled = true; if let Some(address) = cli_args.get_one::("http-address") { @@ -324,7 +324,7 @@ pub fn get_config( clap_utils::parse_optional(cli_args, "builder-user-agent")?; } - if cli_args.contains_id("builder-profit-threshold") { + if parse_flag(cli_args, "builder-profit-threshold") { warn!( log, "Ignoring --builder-profit-threshold"; @@ -555,7 +555,7 @@ pub fn get_config( ClientGenesis::GenesisState } } else { - if cli_args.contains_id("checkpoint-state") || cli_args.contains_id("checkpoint-sync-url") { + if parse_flag(cli_args, "checkpoint-state") || parse_flag(cli_args, "checkpoint-sync-url") { return Err( "Checkpoint sync is not available for this network as no genesis state is known" .to_string(), @@ -882,7 +882,7 @@ pub fn parse_listening_addresses( let listen_addresses_str = cli_args .get_many::("listen-address") .expect("--listen_addresses has a default value"); - let use_zero_ports = cli_args.get_flag("zero-ports"); + let use_zero_ports = parse_flag(cli_args, "zero-ports"); // parse the possible ips let mut maybe_ipv4 = None; @@ -972,7 +972,7 @@ pub fn parse_listening_addresses( (None, Some(ipv6)) => { // A single ipv6 address was provided. Set the ports - if cli_args.contains_id("port6") { + if parse_flag(cli_args, "port6") { warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored.") } // use zero ports if required. If not, use the given port. @@ -1114,15 +1114,15 @@ pub fn set_network_config( config.network_dir = data_dir.join(DEFAULT_NETWORK_DIR); }; - if cli_args.get_flag("subscribe-all-subnets") { + if parse_flag(cli_args, "subscribe-all-subnets") { config.subscribe_all_subnets = true; } - if cli_args.get_flag("import-all-attestations") { + if parse_flag(cli_args, "import-all-attestations") { config.import_all_attestations = true; } - if cli_args.get_flag("shutdown-after-sync") { + if parse_flag(cli_args, "shutdown-after-sync") { config.shutdown_after_sync = true; } @@ -1178,7 +1178,7 @@ pub fn set_network_config( .collect::, _>>()?; } - if cli_args.get_flag("disable-peer-scoring") { + if parse_flag(cli_args, "disable-peer-scoring") { config.disable_peer_scoring = true; } @@ -1244,7 +1244,7 @@ pub fn set_network_config( ); } - if cli_args.get_flag("enr-match") { + if parse_flag(cli_args, "enr-match") { // Match the IP and UDP port in the ENR. if let Some(ipv4_addr) = config.listen_addrs().v4().cloned() { @@ -1360,56 +1360,58 @@ pub fn set_network_config( } } - if cli_args.get_flag("disable-enr-auto-update") { + if parse_flag(cli_args, "disable-enr-auto-update") { config.discv5_config.enr_update = false; } - if cli_args.get_flag("disable-packet-filter") { + if parse_flag(cli_args, "disable-packet-filter") { warn!(log, "Discv5 packet filter is disabled"); config.discv5_config.enable_packet_filter = false; } - if cli_args.get_flag("disable-discovery") { + if parse_flag(cli_args, "disable-discovery") { config.disable_discovery = true; warn!(log, "Discovery is disabled. New peers will not be found"); } - if cli_args.get_flag("disable-quic") { + if parse_flag(cli_args, "disable-quic") { config.disable_quic_support = true; } - if cli_args.get_flag("disable-upnp") { + if parse_flag(cli_args, "disable-upnp") { config.upnp_enabled = false; } - if cli_args.get_flag("private") { + if parse_flag(cli_args, "private") { config.private = true; } - if cli_args.get_flag("metrics") { + if parse_flag(cli_args, "metrics") { config.metrics_enabled = true; } - if cli_args.get_flag("enable-private-discovery") { + if parse_flag(cli_args, "enable-private-discovery") { config.discv5_config.table_filter = |_| true; } // Light client server config. - config.enable_light_client_server = cli_args.get_flag("light-client-server"); - - // The self limiter is disabled by default. - // This flag can be used both with or without a value. Try to parse it first with a value, if - // no value is defined but the flag is present, use the default params. - if cli_args.try_get_one::("self_limiter").is_ok() { - config.outbound_rate_limiter_config = Some(Default::default()); - } else { - config.outbound_rate_limiter_config = clap_utils::parse_optional(cli_args, "self-limiter")?; + config.enable_light_client_server = parse_flag(cli_args, "light-client-server"); + + // The self limiter is disabled by default. If the `self-limiter` flag is provided + // without the `self-limiter-protocols` flag, the default params will be used. + if parse_flag(cli_args, "self-limiter") { + config.outbound_rate_limiter_config = + if let Some(protocols) = cli_args.get_one::("self-limiter-protocols") { + Some(protocols.parse()?) + } else { + Some(Default::default()) + }; } // Proposer-only mode overrides a number of previous configuration parameters. // Specifically, we avoid subscribing to long-lived subnets and wish to maintain a minimal set // of peers. - if cli_args.get_flag("proposer-only") { + if parse_flag(cli_args, "proposer-only") { config.subscribe_all_subnets = false; if cli_args.get_one::("target-peers").is_none() { @@ -1419,21 +1421,17 @@ pub fn set_network_config( config.proposer_only = true; warn!(log, "Proposer-only mode enabled"; "info"=> "Do not connect a validator client to this node unless via the --proposer-nodes flag"); } - // The inbound rate limiter is enabled by default unless `disabled` is passed to the - // `inbound-rate-limiter` flag. Any other value should be parsed as a configuration string. - config.inbound_rate_limiter_config = match cli_args.get_one::("inbound-rate-limiter") { - None => { - // Enabled by default, with default values + // The inbound rate limiter is enabled by default unless `disabled` via the + // `disable-inbound-rate-limiter` flag. + config.inbound_rate_limiter_config = if parse_flag(cli_args, "disable-inbound-rate-limiter") { + None + } else { + // Use the default unless values are provided via the `inbound-rate-limiter-protocols` + if let Some(protocols) = cli_args.get_one::("inbound-rate-limiter-protocols") { + Some(protocols.parse()?) + } else { Some(Default::default()) } - Some(config_str) => { - if config_str.as_str() == "disabled" { - None - } else { - // Enabled with a custom configuration - Some(config_str.parse()?) - } - } }; Ok(()) } diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index 4a7c8877388..9e1b46d61a3 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -106,111 +106,4 @@ pub fn cli_app() -> Command { .help("The directory which contains the enr and it's associated private key") .action(ArgAction::Set) ) - .arg( - Arg::new("subscribe-all-subnets") - .long("subscribe-all-subnets") - .action(ArgAction::SetTrue) - .help("Subscribe to all subnets regardless of validator count. \ - This will also advertise the beacon node as being long-lived subscribed to all subnets.") - ) - .arg( - Arg::new("import-all-attestations") - .long("import-all-attestations") - .help("Import and aggregate all attestations, regardless of validator subscriptions. \ - This will only import attestations from already-subscribed subnets, use with \ - --subscribe-all-subnets to ensure all attestations are received for import.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("shutdown-after-sync") - .long("shutdown-after-sync") - .help("Shutdown beacon node as soon as sync is completed. Backfill sync will \ - not be performed before shutdown.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("zero-ports") - .long("zero-ports") - .short('z') - .help("Sets all listening TCP/UDP ports to 0, allowing the OS to choose some \ - arbitrary free ports.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("disable-peer-scoring") - .long("disable-peer-scoring") - .help("Disables peer scoring in lighthouse. WARNING: This is a dev only flag is only meant to be used in local testing scenarios \ - Using this flag on a real network may cause your node to become eclipsed and see a different view of the network") - .action(ArgAction::SetTrue) - .hide(true) - ) - .arg( - Arg::new("enr-match") - .short('e') - .long("enr-match") - .action(ArgAction::SetTrue) - .help("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.") - ) - .arg( - Arg::new("disable-enr-auto-update") - .short('x') - .action(ArgAction::SetTrue) - .long("disable-enr-auto-update") - .help("Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. \ - This disables this feature, fixing the ENR's IP/PORT to those specified on boot.") - ) - .arg( - Arg::new("disable-discovery") - .long("disable-discovery") - .action(ArgAction::SetTrue) - .help("Disables the discv5 discovery protocol. The node will not search for new peers or participate in the discovery protocol.") - .hide(true) - ) - .arg( - Arg::new("disable-quic") - .long("disable-quic") - .action(ArgAction::SetTrue) - .help("Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections.") - ) - .arg( - Arg::new("disable-upnp") - .long("disable-upnp") - .help("Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("private") - .long("private") - .help("Prevents sending various client identification information.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("metrics") - .long("metrics") - .help("Enable the Prometheus metrics HTTP server. Disabled by default.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("enable-private-discovery") - .long("enable-private-discovery") - .help("Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses.") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("light-client-server") - .long("light-client-server") - .help("Act as a full node supporting light clients on the p2p network \ - [experimental]") - .action(ArgAction::SetTrue) - ) - .arg( - Arg::new("proposer-only") - .long("proposer-only") - .help("Sets this beacon node at be a block proposer only node. \ - This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag should be used \ - for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups.") - .action(ArgAction::SetTrue) - ) } diff --git a/boot_node/src/config.rs b/boot_node/src/config.rs index 0bcb25107cb..a8b0f7aa563 100644 --- a/boot_node/src/config.rs +++ b/boot_node/src/config.rs @@ -29,7 +29,6 @@ impl BootNodeConfig { eth2_network_config: &Eth2NetworkConfig, ) -> Result { let data_dir = get_data_dir(matches); - // Try and obtain bootnodes let boot_nodes = { diff --git a/common/clap_utils/src/lib.rs b/common/clap_utils/src/lib.rs index cb79321bd5f..d7b2a8cd1d4 100644 --- a/common/clap_utils/src/lib.rs +++ b/common/clap_utils/src/lib.rs @@ -200,3 +200,9 @@ pub fn get_color_style() -> Styles { .literal(AnsiColor::Green.on_default()) .placeholder(AnsiColor::Green.on_default()) } + +pub fn parse_flag(matches: &ArgMatches, name: &str) -> bool { + *matches + .get_one::(name) + .unwrap_or(&false) +} diff --git a/lighthouse/tests/beacon_node.rs b/lighthouse/tests/beacon_node.rs index e2bac0d4835..26db5842e09 100644 --- a/lighthouse/tests/beacon_node.rs +++ b/lighthouse/tests/beacon_node.rs @@ -1560,7 +1560,7 @@ fn empty_inbound_rate_limiter_flag() { #[test] fn disable_inbound_rate_limiter_flag() { CommandLineTest::new() - .flag("inbound-rate-limiter", Some("disabled")) + .flag("disable-inbound-rate-limiter", None) .run_with_zero_port() .with_config(|config| assert_eq!(config.network.inbound_rate_limiter_config, None)); } diff --git a/testing/simulator/src/cli.rs b/testing/simulator/src/cli.rs index 1a2c17431a8..be4845bc91c 100644 --- a/testing/simulator/src/cli.rs +++ b/testing/simulator/src/cli.rs @@ -1,4 +1,4 @@ -use clap::{Arg, ArgAction, Command, crate_version}; +use clap::{crate_version, Arg, ArgAction, Command}; pub fn cli_app() -> Command { Command::new("simulator") diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index 86ec520a00e..70e6ee7bcb7 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -343,11 +343,9 @@ pub fn cli_app() -> Command { ) .arg( // TODO take note here - Arg::new("latency-measurement-service") - .long("latency-measurement-service") - .value_name("BOOLEAN") - .help("Set to 'true' to enable a service that periodically attempts to measure latency to BNs. \ - Set to 'false' to disable.") + Arg::new("disable-latency-measurement-service") + .long("disable-latency-measurement-service") + .help("Disables the service that periodically attempts to measure latency to BNs.") .action(ArgAction::SetTrue), ) .arg( diff --git a/validator_client/src/config.rs b/validator_client/src/config.rs index 3c602da9030..7ddb6a4eae6 100644 --- a/validator_client/src/config.rs +++ b/validator_client/src/config.rs @@ -409,7 +409,7 @@ impl Config { config.builder_boost_factor = parse_optional(cli_args, "builder-boost-factor")?; config.enable_latency_measurement_service = - cli_args.get_flag("latency-measurement-service"); + !cli_args.get_flag("disable-latency-measurement-service"); config.validator_registration_batch_size = parse_required(cli_args, "validator-registration-batch-size")?; diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index 41b9b9d3ab6..1ddb6da9cad 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -211,14 +211,6 @@ pub fn cli_app() -> Command { .value_parser(["true", "false"]) .action(ArgAction::Set), ) - .arg( - Arg::new("dump-config") - .long("dump-config") - .hide(true) - .help("Dumps the config to a desired location. Used for testing only.") - .action(ArgAction::Set) - .global(true), - ) } /// The CLI arguments are parsed into this struct before running the application. This step of From fb3b8ddae2ae46ca7d741081b00468d7850597f1 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 00:52:05 +0300 Subject: [PATCH 11/46] remove unneeded check --- beacon_node/src/config.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 07292e3e527..928ea273307 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -971,10 +971,8 @@ pub fn parse_listening_addresses( } (None, Some(ipv6)) => { // A single ipv6 address was provided. Set the ports - - if parse_flag(cli_args, "port6") { - warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored.") - } + warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored."); + // use zero ports if required. If not, use the given port. let tcp_port = use_zero_ports .then(unused_port::unused_tcp6_port) From 9b40a14e504b54287e28aecdb62e64342a06a05e Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 00:56:37 +0300 Subject: [PATCH 12/46] fmt --- beacon_node/src/config.rs | 2 +- common/clap_utils/src/lib.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 928ea273307..43c1e47149b 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -972,7 +972,7 @@ pub fn parse_listening_addresses( (None, Some(ipv6)) => { // A single ipv6 address was provided. Set the ports warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored."); - + // use zero ports if required. If not, use the given port. let tcp_port = use_zero_ports .then(unused_port::unused_tcp6_port) diff --git a/common/clap_utils/src/lib.rs b/common/clap_utils/src/lib.rs index d7b2a8cd1d4..f687c50c37e 100644 --- a/common/clap_utils/src/lib.rs +++ b/common/clap_utils/src/lib.rs @@ -202,7 +202,5 @@ pub fn get_color_style() -> Styles { } pub fn parse_flag(matches: &ArgMatches, name: &str) -> bool { - *matches - .get_one::(name) - .unwrap_or(&false) + *matches.get_one::(name).unwrap_or(&false) } From e320c998f69530bf38fddaad8a7cca6da60f1b3f Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 21:06:39 +0300 Subject: [PATCH 13/46] update --- Cargo.lock | 11 + Cargo.toml | 2 +- account_manager/src/validator/create.rs | 28 +- account_manager/src/validator/exit.rs | 16 +- account_manager/src/validator/import.rs | 18 +- account_manager/src/validator/mod.rs | 1 + account_manager/src/validator/modify.rs | 16 +- account_manager/src/validator/recover.rs | 17 +- .../src/validator/slashing_protection.rs | 8 +- beacon_node/src/cli.rs | 189 ++++++++++- boot_node/src/cli.rs | 20 +- common/clap_utils/src/lib.rs | 2 + database_manager/src/lib.rs | 53 +++- lcli/src/main.rs | 295 ++++++++++++------ lighthouse/src/main.rs | 59 +++- validator_client/src/cli.rs | 115 +++++-- validator_manager/src/create_validators.rs | 53 +++- validator_manager/src/import_validators.rs | 14 +- validator_manager/src/lib.rs | 3 + 19 files changed, 713 insertions(+), 207 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7235262125a..0fd09dd9a38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1352,6 +1352,7 @@ dependencies = [ "anstyle", "clap_lex", "strsim 0.11.0", + "terminal_size", ] [[package]] @@ -8194,6 +8195,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.31", + "windows-sys 0.48.0", +] + [[package]] name = "test-test_logger" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index e308714eb47..c48251954a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -102,7 +102,7 @@ bincode = "1" bitvec = "1" byteorder = "1" bytes = "1" -clap = { version = "4.5.1", features = ["cargo"] } +clap = { version = "4.5.1", features = ["cargo", "wrap_help"] } compare_fields_derive = { path = "common/compare_fields_derive" } criterion = "0.3" delay_map = "0.3" diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index 2921b2c3d6b..c75669d80cf 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -5,6 +5,7 @@ use account_utils::{ random_password, read_password_from_user, strip_off_newlines, validator_definitions, PlainText, }; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use directory::{ ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR, }; @@ -37,14 +38,16 @@ pub fn cli_app() -> Command { .long(WALLET_NAME_FLAG) .value_name("WALLET_NAME") .help("Use the wallet identified by this name") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(WALLET_PASSWORD_FLAG) .long(WALLET_PASSWORD_FLAG) .value_name("WALLET_PASSWORD_PATH") .help("A path to a file containing the password which will unlock the wallet.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(WALLETS_DIR_FLAG) @@ -52,7 +55,8 @@ pub fn cli_app() -> Command { .value_name(WALLETS_DIR_FLAG) .help("A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets") .action(ArgAction::Set) - .conflicts_with("datadir"), + .conflicts_with("datadir") + .display_order(0) ) .arg( Arg::new(SECRETS_DIR_FLAG) @@ -63,7 +67,8 @@ pub fn cli_app() -> Command { Defaults to ~/.lighthouse/{network}/secrets", ) .conflicts_with("datadir") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(DEPOSIT_GWEI_FLAG) @@ -73,7 +78,8 @@ pub fn cli_app() -> Command { "The GWEI value of the deposit amount. Defaults to the minimum amount \ required for an active validator (MAX_EFFECTIVE_BALANCE)", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(STORE_WITHDRAW_FLAG) @@ -84,6 +90,8 @@ pub fn cli_app() -> Command { instead generate them from the wallet seed when required.", ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new(COUNT_FLAG) @@ -91,7 +99,8 @@ pub fn cli_app() -> Command { .value_name("VALIDATOR_COUNT") .help("The number of validators to create, regardless of how many already exist") .conflicts_with("at-most") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(AT_MOST_FLAG) @@ -102,14 +111,17 @@ pub fn cli_app() -> Command { reach the given count. Never deletes an existing validator.", ) .conflicts_with("count") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0) ) } diff --git a/account_manager/src/validator/exit.rs b/account_manager/src/validator/exit.rs index c54e1a33b42..a375a290e06 100644 --- a/account_manager/src/validator/exit.rs +++ b/account_manager/src/validator/exit.rs @@ -1,6 +1,7 @@ use crate::wallet::create::STDIN_INPUTS_FLAG; use bls::{Keypair, PublicKey}; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use environment::Environment; use eth2::{ types::{GenesisData, StateId, ValidatorData, ValidatorId, ValidatorStatus}, @@ -37,14 +38,16 @@ pub fn cli_app() -> Command { .value_name("KEYSTORE_PATH") .help("The path to the EIP-2335 voting keystore for the validator") .action(ArgAction::Set) - .required(true), + .required(true) + .display_order(0) ) .arg( Arg::new(PASSWORD_FILE_FLAG) .long(PASSWORD_FILE_FLAG) .value_name("PASSWORD_FILE_PATH") .help("The path to the password file which unlocks the validator voting keystore") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(BEACON_SERVER_FLAG) @@ -52,24 +55,29 @@ pub fn cli_app() -> Command { .value_name("NETWORK_ADDRESS") .help("Address to a beacon node HTTP API") .default_value(DEFAULT_BEACON_NODE) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(NO_WAIT) .long(NO_WAIT) .help("Exits after publishing the voluntary exit without waiting for confirmation that the exit was included in the beacon chain") + .display_order(0) ) .arg( Arg::new(NO_CONFIRMATION) .long(NO_CONFIRMATION) .help("Exits without prompting for confirmation that you understand the implications of a voluntary exit. This should be used with caution") + .display_order(0) ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0) ) } diff --git a/account_manager/src/validator/import.rs b/account_manager/src/validator/import.rs index 573442c0b73..a7c72679f74 100644 --- a/account_manager/src/validator/import.rs +++ b/account_manager/src/validator/import.rs @@ -10,6 +10,7 @@ use account_utils::{ ZeroizeString, }; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME}; use std::fs; use std::path::PathBuf; @@ -40,7 +41,8 @@ pub fn cli_app() -> Command { .help("Path to a single keystore to be imported.") .conflicts_with(DIR_FLAG) .required_unless_present(DIR_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(DIR_FLAG) @@ -54,20 +56,25 @@ pub fn cli_app() -> Command { ) .conflicts_with(KEYSTORE_FLAG) .required_unless_present(KEYSTORE_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0), ) .arg( Arg::new(REUSE_PASSWORD_FLAG) .long(REUSE_PASSWORD_FLAG) .action(ArgAction::SetTrue) - .help("If present, the same password will be used for all imported keystores."), + .help_heading(FLAG_HEADER) + .help("If present, the same password will be used for all imported keystores.") + .display_order(0), ) .arg( Arg::new(PASSWORD_FLAG) @@ -80,7 +87,8 @@ pub fn cli_app() -> Command { The password will be copied to the `validator_definitions.yml` file, so after \ import we strongly recommend you delete the file at KEYSTORE_PASSWORD_PATH.", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) } diff --git a/account_manager/src/validator/mod.rs b/account_manager/src/validator/mod.rs index 5fd752fb90c..b699301cde3 100644 --- a/account_manager/src/validator/mod.rs +++ b/account_manager/src/validator/mod.rs @@ -17,6 +17,7 @@ pub const CMD: &str = "validator"; pub fn cli_app() -> Command { Command::new(CMD) + .display_order(0) .about("Provides commands for managing Eth2 validators.") .arg( Arg::new(VALIDATOR_DIR_FLAG) diff --git a/account_manager/src/validator/modify.rs b/account_manager/src/validator/modify.rs index 962c40ad87c..571cd28bf5e 100644 --- a/account_manager/src/validator/modify.rs +++ b/account_manager/src/validator/modify.rs @@ -1,6 +1,7 @@ use account_utils::validator_definitions::ValidatorDefinitions; use bls::PublicKey; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use std::{collections::HashSet, path::PathBuf}; pub const CMD: &str = "modify"; @@ -13,6 +14,7 @@ pub const ALL: &str = "all"; pub fn cli_app() -> Command { Command::new(CMD) .about("Modify validator status in validator_definitions.yml.") + .display_order(0) .subcommand( Command::new(ENABLE) .about("Enable validator(s) in validator_definitions.yml.") @@ -21,14 +23,17 @@ pub fn cli_app() -> Command { .long(PUBKEY_FLAG) .value_name("PUBKEY") .help("Validator pubkey to enable") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(ALL) .long(ALL) .help("Enable all validators in the validator directory") .action(ArgAction::SetTrue) - .conflicts_with(PUBKEY_FLAG), + .help_heading(FLAG_HEADER) + .conflicts_with(PUBKEY_FLAG) + .display_order(0), ), ) .subcommand( @@ -39,14 +44,17 @@ pub fn cli_app() -> Command { .long(PUBKEY_FLAG) .value_name("PUBKEY") .help("Validator pubkey to disable") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(ALL) .long(ALL) .help("Disable all validators in the validator directory") .action(ArgAction::SetTrue) - .conflicts_with(PUBKEY_FLAG), + .help_heading(FLAG_HEADER) + .conflicts_with(PUBKEY_FLAG) + .display_order(0), ), ) } diff --git a/account_manager/src/validator/recover.rs b/account_manager/src/validator/recover.rs index cc3359dc775..4677db18df3 100644 --- a/account_manager/src/validator/recover.rs +++ b/account_manager/src/validator/recover.rs @@ -5,6 +5,7 @@ use crate::SECRETS_DIR_FLAG; use account_utils::eth2_keystore::{keypair_from_secret, Keystore, KeystoreBuilder}; use account_utils::{random_password, read_mnemonic_from_cli}; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use directory::ensure_dir_exists; use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR}; use eth2_wallet::bip39::Seed; @@ -29,7 +30,8 @@ pub fn cli_app() -> Command { .help("The first of consecutive key indexes you wish to recover.") .action(ArgAction::Set) .required(false) - .default_value("0"), + .default_value("0") + .display_order(0) ) .arg( Arg::new(COUNT_FLAG) @@ -38,7 +40,8 @@ pub fn cli_app() -> Command { .help("The number of validator keys you wish to recover. Counted consecutively from the provided `--first_index`.") .action(ArgAction::Set) .required(false) - .default_value("1"), + .default_value("1") + .display_order(0) ) .arg( Arg::new(MNEMONIC_FLAG) @@ -48,6 +51,7 @@ pub fn cli_app() -> Command { "If present, the mnemonic will be read in from this file.", ) .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(SECRETS_DIR_FLAG) @@ -57,7 +61,8 @@ pub fn cli_app() -> Command { "The path where the validator keystore passwords will be stored. \ Defaults to ~/.lighthouse/{network}/secrets", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(STORE_WITHDRAW_FLAG) @@ -68,13 +73,17 @@ pub fn cli_app() -> Command { instead generate them from the wallet seed when required.", ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0) ) } diff --git a/account_manager/src/validator/slashing_protection.rs b/account_manager/src/validator/slashing_protection.rs index 6a29f597b89..bcd860a4847 100644 --- a/account_manager/src/validator/slashing_protection.rs +++ b/account_manager/src/validator/slashing_protection.rs @@ -21,6 +21,7 @@ pub const PUBKEYS_FLAG: &str = "pubkeys"; pub fn cli_app() -> Command { Command::new(CMD) .about("Import or export slashing protection data to or from another client") + .display_order(0) .subcommand( Command::new(IMPORT_CMD) .about("Import an interchange file") @@ -28,6 +29,7 @@ pub fn cli_app() -> Command { Arg::new(IMPORT_FILE_ARG) .action(ArgAction::Set) .value_name("FILE") + .display_order(0) .help("The slashing protection interchange file to import (.json)"), ) ) @@ -38,7 +40,8 @@ pub fn cli_app() -> Command { Arg::new(EXPORT_FILE_ARG) .action(ArgAction::Set) .value_name("FILE") - .help("The filename to export the interchange file to"), + .help("The filename to export the interchange file to") + .display_order(0) ) .arg( Arg::new(PUBKEYS_FLAG) @@ -48,7 +51,8 @@ pub fn cli_app() -> Command { .help( "List of public keys to export history for. Keys should be 0x-prefixed, \ comma-separated. All known keys will be exported if omitted", - ), + ) + .display_order(0) ) ) } diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 48431b16776..17a09533540 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1,5 +1,5 @@ use clap::{builder::ArgPredicate, crate_version, Arg, ArgAction, ArgGroup, Command}; -use clap_utils::get_color_style; +use clap_utils::{get_color_style, FLAG_HEADER}; use strum::VariantNames; use types::ProgressiveBalancesMode; @@ -22,6 +22,7 @@ pub fn cli_app() -> Command { .help("Data directory for network keys. Defaults to network/ inside the beacon node \ dir.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("freezer-dir") @@ -29,6 +30,7 @@ pub fn cli_app() -> Command { .value_name("DIR") .help("Data directory for the freezer database.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("blobs-dir") @@ -36,6 +38,7 @@ pub fn cli_app() -> Command { .value_name("DIR") .help("Data directory for the blobs database.") .action(ArgAction::Set) + .display_order(0) ) /* * Network parameters. @@ -44,8 +47,10 @@ pub fn cli_app() -> Command { Arg::new("subscribe-all-subnets") .long("subscribe-all-subnets") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("Subscribe to all subnets regardless of validator count. \ This will also advertise the beacon node as being long-lived subscribed to all subnets.") + .display_order(0) ) .arg( Arg::new("import-all-attestations") @@ -54,13 +59,16 @@ pub fn cli_app() -> Command { This will only import attestations from already-subscribed subnets, use with \ --subscribe-all-subnets to ensure all attestations are received for import.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .global(true) + .display_order(0) ) .arg( Arg::new("disable-packet-filter") .long("disable-packet-filter") .help("Disables the discovery packet filter. Useful for testing in smaller networks") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) ) .arg( Arg::new("shutdown-after-sync") @@ -68,6 +76,8 @@ pub fn cli_app() -> Command { .help("Shutdown beacon node as soon as sync is completed. Backfill sync will \ not be performed before shutdown.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("zero-ports") @@ -76,6 +86,8 @@ pub fn cli_app() -> Command { .help("Sets all listening TCP/UDP ports to 0, allowing the OS to choose some \ arbitrary free ports.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("listen-address") @@ -92,6 +104,7 @@ pub fn cli_app() -> Command { .action(ArgAction::Append) .num_args(0..=2) .default_value("0.0.0.0") + .display_order(0) ) .arg( Arg::new("port") @@ -103,6 +116,7 @@ pub fn cli_app() -> Command { will apply to the IPv4 address and --port6 to the IPv6 address.") .default_value("9000") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("port6") @@ -112,6 +126,7 @@ pub fn cli_app() -> Command { IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1.") .default_value("9090") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("discovery-port") @@ -119,6 +134,7 @@ pub fn cli_app() -> Command { .value_name("PORT") .help("The UDP port that discovery will listen on. Defaults to `port`") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("quic-port") @@ -126,6 +142,7 @@ pub fn cli_app() -> Command { .value_name("PORT") .help("The UDP port that quic will listen on. Defaults to `port` + 1") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("discovery-port6") @@ -134,6 +151,7 @@ pub fn cli_app() -> Command { .help("The UDP port that discovery will listen on over IPv6 if listening over \ both IPv4 and IPv6. Defaults to `port6`") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("quic-port6") @@ -142,12 +160,14 @@ pub fn cli_app() -> Command { .help("The UDP port that quic will listen on over IPv6 if listening over \ both IPv4 and IPv6. Defaults to `port6` + 1") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("target-peers") .long("target-peers") .help("The target number of peers.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("boot-nodes") @@ -156,6 +176,7 @@ pub fn cli_app() -> Command { .value_name("ENR/MULTIADDR LIST") .help("One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("network-load") @@ -165,18 +186,23 @@ pub fn cli_app() -> Command { .default_value("3") .hide(true) .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("disable-upnp") .long("disable-upnp") .help("Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("private") .long("private") .help("Prevents sending various client identification information.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("enr-udp-port") @@ -185,6 +211,7 @@ pub fn cli_app() -> Command { .help("The UDP4 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv4.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-quic-port") @@ -193,6 +220,7 @@ pub fn cli_app() -> Command { .help("The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv4.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-udp6-port") @@ -201,6 +229,7 @@ pub fn cli_app() -> Command { .help("The UDP6 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv6.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-quic6-port") @@ -209,6 +238,7 @@ pub fn cli_app() -> Command { .help("The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IPv6.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-tcp-port") @@ -218,6 +248,7 @@ pub fn cli_app() -> Command { can connect to your local node on this port over IPv4. The --port flag is \ used if this is not set.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-tcp6-port") @@ -227,6 +258,7 @@ pub fn cli_app() -> Command { can connect to your local node on this port over IPv6. The --port6 flag is \ used if this is not set.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-address") @@ -240,23 +272,28 @@ pub fn cli_app() -> Command { accordingly. To update both, set this flag twice with the different values.") .action(ArgAction::Append) .num_args(0..=2) + .display_order(0) ) .arg( Arg::new("enr-match") .short('e') .long("enr-match") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("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.") + .display_order(0) ) .arg( Arg::new("disable-enr-auto-update") .short('x') .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .long("disable-enr-auto-update") .help("Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. \ This disables this feature, fixing the ENR's IP/PORT to those specified on boot.") + .display_order(0) ) .arg( Arg::new("libp2p-addresses") @@ -265,6 +302,7 @@ pub fn cli_app() -> Command { .help("One or more comma-delimited multiaddrs to manually connect to a libp2p peer \ without an ENR.") .action(ArgAction::Set) + .display_order(0) ) // NOTE: This is hide because it is primarily a developer feature for testnets and // debugging. We remove it from the list to avoid clutter. @@ -272,14 +310,18 @@ pub fn cli_app() -> Command { Arg::new("disable-discovery") .long("disable-discovery") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("Disables the discv5 discovery protocol. The node will not search for new peers or participate in the discovery protocol.") .hide(true) + .display_order(0) ) .arg( Arg::new("disable-quic") .long("disable-quic") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections.") + .display_order(0) ) .arg( Arg::new("disable-peer-scoring") @@ -287,7 +329,9 @@ pub fn cli_app() -> Command { .help("Disables peer scoring in lighthouse. WARNING: This is a dev only flag is only meant to be used in local testing scenarios \ Using this flag on a real network may cause your node to become eclipsed and see a different view of the network") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .hide(true) + .display_order(0) ) .arg( Arg::new("trusted-peers") @@ -295,18 +339,24 @@ pub fn cli_app() -> Command { .value_name("TRUSTED_PEERS") .help("One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system.") .action(ArgAction::Set) + .display_order(0) + .display_order(0) ) .arg( Arg::new("genesis-backfill") .long("genesis-backfill") .help("Attempts to download blocks all the way back to genesis when checkpoint syncing.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("enable-private-discovery") .long("enable-private-discovery") .help("Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("self-limiter") @@ -319,6 +369,8 @@ pub fn cli_app() -> Command { used." ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("self-limiter-protocols") @@ -335,6 +387,7 @@ pub fn cli_app() -> Command { .action(ArgAction::Append) .value_delimiter(';') .requires("self-limiter") + .display_order(0) ) .arg( Arg::new("proposer-only") @@ -343,6 +396,8 @@ pub fn cli_app() -> Command { This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag should be used \ for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("disable-inbound-rate-limiter") @@ -351,6 +406,8 @@ pub fn cli_app() -> Command { "Disables the inbound rate limiter (requests received by this node)." ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("inbound-rate-limiter-protocols") @@ -367,6 +424,7 @@ pub fn cli_app() -> Command { ) .action(ArgAction::Set) .conflicts_with("disable-inbound-rate-limiter") + .display_order(0) ) .arg( Arg::new("disable-backfill-rate-limiting") @@ -375,6 +433,8 @@ pub fn cli_app() -> Command { as possible, however it can result in resource contention which degrades staking performance. Stakers \ should generally choose to avoid this flag since backfill sync is not required for staking.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* REST API related arguments */ .arg( @@ -382,6 +442,8 @@ pub fn cli_app() -> Command { .long("http") .help("Enable the RESTful HTTP API server. Disabled by default.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("http-address") @@ -391,6 +453,7 @@ pub fn cli_app() -> Command { .help("Set the listen address for the RESTful HTTP API server.") .default_value_if("enable_http", ArgPredicate::IsPresent, "127.0.0.1") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-port") @@ -400,6 +463,7 @@ pub fn cli_app() -> Command { .help("Set the listen TCP port for the RESTful HTTP API server.") .default_value_if("enable_http", ArgPredicate::IsPresent, "5052") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-allow-origin") @@ -411,6 +475,7 @@ pub fn cli_app() -> Command { If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5052).") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-spec-fork") @@ -420,6 +485,7 @@ pub fn cli_app() -> Command { .help("Serve the spec for a specific hard fork on /eth/v1/config/spec. It should \ not be necessary to set this flag.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-enable-tls") @@ -427,8 +493,10 @@ pub fn cli_app() -> Command { .help("Serves the RESTful HTTP API server over TLS. This feature is currently \ experimental.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .requires("http-tls-cert") .requires("http-tls-key") + .display_order(0) ) .arg( Arg::new("http-tls-cert") @@ -437,6 +505,7 @@ pub fn cli_app() -> Command { .help("The path of the certificate to be used when serving the HTTP API server \ over TLS.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-tls-key") @@ -445,15 +514,18 @@ pub fn cli_app() -> Command { .help("The path of the private key to be used when serving the HTTP API server \ over TLS. Must not be password-protected.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-allow-sync-stalled") .long("http-allow-sync-stalled") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .requires("enable_http") .help("Forces the HTTP to indicate that the node is synced when sync is actually \ stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON \ MAINNET.") + .display_order(0) ) .arg( Arg::new("http-sse-capacity-multiplier") @@ -464,6 +536,7 @@ pub fn cli_app() -> Command { .value_name("N") .help("Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. \ Increasing this value can prevent messages from being dropped.") + .display_order(0) ) .arg( Arg::new("http-duplicate-block-status") @@ -474,6 +547,7 @@ pub fn cli_app() -> Command { .value_name("STATUS_CODE") .help("Status code to send when a block that is already known is POSTed to the \ HTTP API.") + .display_order(0) ) .arg( Arg::new("http-enable-beacon-processor") @@ -485,6 +559,7 @@ pub fn cli_app() -> Command { alongside other tasks. When set to \"false\", HTTP API responses will be executed \ immediately.") .action(ArgAction::Set) + .display_order(0) .default_value_if("enable_http", ArgPredicate::IsPresent, "true") ) /* Prometheus metrics HTTP server related arguments */ @@ -493,6 +568,8 @@ pub fn cli_app() -> Command { .long("metrics") .help("Enable the Prometheus metrics HTTP server. Disabled by default.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("metrics-address") @@ -502,6 +579,7 @@ pub fn cli_app() -> Command { .help("Set the listen address for the Prometheus metrics HTTP server.") .default_value_if("metrics", ArgPredicate::IsPresent, "127.0.0.1") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("metrics-port") @@ -511,6 +589,7 @@ pub fn cli_app() -> Command { .help("Set the listen TCP port for the Prometheus metrics HTTP server.") .default_value_if("metrics", ArgPredicate::IsPresent, "5054") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("metrics-allow-origin") @@ -522,6 +601,7 @@ pub fn cli_app() -> Command { If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5054).") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("shuffling-cache-size") @@ -530,6 +610,7 @@ pub fn cli_app() -> Command { This flag allows the user to set the shuffling cache size in epochs. \ Shufflings are dependent on validator count and setting this value to a large number can consume a large amount of memory.") .action(ArgAction::Set) + .display_order(0) ) /* @@ -547,6 +628,7 @@ pub fn cli_app() -> Command { validators, IP address and other personal information. Always use a HTTPS connection \ and never provide an untrusted URL.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("monitoring-endpoint-period") @@ -556,6 +638,7 @@ pub fn cli_app() -> Command { the monitoring-endpoint. Default: 60s") .requires("monitoring-endpoint") .action(ArgAction::Set) + .display_order(0) ) /* @@ -569,6 +652,8 @@ pub fn cli_app() -> Command { on localhost:5052 and import deposit logs from the execution node. This is \ equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* @@ -580,14 +665,18 @@ pub fn cli_app() -> Command { .help("If present the node will connect to an eth1 node. This is required for \ block production, you must use this flag if you wish to serve a validator.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("dummy-eth1") .long("dummy-eth1") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .conflicts_with("eth1") .help("If present, uses an eth1 backend that generates static dummy data.\ Identical to the method used at the 2019 Canada interop.") + .display_order(0) ) .arg( Arg::new("eth1-purge-cache") @@ -595,6 +684,8 @@ pub fn cli_app() -> Command { .value_name("PURGE-CACHE") .help("Purges the eth1 block and deposit caches") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("eth1-blocks-per-log-query") @@ -604,6 +695,7 @@ pub fn cli_app() -> Command { This will reduce the size of responses from the Eth1 endpoint.") .default_value("1000") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("eth1-cache-follow-distance") @@ -614,6 +706,7 @@ pub fn cli_app() -> Command { compensate for irregular Proof-of-Work block times, but setting it too low \ can make the node vulnerable to re-orgs.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slots-per-restore-point") @@ -623,6 +716,7 @@ pub fn cli_app() -> Command { Cannot be changed after initialization. \ [default: 8192 (mainnet) or 64 (minimal)]") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("epochs-per-migration") @@ -633,6 +727,7 @@ pub fn cli_app() -> Command { writes") .default_value("1") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("block-cache-size") @@ -640,6 +735,7 @@ pub fn cli_app() -> Command { .value_name("SIZE") .help("Specifies how many blocks the database should cache in memory [default: 5]") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("historic-state-cache-size") @@ -647,6 +743,7 @@ pub fn cli_app() -> Command { .value_name("SIZE") .help("Specifies how many states from the freezer database should cache in memory [default: 1]") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("state-cache-size") @@ -654,6 +751,7 @@ pub fn cli_app() -> Command { .value_name("STATE_CACHE_SIZE") .help("Specifies the size of the snapshot cache [default: 3]") .action(ArgAction::Set) + .display_order(0) ) /* * Execution Layer Integration @@ -667,6 +765,7 @@ pub fn cli_app() -> Command { JSON-RPC connection. Uses the same endpoint to populate the \ deposit cache.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("execution-jwt") @@ -677,6 +776,7 @@ pub fn cli_app() -> Command { execution endpoint provided in the --execution-endpoint flag.") .requires("execution-endpoint") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("execution-jwt-secret-key") @@ -688,6 +788,7 @@ pub fn cli_app() -> Command { .requires("execution-endpoint") .conflicts_with("execution-jwt") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("execution-jwt-id") @@ -699,6 +800,7 @@ pub fn cli_app() -> Command { Set to empty by default") .requires("execution-jwt") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("execution-jwt-version") @@ -710,6 +812,7 @@ pub fn cli_app() -> Command { Set to empty by default") .requires("execution-jwt") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("suggested-fee-recipient") @@ -720,6 +823,7 @@ pub fn cli_app() -> Command { client instead of (or in addition to) setting it here.") .requires("execution-endpoint") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("builder") @@ -729,6 +833,7 @@ pub fn cli_app() -> Command { .help("The URL of a service compatible with the MEV-boost API.") .requires("execution-endpoint") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("execution-timeout-multiplier") @@ -737,6 +842,7 @@ pub fn cli_app() -> Command { .help("Unsigned integer to multiply the default execution timeouts by.") .default_value("1") .action(ArgAction::Set) + .display_order(0) ) /* Deneb settings */ .arg( @@ -747,6 +853,7 @@ pub fn cli_app() -> Command { NOTE: This will override the trusted setup that is generated \ from the mainnet kzg ceremony. Use with caution") .action(ArgAction::Set) + .display_order(0) ) /* * Database purging and compaction. @@ -755,14 +862,18 @@ pub fn cli_app() -> Command { Arg::new("purge-db") .long("purge-db") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("If present, the chain database will be deleted. Use with caution.") + .display_order(0) ) .arg( Arg::new("compact-db") .long("compact-db") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("If present, apply compaction to the database on start-up. Use with caution. \ It is generally not recommended unless auto-compaction is disabled.") + .display_order(0) ) .arg( Arg::new("auto-compact-db") @@ -770,6 +881,7 @@ pub fn cli_app() -> Command { .help("Enable or disable automatic compaction of the database on finalization.") .action(ArgAction::Set) .default_value("true") + .display_order(0) ) .arg( Arg::new("prune-payloads") @@ -779,6 +891,7 @@ pub fn cli_app() -> Command { reconstructed and sent to syncing peers.") .action(ArgAction::Set) .default_value("true") + .display_order(0) ) .arg( Arg::new("prune-blobs") @@ -788,6 +901,7 @@ pub fn cli_app() -> Command { data availability boundary relative to the current epoch.") .action(ArgAction::Set) .default_value("true") + .display_order(0) ) .arg( Arg::new("epochs-per-blob-prune") @@ -798,6 +912,7 @@ pub fn cli_app() -> Command { relative to the current epoch.") .action(ArgAction::Set) .default_value("1") + .display_order(0) ) .arg( Arg::new("blob-prune-margin-epochs") @@ -807,6 +922,7 @@ pub fn cli_app() -> Command { up until data_availability_boundary - blob_prune_margin_epochs.") .action(ArgAction::Set) .default_value("0") + .display_order(0) ) /* @@ -821,6 +937,7 @@ pub fn cli_app() -> Command { ) .value_name("GRAFFITI") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("max-skip-slots") @@ -832,6 +949,7 @@ pub fn cli_app() -> Command { ) .value_name("NUM_SLOTS") .action(ArgAction::Set) + .display_order(0) ) /* * Slasher. @@ -845,6 +963,8 @@ pub fn cli_app() -> Command { resources required." ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("slasher-dir") @@ -855,6 +975,7 @@ pub fn cli_app() -> Command { .value_name("PATH") .action(ArgAction::Set) .requires("slasher") + .display_order(0) ) .arg( Arg::new("slasher-update-period") @@ -865,6 +986,7 @@ pub fn cli_app() -> Command { .value_name("SECONDS") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-slot-offset") @@ -877,6 +999,7 @@ pub fn cli_app() -> Command { .value_name("SECONDS") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-history-length") @@ -888,6 +1011,7 @@ pub fn cli_app() -> Command { .value_name("EPOCHS") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-max-db-size") @@ -898,6 +1022,7 @@ pub fn cli_app() -> Command { .value_name("GIGABYTES") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-att-cache-size") @@ -906,6 +1031,7 @@ pub fn cli_app() -> Command { .value_name("COUNT") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-chunk-size") @@ -916,6 +1042,7 @@ pub fn cli_app() -> Command { .value_name("EPOCHS") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-validator-chunk-size") @@ -926,6 +1053,7 @@ pub fn cli_app() -> Command { .value_name("NUM_VALIDATORS") .requires("slasher") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("slasher-broadcast") @@ -934,6 +1062,7 @@ pub fn cli_app() -> Command { [Enabled by default].") .action(ArgAction::Set) .default_value("true") + .display_order(0) ) .arg( Arg::new("slasher-backend") @@ -943,6 +1072,7 @@ pub fn cli_app() -> Command { .action(ArgAction::Set) .value_parser(slasher::DatabaseBackend::VARIANTS.to_vec()) .requires("slasher") + .display_order(0) ) .arg( Arg::new("wss-checkpoint") @@ -955,6 +1085,7 @@ pub fn cli_app() -> Command { ) .value_name("WSS_CHECKPOINT") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("checkpoint-state") @@ -964,6 +1095,7 @@ pub fn cli_app() -> Command { .value_name("STATE_SSZ") .action(ArgAction::Set) .requires("checkpoint-block") + .display_order(0) ) .arg( Arg::new("checkpoint-block") @@ -973,6 +1105,7 @@ pub fn cli_app() -> Command { .value_name("BLOCK_SSZ") .action(ArgAction::Set) .requires("checkpoint-state") + .display_order(0) ) .arg( Arg::new("checkpoint-blobs") @@ -982,6 +1115,7 @@ pub fn cli_app() -> Command { .value_name("BLOBS_SSZ") .action(ArgAction::Set) .requires("checkpoint-block") + .display_order(0) ) .arg( Arg::new("checkpoint-sync-url") @@ -990,6 +1124,7 @@ pub fn cli_app() -> Command { .value_name("BEACON_NODE") .action(ArgAction::Set) .conflicts_with("checkpoint-state") + .display_order(0) ) .arg( Arg::new("checkpoint-sync-url-timeout") @@ -998,6 +1133,7 @@ pub fn cli_app() -> Command { .value_name("SECONDS") .action(ArgAction::Set) .default_value("180") + .display_order(0) ) .arg( Arg::new("allow-insecure-genesis-sync") @@ -1008,21 +1144,27 @@ pub fn cli_app() -> Command { .conflicts_with("checkpoint-sync-url") .conflicts_with("checkpoint-state") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("reconstruct-historic-states") .long("reconstruct-historic-states") .help("After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("validator-monitor-auto") .long("validator-monitor-auto") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("Enables the automatic detection and monitoring of validators connected to the \ HTTP API and using the subnet subscription endpoint. This generally has the \ effect of providing additional logging and metrics for locally controlled \ validators.") + .display_order(0) ) .arg( Arg::new("validator-monitor-pubkeys") @@ -1032,6 +1174,7 @@ pub fn cli_app() -> Command { logging.") .value_name("PUBKEYS") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("validator-monitor-file") @@ -1040,6 +1183,7 @@ pub fn cli_app() -> Command { contained within a file at the given path.") .value_name("PATH") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("validator-monitor-individual-tracking-threshold") @@ -1051,6 +1195,7 @@ pub fn cli_app() -> Command { high log volume when using many validators. Defaults to 64.") .value_name("INTEGER") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("disable-lock-timeouts") @@ -1059,12 +1204,16 @@ pub fn cli_app() -> Command { lead to less spurious failures on slow hardware but is considered \ experimental as it may obscure performance issues.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("disable-proposer-reorgs") .long("disable-proposer-reorgs") .help("Do not attempt to reorg late blocks from other validators when proposing.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("proposer-reorg-threshold") @@ -1074,6 +1223,7 @@ pub fn cli_app() -> Command { .help("Percentage of vote weight below which to attempt a proposer reorg. \ Default: 20%") .conflicts_with("disable-proposer-reorgs") + .display_order(0) ) .arg( Arg::new("proposer-reorg-epochs-since-finalization") @@ -1083,6 +1233,7 @@ pub fn cli_app() -> Command { .help("Maximum number of epochs since finalization at which proposer reorgs are \ allowed. Default: 2") .conflicts_with("disable-proposer-reorgs") + .display_order(0) ) .arg( Arg::new("proposer-reorg-cutoff") @@ -1094,6 +1245,7 @@ pub fn cli_app() -> Command { ample time to propagate and be processed by the network. The default is \ 1/12th of a slot (1 second on mainnet)") .conflicts_with("disable-proposer-reorgs") + .display_order(0) ) .arg( Arg::new("proposer-reorg-disallowed-offsets") @@ -1107,6 +1259,7 @@ pub fn cli_app() -> Command { avoided. Any offsets supplied with this flag will impose additional \ restrictions.") .conflicts_with("disable-proposer-reorgs") + .display_order(0) ) .arg( Arg::new("prepare-payload-lookahead") @@ -1117,6 +1270,7 @@ pub fn cli_app() -> Command { improve their payload after the first call, and high values are useful \ for ensuring the EL is given ample notice. Default: 1/3 of a slot.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("always-prepare-payload") @@ -1126,6 +1280,8 @@ pub fn cli_app() -> Command { recipient on this BN and also consider adjusting the \ --prepare-payload-lookahead flag.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("fork-choice-before-proposal-timeout") @@ -1135,6 +1291,7 @@ pub fn cli_app() -> Command { to 0, however you risk proposing atop the wrong parent block.") .default_value("250") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("paranoid-block-proposal") @@ -1145,6 +1302,8 @@ pub fn cli_app() -> Command { otherwise.") .hide(true) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("builder-fallback-skips") @@ -1154,6 +1313,7 @@ pub fn cli_app() -> Command { and will use the local execution engine for payload construction.") .default_value("3") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("builder-fallback-skips-per-epoch") @@ -1164,6 +1324,7 @@ pub fn cli_app() -> Command { payload construction.") .default_value("8") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("builder-fallback-epochs-since-finalization") @@ -1177,6 +1338,7 @@ pub fn cli_app() -> Command { is set to propose.") .default_value("3") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("builder-fallback-disable-checks") @@ -1185,6 +1347,8 @@ pub fn cli_app() -> Command { API will always be used for payload construction, regardless of recent chain \ conditions.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("builder-profit-threshold") @@ -1192,6 +1356,7 @@ pub fn cli_app() -> Command { .value_name("WEI_VALUE") .help("This flag is deprecated and has no effect.") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("builder-user-agent") @@ -1201,6 +1366,7 @@ pub fn cli_app() -> Command { default is Lighthouse's version string.") .requires("builder") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("reset-payload-statuses") @@ -1209,6 +1375,8 @@ pub fn cli_app() -> Command { already-imported blocks. This can assist in the recovery from a consensus \ failure caused by the execution layer.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("disable-deposit-contract-sync") @@ -1217,14 +1385,18 @@ pub fn cli_app() -> Command { This overrides any previous option that depends on it. \ Useful if you intend to run a non-validating beacon node.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("disable-optimistic-finalized-sync") .long("disable-optimistic-finalized-sync") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("Force Lighthouse to verify every execution block hash with the execution \ client during finalized sync. By default block hashes will be checked in \ Lighthouse and only passed to the EL if initial verification fails.") + .display_order(0) ) .arg( Arg::new("light-client-server") @@ -1232,6 +1404,8 @@ pub fn cli_app() -> Command { .help("Act as a full node supporting light clients on the p2p network \ [experimental]") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("gui") @@ -1239,12 +1413,16 @@ pub fn cli_app() -> Command { .help("Enable the graphical user interface and all its requirements. \ This enables --http and --validator-monitor-auto and enables SSE logging.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("always-prefer-builder-payload") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .long("always-prefer-builder-payload") .help("This flag is deprecated and has no effect.") + .display_order(0) ) .arg( Arg::new("invalid-gossip-verified-blocks-path") @@ -1255,6 +1433,7 @@ pub fn cli_app() -> Command { the block SSZ as a file at this path. This feature is only recommended for \ developers. This directory is not pruned, users should be careful to avoid \ filling up their disks.") + .display_order(0) ) .arg( Arg::new("progressive-balances") @@ -1268,6 +1447,7 @@ pub fn cli_app() -> Command { Lighthouse team.") .action(ArgAction::Set) .value_parser(ProgressiveBalancesMode::VARIANTS.to_vec()) + .display_order(0) ) .arg( Arg::new("beacon-processor-max-workers") @@ -1279,6 +1459,7 @@ pub fn cli_app() -> Command { default value is the number of logical CPU cores on the host.") .hide(true) .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("beacon-processor-work-queue-len") @@ -1290,6 +1471,7 @@ pub fn cli_app() -> Command { .default_value("16384") .hide(true) .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("beacon-processor-reprocess-queue-len") @@ -1301,6 +1483,7 @@ pub fn cli_app() -> Command { .hide(true) .default_value("12288") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("beacon-processor-attestation-batch-size") @@ -1312,6 +1495,7 @@ pub fn cli_app() -> Command { .hide(true) .default_value("64") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("beacon-processor-aggregate-batch-size") @@ -1324,12 +1508,15 @@ pub fn cli_app() -> Command { .hide(true) .default_value("64") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("disable-duplicate-warn-logs") .long("disable-duplicate-warn-logs") .help("This flag is deprecated and has no effect.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .group(ArgGroup::new("enable_http").args(["http", "gui", "staking"]).multiple(true)) } diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index 9e1b46d61a3..0854078e281 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -1,7 +1,7 @@ //! Simple logic for spawning a Lighthouse BootNode. use clap::{Arg, ArgAction, Command}; -use clap_utils::get_color_style; +use clap_utils::{get_color_style, FLAG_HEADER}; // TODO: Add DOS prevention CLI params pub fn cli_app() -> Command { @@ -26,6 +26,7 @@ pub fn cli_app() -> Command { .num_args(0..=2) .required(true) .conflicts_with("network-dir") + .display_order(0) ) .arg( Arg::new("port") @@ -34,6 +35,7 @@ pub fn cli_app() -> Command { .help("The UDP port to listen on.") .default_value("9000") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("port6") @@ -42,7 +44,8 @@ pub fn cli_app() -> Command { .help("The UDP port to listen on over IpV6 when listening over both Ipv4 and \ Ipv6. Defaults to 9090 when required.") .default_value("9090") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("listen-address") @@ -59,6 +62,7 @@ pub fn cli_app() -> Command { .num_args(0..=2) .default_value("0.0.0.0") .action(ArgAction::Append) + .display_order(0) ) .arg( Arg::new("boot-nodes") @@ -66,7 +70,8 @@ pub fn cli_app() -> Command { .allow_hyphen_values(true) .value_name("ENR-LIST/Multiaddr") .help("One or more comma-delimited base64-encoded ENR's or multiaddr strings of peers to initially add to the local routing table") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enr-udp-port") @@ -75,6 +80,7 @@ pub fn cli_app() -> Command { .help("The UDP port of the boot node's ENR. This is the port that external peers will dial to reach this boot node. Set this only if the external port differs from the listening port.") .action(ArgAction::Set) .conflicts_with("network-dir") + .display_order(0) ) .arg( Arg::new("enr-udp6-port") @@ -83,21 +89,26 @@ pub fn cli_app() -> Command { .help("The UDP6 port of the local ENR. Set this only if you are sure other nodes \ can connect to your local node on this port over IpV6.") .conflicts_with("network-dir") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enable-enr-auto-update") .short('x') .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .long("enable-enr-auto-update") .help("Discovery can automatically update the node's local ENR with an external IP address and port as seen by other peers on the network. \ This enables this feature.") + .display_order(0) ) .arg( Arg::new("disable-packet-filter") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .long("disable-packet-filter") .help("Disables discv5 packet filter. Useful for testing in smaller networks") + .display_order(0) ) .arg( Arg::new("network-dir") @@ -105,5 +116,6 @@ pub fn cli_app() -> Command { .long("network-dir") .help("The directory which contains the enr and it's associated private key") .action(ArgAction::Set) + .display_order(0) ) } diff --git a/common/clap_utils/src/lib.rs b/common/clap_utils/src/lib.rs index f687c50c37e..ea56e7e672a 100644 --- a/common/clap_utils/src/lib.rs +++ b/common/clap_utils/src/lib.rs @@ -16,6 +16,8 @@ pub const BAD_TESTNET_DIR_MESSAGE: &str = "The hard-coded testnet directory was or when there is no default public network to connect to. \ During these times you must specify a --testnet-dir."; +pub const FLAG_HEADER: &str = "Flags"; + /// Try to parse the eth2 network config from the `network`, `testnet-dir` flags in that order. /// Returns the default hardcoded testnet if neither flags are set. pub fn get_eth2_network_config(cli_args: &ArgMatches) -> Result { diff --git a/database_manager/src/lib.rs b/database_manager/src/lib.rs index 5f9b9e9af53..804fc9da2a1 100644 --- a/database_manager/src/lib.rs +++ b/database_manager/src/lib.rs @@ -4,7 +4,7 @@ use beacon_chain::{ }; use beacon_node::{get_data_dir, get_slots_per_restore_point, ClientConfig}; use clap::{Arg, ArgAction, ArgMatches, Command}; -use clap_utils::get_color_style; +use clap_utils::{get_color_style, FLAG_HEADER}; use environment::{Environment, RuntimeContext}; use slog::{info, warn, Logger}; use std::fs; @@ -52,7 +52,8 @@ pub fn inspect_cli_app() -> Command { .value_name("TAG") .help("3-byte column ID (see `DBColumn`)") .action(ArgAction::Set) - .required(true), + .required(true) + .display_order(0), ) .arg( Arg::new("output") @@ -60,40 +61,48 @@ pub fn inspect_cli_app() -> Command { .value_name("TARGET") .help("Select the type of output to show") .default_value("sizes") - .value_parser(InspectTarget::VARIANTS.to_vec()), + .value_parser(InspectTarget::VARIANTS.to_vec()) + .display_order(0), ) .arg( Arg::new("skip") .long("skip") .value_name("N") - .help("Skip over the first N keys"), + .help("Skip over the first N keys") + .display_order(0), ) .arg( Arg::new("limit") .long("limit") .value_name("N") - .help("Output at most N keys"), + .help("Output at most N keys") + .display_order(0), ) .arg( Arg::new("freezer") .long("freezer") .help("Inspect the freezer DB rather than the hot DB") .action(ArgAction::SetTrue) - .conflicts_with("blobs-db"), + .help_heading(FLAG_HEADER) + .conflicts_with("blobs-db") + .display_order(0), ) .arg( Arg::new("blobs-db") .long("blobs-db") .help("Inspect the blobs DB rather than the hot DB") .action(ArgAction::SetTrue) - .conflicts_with("freezer"), + .help_heading(FLAG_HEADER) + .conflicts_with("freezer") + .display_order(0), ) .arg( Arg::new("output-dir") .long("output-dir") .value_name("DIR") .help("Base directory for the output files. Defaults to the current directory") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) } @@ -107,21 +116,26 @@ pub fn compact_cli_app() -> Command { .value_name("TAG") .help("3-byte column ID (see `DBColumn`)") .action(ArgAction::Set) - .required(true), + .required(true) + .display_order(0), ) .arg( Arg::new("freezer") .long("freezer") .help("Inspect the freezer DB rather than the hot DB") .action(ArgAction::SetTrue) - .conflicts_with("blobs-db"), + .help_heading(FLAG_HEADER) + .conflicts_with("blobs-db") + .display_order(0), ) .arg( Arg::new("blobs-db") .long("blobs-db") .help("Inspect the blobs DB rather than the hot DB") .action(ArgAction::SetTrue) - .conflicts_with("freezer"), + .help_heading(FLAG_HEADER) + .conflicts_with("freezer") + .display_order(0), ) } @@ -149,7 +163,9 @@ pub fn prune_states_app() -> Command { "Commit to pruning states irreversably. Without this flag the command will \ just check that the database is capable of being pruned.", ) - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0), ) .styles(get_color_style()) .about("Prune all beacon states from the freezer database") @@ -157,6 +173,7 @@ pub fn prune_states_app() -> Command { pub fn cli_app() -> Command { Command::new(CMD) + .display_order(0) .visible_aliases(["db"]) .styles(get_color_style()) .about("Manage a beacon node database") @@ -169,14 +186,16 @@ pub fn cli_app() -> Command { Cannot be changed after initialization. \ [default: 2048 (mainnet) or 64 (minimal)]", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new("freezer-dir") .long("freezer-dir") .value_name("DIR") .help("Data directory for the freezer database.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new("blob-prune-margin-epochs") @@ -187,14 +206,16 @@ pub fn cli_app() -> Command { up until data_availability_boundary - blob_prune_margin_epochs.", ) .action(ArgAction::Set) - .default_value("0"), + .default_value("0") + .display_order(0), ) .arg( Arg::new("blobs-dir") .long("blobs-dir") .value_name("DIR") .help("Data directory for the blobs database.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .subcommand(migrate_cli_app()) .subcommand(version_cli_app()) diff --git a/lcli/src/main.rs b/lcli/src/main.rs index d54f6aa3861..8ee6451156d 100644 --- a/lcli/src/main.rs +++ b/lcli/src/main.rs @@ -20,7 +20,7 @@ mod state_root; mod transition_blocks; use clap::{Arg, ArgAction, ArgMatches, Command}; -use clap_utils::parse_optional; +use clap_utils::{parse_optional, FLAG_HEADER}; use environment::{EnvironmentBuilder, LoggerConfig}; use eth2_network_config::Eth2NetworkConfig; use parse_ssz::run_parse_ssz; @@ -34,6 +34,7 @@ fn main() { let matches = Command::new("Lighthouse CLI Tool") .version(lighthouse_version::VERSION) + .display_order(0) .about("Performs various testing-related tasks, including defining testnets.") .arg( Arg::new("spec") @@ -43,7 +44,8 @@ fn main() { .action(ArgAction::Set) .value_parser(["minimal", "mainnet", "gnosis"]) .default_value("mainnet") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("testnet-dir") @@ -52,7 +54,8 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .global(true) - .help("The testnet dir."), + .help("The testnet dir.") + .display_order(0) ) .arg( Arg::new("network") @@ -62,6 +65,7 @@ fn main() { .global(true) .help("The network to use. Defaults to mainnet.") .conflicts_with("testnet-dir") + .display_order(0) ) .subcommand( Command::new("skip-slots") @@ -73,7 +77,8 @@ fn main() { .long("output-path") .value_name("PATH") .action(ArgAction::Set) - .help("Path to output a SSZ file."), + .help("Path to output a SSZ file.") + .display_order(0) ) .arg( Arg::new("pre-state-path") @@ -81,14 +86,16 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .conflicts_with("beacon-url") - .help("Path to a SSZ file of the pre-state."), + .help("Path to a SSZ file of the pre-state.") + .display_order(0) ) .arg( Arg::new("beacon-url") .long("beacon-url") .value_name("URL") .action(ArgAction::Set) - .help("URL to a beacon-API provider."), + .help("URL to a beacon-API provider.") + .display_order(0) ) .arg( Arg::new("state-id") @@ -96,7 +103,8 @@ fn main() { .value_name("STATE_ID") .action(ArgAction::Set) .requires("beacon-url") - .help("Identifier for a state as per beacon-API standards (slot, root, etc.)"), + .help("Identifier for a state as per beacon-API standards (slot, root, etc.)") + .display_order(0) ) .arg( Arg::new("runs") @@ -104,27 +112,32 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .default_value("1") - .help("Number of repeat runs, useful for benchmarking."), + .help("Number of repeat runs, useful for benchmarking.") + .display_order(0) ) .arg( Arg::new("state-root") .long("state-root") .value_name("HASH256") .action(ArgAction::Set) - .help("Tree hash root of the provided state, to avoid computing it."), + .help("Tree hash root of the provided state, to avoid computing it.") + .display_order(0) ) .arg( Arg::new("slots") .long("slots") .value_name("INTEGER") .action(ArgAction::Set) - .help("Number of slots to skip forward."), + .help("Number of slots to skip forward.") + .display_order(0) ) .arg( Arg::new("partial-state-advance") .long("partial-state-advance") .action(ArgAction::SetTrue) - .help("If present, don't compute state roots when skipping forward."), + .help_heading(FLAG_HEADER) + .help("If present, don't compute state roots when skipping forward.") + .display_order(0) ) ) .subcommand( @@ -137,7 +150,8 @@ fn main() { .action(ArgAction::Set) .conflicts_with("beacon-url") .requires("block-path") - .help("Path to load a BeaconState from as SSZ."), + .help("Path to load a BeaconState from as SSZ.") + .display_order(0) ) .arg( Arg::new("block-path") @@ -146,35 +160,40 @@ fn main() { .action(ArgAction::Set) .conflicts_with("beacon-url") .requires("pre-state-path") - .help("Path to load a SignedBeaconBlock from as SSZ."), + .help("Path to load a SignedBeaconBlock from as SSZ.") + .display_order(0) ) .arg( Arg::new("post-state-output-path") .long("post-state-output-path") .value_name("PATH") .action(ArgAction::Set) - .help("Path to output the post-state."), + .help("Path to output the post-state.") + .display_order(0) ) .arg( Arg::new("pre-state-output-path") .long("pre-state-output-path") .value_name("PATH") .action(ArgAction::Set) - .help("Path to output the pre-state, useful when used with --beacon-url."), + .help("Path to output the pre-state, useful when used with --beacon-url.") + .display_order(0) ) .arg( Arg::new("block-output-path") .long("block-output-path") .value_name("PATH") .action(ArgAction::Set) - .help("Path to output the block, useful when used with --beacon-url."), + .help("Path to output the block, useful when used with --beacon-url.") + .display_order(0) ) .arg( Arg::new("beacon-url") .long("beacon-url") .value_name("URL") .action(ArgAction::Set) - .help("URL to a beacon-API provider."), + .help("URL to a beacon-API provider.") + .display_order(0) ) .arg( Arg::new("block-id") @@ -182,7 +201,8 @@ fn main() { .value_name("BLOCK_ID") .action(ArgAction::Set) .requires("beacon-url") - .help("Identifier for a block as per beacon-API standards (slot, root, etc.)"), + .help("Identifier for a block as per beacon-API standards (slot, root, etc.)") + .display_order(0) ) .arg( Arg::new("runs") @@ -190,27 +210,34 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .default_value("1") - .help("Number of repeat runs, useful for benchmarking."), + .help("Number of repeat runs, useful for benchmarking.") + .display_order(0) ) .arg( Arg::new("no-signature-verification") .long("no-signature-verification") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("Disable signature verification.") + .display_order(0) ) .arg( Arg::new("exclude-cache-builds") .long("exclude-cache-builds") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("If present, pre-build the committee and tree-hash caches without \ - including them in the timings."), + including them in the timings.") + .display_order(0) ) .arg( Arg::new("exclude-post-block-thc") .long("exclude-post-block-thc") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("If present, don't rebuild the tree-hash-cache after applying \ - the block."), + the block.") + .display_order(0) ) ) .subcommand( @@ -226,20 +253,23 @@ fn main() { .default_value("json") .value_parser(["json", "yaml"]) .help("Output format to use") + .display_order(0) ) .arg( Arg::new("type") .value_name("TYPE") .action(ArgAction::Set) .required(true) - .help("Type to decode"), + .help("Type to decode") + .display_order(0) ) .arg( Arg::new("ssz-file") .value_name("FILE") .action(ArgAction::Set) .required(true) - .help("Path to SSZ bytes"), + .help("Path to SSZ bytes") + .display_order(0) ) ) .subcommand( @@ -255,6 +285,7 @@ fn main() { .help("Path to an Eth1 JSON-RPC IPC endpoint") .action(ArgAction::Set) .required(true) + .display_order(0) ) .arg( Arg::new("confirmations") @@ -262,7 +293,8 @@ fn main() { .long("confirmations") .action(ArgAction::Set) .default_value("3") - .help("The number of block confirmations before declaring the contract deployed."), + .help("The number of block confirmations before declaring the contract deployed.") + .display_order(0) ) .arg( Arg::new("validator-count") @@ -271,7 +303,8 @@ fn main() { .action(ArgAction::Set) .help("If present, makes `validator_count` number of INSECURE deterministic deposits after \ deploying the deposit contract." - ), + ) + .display_order(0) ) ) .subcommand( @@ -283,7 +316,8 @@ fn main() { .long("eth1-endpoint") .value_name("HTTP_SERVER") .action(ArgAction::Set) - .help("Deprecated. Use --eth1-endpoints."), + .help("Deprecated. Use --eth1-endpoints.") + .display_order(0) ) .arg( Arg::new("eth1-endpoints") @@ -295,7 +329,8 @@ fn main() { "One or more comma-delimited URLs to eth1 JSON-RPC http APIs. \ If multiple endpoints are given the endpoints are used as \ fallback in the given order.", - ), + ) + .display_order(0) ), ) .subcommand( @@ -308,7 +343,8 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .default_value("1024") - .help("The number of validators in the genesis state."), + .help("The number of validators in the genesis state.") + .display_order(0) ) .arg( Arg::new("genesis-time") @@ -316,7 +352,8 @@ fn main() { .short('t') .value_name("UNIX_EPOCH") .action(ArgAction::Set) - .help("The value for state.genesis_time. Defaults to now."), + .help("The value for state.genesis_time. Defaults to now.") + .display_order(0) ) .arg( Arg::new("genesis-fork-version") @@ -326,7 +363,8 @@ fn main() { .help( "Used to avoid reply attacks between testnets. Recommended to set to non-default.", - ), + ) + .display_order(0) ), ) .subcommand( @@ -340,7 +378,8 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .required(true) - .help("The path to the SSZ file"), + .help("The path to the SSZ file") + .display_order(0) ) .arg( Arg::new("genesis-time") @@ -348,7 +387,8 @@ fn main() { .value_name("UNIX_EPOCH") .action(ArgAction::Set) .required(true) - .help("The value for state.genesis_time."), + .help("The value for state.genesis_time.") + .display_order(0) ), ) .subcommand( @@ -365,7 +405,8 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .required(true) - .help("The path to the SSZ file"), + .help("The path to the SSZ file") + .display_order(0) ) .arg( Arg::new("mnemonic") @@ -376,7 +417,8 @@ fn main() { "replace nephew blur decorate waste convince soup column \ orient excite play baby", ) - .help("The mnemonic for key derivation."), + .help("The mnemonic for key derivation.") + .display_order(0) ), ) .subcommand( @@ -394,7 +436,8 @@ fn main() { `execution_payload_header.random`") .default_value( "0x0000000000000000000000000000000000000000000000000000000000000000", - ), + ) + .display_order(0) ) .arg( Arg::new("genesis-time") @@ -402,6 +445,7 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .help("The genesis time when generating an execution payload.") + .display_order(0) ) .arg( Arg::new("base-fee-per-gas") @@ -409,7 +453,8 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .help("The base fee per gas field in the execution payload generated.") - .default_value("1000000000"), + .default_value("1000000000") + .display_order(0) ) .arg( Arg::new("gas-limit") @@ -417,7 +462,8 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .help("The gas limit field in the execution payload generated.") - .default_value("30000000"), + .default_value("30000000") + .display_order(0) ) .arg( Arg::new("file") @@ -425,7 +471,8 @@ fn main() { .value_name("FILE") .action(ArgAction::Set) .required(true) - .help("Output file"), + .help("Output file") + .display_order(0) ).arg( Arg::new("fork") .long("fork") @@ -434,6 +481,7 @@ fn main() { .default_value("bellatrix") .help("The fork for which the execution payload header should be created.") .value_parser(["merge", "bellatrix", "capella", "deneb", "capella"]) + .display_order(0) ) ) .subcommand( @@ -447,23 +495,29 @@ fn main() { .long("force") .short('f') .action(ArgAction::SetTrue) - .help("Overwrites any previous testnet configurations"), + .help_heading(FLAG_HEADER) + .help("Overwrites any previous testnet configurations") + .display_order(0) ) .arg( Arg::new("interop-genesis-state") .long("interop-genesis-state") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "If present, a interop-style genesis.ssz file will be generated.", - ), + ) + .display_order(0) ) .arg( Arg::new("derived-genesis-state") .long("derived-genesis-state") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "If present, a genesis.ssz file will be generated with keys generated from a given mnemonic.", - ), + ) + .display_order(0) ) .arg( Arg::new("mnemonic-phrase") @@ -471,7 +525,8 @@ fn main() { .value_name("MNEMONIC_PHRASE") .action(ArgAction::Set) .requires("derived-genesis-state") - .help("The mnemonic with which we generate the validator keys for a derived genesis state"), + .help("The mnemonic with which we generate the validator keys for a derived genesis state") + .display_order(0) ) .arg( Arg::new("min-genesis-time") @@ -481,56 +536,64 @@ fn main() { .help( "The minimum permitted genesis time. For non-eth1 testnets will be the genesis time. Defaults to now.", - ), + ) + .display_order(0) ) .arg( Arg::new("min-genesis-active-validator-count") .long("min-genesis-active-validator-count") .value_name("INTEGER") .action(ArgAction::Set) - .help("The number of validators required to trigger eth2 genesis."), + .help("The number of validators required to trigger eth2 genesis.") + .display_order(0) ) .arg( Arg::new("genesis-delay") .long("genesis-delay") .value_name("SECONDS") .action(ArgAction::Set) - .help("The delay between sufficient eth1 deposits and eth2 genesis."), + .help("The delay between sufficient eth1 deposits and eth2 genesis.") + .display_order(0) ) .arg( Arg::new("min-deposit-amount") .long("min-deposit-amount") .value_name("GWEI") .action(ArgAction::Set) - .help("The minimum permitted deposit amount."), + .help("The minimum permitted deposit amount.") + .display_order(0) ) .arg( Arg::new("max-effective-balance") .long("max-effective-balance") .value_name("GWEI") .action(ArgAction::Set) - .help("The amount required to become a validator."), + .help("The amount required to become a validator.") + .display_order(0) ) .arg( Arg::new("effective-balance-increment") .long("effective-balance-increment") .value_name("GWEI") .action(ArgAction::Set) - .help("The steps in effective balance calculation."), + .help("The steps in effective balance calculation.") + .display_order(0) ) .arg( Arg::new("ejection-balance") .long("ejection-balance") .value_name("GWEI") .action(ArgAction::Set) - .help("The balance at which a validator gets ejected."), + .help("The balance at which a validator gets ejected.") + .display_order(0) ) .arg( Arg::new("eth1-follow-distance") .long("eth1-follow-distance") .value_name("ETH1_BLOCKS") .action(ArgAction::Set) - .help("The distance to follow behind the eth1 chain head."), + .help("The distance to follow behind the eth1 chain head.") + .display_order(0) ) .arg( Arg::new("genesis-fork-version") @@ -540,28 +603,32 @@ fn main() { .help( "Used to avoid reply attacks between testnets. Recommended to set to non-default.", - ), + ) + .display_order(0) ) .arg( Arg::new("seconds-per-slot") .long("seconds-per-slot") .value_name("SECONDS") .action(ArgAction::Set) - .help("Eth2 slot time"), + .help("Eth2 slot time") + .display_order(0) ) .arg( Arg::new("seconds-per-eth1-block") .long("seconds-per-eth1-block") .value_name("SECONDS") .action(ArgAction::Set) - .help("Eth1 block time"), + .help("Eth1 block time") + .display_order(0) ) .arg( Arg::new("eth1-id") .long("eth1-id") .value_name("ETH1_ID") .action(ArgAction::Set) - .help("The chain id and network id for the eth1 testnet."), + .help("The chain id and network id for the eth1 testnet.") + .display_order(0) ) .arg( Arg::new("deposit-contract-address") @@ -569,7 +636,8 @@ fn main() { .value_name("ETH1_ADDRESS") .action(ArgAction::Set) .required(true) - .help("The address of the deposit contract."), + .help("The address of the deposit contract.") + .display_order(0) ) .arg( Arg::new("deposit-contract-deploy-block") @@ -580,7 +648,8 @@ fn main() { .help( "The block the deposit contract was deployed. Setting this is a huge optimization for nodes, please do it.", - ), + ) + .display_order(0) ) .arg( Arg::new("altair-fork-epoch") @@ -589,7 +658,8 @@ fn main() { .action(ArgAction::Set) .help( "The epoch at which to enable the Altair hard fork", - ), + ) + .display_order(0) ) .arg( Arg::new("bellatrix-fork-epoch") @@ -598,7 +668,8 @@ fn main() { .action(ArgAction::Set) .help( "The epoch at which to enable the Bellatrix hard fork", - ), + ) + .display_order(0) ) .arg( Arg::new("capella-fork-epoch") @@ -607,7 +678,8 @@ fn main() { .action(ArgAction::Set) .help( "The epoch at which to enable the Capella hard fork", - ), + ) + .display_order(0) ) .arg( Arg::new("deneb-fork-epoch") @@ -616,7 +688,8 @@ fn main() { .action(ArgAction::Set) .help( "The epoch at which to enable the Deneb hard fork", - ), + ) + .display_order(0) ) .arg( Arg::new("electra-fork-epoch") @@ -625,7 +698,8 @@ fn main() { .action(ArgAction::Set) .help( "The epoch at which to enable the Electra hard fork", - ), + ) + .display_order(0) ) .arg( Arg::new("ttd") @@ -634,14 +708,16 @@ fn main() { .action(ArgAction::Set) .help( "The terminal total difficulty", - ), + ) + .display_order(0) ) .arg( Arg::new("eth1-block-hash") .long("eth1-block-hash") .value_name("BLOCK_HASH") .action(ArgAction::Set) - .help("The eth1 block hash used when generating a genesis state."), + .help("The eth1 block hash used when generating a genesis state.") + .display_order(0) ) .arg( Arg::new("execution-payload-header") @@ -650,28 +726,32 @@ fn main() { .action(ArgAction::Set) .required(false) .help("Path to file containing `ExecutionPayloadHeader` SSZ bytes to be \ - used in the genesis state."), + used in the genesis state.") + .display_order(0) ) .arg( Arg::new("validator-count") .long("validator-count") .value_name("INTEGER") .action(ArgAction::Set) - .help("The number of validators when generating a genesis state."), + .help("The number of validators when generating a genesis state.") + .display_order(0) ) .arg( Arg::new("genesis-time") .long("genesis-time") .value_name("INTEGER") .action(ArgAction::Set) - .help("The genesis time when generating a genesis state."), + .help("The genesis time when generating a genesis state.") + .display_order(0) ) .arg( Arg::new("proposer-score-boost") .long("proposer-score-boost") .value_name("INTEGER") .action(ArgAction::Set) - .help("The proposer score boost to apply as a percentage, e.g. 70 = 70%"), + .help("The proposer score boost to apply as a percentage, e.g. 70 = 70%") + .display_order(0) ) ) @@ -684,7 +764,8 @@ fn main() { .value_name("GWEI") .action(ArgAction::Set) .required(true) - .help("The amount (in Gwei) that was deposited"), + .help("The amount (in Gwei) that was deposited") + .display_order(0) ) .arg( Arg::new("deposit-data") @@ -695,7 +776,8 @@ fn main() { .help( "A 0x-prefixed hex string of the deposit data. Should include the function signature.", - ), + ) + .display_order(0) ), ) .subcommand( @@ -707,7 +789,8 @@ fn main() { .value_name("IP_ADDRESS") .action(ArgAction::Set) .required(true) - .help("The IP address to be included in the ENR and used for discovery"), + .help("The IP address to be included in the ENR and used for discovery") + .display_order(0) ) .arg( Arg::new("udp-port") @@ -715,7 +798,8 @@ fn main() { .value_name("UDP_PORT") .action(ArgAction::Set) .required(true) - .help("The UDP port to be included in the ENR and used for discovery"), + .help("The UDP port to be included in the ENR and used for discovery") + .display_order(0) ) .arg( Arg::new("tcp-port") @@ -725,7 +809,8 @@ fn main() { .required(true) .help( "The TCP port to be included in the ENR and used for application comms", - ), + ) + .display_order(0) ) .arg( Arg::new("output-dir") @@ -733,7 +818,8 @@ fn main() { .value_name("OUTPUT_DIRECTORY") .action(ArgAction::Set) .required(true) - .help("The directory in which to create the network dir"), + .help("The directory in which to create the network dir") + .display_order(0) ) .arg( Arg::new("genesis-fork-version") @@ -744,7 +830,8 @@ fn main() { .help( "Used to avoid reply attacks between testnets. Recommended to set to non-default.", - ), + ) + .display_order(0) ), ) .subcommand( @@ -756,7 +843,8 @@ fn main() { .value_name("COUNT") .action(ArgAction::Set) .required(true) - .help("Produces validators in the range of 0..count."), + .help("Produces validators in the range of 0..count.") + .display_order(0) ) .arg( Arg::new("base-dir") @@ -764,14 +852,16 @@ fn main() { .value_name("BASE_DIR") .action(ArgAction::Set) .required(true) - .help("The base directory where validator keypairs and secrets are stored"), + .help("The base directory where validator keypairs and secrets are stored") + .display_order(0) ) .arg( Arg::new("node-count") .long("node-count") .value_name("NODE_COUNT") .action(ArgAction::Set) - .help("The number of nodes to divide the validator keys to"), + .help("The number of nodes to divide the validator keys to") + .display_order(0) ) ) .subcommand( @@ -785,7 +875,8 @@ fn main() { .value_name("COUNT") .action(ArgAction::Set) .required(true) - .help("Produces validators in the range of 0..count."), + .help("Produces validators in the range of 0..count.") + .display_order(0) ) .arg( Arg::new("base-dir") @@ -793,14 +884,16 @@ fn main() { .value_name("BASE_DIR") .action(ArgAction::Set) .required(true) - .help("The base directory where validator keypairs and secrets are stored"), + .help("The base directory where validator keypairs and secrets are stored") + .display_order(0) ) .arg( Arg::new("node-count") .long("node-count") .value_name("NODE_COUNT") .action(ArgAction::Set) - .help("The number of nodes to divide the validator keys to"), + .help("The number of nodes to divide the validator keys to") + .display_order(0) ) .arg( Arg::new("mnemonic-phrase") @@ -808,7 +901,8 @@ fn main() { .value_name("MNEMONIC_PHRASE") .action(ArgAction::Set) .required(true) - .help("The mnemonic with which we generate the validator keys"), + .help("The mnemonic with which we generate the validator keys") + .display_order(0) ) ) .subcommand( @@ -820,7 +914,8 @@ fn main() { .value_name("SSZ_STATE") .action(ArgAction::Set) .required(true) - .help("BeaconState to generate committees from (SSZ)"), + .help("BeaconState to generate committees from (SSZ)") + .display_order(0) ) .arg( Arg::new("attestations") @@ -828,7 +923,8 @@ fn main() { .value_name("JSON_ATTESTATIONS") .action(ArgAction::Set) .required(true) - .help("List of Attestations to convert to indexed form (JSON)"), + .help("List of Attestations to convert to indexed form (JSON)") + .display_order(0) ) ) .subcommand( @@ -840,14 +936,16 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .conflicts_with("beacon-url") - .help("Path to load a SignedBeaconBlock from as SSZ."), + .help("Path to load a SignedBeaconBlock from as SSZ.") + .display_order(0) ) .arg( Arg::new("beacon-url") .long("beacon-url") .value_name("URL") .action(ArgAction::Set) - .help("URL to a beacon-API provider."), + .help("URL to a beacon-API provider.") + .display_order(0) ) .arg( Arg::new("block-id") @@ -855,7 +953,8 @@ fn main() { .value_name("BLOCK_ID") .action(ArgAction::Set) .requires("beacon-url") - .help("Identifier for a block as per beacon-API standards (slot, root, etc.)"), + .help("Identifier for a block as per beacon-API standards (slot, root, etc.)") + .display_order(0) ) .arg( Arg::new("runs") @@ -863,7 +962,8 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .default_value("1") - .help("Number of repeat runs, useful for benchmarking."), + .help("Number of repeat runs, useful for benchmarking.") + .display_order(0) ) ) .subcommand( @@ -875,14 +975,16 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .conflicts_with("beacon-url") - .help("Path to load a BeaconState from as SSZ."), + .help("Path to load a BeaconState from as SSZ.") + .display_order(0) ) .arg( Arg::new("beacon-url") .long("beacon-url") .value_name("URL") .action(ArgAction::Set) - .help("URL to a beacon-API provider."), + .help("URL to a beacon-API provider.") + .display_order(0) ) .arg( Arg::new("state-id") @@ -890,7 +992,8 @@ fn main() { .value_name("BLOCK_ID") .action(ArgAction::Set) .requires("beacon-url") - .help("Identifier for a state as per beacon-API standards (slot, root, etc.)"), + .help("Identifier for a state as per beacon-API standards (slot, root, etc.)") + .display_order(0) ) .arg( Arg::new("runs") @@ -898,7 +1001,8 @@ fn main() { .value_name("INTEGER") .action(ArgAction::Set) .default_value("1") - .help("Number of repeat runs, useful for benchmarking."), + .help("Number of repeat runs, useful for benchmarking.") + .display_order(0) ) ) .subcommand( @@ -912,7 +1016,8 @@ fn main() { .value_name("PATH") .action(ArgAction::Set) .required(true) - .help("Path to write the JWT secret."), + .help("Path to write the JWT secret.") + .display_order(0) ) .arg( Arg::new("listen-address") @@ -921,6 +1026,7 @@ fn main() { .action(ArgAction::Set) .help("The server will listen on this address.") .default_value("127.0.0.1") + .display_order(0) ) .arg( Arg::new("listen-port") @@ -929,6 +1035,7 @@ fn main() { .action(ArgAction::Set) .help("The server will listen on this port.") .default_value("8551") + .display_order(0) ) .arg( Arg::new("all-payloads-valid") @@ -938,6 +1045,7 @@ fn main() { Set to 'true' to return VALID. Set to 'false' to return SYNCING.") .default_value("false") .hide(true) + .display_order(0) ) .arg( Arg::new("shanghai-time") @@ -946,6 +1054,7 @@ fn main() { .action(ArgAction::Set) .help("The payload timestamp that enables Shanghai. Defaults to the mainnet value.") .default_value("1681338479") + .display_order(0) ) .arg( Arg::new("cancun-time") @@ -954,6 +1063,7 @@ fn main() { .action(ArgAction::Set) .help("The payload timestamp that enables Cancun. No default is provided \ until Cancun is triggered on mainnet.") + .display_order(0) ) .arg( Arg::new("prague-time") @@ -962,6 +1072,7 @@ fn main() { .action(ArgAction::Set) .help("The payload timestamp that enables Prague. No default is provided \ until Prague is triggered on mainnet.") + .display_order(0) ) ) .get_matches(); diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index c27a9724a29..118e2dd9bf7 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -83,13 +83,15 @@ fn main() { node, a validator client and utilities for managing validator accounts.", ) .long_version(LONG_VERSION.as_str()) + .display_order(0) .arg( Arg::new("env_log") .short('l') .help( "DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p", ) - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .display_order(0) ) .arg( Arg::new("logfile") @@ -102,7 +104,8 @@ fn main() { Once the number of log files exceeds the value specified in \ `--logfile-max-number` the oldest log file will be overwritten.") .action(ArgAction::Set) - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("logfile-debug-level") @@ -112,7 +115,8 @@ fn main() { .action(ArgAction::Set) .value_parser(["info", "debug", "trace", "warn", "error", "crit"]) .default_value("debug") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("logfile-format") @@ -122,6 +126,7 @@ fn main() { .value_parser(["DEFAULT", "JSON"]) .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("logfile-max-size") @@ -132,7 +137,8 @@ fn main() { to 0, background file logging is disabled.") .action(ArgAction::Set) .default_value("200") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("logfile-max-number") @@ -143,7 +149,8 @@ fn main() { background file logging is disabled.") .action(ArgAction::Set) .default_value("5") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("logfile-compress") @@ -152,7 +159,8 @@ fn main() { .help( "If present, compress old log files. This can help reduce the space needed \ to store old logs.") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("logfile-no-restricted-perms") @@ -163,7 +171,8 @@ fn main() { any user on the machine. Note that logs can often contain sensitive information \ about your validator and so this flag should be used with caution. For Windows users, \ the log file permissions will be inherited from the parent folder.") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("log-format") @@ -172,7 +181,8 @@ fn main() { .help("Specifies the log format used when emitting logs to the terminal.") .value_parser(["JSON"]) .action(ArgAction::Set) - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("log-color") @@ -180,14 +190,16 @@ fn main() { .alias("log-colour") .help("Force outputting colors when emitting logs to the terminal.") .action(ArgAction::SetTrue) - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("disable-log-timestamp") .long("disable-log-timestamp") .action(ArgAction::SetTrue) .help("If present, do not include timestamps in logging output.") - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("debug-level") @@ -197,7 +209,8 @@ fn main() { .action(ArgAction::Set) .value_parser(["info", "debug", "trace", "warn", "error", "crit"]) .global(true) - .default_value("info"), + .default_value("info") + .display_order(0) ) .arg( Arg::new("datadir") @@ -209,7 +222,8 @@ fn main() { "Used to specify a custom root data directory for lighthouse keys and databases. \ Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag \ Note: Users should specify separate custom datadirs for different networks.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("testnet-dir") @@ -222,7 +236,8 @@ fn main() { existing database.", ) .action(ArgAction::Set) - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("network") @@ -233,7 +248,7 @@ fn main() { .conflicts_with("testnet-dir") .action(ArgAction::Set) .global(true) - + .display_order(0) ) .arg( Arg::new("dump-config") @@ -242,6 +257,7 @@ fn main() { .help("Dumps the config to a desired location. Used for testing only.") .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("dump-chain-config") @@ -250,6 +266,7 @@ fn main() { .help("Dumps the chain config to a desired location. Used for testing only.") .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("immediate-shutdown") @@ -260,6 +277,7 @@ fn main() { "Shuts down immediately after the Beacon Node or Validator has successfully launched. \ Used for testing only, DO NOT USE IN PRODUCTION.") .global(true) + .display_order(0) ) .arg( Arg::new(DISABLE_MALLOC_TUNING_FLAG) @@ -270,7 +288,8 @@ fn main() { specific memory allocation issues." ) .action(ArgAction::SetTrue) - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("terminal-total-difficulty-override") @@ -284,6 +303,7 @@ fn main() { failure. Be extremely careful with this flag.") .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("terminal-block-hash-override") @@ -297,6 +317,7 @@ fn main() { .requires("terminal-block-hash-epoch-override") .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("terminal-block-hash-epoch-override") @@ -310,6 +331,7 @@ fn main() { .requires("terminal-block-hash-override") .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("safe-slots-to-import-optimistically") @@ -323,6 +345,7 @@ fn main() { this flag.") .action(ArgAction::Set) .global(true) + .display_order(0) ) .arg( Arg::new("genesis-state-url") @@ -335,7 +358,8 @@ fn main() { If the genesis state is already included in this binary then this value will be ignored.", ) .action(ArgAction::Set) - .global(true), + .global(true) + .display_order(0) ) .arg( Arg::new("genesis-state-url-timeout") @@ -346,7 +370,8 @@ fn main() { ) .action(ArgAction::Set) .default_value("180") - .global(true), + .global(true) + .display_order(0) ) .subcommand(beacon_node::cli_app()) .subcommand(boot_node::cli_app()) diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index 70e6ee7bcb7..ed91712b056 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -1,5 +1,5 @@ use clap::{builder::ArgPredicate, Arg, ArgAction, Command}; -use clap_utils::get_color_style; +use clap_utils::{get_color_style, FLAG_HEADER}; pub fn cli_app() -> Command { Command::new("validator_client") @@ -16,7 +16,8 @@ pub fn cli_app() -> Command { .help("Comma-separated addresses to one or more beacon node HTTP APIs. \ Default is http://localhost:5052." ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("proposer-nodes") @@ -25,7 +26,8 @@ pub fn cli_app() -> Command { .help("Comma-separated addresses to one or more beacon node HTTP APIs. \ These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes." ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) // TODO remove this flag in a future release .arg( @@ -37,7 +39,9 @@ pub fn cli_app() -> Command { and proposer preparation messages to all beacon nodes provided in the \ `--beacon-nodes flag`. This option changes that behaviour such that these \ api calls only go out to the first available and synced beacon node") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("broadcast") @@ -48,7 +52,8 @@ pub fn cli_app() -> Command { sync-committee. Default (when flag is omitted) is to broadcast \ subscriptions only." ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("validators-dir") @@ -62,6 +67,7 @@ pub fn cli_app() -> Command { ) .action(ArgAction::Set) .conflicts_with("datadir") + .display_order(0) ) .arg( Arg::new("secrets-dir") @@ -75,11 +81,13 @@ pub fn cli_app() -> Command { ) .action(ArgAction::Set) .conflicts_with("datadir") + .display_order(0) ) .arg( Arg::new("init-slashing-protection") .long("init-slashing-protection") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "If present, do not require the slashing protection database to exist before \ running. You SHOULD NOT use this flag unless you're certain that a new \ @@ -87,23 +95,28 @@ pub fn cli_app() -> Command { will have been initialized when you imported your validator keys. If you \ misplace your database and then run with this flag you risk being slashed." ) + .display_order(0) ) .arg( Arg::new("disable-auto-discover") .long("disable-auto-discover") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "If present, do not attempt to discover new validators in the validators-dir. Validators \ will need to be manually added to the validator_definitions.yml file." ) + .display_order(0) ) .arg( Arg::new("use-long-timeouts") .long("use-long-timeouts") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("If present, the validator client will use longer timeouts for requests \ made to the beacon node. This flag is generally not recommended, \ longer timeouts can cause missed duties when fallbacks are used.") + .display_order(0) ) .arg( Arg::new("beacon-nodes-tls-certs") @@ -114,6 +127,7 @@ pub fn cli_app() -> Command { to a beacon node (and/or proposer node). These certificates must be in PEM format and are used \ in addition to the OS trust store. Commas must only be used as a \ delimiter, and must not be part of the certificate path.") + .display_order(0) ) // This overwrites the graffiti configured in the beacon node. .arg( @@ -122,6 +136,7 @@ pub fn cli_app() -> Command { .help("Specify your custom graffiti to be included in blocks.") .value_name("GRAFFITI") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("graffiti-file") @@ -130,6 +145,7 @@ pub fn cli_app() -> Command { .value_name("GRAFFITI-FILE") .action(ArgAction::Set) .conflicts_with("graffiti") + .display_order(0) ) .arg( Arg::new("suggested-fee-recipient") @@ -139,6 +155,7 @@ pub fn cli_app() -> Command { configured in the validator definitions it takes priority over this value.") .value_name("FEE-RECIPIENT") .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("produce-block-v3") @@ -148,19 +165,25 @@ pub fn cli_app() -> Command { that has this endpoint implemented. This flag will be enabled by default in \ future.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("distributed") .long("distributed") .help("Enables functionality required for running the validator in a distributed validator cluster.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* REST API related arguments */ .arg( Arg::new("http") .long("http") .help("Enable the RESTful HTTP API server. Disabled by default.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* * Note: The HTTP server is **not** encrypted (i.e., not HTTPS) and therefore it is @@ -180,7 +203,8 @@ pub fn cli_app() -> Command { `--unencrypted-http-transport` flag to ensure the user is aware of the \ risks involved. For access via the Internet, users should apply \ transport-layer security like a HTTPS reverse-proxy or SSH tunnelling.") - .requires("unencrypted-http-transport"), + .requires("unencrypted-http-transport") + .display_order(0) ) .arg( Arg::new("unencrypted-http-transport") @@ -188,7 +212,9 @@ pub fn cli_app() -> Command { .help("This is a safety flag to ensure that the user is aware that the http \ transport is unencrypted and using a custom HTTP address is unsafe.") .action(ArgAction::SetTrue) - .requires("http-address"), + .help_heading(FLAG_HEADER) + .requires("http-address") + .display_order(0) ) .arg( Arg::new("http-port") @@ -197,7 +223,8 @@ pub fn cli_app() -> Command { .value_name("PORT") .help("Set the listen TCP port for the RESTful HTTP API server.") .default_value_if("http", ArgPredicate::IsPresent, "5062") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-allow-origin") @@ -208,7 +235,8 @@ pub fn cli_app() -> Command { Use * to allow any origin (not recommended in production). \ If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5062).") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("http-allow-keystore-export") @@ -219,7 +247,9 @@ pub fn cli_app() -> Command { consumers who have access to the API token. This method is useful for \ exporting validators, however it should be used with caution since it \ exposes private key data to authorized users.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("http-store-passwords-in-secrets-dir") @@ -228,14 +258,18 @@ pub fn cli_app() -> Command { .help("If present, any validators created via the HTTP will have keystore \ passwords stored in the secrets-dir rather than the validator \ definitions file.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* Prometheus metrics HTTP server related arguments */ .arg( Arg::new("metrics") .long("metrics") .help("Enable the Prometheus metrics HTTP server. Disabled by default.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("metrics-address") @@ -244,7 +278,8 @@ pub fn cli_app() -> Command { .value_name("ADDRESS") .help("Set the listen address for the Prometheus metrics HTTP server.") .default_value_if("metrics", ArgPredicate::IsPresent, "127.0.0.1") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("metrics-port") @@ -253,7 +288,8 @@ pub fn cli_app() -> Command { .value_name("PORT") .help("Set the listen TCP port for the Prometheus metrics HTTP server.") .default_value_if("metrics", ArgPredicate::IsPresent, "5064") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("metrics-allow-origin") @@ -264,7 +300,8 @@ pub fn cli_app() -> Command { Use * to allow any origin (not recommended in production). \ If no value is supplied, the CORS allowed origin is set to the listen \ address of this server (e.g., http://localhost:5064).") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enable-high-validator-count-metrics") @@ -273,7 +310,9 @@ pub fn cli_app() -> Command { Note: This flag is automatically enabled for <= 64 validators. \ Enabling this metric for higher validator counts will lead to higher volume \ of prometheus metrics being collected.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* * Explorer metrics @@ -288,7 +327,8 @@ pub fn cli_app() -> Command { Note: This will send information to a remote sever which may identify and associate your \ validators, IP address and other personal information. Always use a HTTPS connection \ and never provide an untrusted URL.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("monitoring-endpoint-period") @@ -297,7 +337,8 @@ pub fn cli_app() -> Command { .help("Defines how many seconds to wait between each message sent to \ the monitoring-endpoint. Default: 60s") .requires("monitoring-endpoint") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("enable-doppelganger-protection") @@ -312,7 +353,9 @@ pub fn cli_app() -> Command { to avoid potentially committing a slashable offense. Use this flag in order to \ ENABLE this functionality, without this flag Lighthouse will begin attesting \ immediately.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("builder-proposals") @@ -321,7 +364,9 @@ pub fn cli_app() -> Command { .help("If this flag is set, Lighthouse will query the Beacon Node for only block \ headers during proposals and will sign over headers. Useful for outsourcing \ execution payload construction during proposals.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("builder-registration-timestamp-override") @@ -329,7 +374,8 @@ pub fn cli_app() -> Command { .alias("builder-registration-timestamp-override") .help("This flag takes a unix timestamp value that will be used to override the \ timestamp used in the builder api registration") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("gas-limit") @@ -339,14 +385,17 @@ pub fn cli_app() -> Command { .help("The gas limit to be used in all builder proposals for all validators managed \ by this validator client. Note this will not necessarily be used if the gas limit \ set here moves too far from the previous block's gas limit. [default: 30,000,000]") - .requires("builder-proposals"), + .requires("builder-proposals") + .display_order(0) ) .arg( // TODO take note here Arg::new("disable-latency-measurement-service") .long("disable-latency-measurement-service") .help("Disables the service that periodically attempts to measure latency to BNs.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("validator-registration-batch-size") @@ -356,7 +405,8 @@ pub fn cli_app() -> Command { validator/register_validator request sent to the BN. This value \ can be reduced to avoid timeouts from builders.") .default_value("500") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("builder-boost-factor") @@ -367,14 +417,17 @@ pub fn cli_app() -> Command { when choosing between a builder payload header and payload from \ the local execution node.") .conflicts_with("prefer-builder-proposals") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("prefer-builder-proposals") .long("prefer-builder-proposals") .help("If this flag is set, Lighthouse will always prefer blocks \ constructed by builders, regardless of payload value.") - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("disable-slashing-protection-web3signer") @@ -386,6 +439,8 @@ pub fn cli_app() -> Command { THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT \ ENABLING WEB3SIGNER'S SLASHING PROTECTION.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0) ) /* * Experimental/development options. @@ -397,7 +452,8 @@ pub fn cli_app() -> Command { .default_value("90000") .help("Keep-alive timeout for each web3signer connection. Set to 'null' to never \ timeout") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new("web3-signer-max-idle-connections") @@ -405,6 +461,7 @@ pub fn cli_app() -> Command { .value_name("COUNT") .help("Maximum number of idle connections to maintain per web3signer host. Default \ is unlimited.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) } diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index 1ddb6da9cad..762cef9bc0f 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -2,6 +2,7 @@ use super::common::*; use crate::DumpConfig; use account_utils::{random_password_string, read_mnemonic_from_cli, read_password_from_user}; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use eth2::{ lighthouse_vc::std_types::KeystoreJsonStr, types::{StateId, ValidatorId}, @@ -53,7 +54,8 @@ pub fn cli_app() -> Command { files will be created. The directory will be created if it does not exist.", ) .required(true) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(DEPOSIT_GWEI_FLAG) @@ -64,7 +66,8 @@ pub fn cli_app() -> Command { required for an active validator (MAX_EFFECTIVE_BALANCE)", ) .conflicts_with(DISABLE_DEPOSITS_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(FIRST_INDEX_FLAG) @@ -73,7 +76,8 @@ pub fn cli_app() -> Command { .help("The first of consecutive key indexes you wish to create.") .action(ArgAction::Set) .required(false) - .default_value("0"), + .default_value("0") + .display_order(0), ) .arg( Arg::new(COUNT_FLAG) @@ -81,21 +85,25 @@ pub fn cli_app() -> Command { .value_name("VALIDATOR_COUNT") .help("The number of validators to create, regardless of how many already exist") .conflicts_with("at-most") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(MNEMONIC_FLAG) .long(MNEMONIC_FLAG) .value_name("MNEMONIC_PATH") .help("If present, the mnemonic will be read in from this file.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0) + .help_heading(FLAG_HEADER), ) .arg( Arg::new(DISABLE_DEPOSITS_FLAG) @@ -106,7 +114,9 @@ pub fn cli_app() -> Command { Using this flag will save several seconds per validator if the \ user has an alternate strategy for submitting deposits.", ) - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0), ) .arg( Arg::new(SPECIFY_VOTING_KEYSTORE_PASSWORD_FLAG) @@ -118,7 +128,9 @@ pub fn cli_app() -> Command { necessary to keep backups of voting keystore passwords if the \ mnemonic is safely backed up.", ) - .action(ArgAction::SetTrue), + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) + .display_order(0), ) .arg( Arg::new(ETH1_WITHDRAWAL_ADDRESS_FLAG) @@ -130,7 +142,8 @@ pub fn cli_app() -> Command { with the mnemonic-derived withdrawal public key in EIP-2334 format.", ) .conflicts_with(DISABLE_DEPOSITS_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(GAS_LIMIT_FLAG) @@ -141,7 +154,8 @@ pub fn cli_app() -> Command { to leave this as the default value by not specifying this flag.", ) .required(false) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(FEE_RECIPIENT_FLAG) @@ -152,7 +166,8 @@ pub fn cli_app() -> Command { fee recipient. Omit this flag to use the default value from the VC.", ) .required(false) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(BUILDER_PROPOSALS_FLAG) @@ -163,7 +178,8 @@ pub fn cli_app() -> Command { ) .required(false) .value_parser(["true", "false"]) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(BEACON_NODE_FLAG) @@ -176,16 +192,19 @@ pub fn cli_app() -> Command { prevent the same validator being created twice and therefore slashable \ conditions.", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(FORCE_BLS_WITHDRAWAL_CREDENTIALS) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .long(FORCE_BLS_WITHDRAWAL_CREDENTIALS) .help( "If present, allows BLS withdrawal credentials rather than an execution \ address. This is not recommended.", - ), + ) + .display_order(0), ) .arg( Arg::new(BUILDER_BOOST_FACTOR_FLAG) @@ -198,7 +217,8 @@ pub fn cli_app() -> Command { a percentage multiplier to apply to the builder's payload value \ when choosing between a builder payload header and payload from \ the local execution node.", - ), + ) + .display_order(0), ) .arg( Arg::new(PREFER_BUILDER_PROPOSALS_FLAG) @@ -209,7 +229,8 @@ pub fn cli_app() -> Command { ) .required(false) .value_parser(["true", "false"]) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) } diff --git a/validator_manager/src/import_validators.rs b/validator_manager/src/import_validators.rs index e5bb7343785..b72ecf1f55e 100644 --- a/validator_manager/src/import_validators.rs +++ b/validator_manager/src/import_validators.rs @@ -1,6 +1,7 @@ use super::common::*; use crate::DumpConfig; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use eth2::{lighthouse_vc::std_types::ImportKeystoreStatus, SensitiveUrl}; use serde::{Deserialize, Serialize}; use std::fs; @@ -30,7 +31,8 @@ pub fn cli_app() -> Command { \"validators.json\".", ) .required(true) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(VC_URL_FLAG) @@ -43,18 +45,21 @@ pub fn cli_app() -> Command { ) .default_value("http://localhost:5062") .requires(VC_TOKEN_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(VC_TOKEN_FLAG) .long(VC_TOKEN_FLAG) .value_name("PATH") .help("The file containing a token required by the validator client.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(IGNORE_DUPLICATES_FLAG) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .long(IGNORE_DUPLICATES_FLAG) .help( "If present, ignore any validators which already exist on the VC. \ @@ -63,7 +68,8 @@ pub fn cli_app() -> Command { slashable conditions, it might be an indicator that something is amiss. \ Users should also be careful to avoid submitting duplicate deposits for \ validators that already exist on the VC.", - ), + ) + .display_order(0), ) } diff --git a/validator_manager/src/lib.rs b/validator_manager/src/lib.rs index bf1f7898201..297bf397f5e 100644 --- a/validator_manager/src/lib.rs +++ b/validator_manager/src/lib.rs @@ -1,4 +1,5 @@ use clap::{ArgMatches, Command}; +use clap_utils::get_color_style; use common::write_to_json_file; use environment::Environment; use serde::Serialize; @@ -40,6 +41,8 @@ impl DumpConfig { pub fn cli_app() -> Command { Command::new(CMD) .visible_aliases(["vm", "validator-manager", CMD]) + .display_order(0) + .styles(get_color_style()) .about("Utilities for managing a Lighthouse validator client via the HTTP API.") .subcommand(create_validators::cli_app()) .subcommand(import_validators::cli_app()) From 0c92aaa95a9692abfd2c7e9654e06c3045545776 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 21:48:22 +0300 Subject: [PATCH 14/46] alphabetic order --- account_manager/src/wallet/create.rs | 16 +++++++---- account_manager/src/wallet/mod.rs | 1 + account_manager/src/wallet/recover.rs | 15 ++++++---- lighthouse/src/main.rs | 11 +++++++- scripts/cli.sh | 3 -- validator_manager/src/move_validators.rs | 36 ++++++++++++++++-------- 6 files changed, 56 insertions(+), 26 deletions(-) diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs index 7d7d9720424..12aa5d3801a 100644 --- a/account_manager/src/wallet/create.rs +++ b/account_manager/src/wallet/create.rs @@ -44,7 +44,8 @@ pub fn cli_app() -> Command { "The wallet will be created with this name. It is not allowed to \ create two wallets with the same name for the same --base-dir.", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(PASSWORD_FLAG) @@ -56,7 +57,8 @@ pub fn cli_app() -> Command { saved at that path. To avoid confusion, if the file does not already \ exist it must include a '.pass' suffix.", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(TYPE_FLAG) @@ -68,7 +70,8 @@ pub fn cli_app() -> Command { ) .action(ArgAction::Set) .value_parser([HD_TYPE]) - .default_value(HD_TYPE), + .default_value(HD_TYPE) + .display_order(0) ) .arg( Arg::new(MNEMONIC_FLAG) @@ -78,13 +81,15 @@ pub fn cli_app() -> Command { "If present, the mnemonic will be saved to this file. DO NOT SHARE THE MNEMONIC.", ) .action(ArgAction::Set) + .display_order(0) ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0) ) .arg( Arg::new(MNEMONIC_LENGTH_FLAG) @@ -109,7 +114,8 @@ pub fn cli_app() -> Command { )), } }) - .default_value("24"), + .default_value("24") + .display_order(0) ) } diff --git a/account_manager/src/wallet/mod.rs b/account_manager/src/wallet/mod.rs index 19ad5713ebe..1a4b55f8764 100644 --- a/account_manager/src/wallet/mod.rs +++ b/account_manager/src/wallet/mod.rs @@ -12,6 +12,7 @@ pub const CMD: &str = "wallet"; pub fn cli_app() -> Command { Command::new(CMD) .about("Manage wallets, from which validator keys can be derived.") + .display_order(0) .arg( Arg::new(WALLETS_DIR_FLAG) .long(WALLETS_DIR_FLAG) diff --git a/account_manager/src/wallet/recover.rs b/account_manager/src/wallet/recover.rs index 0f58d89c4e1..b9641f11521 100644 --- a/account_manager/src/wallet/recover.rs +++ b/account_manager/src/wallet/recover.rs @@ -18,7 +18,8 @@ pub fn cli_app() -> Command { "The wallet will be created with this name. It is not allowed to \ create two wallets with the same name for the same --base-dir.", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(PASSWORD_FLAG) @@ -31,14 +32,16 @@ pub fn cli_app() -> Command { saved at that path. To avoid confusion, if the file does not already \ exist it must include a '.pass' suffix.", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(MNEMONIC_FLAG) .long(MNEMONIC_FLAG) .value_name("MNEMONIC_PATH") .help("If present, the mnemonic will be read in from this file.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(TYPE_FLAG) @@ -50,14 +53,16 @@ pub fn cli_app() -> Command { ) .action(ArgAction::Set) .value_parser([HD_TYPE]) - .default_value(HD_TYPE), + .default_value(HD_TYPE) + .display_order(0), ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0), ) } diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index 118e2dd9bf7..4b6ef255d88 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -2,7 +2,9 @@ mod metrics; use beacon_node::ProductionBeaconNode; use clap::{Arg, ArgAction, ArgMatches, Command}; -use clap_utils::{flags::DISABLE_MALLOC_TUNING_FLAG, get_color_style, get_eth2_network_config}; +use clap_utils::{ + flags::DISABLE_MALLOC_TUNING_FLAG, get_color_style, get_eth2_network_config, FLAG_HEADER, +}; use directory::{parse_path_or_default, DEFAULT_BEACON_NODE_DIR, DEFAULT_VALIDATOR_DIR}; use environment::{EnvironmentBuilder, LoggerConfig}; use eth2_network_config::{Eth2NetworkConfig, DEFAULT_HARDCODED_NETWORK, HARDCODED_NET_NAMES}; @@ -91,6 +93,7 @@ fn main() { "DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p", ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .display_order(0) ) .arg( @@ -156,6 +159,7 @@ fn main() { Arg::new("logfile-compress") .long("logfile-compress") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "If present, compress old log files. This can help reduce the space needed \ to store old logs.") @@ -166,6 +170,7 @@ fn main() { Arg::new("logfile-no-restricted-perms") .long("logfile-no-restricted-perms") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "If present, log files will be generated as world-readable meaning they can be read by \ any user on the machine. Note that logs can often contain sensitive information \ @@ -190,6 +195,7 @@ fn main() { .alias("log-colour") .help("Force outputting colors when emitting logs to the terminal.") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .global(true) .display_order(0) ) @@ -197,6 +203,7 @@ fn main() { Arg::new("disable-log-timestamp") .long("disable-log-timestamp") .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help("If present, do not include timestamps in logging output.") .global(true) .display_order(0) @@ -273,6 +280,7 @@ fn main() { .long("immediate-shutdown") .hide(true) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .help( "Shuts down immediately after the Beacon Node or Validator has successfully launched. \ Used for testing only, DO NOT USE IN PRODUCTION.") @@ -288,6 +296,7 @@ fn main() { specific memory allocation issues." ) .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .global(true) .display_order(0) ) diff --git a/scripts/cli.sh b/scripts/cli.sh index 2767ed73c80..d7386fc64b8 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -12,9 +12,6 @@ write_to_file() { local file="$2" local program="$3" - # Remove first line of cmd to get rid of commit specific numbers. - cmd=${cmd#*$'\n'} - # We need to add the header and the backticks to create the code block. printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" diff --git a/validator_manager/src/move_validators.rs b/validator_manager/src/move_validators.rs index db94ec5c94b..b95e759e9f8 100644 --- a/validator_manager/src/move_validators.rs +++ b/validator_manager/src/move_validators.rs @@ -85,14 +85,16 @@ pub fn cli_app() -> Command { ) .required(true) .requires(SRC_VC_TOKEN_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(SRC_VC_TOKEN_FLAG) .long(SRC_VC_TOKEN_FLAG) .value_name("PATH") .help("The file containing a token required by the source validator client.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(DEST_VC_URL_FLAG) @@ -105,14 +107,16 @@ pub fn cli_app() -> Command { ) .required(true) .requires(DEST_VC_TOKEN_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(DEST_VC_TOKEN_FLAG) .long(DEST_VC_TOKEN_FLAG) .value_name("PATH") .help("The file containing a token required by the destination validator client.") - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(VALIDATORS_FLAG) @@ -122,7 +126,8 @@ pub fn cli_app() -> Command { "The validators to be moved. Either a list of 0x-prefixed \ validator pubkeys or the keyword \"all\".", ) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(COUNT_FLAG) @@ -130,7 +135,8 @@ pub fn cli_app() -> Command { .value_name("VALIDATOR_COUNT") .help("The number of validators to move.") .conflicts_with(VALIDATORS_FLAG) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(GAS_LIMIT_FLAG) @@ -141,7 +147,8 @@ pub fn cli_app() -> Command { to leave this as the default value by not specifying this flag.", ) .required(false) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(FEE_RECIPIENT_FLAG) @@ -152,7 +159,8 @@ pub fn cli_app() -> Command { fee recipient. Omit this flag to use the default value from the VC.", ) .required(false) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(BUILDER_PROPOSALS_FLAG) @@ -163,14 +171,16 @@ pub fn cli_app() -> Command { ) .required(false) .value_parser(["true", "false"]) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) .arg( Arg::new(STDIN_INPUTS_FLAG) .action(ArgAction::SetTrue) .hide(cfg!(windows)) .long(STDIN_INPUTS_FLAG) - .help("If present, read all user inputs from stdin instead of tty."), + .help("If present, read all user inputs from stdin instead of tty.") + .display_order(0), ) .arg( Arg::new(BUILDER_BOOST_FACTOR_FLAG) @@ -183,7 +193,8 @@ pub fn cli_app() -> Command { a percentage multiplier to apply to the builder's payload value \ when choosing between a builder payload header and payload from \ the local execution node.", - ), + ) + .display_order(0), ) .arg( Arg::new(PREFER_BUILDER_PROPOSALS_FLAG) @@ -194,7 +205,8 @@ pub fn cli_app() -> Command { ) .required(false) .value_parser(["true", "false"]) - .action(ArgAction::Set), + .action(ArgAction::Set) + .display_order(0), ) } From 30556d0fa6f14cac5e2698303b5333e5bfd66d97 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 23:05:22 +0300 Subject: [PATCH 15/46] fix test --- beacon_node/src/cli.rs | 2 -- beacon_node/src/config.rs | 6 +++--- lighthouse/tests/validator_client.rs | 20 +------------------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index b835f8712df..50061e9c86c 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1439,8 +1439,6 @@ pub fn cli_app() -> Command { .long("progressive-balances") .value_name("MODE") .help("Deprecated. This optimisation is now the default and cannot be disabled.") - .takes_value(true) - .possible_values(&["fast", "disabled", "checked", "strict"]) .action(ArgAction::Set) .display_order(0) ) diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index 5f2b94e2f9c..6d130af618c 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -3,7 +3,7 @@ use beacon_chain::chain_config::{ DEFAULT_RE_ORG_MAX_EPOCHS_SINCE_FINALIZATION, DEFAULT_RE_ORG_THRESHOLD, }; use beacon_chain::TrustedSetup; -use clap::ArgMatches; +use clap::{ArgMatches, Id}; use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG; use clap_utils::{parse_flag, parse_required}; use client::{ClientConfig, ClientGenesis}; @@ -103,7 +103,7 @@ pub fn get_config( * Http API server */ - if parse_flag(cli_args, "enable_http") { + if cli_args.get_one::("enable_http").is_some() { client_config.http_api.enabled = true; if let Some(address) = cli_args.get_one::("http-address") { @@ -843,7 +843,7 @@ pub fn get_config( client_config.network.invalid_block_storage = Some(path); } - if cli_args.is_present("progressive-balances") { + if cli_args.get_one::("progressive-balances").is_some() { warn!( log, "Progressive balances mode is deprecated"; diff --git a/lighthouse/tests/validator_client.rs b/lighthouse/tests/validator_client.rs index a929c8cd7d0..b33965cf9e8 100644 --- a/lighthouse/tests/validator_client.rs +++ b/lighthouse/tests/validator_client.rs @@ -594,25 +594,7 @@ fn wrong_broadcast_flag() { #[test] fn latency_measurement_service() { CommandLineTest::new() - .flag("latency-measurement-service", None) - .run() - .with_config(|config| { - assert!(config.enable_latency_measurement_service); - }); - CommandLineTest::new() - .flag("latency-measurement-service", None) - .run() - .with_config(|config| { - assert!(config.enable_latency_measurement_service); - }); - CommandLineTest::new() - .flag("latency-measurement-service", None) - .run() - .with_config(|config| { - assert!(config.enable_latency_measurement_service); - }); - CommandLineTest::new() - // .flag("latency-measurement-service", Some("false")) + .flag("disable-latency-measurement-service", None) .run() .with_config(|config| { assert!(!config.enable_latency_measurement_service); From 71edfe86614aff5636fc43fc50a512b3e9fb5b76 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 23:41:03 +0300 Subject: [PATCH 16/46] fix test --- beacon_node/src/cli.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 9d06e55ba30..c49a72dcb75 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -1225,7 +1225,7 @@ pub fn cli_app() -> Command { .display_order(0) ) .arg( - Arg::with_name("proposer-reorg-parent-threshold") + Arg::new("proposer-reorg-parent-threshold") .long("proposer-reorg-parent-threshold") .value_name("PERCENT") .help("Percentage of parent vote weight above which to attempt a proposer reorg. \ @@ -1235,7 +1235,7 @@ pub fn cli_app() -> Command { .display_order(0) ) .arg( - Arg::with_name("proposer-reorg-epochs-since-finalization") + Arg::new("proposer-reorg-epochs-since-finalization") .long("proposer-reorg-epochs-since-finalization") .action(ArgAction::Set) .value_name("EPOCHS") From 4555fb27362cc22166730d6049977f208b4e9a3e Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 4 Apr 2024 23:55:55 +0300 Subject: [PATCH 17/46] revert removed if statement --- beacon_node/src/config.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index d7eea182274..c0230d4184b 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -4,7 +4,7 @@ use beacon_chain::chain_config::{ DEFAULT_RE_ORG_PARENT_THRESHOLD, }; use beacon_chain::TrustedSetup; -use clap::{ArgMatches, Id}; +use clap::{ArgMatches, Id, parser::ValueSource}; use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG; use clap_utils::{parse_flag, parse_required}; use client::{ClientConfig, ClientGenesis}; @@ -980,8 +980,11 @@ pub fn parse_listening_addresses( return Err("No listening addresses provided".into()); } (None, Some(ipv6)) => { + // A single ipv6 address was provided. Set the ports - warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored."); + if cli_args.value_source("port6") == Some(ValueSource::CommandLine) { + warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored."); + } // use zero ports if required. If not, use the given port. let tcp_port = use_zero_ports From 35bdf5e4b159063566aec28396191e323c5d125f Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 5 Apr 2024 00:06:02 +0300 Subject: [PATCH 18/46] fmt got me again --- beacon_node/src/config.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index c0230d4184b..11348af5e0d 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -4,7 +4,7 @@ use beacon_chain::chain_config::{ DEFAULT_RE_ORG_PARENT_THRESHOLD, }; use beacon_chain::TrustedSetup; -use clap::{ArgMatches, Id, parser::ValueSource}; +use clap::{parser::ValueSource, ArgMatches, Id}; use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG; use clap_utils::{parse_flag, parse_required}; use client::{ClientConfig, ClientGenesis}; @@ -980,7 +980,6 @@ pub fn parse_listening_addresses( return Err("No listening addresses provided".into()); } (None, Some(ipv6)) => { - // A single ipv6 address was provided. Set the ports if cli_args.value_source("port6") == Some(ValueSource::CommandLine) { warn!(log, "When listening only over IPv6, use the --port flag. The value of --port6 will be ignored."); From daec018a76b5cf347a8559aa4f936d6ba8f1b464 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 5 Apr 2024 08:49:00 +0300 Subject: [PATCH 19/46] fix broken flag --- account_manager/src/validator/create.rs | 1 + account_manager/src/validator/exit.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs index c75669d80cf..cfe4d8e94ad 100644 --- a/account_manager/src/validator/create.rs +++ b/account_manager/src/validator/create.rs @@ -122,6 +122,7 @@ pub fn cli_app() -> Command { .long(STDIN_INPUTS_FLAG) .help("If present, read all user inputs from stdin instead of tty.") .display_order(0) + .action(ArgAction::SetTrue) ) } diff --git a/account_manager/src/validator/exit.rs b/account_manager/src/validator/exit.rs index a375a290e06..277d2ae8eca 100644 --- a/account_manager/src/validator/exit.rs +++ b/account_manager/src/validator/exit.rs @@ -62,6 +62,8 @@ pub fn cli_app() -> Command { Arg::new(NO_WAIT) .long(NO_WAIT) .help("Exits after publishing the voluntary exit without waiting for confirmation that the exit was included in the beacon chain") + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) .display_order(0) ) .arg( @@ -69,6 +71,8 @@ pub fn cli_app() -> Command { .long(NO_CONFIRMATION) .help("Exits without prompting for confirmation that you understand the implications of a voluntary exit. This should be used with caution") .display_order(0) + .action(ArgAction::SetTrue) + .help_heading(FLAG_HEADER) ) .arg( Arg::new(STDIN_INPUTS_FLAG) From 8911e3c21c8bf00af767835ac9069a03d104a8f0 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 5 Apr 2024 08:57:49 +0300 Subject: [PATCH 20/46] make cli --- book/src/help_bn.md | 825 +++++++++++++++---------------------- book/src/help_general.md | 163 +++----- book/src/help_vc.md | 366 +++++++--------- book/src/help_vm.md | 143 +++---- book/src/help_vm_create.md | 195 +++------ book/src/help_vm_import.md | 150 +++---- book/src/help_vm_move.md | 176 +++----- help_bn.md-e | 336 +++++++++++++++ help_general.md-e | 61 +++ help_vc.md-e | 150 +++++++ help_vm.md-e | 55 +++ help_vm_create.md-e | 69 ++++ help_vm_import.md-e | 54 +++ help_vm_move.md-e | 63 +++ 14 files changed, 1548 insertions(+), 1258 deletions(-) create mode 100644 help_bn.md-e create mode 100644 help_general.md-e create mode 100644 help_vc.md-e create mode 100644 help_vm.md-e create mode 100644 help_vm_create.md-e create mode 100644 help_vm_import.md-e create mode 100644 help_vm_move.md-e diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 996642f0fc7..9f5a56f3378 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,495 +1,336 @@ # Beacon Node ``` -Sigma Prime -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides -a HTTP API for querying the beacon chain and publishing messages to the network. - -USAGE: - lighthouse beacon_node [FLAGS] [OPTIONS] - -FLAGS: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible - with data availability checks. Checkpoint syncing is the preferred method - for syncing a node. Only use this flag when testing. DO NOT use on - mainnet! - --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended - for use by block builders, relays and developers. You should set a fee - recipient on this BN and also consider adjusting the --prepare-payload- - lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the - builder API will always be used for payload construction, regardless of - recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with - caution. It is generally not recommended unless auto-compaction is - disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync - the entire chain as fast as possible, however it can result in resource - contention which degrades staking performance. Stakers should generally - choose to avoid this flag since backfill sync is not required for - staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This - overrides any previous option that depends on it. Useful if you intend to - run a non-validating beacon node. - --disable-duplicate-warn-logs This flag is deprecated and has no effect. - -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP - address and port as seen by other peers on the network. This disables - this feature, fixing the ENR's IP/PORT to those specified on boot. - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can - lead to less spurious failures on slow hardware but is considered - experimental as it may obscure performance issues. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution - client during finalized sync. By default block hashes will be checked in - Lighthouse and only passed to the EL if initial verification fails. - --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller - networks - --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic Disables the quic transport. The node will rely solely on the TCP - transport for libp2p connections. - --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from - attempting to automatically establish external port mappings. - --dummy-eth1 If present, uses an eth1 backend that generates static dummy - data.Identical to the method used at the 2019 Canada interop. - --enable-private-discovery Lighthouse by default does not discover private IP addresses. Set this - flag to enable connection attempts to local addresses. - -e, --enr-match 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. - --eth1 If present the node will connect to an eth1 node. This is required for - block production, you must use this flag if you wish to serve a - validator. - --eth1-purge-cache Purges the eth1 block and deposit caches - --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint - syncing. - --gui Enable the graphical user interface and all its requirements. This - enables --http and --validator-monitor-auto and enables SSE logging. - -h, --help Prints help information - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually - stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE - ON MAINNET. - --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently - experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator - subscriptions. This will only import attestations from already-subscribed - subnets, use with --subscribe-all-subnets to ensure all attestations are - received for import. - --light-client-server Act as a full node supporting light clients on the p2p network - [experimental] - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed - to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be - used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the - beacon node in a minimal configuration that is sufficient for block - publishing only. This flag should be used for a beacon node being - referenced by validator client using the --proposer-node flag. This - configuration is for enabling more secure setups. - --purge-db If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. - This requires syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already- - imported blocks. This can assist in the recovery from a consensus - failure caused by the execution layer. - --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not - be performed before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended - for expert users because of the immaturity of the slasher UX and the - extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP - server on localhost:5052 and import deposit logs from the execution node. - This is equivalent to `--http` on merge-ready networks, or `--http - --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also - advertise the beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to - the HTTP API and using the subnet subscription endpoint. This generally - has the effect of providing additional logging and metrics for locally - controlled validators. - -V, --version Prints version information - -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some - arbitrary free ports. - -OPTIONS: - --auto-compact-db - Enable or disable automatic compaction of the database on finalization. [default: true] - - --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - - blob_prune_margin_epochs. [default: 0] - --blobs-dir - Data directory for the blobs database. - - --block-cache-size - Specifies how many blocks the database should cache in memory [default: 5] - - --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. - - --builder - The URL of a service compatible with the MEV-boost API. - - --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT - query any connected builders, and will use the local execution engine for payload construction. Setting this - value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will - cause this condition to be hit if there are skips slots at the start of an epoch, right before this node is - set to propose. [default: 3] - --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it - will NOT query any connected builders, and will use the local execution engine for payload construction. - [default: 3] - --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past - `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution engine for - payload construction. [default: 8] - --builder-profit-threshold - This flag is deprecated and has no effect. - - --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version - string. - --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using - --checkpoint-sync-url instead is recommended. - --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using - --checkpoint-sync-url instead is recommended. - --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using - --checkpoint-sync-url instead is recommended. - --checkpoint-sync-url - Set the remote beacon node HTTP endpoint to use for checkpoint sync. - - --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] - - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --discovery-port - The UDP port that discovery will listen on. Defaults to `port` - - --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to - `port6` - --enr-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 to the IP address it resolves to and does not auto-update based on PONG - responses in discovery. Set this only if you are sure other nodes can connect to your local node on this - address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice - with the different values. - --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect - to your local node on this port over IPv4. - --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect - to your local node on this port over IPv6. - --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv4. The --port flag is used if this is not set. - --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv6. The --port6 flag is used if this is not set. - --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv4. - --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv6. - --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data - availability boundary relative to the current epoch. [default: 1] - --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less - frequent runs can be useful for minimizing disk writes [default: 1] - --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses - from the Eth1 endpoint. [default: 1000] - --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the - cache. Setting this value lower can help compensate for irregular Proof-of-Work block times, but setting it - too low can make the node vulnerable to re-orgs. - --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to - populate the deposit cache. - --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution- - endpoint flag. - --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It - corresponds to the 'id' field in the JWT claims object.Set to empty by default - --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. - - --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It - corresponds to the 'clv' field in the JWT claims object.Set to empty by default - --execution-timeout-multiplier - Unsigned integer to multiply the default execution timeouts by. [default: 1] - - --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent - waiting at all by setting the timeout to 0, however you risk proposing atop the wrong parent block. - [default: 250] - --freezer-dir - Data directory for the freezer database. - - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated - to fit in 32 bytes. - --historic-state-cache-size - Specifies how many states from the freezer database should cache in memory [default: 1] - - --http-address
- Set the listen address for the RESTful HTTP API server. - - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not - recommended in production). If no value is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5052). - --http-duplicate-block-status - Status code to send when a block that is already known is POSTed to the HTTP API. - - --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to - "true", HTTP API requests will be queued and scheduled alongside other tasks. When set to "false", HTTP API - responses will be executed immediately. - --http-port - Set the listen TCP port for the RESTful HTTP API server. - - --http-spec-fork - Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. - - --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can - prevent messages from being dropped. - --http-tls-cert - The path of the certificate to be used when serving the HTTP API server over TLS. - - --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not be password- - protected. - --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this - path. This feature is only recommended for developers. This directory is not pruned, users should be careful - to avoid filling up their disks. - --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. - - --listen-address
... - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag - twice with the different values. - Examples: - - --listen-address '0.0.0.0' will listen over IPv4. - - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the - given addresses is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be accepted. - [default: 0.0.0.0] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority - forks from wasting our time and disk space, but could also cause unnecessary consensus failures, so is - disabled by default. - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not - recommended in production). If no value is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5054). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor - your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node - metrics will be sent. Note: This will send information to a remote sever which may identify and associate - your validators, IP address and other personal information. Always use a HTTPS connection and never provide - an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --network-dir - Data directory for network keys. Defaults to network/ inside the beacon node dir. - - --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value - and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the --discovery- - port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 - and IPv6 the --port flag will apply to the IPv4 address and --port6 to the IPv6 address. [default: 9000] - --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when - required. The Quic UDP port will be set to this value + 1. [default: 9090] - --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are - useful for execution nodes which don't improve their payload after the first call, and high values are - useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. - --progressive-balances - Deprecated. This optimisation is now the default and cannot be disabled. [possible values: fast, disabled, - checked, strict] - --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent - failed reorgs by ensuring the block has ample time to propagate and be processed by the network. The default - is 1/12th of a slot (1 second on mainnet) - --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain - slots. An offset of N means that reorging proposals will not be attempted at any slot such that `slot % - SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this - flag will impose additional restrictions. - --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 - - --proposer-reorg-parent-threshold - Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% - - --proposer-reorg-threshold - Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% - - --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative - to the current epoch. [default: true] - --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution - client, as payloads need to be reconstructed and sent to syncing peers. [default: true] - --quic-port - The UDP port that quic will listen on. Defaults to `port` + 1 - - --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + - 1 - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user - to set the shuffling cache size in epochs. Shufflings are dependent on validator count and setting this - value to a large number can consume a large amount of memory. - --slasher-att-cache-size - Set the maximum number of attestation roots for the slasher to cache - - --slasher-backend - Set the database backend to be used by the slasher. [possible values: lmdb, disabled] - - --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] - - --slasher-chunk-size - Number of epochs per validator per chunk stored on disk. - - --slasher-dir - Set the slasher's database directory. - - --slasher-history-length - Configure how many epochs of history the slasher keeps. Immutable after initialization. - - --slasher-max-db-size - Maximum size of the MDBX database used by the slasher. - - --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if - the slasher-update-period is a multiple of the slot duration. - --slasher-update-period - Configure how often the slasher runs batch processing. - - --slasher-validator-chunk-size - Number of validators per chunk stored on disk. - - --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. - [default: 8192 (mainnet) or 64 (minimal)] - --state-cache-size - Specifies the size of the snapshot cache [default: 3] - - --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You - should set this flag on the validator client instead of (or in addition to) setting it here. - --target-peers - The target number of peers. - - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according to the peer - scoring system. - --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is - generated from the mainnet kzg ceremony. Use with caution - --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given - path. - --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator - Prometheus metrics and issuing per-validator logs. Instead, it will provide aggregate metrics and logs. This - avoids infeasibly high cardinality in the Prometheus database and high log volume when using many - validators. Defaults to 64. - --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special - monitoring and additional logging. - --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The - block root should be 0x-prefixed. Note that this flag is for verification only, to perform a checkpoint sync - from a recent state use --checkpoint-sync-url. -``` - +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. + +Usage: lighthouse beacon_node [OPTIONS] + +Options: + --auto-compact-db + Enable or disable automatic compaction of the database on finalization. [default: true] + --blob-prune-margin-epochs + The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - blob_prune_margin_epochs. [default: 0] + --blobs-dir + Data directory for the blobs database. + --block-cache-size + Specifies how many blocks the database should cache in memory [default: 5] + --boot-nodes + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. + --builder + The URL of a service compatible with the MEV-boost API. + --builder-fallback-epochs-since-finalization + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local execution engine for payload + construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if there are skips slots at the start + of an epoch, right before this node is set to propose. [default: 3] + --builder-fallback-skips + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the local execution engine for payload + construction. [default: 3] + --builder-fallback-skips-per-epoch + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution + engine for payload construction. [default: 8] + --builder-profit-threshold + This flag is deprecated and has no effect. + --builder-user-agent + The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. + --checkpoint-blobs + Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + --checkpoint-block + Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url instead is recommended. + --checkpoint-state + Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + --checkpoint-sync-url + Set the remote beacon node HTTP endpoint to use for checkpoint sync. + --checkpoint-sync-url-timeout + Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify + separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --discovery-port + The UDP port that discovery will listen on. Defaults to `port` + --discovery-port6 + The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + --enr-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 to the IP address it resolves to and does not auto-update based + on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set + this flag twice with the different values. + --enr-quic-port + The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. + --enr-quic6-port + The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. + --enr-tcp-port + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is not set. + --enr-tcp6-port + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is not set. + --enr-udp-port + The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. + --enr-udp6-port + The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. + --epochs-per-blob-prune + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. [default: 1] + --epochs-per-migration + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] + --eth1-blocks-per-log-query + Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] + --eth1-cache-follow-distance + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for irregular Proof-of-Work block times, but + setting it too low can make the node vulnerable to re-orgs. + --execution-endpoint + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. + --execution-jwt + File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + --execution-jwt-id + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty by default + --execution-jwt-secret-key + Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + --execution-jwt-version + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by default + --execution-timeout-multiplier + Unsigned integer to multiply the default execution timeouts by. [default: 1] + --fork-choice-before-proposal-timeout + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk proposing atop the wrong parent + block. [default: 250] + --freezer-dir + Data directory for the freezer database. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the + --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 bytes. + --historic-state-cache-size + Specifies how many states from the freezer database should cache in memory [default: 1] + --http-address
+ Set the listen address for the RESTful HTTP API server. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5052). + --http-duplicate-block-status + Status code to send when a block that is already known is POSTed to the HTTP API. + --http-enable-beacon-processor + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside other tasks. When set to "false", + HTTP API responses will be executed immediately. + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --http-spec-fork + Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. + --http-sse-capacity-multiplier + Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from being dropped. + --http-tls-cert + The path of the certificate to be used when serving the HTTP API server over TLS. + --http-tls-key + The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. + --inbound-rate-limiter-protocols + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple + protocols, separate them by ';'. This is enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + --invalid-gossip-verified-blocks-path + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. This directory is not pruned, users + should be careful to avoid filling up their disks. + --libp2p-addresses + One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. + --listen-address [
...] + The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the different values. + Examples: + - --listen-address '0.0.0.0' will listen over IPv4. + - --listen-address '::' will listen over IPv6. + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be + accepted. [default: 0.0.0.0] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds + the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --max-skip-slots + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also cause unnecessary consensus failures, + so is disabled by default. + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5054). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the + beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS + connection and never provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --network-dir + Data directory for network keys. Defaults to network/ inside the beacon node dir. + --port + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the + --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 address and --port6 to the IPv6 address. + [default: 9000] + --port6 + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] + --prepare-payload-lookahead + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload after the first call, and high + values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. + --progressive-balances + Deprecated. This optimisation is now the default and cannot be disabled. + --proposer-reorg-cutoff + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to propagate and be processed by the network. + The default is 1/12th of a slot (1 second on mainnet) + --proposer-reorg-disallowed-offsets + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not be attempted at any slot such that + `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + --proposer-reorg-epochs-since-finalization + Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 + --proposer-reorg-parent-threshold + Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% + --proposer-reorg-threshold + Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% + --prune-blobs + Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] + --prune-payloads + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to syncing peers. [default: true] + --quic-port + The UDP port that quic will listen on. Defaults to `port` + 1 + --quic-port6 + The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be + extremely careful with this flag. + --self-limiter-protocols + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple protocols, + separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --shuffling-cache-size + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are dependent on validator count and + setting this value to a large number can consume a large amount of memory. + --slasher-att-cache-size + Set the maximum number of attestation roots for the slasher to cache + --slasher-backend + Set the database backend to be used by the slasher. [possible values: lmdb, disabled] + --slasher-broadcast + Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] + --slasher-chunk-size + Number of epochs per validator per chunk stored on disk. + --slasher-dir + Set the slasher's database directory. + --slasher-history-length + Configure how many epochs of history the slasher keeps. Immutable after initialization. + --slasher-max-db-size + Maximum size of the MDBX database used by the slasher. + --slasher-slot-offset + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot duration. + --slasher-update-period + Configure how often the slasher runs batch processing. + --slasher-validator-chunk-size + Number of validators per chunk stored on disk. + --slots-per-restore-point + Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] + --state-cache-size + Specifies the size of the snapshot cache [default: 3] + --suggested-fee-recipient + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in addition to) setting it here. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --target-peers + The target number of peers. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override + the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --trusted-peers + One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. + --trusted-setup-file-override + Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from the mainnet kzg ceremony. Use with caution + --validator-monitor-file + As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. + --validator-monitor-individual-tracking-threshold + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, it will provide aggregate metrics + and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + --validator-monitor-pubkeys + A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. + --wss-checkpoint + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is for verification only, to perform a + checkpoint sync from a recent state use --checkpoint-sync-url. + -h, --help + Print help + -V, --version + Print version + +Flags: + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the preferred method for syncing a node. + Only use this flag when testing. DO NOT use on mainnet! + --always-prefer-builder-payload This flag is deprecated and has no effect. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should set a fee recipient on this BN and + also consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, regardless of recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in resource contention which degrades + staking performance. Stakers should generally choose to avoid this flag since backfill sync is not required for staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if you intend to run a non-validating + beacon node. + --disable-duplicate-warn-logs This flag is deprecated and has no effect. + --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is considered experimental as it may + obscure performance issues. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will be checked in Lighthouse and only + passed to the EL if initial verification fails. + --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. + --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. + --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. + --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. + --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve a validator. + --eth1-purge-cache Purges the eth1 block and deposit caches + --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. + --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE logging. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from already-subscribed subnets, use with + --subscribe-all-subnets to ensure all attestations are received for import. + --light-client-server Act as a full node supporting light clients on the p2p network [experimental] + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information + about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --private Prevents sending various client identification information. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag + should be used for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups. + --purge-db If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a consensus failure caused by the + execution layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is + enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher UX and the extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the execution node. This is equivalent to + `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. This generally has the effect of + providing additional logging and metrics for locally controlled validators. + -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This disables this feature, fixing the + ENR's IP/PORT to those specified on boot. + -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. + --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index 551f93e2bf1..bb7f3e25047 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,108 +1,61 @@ # Lighthouse General Commands ``` -Sigma Prime -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing -validator accounts. - -USAGE: - lighthouse [FLAGS] [OPTIONS] [SUBCOMMAND] - -FLAGS: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will - generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to sub-protocol logs such - as discv5 and libp2p - -h, --help Prints help information - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to - store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be - read by any user on the machine. Note that logs can often contain sensitive - information about your validator and so this flag should be used with caution. - For Windows users, the log file permissions will be inherited from the parent - folder. - -V, --version Prints version information - -OPTIONS: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - -SUBCOMMANDS: - account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, - account_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, - verifies and stores blocks. Provides a HTTP API for querying the beacon chain and - publishing messages to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process - will *not* import blocks or perform most typical beacon node functions. Instead, it will - simply run the discv5 service and assist nodes on the network to discover each other. This - is the recommended way to provide a network boot-node since it has a reduced attack surface - compared to a full beacon node. - database_manager Manage a beacon node database [aliases: db] - help Prints this message or the help of the given subcommand(s) - validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing - blocks and attestations). [aliases: v, vc, validator] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, - validator-manager, validator_manager] -``` - +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. + +Usage: lighthouse [OPTIONS] [COMMAND] + +Commands: + database_manager Manage a beacon node database [aliases: db] + validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages + to the network. [aliases: b, bn, beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node functions. Instead, it will simply + run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to provide a network boot-node since it has a reduced attack surface compared + to a full beacon node. + validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] + account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] + help Print this message or the help of the given subcommand(s) + +Options: + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs + are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect + use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + -h, --help Print help + -V, --version Print version + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index fb963f87cc5..d4ae6849c18 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -3,224 +3,148 @@ ``` When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). -USAGE: - lighthouse validator_client [FLAGS] [OPTIONS] - -FLAGS: - --builder-proposals - If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will - sign over headers. Useful for outsourcing execution payload construction during proposals. - --disable-auto-discover - If present, do not attempt to discover new validators in the validators-dir. Validators will need to be - manually added to the validator_definitions.yml file. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag will generally increase memory usage, - it should only be provided when debugging specific memory allocation issues. - --disable-run-on-all - DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and - proposer preparation messages to all beacon nodes provided in the `--beacon-nodes flag`. This option changes - that behaviour such that these api calls only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer - Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC - but is only safe if slashing protection is enabled on the remote signer and is implemented correctly. DO NOT - ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL - GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. - --distributed - Enables functionality required for running the validator in a distributed validator cluster. - - --enable-doppelganger-protection - If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network - by any of the validators managed by this client. This will result in three (possibly four) epochs worth of - missed attestations. If an attestation is detected during this period, it means it is very likely that you - are running a second validator client with the same keys. This validator client will immediately shutdown if - this is detected in order to avoid potentially committing a slashable offense. Use this flag in order to - ENABLE this functionality, without this flag Lighthouse will begin attesting immediately. - --enable-high-validator-count-metrics - Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 - validators. Enabling this metric for higher validator counts will lead to higher volume of prometheus - metrics being collected. - -h, --help Prints help information - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export - If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting - keystores and passwords to HTTP API consumers who have access to the API token. This method is useful for - exporting validators, however it should be used with caution since it exposes private key data to authorized - users. - --http-store-passwords-in-secrets-dir - If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir - rather than the validator definitions file. - --init-slashing-protection - If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this - flag unless you're certain that a new slashing protection database is required. Usually, your database will - have been initialized when you imported your validator keys. If you misplace your database and then run with - this flag you risk being slashed. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space needed to store old logs. - - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they can be read by any user on the - machine. Note that logs can often contain sensitive information about your validator and so this flag should - be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload - value. - --produce-block-v3 - Enable block production via the block v3 endpoint for this validator client. This should only be enabled - when paired with a beacon node that has this endpoint implemented. This flag will be enabled by default in - future. - --unencrypted-http-transport - This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a - custom HTTP address is unsafe. - --use-long-timeouts - If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is - generally not recommended, longer timeouts can cause missed duties when fallbacks are used. - -V, --version Prints version information - -OPTIONS: - --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. - - --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer - node). These certificates must be in PEM format and are used in addition to the OS trust store. Commas must - only be used as a delimiter, and must not be part of the certificate path. - --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, - attestations, blocks, subscriptions, sync-committee. Default (when flag is omitted) is to broadcast - subscriptions only. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing - between a builder payload header and payload from the local execution node. - --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api - registration - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note - this will not necessarily be used if the gas limit set here moves too far from the previous block's gas - limit. [default: 30,000,000] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --graffiti - Specify your custom graffiti to be included in blocks. - - --graffiti-file - Specify a graffiti file to load validator graffitis from. - - --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish - on a public network. When this flag is used, it additionally requires the explicit use of the - `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the - Internet, users should apply transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not - recommended in production). If no value is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5062). - --http-port - Set the listen TCP port for the RESTful HTTP API server. - - --latency-measurement-service - Set to 'true' to enable a service that periodically attempts to measure latency to BNs. Set to 'false' to - disable. [default: true] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not - recommended in production). If no value is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5064). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor - your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node - metrics will be sent. Note: This will send information to a remote sever which may identify and associate - your validators, IP address and other personal information. Always use a HTTPS connection and never provide - an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send - beacon block proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes. - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be - contained in a file where the name is the 0x-prefixed hex representation of the validators voting public - key. Defaults to ~/.lighthouse/{network}/secrets. - --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this - validator client. If a fee recipient is configured in the validator definitions it takes priority over this - value. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. This value can be - reduced to avoid timeouts from builders. [default: 500] - --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common - slashing protection database and the validator_definitions.yml - --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] - - --web3-signer-max-idle-connections - Maximum number of idle connections to maintain per web3signer host. Default is unlimited. -``` - +Usage: lighthouse validator_client [OPTIONS] + +Options: + --beacon-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. + --beacon-nodes-tls-certs + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used in addition to the OS trust store. + Commas must only be used as a delimiter, and must not be part of the certificate path. + --broadcast + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag is omitted) is to + broadcast subscriptions only. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution node. + --builder-registration-timestamp-override + This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify + separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --gas-limit + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set here moves too far from the previous + block's gas limit. [default: 30,000,000] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the + --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. + --graffiti-file + Specify a graffiti file to load validator graffitis from. + --http-address
+ Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it additionally requires the explicit use of + the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security like a HTTPS reverse-proxy or SSH + tunnelling. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5062). + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds + the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5064). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the + beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS + connection and never provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --proposer-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard beacon nodes specified in + --beacon-nodes. + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be + extremely careful with this flag. + --secrets-dir + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex representation of the validators + voting public key. Defaults to ~/.lighthouse/{network}/secrets. + --suggested-fee-recipient + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the validator definitions it takes priority + over this value. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override + the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --validator-registration-batch-size + Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] + --validators-dir + The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the validator_definitions.yml + --web3-signer-keep-alive-timeout + Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] + --web3-signer-max-idle-connections + Maximum number of idle connections to maintain per web3signer host. Default is unlimited. + -h, --help + Print help + +Flags: + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. Useful for outsourcing execution + payload construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the validator_definitions.yml file. + --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific + memory allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation messages to all beacon nodes + provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls only go out to the first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if slashing protection is enabled on + the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL + GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed Enables functionality required for running the validator in a distributed validator cluster. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the validators managed by this client. This + will result in three (possibly four) epochs worth of missed attestations. If an attestation is detected during this period, it means it is very likely that you are + running a second validator client with the same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing + a slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this metric for higher validator counts + will lead to higher volume of prometheus metrics being collected. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to HTTP API consumers who have access + to the API token. This method is useful for exporting validators, however it should be used with caution since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're certain that a new slashing + protection database is required. Usually, your database will have been initialized when you imported your validator keys. If you misplace your database and then + run with this flag you risk being slashed. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive + information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent + folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a beacon node that has this endpoint + implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause + missed duties when fallbacks are used. +``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index db01164a92b..5c41e65be3c 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -3,96 +3,53 @@ ``` Utilities for managing a Lighthouse validator client via the HTTP API. -USAGE: - lighthouse validator_manager [FLAGS] [OPTIONS] [SUBCOMMAND] - -FLAGS: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will - generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - -h, --help Prints help information - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to - store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be - read by any user on the machine. Note that logs can often contain sensitive - information about your validator and so this flag should be used with caution. - For Windows users, the log file permissions will be inherited from the parent - folder. - -V, --version Prints version information - -OPTIONS: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - -SUBCOMMANDS: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the - validator keystores and other validator data. This file can then be imported to a validator client - using the "import-validators" command. Another, optional JSON file is created which contains a list of - validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. - help Prints this message or the help of the given subcommand(s) - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file - which can be generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file - which can be generated using the "create-validators" command. This command only supports validators - signing via a keystore on the local file system (i.e., not Web3Signer validators). -``` - +Usage: lighthouse validator_manager [OPTIONS] [COMMAND] + +Commands: + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client + using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports + validators signing via a keystore on the local file system (i.e., not Web3Signer validators). + help Print this message or the help of the given subcommand(s) + +Options: + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs + are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect + use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + -h, --help Print help + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 2fa54265abd..38e2e26da57 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,138 +1,69 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and -other validator data. This file can then be imported to a validator client using the "import-validators" command. -Another, optional JSON file is created which contains a list of validator deposits in the same format as the -"ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client using the +"import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. -USAGE: - lighthouse validator_manager create [FLAGS] [OPTIONS] --output-path +Usage: lighthouse validator_manager create [OPTIONS] --output-path -FLAGS: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used - for submitting validator deposits via a web UI. Using this flag will save - several seconds per validator if the user has an alternate strategy for - submitting deposits. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution - address. This is not recommended. - -h, --help Prints help information - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed - to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can - be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used - with caution. For Windows users, the log file permissions will be - inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore - password that will be used to encrypt the voting keystores. If this flag - is not provided, a random password will be used. It is not necessary to - keep backups of voting keystore passwords if the mnemonic is safely backed - up. - --stdin-inputs If present, read all user inputs from stdin instead of tty. - -V, --version Prints version information +Options: + --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any validator key here is already known + as a validator by that beacon node. This helps prevent the same validator being created twice and therefore slashable conditions. + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload + from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --count The number of validators to create, regardless of how many already exist + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials + with the mnemonic-derived withdrawal public key in EIP-2334 format. + --first-index The first of consecutive key indexes you wish to create. [default: 0] + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future + logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --mnemonic-path If present, the mnemonic will be read in from this file. + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if it does not exist. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. + Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + -h, --help Print help -OPTIONS: - --beacon-node - A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised - if any validator key here is already known as a validator by that beacon node. This helps prevent the same - validator being created twice and therefore slashable conditions. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing - between a builder payload header and payload from the local execution node. - --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather than the local EL. - [possible values: true, false] - --count - The number of validators to create, regardless of how many already exist - - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --deposit-gwei - The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator - (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address - If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, - it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. - --first-index - The first of consecutive key indexes you wish to create. [default: 0] - - --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the default value by not - specifying this flag. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --mnemonic-path - If present, the mnemonic will be read in from this file. - - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --output-path - The path to a directory where the validator and (optionally) deposits files will be created. The directory - will be created if it does not exist. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload - value. [possible values: true, false] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag to use the - default value from the VC. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. -``` - +Flags: + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this flag will save several seconds per + validator if the user has an alternate strategy for submitting deposits. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information + about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this flag is not provided, a random + password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed up. + --stdin-inputs If present, read all user inputs from stdin instead of tty. +``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index e6ff351dac2..06369b467cd 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,102 +1,54 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be -generated using the "create-validators" command. - -USAGE: - lighthouse validator_manager import [FLAGS] [OPTIONS] --validators-file - -FLAGS: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will - generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - -h, --help Prints help information - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this - flag, the process will terminate without making any changes. This flag should - be used with caution, whilst it does not directly cause slashable conditions, - it might be an indicator that something is amiss. Users should also be careful - to avoid submitting duplicate deposits for validators that already exist on the - VC. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to - store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be - read by any user on the machine. Note that logs can often contain sensitive - information about your validator and so this flag should be used with caution. - For Windows users, the log file permissions will be inherited from the parent - folder. - -V, --version Prints version information - -OPTIONS: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - --validators-file - The path to a JSON file containing a list of validators to be imported to the validator client. This file is - usually named "validators.json". - --vc-token - The file containing a token required by the validator client. - - --vc-url - A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry - run' will be conducted where no changes are made to the validator client. [default: http://localhost:5062] -``` - +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. + +Usage: lighthouse validator_manager import [OPTIONS] --validators-file + +Options: + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs + are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect + use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named "validators.json". + --vc-token The file containing a token required by the validator client. + --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be conducted where no changes are + made to the validator client. [default: http://localhost:5062] + -h, --help Print help + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. This flag should be used with + caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is amiss. Users should also be careful to avoid submitting duplicate + deposits for validators that already exist on the VC. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index fe1d4c5ae94..ee0108ca9f2 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,119 +1,63 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be -generated using the "create-validators" command. This command only supports validators signing via a keystore on the -local file system (i.e., not Web3Signer validators). - -USAGE: - lighthouse validator_manager move [FLAGS] [OPTIONS] --dest-vc-token --dest-vc-url --src-vc-token --src-vc-url - -FLAGS: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will - generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - -h, --help Prints help information - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to - store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be - read by any user on the machine. Note that logs can often contain sensitive - information about your validator and so this flag should be used with caution. - For Windows users, the log file permissions will be inherited from the parent - folder. - --stdin-inputs If present, read all user inputs from stdin instead of tty. - -V, --version Prints version information - -OPTIONS: - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing - between a builder payload header and payload from the local execution node. - --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather than the local EL. - [possible values: true, false] - --count The number of validators to move. - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --dest-vc-token - The file containing a token required by the destination validator client. - - --dest-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" - and will have new validators added as they are removed from the "source" validator client. - --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the default value by not - specifying this flag. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload - value. [possible values: true, false] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --src-vc-token - The file containing a token required by the source validator client. - - --src-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and - contains the validators that are to be moved. - --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag to use the - default value from the VC. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - --validators - The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". -``` - +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports validators signing +via a keystore on the local file system (i.e., not Web3Signer validators). + +Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url + +Options: + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload + from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --count The number of validators to move. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --dest-vc-token The file containing a token required by the destination validator client. + --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have new validators added as + they are removed from the "source" validator client. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future + logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. + Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --src-vc-token The file containing a token required by the source validator client. + --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the validators that are to be + moved. + --stdin-inputs If present, read all user inputs from stdin instead of tty. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". + -h, --help Print help + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_bn.md-e b/help_bn.md-e new file mode 100644 index 00000000000..726e996b5d2 --- /dev/null +++ b/help_bn.md-e @@ -0,0 +1,336 @@ +# Beacon Node + +``` +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. + +Usage: lighthouse beacon_node [OPTIONS] + +Options: + --auto-compact-db + Enable or disable automatic compaction of the database on finalization. [default: true] + --blob-prune-margin-epochs + The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - blob_prune_margin_epochs. [default: 0] + --blobs-dir + Data directory for the blobs database. + --block-cache-size + Specifies how many blocks the database should cache in memory [default: 5] + --boot-nodes + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. + --builder + The URL of a service compatible with the MEV-boost API. + --builder-fallback-epochs-since-finalization + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local execution engine for payload + construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if there are skips slots at the start + of an epoch, right before this node is set to propose. [default: 3] + --builder-fallback-skips + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the local execution engine for payload + construction. [default: 3] + --builder-fallback-skips-per-epoch + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution + engine for payload construction. [default: 8] + --builder-profit-threshold + This flag is deprecated and has no effect. + --builder-user-agent + The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. + --checkpoint-blobs + Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + --checkpoint-block + Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url instead is recommended. + --checkpoint-state + Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + --checkpoint-sync-url + Set the remote beacon node HTTP endpoint to use for checkpoint sync. + --checkpoint-sync-url-timeout + Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify + separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --discovery-port + The UDP port that discovery will listen on. Defaults to `port` + --discovery-port6 + The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + --enr-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 to the IP address it resolves to and does not auto-update based + on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set + this flag twice with the different values. + --enr-quic-port + The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. + --enr-quic6-port + The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. + --enr-tcp-port + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is not set. + --enr-tcp6-port + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is not set. + --enr-udp-port + The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. + --enr-udp6-port + The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. + --epochs-per-blob-prune + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. [default: 1] + --epochs-per-migration + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] + --eth1-blocks-per-log-query + Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] + --eth1-cache-follow-distance + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for irregular Proof-of-Work block times, but + setting it too low can make the node vulnerable to re-orgs. + --execution-endpoint + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. + --execution-jwt + File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + --execution-jwt-id + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty by default + --execution-jwt-secret-key + Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + --execution-jwt-version + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by default + --execution-timeout-multiplier + Unsigned integer to multiply the default execution timeouts by. [default: 1] + --fork-choice-before-proposal-timeout + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk proposing atop the wrong parent + block. [default: 250] + --freezer-dir + Data directory for the freezer database. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the + --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 bytes. + --historic-state-cache-size + Specifies how many states from the freezer database should cache in memory [default: 1] + --http-address
+ Set the listen address for the RESTful HTTP API server. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5052). + --http-duplicate-block-status + Status code to send when a block that is already known is POSTed to the HTTP API. + --http-enable-beacon-processor + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside other tasks. When set to "false", + HTTP API responses will be executed immediately. + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --http-spec-fork + Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. + --http-sse-capacity-multiplier + Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from being dropped. + --http-tls-cert + The path of the certificate to be used when serving the HTTP API server over TLS. + --http-tls-key + The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. + --inbound-rate-limiter-protocols + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple + protocols, separate them by ';'. This is enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + --invalid-gossip-verified-blocks-path + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. This directory is not pruned, users + should be careful to avoid filling up their disks. + --libp2p-addresses + One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. + --listen-address [
...] + The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the different values. + Examples: + - --listen-address '0.0.0.0' will listen over IPv4. + - --listen-address '::' will listen over IPv6. + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be + accepted. [default: 0.0.0.0] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds + the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --max-skip-slots + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also cause unnecessary consensus failures, + so is disabled by default. + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5054). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the + beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS + connection and never provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --network-dir + Data directory for network keys. Defaults to network/ inside the beacon node dir. + --port + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the + --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 address and --port6 to the IPv6 address. + [default: 9000] + --port6 + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] + --prepare-payload-lookahead + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload after the first call, and high + values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. + --progressive-balances + Deprecated. This optimisation is now the default and cannot be disabled. + --proposer-reorg-cutoff + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to propagate and be processed by the network. + The default is 1/12th of a slot (1 second on mainnet) + --proposer-reorg-disallowed-offsets + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not be attempted at any slot such that + `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + --proposer-reorg-epochs-since-finalization + Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 + --proposer-reorg-parent-threshold + Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% + --proposer-reorg-threshold + Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% + --prune-blobs + Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] + --prune-payloads + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to syncing peers. [default: true] + --quic-port + The UDP port that quic will listen on. Defaults to `port` + 1 + --quic-port6 + The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be + extremely careful with this flag. + --self-limiter-protocols + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple protocols, + separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --shuffling-cache-size + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are dependent on validator count and + setting this value to a large number can consume a large amount of memory. + --slasher-att-cache-size + Set the maximum number of attestation roots for the slasher to cache + --slasher-backend + Set the database backend to be used by the slasher. [possible values: lmdb, disabled] + --slasher-broadcast + Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] + --slasher-chunk-size + Number of epochs per validator per chunk stored on disk. + --slasher-dir + Set the slasher's database directory. + --slasher-history-length + Configure how many epochs of history the slasher keeps. Immutable after initialization. + --slasher-max-db-size + Maximum size of the MDBX database used by the slasher. + --slasher-slot-offset + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot duration. + --slasher-update-period + Configure how often the slasher runs batch processing. + --slasher-validator-chunk-size + Number of validators per chunk stored on disk. + --slots-per-restore-point + Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] + --state-cache-size + Specifies the size of the snapshot cache [default: 3] + --suggested-fee-recipient + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in addition to) setting it here. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --target-peers + The target number of peers. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override + the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --trusted-peers + One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. + --trusted-setup-file-override + Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from the mainnet kzg ceremony. Use with caution + --validator-monitor-file + As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. + --validator-monitor-individual-tracking-threshold + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, it will provide aggregate metrics + and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + --validator-monitor-pubkeys + A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. + --wss-checkpoint + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is for verification only, to perform a + checkpoint sync from a recent state use --checkpoint-sync-url. + -h, --help + Print help + -V, --version + Print version + +Flags: + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the preferred method for syncing a node. + Only use this flag when testing. DO NOT use on mainnet! + --always-prefer-builder-payload This flag is deprecated and has no effect. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should set a fee recipient on this BN and + also consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, regardless of recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in resource contention which degrades + staking performance. Stakers should generally choose to avoid this flag since backfill sync is not required for staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if you intend to run a non-validating + beacon node. + --disable-duplicate-warn-logs This flag is deprecated and has no effect. + --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is considered experimental as it may + obscure performance issues. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will be checked in Lighthouse and only + passed to the EL if initial verification fails. + --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. + --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. + --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. + --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. + --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve a validator. + --eth1-purge-cache Purges the eth1 block and deposit caches + --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. + --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE logging. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from already-subscribed subnets, use with + --subscribe-all-subnets to ensure all attestations are received for import. + --light-client-server Act as a full node supporting light clients on the p2p network [experimental] + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information + about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --private Prevents sending various client identification information. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag + should be used for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups. + --purge-db If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a consensus failure caused by the + execution layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is + enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher UX and the extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the execution node. This is equivalent to + `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. This generally has the effect of + providing additional logging and metrics for locally controlled validators. + -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This disables this feature, fixing the + ENR's IP/PORT to those specified on boot. + -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. + --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks +``` \ No newline at end of file diff --git a/help_general.md-e b/help_general.md-e new file mode 100644 index 00000000000..39f7c689fa4 --- /dev/null +++ b/help_general.md-e @@ -0,0 +1,61 @@ +# Lighthouse General Commands + +``` +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. + +Usage: lighthouse [OPTIONS] [COMMAND] + +Commands: + database_manager Manage a beacon node database [aliases: db] + validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages + to the network. [aliases: b, bn, beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node functions. Instead, it will simply + run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to provide a network boot-node since it has a reduced attack surface compared + to a full beacon node. + validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] + account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] + help Print this message or the help of the given subcommand(s) + +Options: + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs + are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect + use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + -h, --help Print help + -V, --version Print version + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_vc.md-e b/help_vc.md-e new file mode 100644 index 00000000000..2be0f91f275 --- /dev/null +++ b/help_vc.md-e @@ -0,0 +1,150 @@ +# Validator Client + +``` +When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). + +Usage: lighthouse validator_client [OPTIONS] + +Options: + --beacon-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. + --beacon-nodes-tls-certs + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used in addition to the OS trust store. + Commas must only be used as a delimiter, and must not be part of the certificate path. + --broadcast + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag is omitted) is to + broadcast subscriptions only. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution node. + --builder-registration-timestamp-override + This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify + separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --gas-limit + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set here moves too far from the previous + block's gas limit. [default: 30,000,000] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the + --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. + --graffiti-file + Specify a graffiti file to load validator graffitis from. + --http-address
+ Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it additionally requires the explicit use of + the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security like a HTTPS reverse-proxy or SSH + tunnelling. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5062). + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds + the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen + address of this server (e.g., http://localhost:5064). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the + beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS + connection and never provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --proposer-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard beacon nodes specified in + --beacon-nodes. + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be + extremely careful with this flag. + --secrets-dir + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex representation of the validators + voting public key. Defaults to ~/.lighthouse/{network}/secrets. + --suggested-fee-recipient + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the validator definitions it takes priority + over this value. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override + the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --validator-registration-batch-size + Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] + --validators-dir + The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the validator_definitions.yml + --web3-signer-keep-alive-timeout + Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] + --web3-signer-max-idle-connections + Maximum number of idle connections to maintain per web3signer host. Default is unlimited. + -h, --help + Print help + +Flags: + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. Useful for outsourcing execution + payload construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the validator_definitions.yml file. + --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific + memory allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation messages to all beacon nodes + provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls only go out to the first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if slashing protection is enabled on + the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL + GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed Enables functionality required for running the validator in a distributed validator cluster. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the validators managed by this client. This + will result in three (possibly four) epochs worth of missed attestations. If an attestation is detected during this period, it means it is very likely that you are + running a second validator client with the same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing + a slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this metric for higher validator counts + will lead to higher volume of prometheus metrics being collected. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to HTTP API consumers who have access + to the API token. This method is useful for exporting validators, however it should be used with caution since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're certain that a new slashing + protection database is required. Usually, your database will have been initialized when you imported your validator keys. If you misplace your database and then + run with this flag you risk being slashed. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive + information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent + folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a beacon node that has this endpoint + implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause + missed duties when fallbacks are used. +``` \ No newline at end of file diff --git a/help_vm.md-e b/help_vm.md-e new file mode 100644 index 00000000000..eb0d0e6055d --- /dev/null +++ b/help_vm.md-e @@ -0,0 +1,55 @@ +# Validator Manager + +``` +Utilities for managing a Lighthouse validator client via the HTTP API. + +Usage: lighthouse validator_manager [OPTIONS] [COMMAND] + +Commands: + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client + using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports + validators signing via a keystore on the local file system (i.e., not Web3Signer validators). + help Print this message or the help of the given subcommand(s) + +Options: + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs + are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect + use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + -h, --help Print help + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_vm_create.md-e b/help_vm_create.md-e new file mode 100644 index 00000000000..c3c56165535 --- /dev/null +++ b/help_vm_create.md-e @@ -0,0 +1,69 @@ +# Validator Manager Create + +``` +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client using the +"import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. + +Usage: lighthouse validator_manager create [OPTIONS] --output-path + +Options: + --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any validator key here is already known + as a validator by that beacon node. This helps prevent the same validator being created twice and therefore slashable conditions. + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload + from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --count The number of validators to create, regardless of how many already exist + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials + with the mnemonic-derived withdrawal public key in EIP-2334 format. + --first-index The first of consecutive key indexes you wish to create. [default: 0] + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future + logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --mnemonic-path If present, the mnemonic will be read in from this file. + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if it does not exist. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. + Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + -h, --help Print help + +Flags: + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this flag will save several seconds per + validator if the user has an alternate strategy for submitting deposits. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information + about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this flag is not provided, a random + password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed up. + --stdin-inputs If present, read all user inputs from stdin instead of tty. +``` \ No newline at end of file diff --git a/help_vm_import.md-e b/help_vm_import.md-e new file mode 100644 index 00000000000..4478f2bc1a4 --- /dev/null +++ b/help_vm_import.md-e @@ -0,0 +1,54 @@ +# Validator Manager Import + +``` +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. + +Usage: lighthouse validator_manager import [OPTIONS] --validators-file + +Options: + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs + are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect + use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named "validators.json". + --vc-token The file containing a token required by the validator client. + --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be conducted where no changes are + made to the validator client. [default: http://localhost:5062] + -h, --help Print help + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. This flag should be used with + caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is amiss. Users should also be careful to avoid submitting duplicate + deposits for validators that already exist on the VC. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_vm_move.md-e b/help_vm_move.md-e new file mode 100644 index 00000000000..df66cbd29a8 --- /dev/null +++ b/help_vm_move.md-e @@ -0,0 +1,63 @@ +# Validator Manager Move + +``` +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports validators signing +via a keystore on the local file system (i.e., not Web3Signer validators). + +Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url + +Options: + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload + from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --count The number of validators to move. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of + the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + --dest-vc-token The file containing a token required by the destination validator client. + --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have new validators added as + they are removed from the "source" validator client. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If + not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be + ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future + logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. + Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --src-vc-token The file containing a token required by the source validator client. + --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the validators that are to be + moved. + --stdin-inputs If present, read all user inputs from stdin instead of tty. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should + only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". + -h, --help Print help + +Flags: + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. +``` \ No newline at end of file From e4a4b88c12a75156bb9b8c01e6ceaa13555a2881 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Mon, 8 Apr 2024 08:36:31 +0300 Subject: [PATCH 21/46] make cli --- book/src/help_bn.md | 256 ++++++++++++++++++++----------------- book/src/help_general.md | 76 ++++++----- book/src/help_vc.md | 152 ++++++++++++---------- book/src/help_vm.md | 78 ++++++----- book/src/help_vm_create.md | 111 +++++++++------- book/src/help_vm_import.md | 79 +++++++----- book/src/help_vm_move.md | 94 ++++++++------ help_bn.md-e | 256 ++++++++++++++++++++----------------- help_general.md-e | 76 ++++++----- help_vc.md-e | 152 ++++++++++++---------- help_vm.md-e | 78 ++++++----- help_vm_create.md-e | 111 +++++++++------- help_vm_import.md-e | 79 +++++++----- help_vm_move.md-e | 94 ++++++++------ 14 files changed, 962 insertions(+), 730 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 9f5a56f3378..8687ee9cd9b 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,7 +1,8 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing +messages to the network. Usage: lighthouse beacon_node [OPTIONS] @@ -19,15 +20,15 @@ Options: --builder The URL of a service compatible with the MEV-boost API. --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local execution engine for payload - construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if there are skips slots at the start - of an epoch, right before this node is set to propose. [default: 3] + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local + execution engine for payload construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will + cause this condition to be hit if there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the local execution engine for payload - construction. [default: 3] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the + local execution engine for payload construction. [default: 3] --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution - engine for payload construction. [default: 8] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected + builders, and will use the local execution engine for payload construction. [default: 8] --builder-profit-threshold This flag is deprecated and has no effect. --builder-user-agent @@ -43,8 +44,8 @@ Options: --checkpoint-sync-url-timeout Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` + flag Note: Users should specify separate custom datadirs for different networks. --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --discovery-port @@ -52,50 +53,56 @@ Options: --discovery-port6 The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` --enr-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 to the IP address it resolves to and does not auto-update based - on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set - this flag twice with the different values. + 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 to the IP address it resolves + to and does not auto-update based on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will + update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. --enr-quic-port The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. --enr-quic6-port The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is not set. + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is + not set. --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is not set. + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is + not set. --enr-udp-port The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. --enr-udp6-port The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. [default: 1] + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. + [default: 1] --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes + [default: 1] --eth1-blocks-per-log-query Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for irregular Proof-of-Work block times, but - setting it too low can make the node vulnerable to re-orgs. + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for + irregular Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. --execution-endpoint Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. --execution-jwt File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set + to empty by default --execution-jwt-secret-key Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set + to empty by default --execution-timeout-multiplier Unsigned integer to multiply the default execution timeouts by. [default: 1] --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk proposing atop the wrong parent - block. [default: 250] + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk + proposing atop the wrong parent block. [default: 250] --freezer-dir Data directory for the freezer database. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the - --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -105,13 +112,13 @@ Options: --http-address
Set the listen address for the RESTful HTTP API server. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5052). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5052). --http-duplicate-block-status Status code to send when a block that is already known is POSTed to the HTTP API. --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside other tasks. When set to "false", - HTTP API responses will be executed immediately. + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside + other tasks. When set to "false", HTTP API responses will be executed immediately. --http-port Set the listen TCP port for the RESTful HTTP API server. --http-spec-fork @@ -123,11 +130,12 @@ Options: --http-tls-key The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple - protocols, separate them by ';'. This is enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of + :/. To set quotas for multiple protocols, separate them by ';'. This is enabled by default, using default quotas. To disable + rate limiting use the disable-inbound-rate-limiter flag instead. --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. This directory is not pruned, users - should be careful to avoid filling up their disks. + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. + This directory is not pruned, users should be careful to avoid filling up their disks. --libp2p-addresses One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. --listen-address [
...] @@ -135,13 +143,13 @@ Options: Examples: - --listen-address '0.0.0.0' will listen over IPv4. - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be - accepted. [default: 0.0.0.0] + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or + multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds - the value specified in `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. + Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format @@ -151,19 +159,19 @@ Options: --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also cause unnecessary consensus failures, - so is disabled by default. + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also + cause unnecessary consensus failures, so is disabled by default. --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5054). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5054). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the - beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS - connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This + flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your + validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network @@ -171,22 +179,24 @@ Options: --network-dir Data directory for network keys. Defaults to network/ inside the beacon node dir. --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the - --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 address and --port6 to the IPv6 address. - [default: 9000] + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The + discovery port can be modified by the --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port + flag will apply to the IPv4 address and --port6 to the IPv6 address. [default: 9000] --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. + [default: 9090] --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload after the first call, and high - values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload + after the first call, and high values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. --progressive-balances Deprecated. This optimisation is now the default and cannot be disabled. --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to propagate and be processed by the network. - The default is 1/12th of a slot (1 second on mainnet) + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to + propagate and be processed by the network. The default is 1/12th of a slot (1 second on mainnet) --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not be attempted at any slot such that - `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not + be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose + additional restrictions. --proposer-reorg-epochs-since-finalization Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 --proposer-reorg-parent-threshold @@ -196,21 +206,23 @@ Options: --prune-blobs Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to syncing peers. [default: true] + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to + syncing peers. [default: true] --quic-port The UDP port that quic will listen on. Defaults to `port` + 1 --quic-port6 The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be - extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node + to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple protocols, - separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To + set quotas for multiple protocols, separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for + the inbound rate limiter will be used. --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are dependent on validator count and - setting this value to a large number can consume a large amount of memory. + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are + dependent on validator count and setting this value to a large number can consume a large amount of memory. --slasher-att-cache-size Set the maximum number of attestation roots for the slasher to cache --slasher-backend @@ -226,7 +238,8 @@ Options: --slasher-max-db-size Maximum size of the MDBX database used by the slasher. --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot duration. + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot + duration. --slasher-update-period Configure how often the slasher runs batch processing. --slasher-validator-chunk-size @@ -236,21 +249,24 @@ Options: --state-cache-size Specifies the size of the snapshot cache [default: 3] --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in addition to) setting it here. + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in + addition to) setting it here. -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. --target-peers The target number of peers. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with this flag. --trusted-peers One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. --trusted-setup-file-override @@ -258,79 +274,91 @@ Options: --validator-monitor-file As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, it will provide aggregate metrics - and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, + it will provide aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. + Defaults to 64. --validator-monitor-pubkeys A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is for verification only, to perform a - checkpoint sync from a recent state use --checkpoint-sync-url. + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is + for verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. -h, --help Print help -V, --version Print version Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the preferred method for syncing a node. - Only use this flag when testing. DO NOT use on mainnet! + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the + preferred method for syncing a node. Only use this flag when testing. DO NOT use on mainnet! --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should set a fee recipient on this BN and - also consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, regardless of recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in resource contention which degrades - staking performance. Stakers should generally choose to avoid this flag since backfill sync is not required for staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if you intend to run a non-validating - beacon node. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should + set a fee recipient on this BN and also consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, + regardless of recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is + disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in + resource contention which degrades staking performance. Stakers should generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if + you intend to run a non-validating beacon node. --disable-duplicate-warn-logs This flag is deprecated and has no effect. --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is considered experimental as it may - obscure performance issues. + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is + considered experimental as it may obscure performance issues. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will be checked in Lighthouse and only - passed to the EL if initial verification fails. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be + provided when debugging specific memory allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will + be checked in Lighthouse and only passed to the EL if initial verification fails. --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match 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. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve a validator. + --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve + a validator. --eth1-purge-cache Purges the eth1 block and deposit caches --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE logging. + --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE + logging. --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING + ONLY. DO NOT USE ON MAINNET. --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from already-subscribed subnets, use with - --subscribe-all-subnets to ensure all attestations are received for import. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from + already-subscribed subnets, use with --subscribe-all-subnets to ensure all attestations are received for import. --light-client-server Act as a full node supporting light clients on the p2p network [experimental] --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information - about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can + often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log + file permissions will be inherited from the parent folder. --metrics Enable the Prometheus metrics HTTP server. Disabled by default. --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag - should be used for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient + for block publishing only. This flag should be used for a beacon node being referenced by validator client using the --proposer-node + flag. This configuration is for enabling more secure setups. --purge-db If present, the chain database will be deleted. Use with caution. --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a consensus failure caused by the - execution layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is - enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a + consensus failure caused by the execution layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol + configurations. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the + inbound rate limiter will be used. --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher UX and the extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the execution node. This is equivalent to - `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. This generally has the effect of - providing additional logging and metrics for locally controlled validators. - -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This disables this feature, fixing the - ENR's IP/PORT to those specified on boot. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher + UX and the extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the + execution node. This is equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to + all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. + This generally has the effect of providing additional logging and metrics for locally controlled validators. + -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This + disables this feature, fixing the ENR's IP/PORT to those specified on boot. -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks ``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index bb7f3e25047..be98f462ec7 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -8,54 +8,66 @@ Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages - to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node functions. Instead, it will simply - run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to provide a network boot-node since it has a reduced attack surface compared - to a full beacon node. + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the + beacon chain and publishing messages to the network. [aliases: b, bn, beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node + functions. Instead, it will simply run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to + provide a network boot-node since it has a reduced attack surface compared to a full beacon node. validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs - are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect - use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help -V, --version Print version Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index d4ae6849c18..f4ebb667766 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -9,26 +9,27 @@ Options: --beacon-nodes Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used in addition to the OS trust store. - Commas must only be used as a delimiter, and must not be part of the certificate path. + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used + in addition to the OS trust store. Commas must only be used as a delimiter, and must not be part of the certificate path. --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag is omitted) is to - broadcast subscriptions only. + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default + (when flag is omitted) is to broadcast subscriptions only. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local + execution node. --builder-registration-timestamp-override This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` + flag Note: Users should specify separate custom datadirs for different networks. --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set here moves too far from the previous - block's gas limit. [default: 30,000,000] + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set + here moves too far from the previous block's gas limit. [default: 30,000,000] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the - --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -36,19 +37,19 @@ Options: --graffiti-file Specify a graffiti file to load validator graffitis from. --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it additionally requires the explicit use of - the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security like a HTTPS reverse-proxy or SSH - tunnelling. + Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it + additionally requires the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, + users should apply transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5062). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5062). --http-port Set the listen TCP port for the RESTful HTTP API server. --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds - the value specified in `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. + Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format @@ -60,47 +61,50 @@ Options: --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5064). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5064). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the - beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS - connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This + flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your + validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard beacon nodes specified in - --beacon-nodes. + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the + standard beacon nodes specified in --beacon-nodes. --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be - extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node + to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex representation of the validators - voting public key. Defaults to ~/.lighthouse/{network}/secrets. + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex + representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the validator definitions it takes priority - over this value. + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the + validator definitions it takes priority over this value. -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with this flag. --validator-registration-batch-size Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the validator_definitions.yml + The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the + validator_definitions.yml --web3-signer-keep-alive-timeout Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] --web3-signer-max-idle-connections @@ -109,42 +113,50 @@ Options: Print help Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. Useful for outsourcing execution - payload construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the validator_definitions.yml file. + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. + Useful for outsourcing execution payload construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the + validator_definitions.yml file. --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific - memory allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation messages to all beacon nodes - provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if slashing protection is enabled on - the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL - GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be + provided when debugging specific memory allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation + messages to all beacon nodes provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls + only go out to the first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if + slashing protection is enabled on the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN + THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING + WEB3SIGNER'S SLASHING PROTECTION. --distributed Enables functionality required for running the validator in a distributed validator cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the validators managed by this client. This - will result in three (possibly four) epochs worth of missed attestations. If an attestation is detected during this period, it means it is very likely that you are - running a second validator client with the same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing - a slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this metric for higher validator counts - will lead to higher volume of prometheus metrics being collected. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the + validators managed by this client. This will result in three (possibly four) epochs worth of missed attestations. If an + attestation is detected during this period, it means it is very likely that you are running a second validator client with the + same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing a + slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting + immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this + metric for higher validator counts will lead to higher volume of prometheus metrics being collected. --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to HTTP API consumers who have access - to the API token. This method is useful for exporting validators, however it should be used with caution since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're certain that a new slashing - protection database is required. Usually, your database will have been initialized when you imported your validator keys. If you misplace your database and then - run with this flag you risk being slashed. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to + HTTP API consumers who have access to the API token. This method is useful for exporting validators, however it should be used + with caution since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator + definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're + certain that a new slashing protection database is required. Usually, your database will have been initialized when you imported + your validator keys. If you misplace your database and then run with this flag you risk being slashed. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive - information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent - folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs + can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, + the log file permissions will be inherited from the parent folder. --metrics Enable the Prometheus metrics HTTP server. Disabled by default. --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a beacon node that has this endpoint - implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause - missed duties when fallbacks are used. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a + beacon node that has this endpoint implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is + unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not + recommended, longer timeouts can cause missed duties when fallbacks are used. ``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 5c41e65be3c..2f7136b085f 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,50 +6,64 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client - using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports - validators signing via a keystore on the local file system (i.e., not Web3Signer validators). + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then + be imported to a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the + same format as the "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" + command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" + command. This command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs - are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect - use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 38e2e26da57..a3233077c26 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,69 +1,90 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client using the -"import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to +a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the +"ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: - --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any validator key here is already known - as a validator by that beacon node. This helps prevent the same validator being created twice and therefore slashable conditions. - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload - from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any + validator key here is already known as a validator by that beacon node. This helps prevent the same validator being + created twice and therefore slashable conditions. + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a + builder payload header and payload from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible + values: true, false] --count The number of validators to create, regardless of how many already exist - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials - with the mnemonic-derived withdrawal public key in EIP-2334 format. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator + (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will + generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. --first-index The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not + specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future - logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] --mnemonic-path If present, the mnemonic will be read in from this file. - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if it does not exist. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. - Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be + created if it does not exist. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value + from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this flag will save several seconds per - validator if the user has an alternate strategy for submitting deposits. + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this + flag will save several seconds per validator if the user has an alternate strategy for submitting deposits. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be + provided when debugging specific memory allocation issues. --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information - about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this flag is not provided, a random - password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed up. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can + often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this + flag is not provided, a random password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic + is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. ``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 06369b467cd..bef0a6defb8 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -6,49 +6,62 @@ Uploads validators to a validator client using the HTTP API. The validators are Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs - are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect - use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named "validators.json". + --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually + named "validators.json". --vc-token The file containing a token required by the validator client. - --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be conducted where no changes are - made to the validator client. [default: http://localhost:5062] + --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' + will be conducted where no changes are made to the validator client. [default: http://localhost:5062] -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. This flag should be used with - caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is amiss. Users should also be careful to avoid submitting duplicate - deposits for validators that already exist on the VC. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. + This flag should be used with caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is + amiss. Users should also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index ee0108ca9f2..61d6426d1ef 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,63 +1,79 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports validators signing -via a keystore on the local file system (i.e., not Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This +command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload - from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a + builder payload header and payload from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible + values: true, false] --count The number of validators to move. - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] --dest-vc-token The file containing a token required by the destination validator client. - --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have new validators added as - they are removed from the "source" validator client. - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and + will have new validators added as they are removed from the "source" validator client. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not + specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future - logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. - Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. --src-vc-token The file containing a token required by the source validator client. - --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the validators that are to be - moved. + --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and + contains the validators that are to be moved. --stdin-inputs If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value + from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/help_bn.md-e b/help_bn.md-e index 726e996b5d2..05a76ca2a47 100644 --- a/help_bn.md-e +++ b/help_bn.md-e @@ -1,7 +1,8 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing +messages to the network. Usage: lighthouse beacon_node [OPTIONS] @@ -19,15 +20,15 @@ Options: --builder The URL of a service compatible with the MEV-boost API. --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local execution engine for payload - construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if there are skips slots at the start - of an epoch, right before this node is set to propose. [default: 3] + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local + execution engine for payload construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will + cause this condition to be hit if there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the local execution engine for payload - construction. [default: 3] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the + local execution engine for payload construction. [default: 3] --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution - engine for payload construction. [default: 8] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected + builders, and will use the local execution engine for payload construction. [default: 8] --builder-profit-threshold This flag is deprecated and has no effect. --builder-user-agent @@ -43,8 +44,8 @@ Options: --checkpoint-sync-url-timeout Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` + flag Note: Users should specify separate custom datadirs for different networks. --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --discovery-port @@ -52,50 +53,56 @@ Options: --discovery-port6 The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` --enr-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 to the IP address it resolves to and does not auto-update based - on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set - this flag twice with the different values. + 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 to the IP address it resolves + to and does not auto-update based on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will + update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. --enr-quic-port The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. --enr-quic6-port The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is not set. + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is + not set. --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is not set. + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is + not set. --enr-udp-port The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. --enr-udp6-port The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. [default: 1] + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. + [default: 1] --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes + [default: 1] --eth1-blocks-per-log-query Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for irregular Proof-of-Work block times, but - setting it too low can make the node vulnerable to re-orgs. + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for + irregular Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. --execution-endpoint Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. --execution-jwt File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set + to empty by default --execution-jwt-secret-key Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set + to empty by default --execution-timeout-multiplier Unsigned integer to multiply the default execution timeouts by. [default: 1] --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk proposing atop the wrong parent - block. [default: 250] + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk + proposing atop the wrong parent block. [default: 250] --freezer-dir Data directory for the freezer database. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the - --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -105,13 +112,13 @@ Options: --http-address
Set the listen address for the RESTful HTTP API server. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5052). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5052). --http-duplicate-block-status Status code to send when a block that is already known is POSTed to the HTTP API. --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside other tasks. When set to "false", - HTTP API responses will be executed immediately. + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside + other tasks. When set to "false", HTTP API responses will be executed immediately. --http-port Set the listen TCP port for the RESTful HTTP API server. --http-spec-fork @@ -123,11 +130,12 @@ Options: --http-tls-key The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple - protocols, separate them by ';'. This is enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of + :/. To set quotas for multiple protocols, separate them by ';'. This is enabled by default, using default quotas. To disable + rate limiting use the disable-inbound-rate-limiter flag instead. --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. This directory is not pruned, users - should be careful to avoid filling up their disks. + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. + This directory is not pruned, users should be careful to avoid filling up their disks. --libp2p-addresses One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. --listen-address [
...] @@ -135,13 +143,13 @@ Options: Examples: - --listen-address '0.0.0.0' will listen over IPv4. - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be - accepted. [default: 0.0.0.0] + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or + multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds - the value specified in `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. + Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format @@ -151,19 +159,19 @@ Options: --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also cause unnecessary consensus failures, - so is disabled by default. + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also + cause unnecessary consensus failures, so is disabled by default. --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5054). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5054). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the - beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS - connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This + flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your + validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network @@ -171,22 +179,24 @@ Options: --network-dir Data directory for network keys. Defaults to network/ inside the beacon node dir. --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the - --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 address and --port6 to the IPv6 address. - [default: 9000] + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The + discovery port can be modified by the --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port + flag will apply to the IPv4 address and --port6 to the IPv6 address. [default: 9000] --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. + [default: 9090] --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload after the first call, and high - values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload + after the first call, and high values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. --progressive-balances Deprecated. This optimisation is now the default and cannot be disabled. --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to propagate and be processed by the network. - The default is 1/12th of a slot (1 second on mainnet) + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to + propagate and be processed by the network. The default is 1/12th of a slot (1 second on mainnet) --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not be attempted at any slot such that - `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not + be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose + additional restrictions. --proposer-reorg-epochs-since-finalization Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 --proposer-reorg-parent-threshold @@ -196,21 +206,23 @@ Options: --prune-blobs Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to syncing peers. [default: true] + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to + syncing peers. [default: true] --quic-port The UDP port that quic will listen on. Defaults to `port` + 1 --quic-port6 The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be - extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node + to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas for multiple protocols, - separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To + set quotas for multiple protocols, separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for + the inbound rate limiter will be used. --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are dependent on validator count and - setting this value to a large number can consume a large amount of memory. + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are + dependent on validator count and setting this value to a large number can consume a large amount of memory. --slasher-att-cache-size Set the maximum number of attestation roots for the slasher to cache --slasher-backend @@ -226,7 +238,8 @@ Options: --slasher-max-db-size Maximum size of the MDBX database used by the slasher. --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot duration. + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot + duration. --slasher-update-period Configure how often the slasher runs batch processing. --slasher-validator-chunk-size @@ -236,21 +249,24 @@ Options: --state-cache-size Specifies the size of the snapshot cache [default: 3] --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in addition to) setting it here. + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in + addition to) setting it here. -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. --target-peers The target number of peers. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with this flag. --trusted-peers One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. --trusted-setup-file-override @@ -258,79 +274,91 @@ Options: --validator-monitor-file As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, it will provide aggregate metrics - and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, + it will provide aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. + Defaults to 64. --validator-monitor-pubkeys A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is for verification only, to perform a - checkpoint sync from a recent state use --checkpoint-sync-url. + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is + for verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. -h, --help Print help -V, --version Print version Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the preferred method for syncing a node. - Only use this flag when testing. DO NOT use on mainnet! + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the + preferred method for syncing a node. Only use this flag when testing. DO NOT use on mainnet! --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should set a fee recipient on this BN and - also consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, regardless of recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in resource contention which degrades - staking performance. Stakers should generally choose to avoid this flag since backfill sync is not required for staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if you intend to run a non-validating - beacon node. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should + set a fee recipient on this BN and also consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, + regardless of recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is + disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in + resource contention which degrades staking performance. Stakers should generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if + you intend to run a non-validating beacon node. --disable-duplicate-warn-logs This flag is deprecated and has no effect. --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is considered experimental as it may - obscure performance issues. + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is + considered experimental as it may obscure performance issues. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will be checked in Lighthouse and only - passed to the EL if initial verification fails. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be + provided when debugging specific memory allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will + be checked in Lighthouse and only passed to the EL if initial verification fails. --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match 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. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve a validator. + --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve + a validator. --eth1-purge-cache Purges the eth1 block and deposit caches --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE logging. + --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE + logging. --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING + ONLY. DO NOT USE ON MAINNET. --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from already-subscribed subnets, use with - --subscribe-all-subnets to ensure all attestations are received for import. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from + already-subscribed subnets, use with --subscribe-all-subnets to ensure all attestations are received for import. --light-client-server Act as a full node supporting light clients on the p2p network [experimental] --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information - about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can + often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log + file permissions will be inherited from the parent folder. --metrics Enable the Prometheus metrics HTTP server. Disabled by default. --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient for block publishing only. This flag - should be used for a beacon node being referenced by validator client using the --proposer-node flag. This configuration is for enabling more secure setups. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient + for block publishing only. This flag should be used for a beacon node being referenced by validator client using the --proposer-node + flag. This configuration is for enabling more secure setups. --purge-db If present, the chain database will be deleted. Use with caution. --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a consensus failure caused by the - execution layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is - enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a + consensus failure caused by the execution layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol + configurations. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the + inbound rate limiter will be used. --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher UX and the extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the execution node. This is equivalent to - `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. This generally has the effect of - providing additional logging and metrics for locally controlled validators. - -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This disables this feature, fixing the - ENR's IP/PORT to those specified on boot. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher + UX and the extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the + execution node. This is equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to + all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. + This generally has the effect of providing additional logging and metrics for locally controlled validators. + -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This + disables this feature, fixing the ENR's IP/PORT to those specified on boot. -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks ``` \ No newline at end of file diff --git a/help_general.md-e b/help_general.md-e index 39f7c689fa4..ea916614145 100644 --- a/help_general.md-e +++ b/help_general.md-e @@ -8,54 +8,66 @@ Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages - to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node functions. Instead, it will simply - run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to provide a network boot-node since it has a reduced attack surface compared - to a full beacon node. + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the + beacon chain and publishing messages to the network. [aliases: b, bn, beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node + functions. Instead, it will simply run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to + provide a network boot-node since it has a reduced attack surface compared to a full beacon node. validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs - are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect - use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help -V, --version Print version Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/help_vc.md-e b/help_vc.md-e index 2be0f91f275..57d308c9862 100644 --- a/help_vc.md-e +++ b/help_vc.md-e @@ -9,26 +9,27 @@ Options: --beacon-nodes Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used in addition to the OS trust store. - Commas must only be used as a delimiter, and must not be part of the certificate path. + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used + in addition to the OS trust store. Commas must only be used as a delimiter, and must not be part of the certificate path. --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag is omitted) is to - broadcast subscriptions only. + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default + (when flag is omitted) is to broadcast subscriptions only. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local + execution node. --builder-registration-timestamp-override This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` + flag Note: Users should specify separate custom datadirs for different networks. --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set here moves too far from the previous - block's gas limit. [default: 30,000,000] + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set + here moves too far from the previous block's gas limit. [default: 30,000,000] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default URL or the - --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -36,19 +37,19 @@ Options: --graffiti-file Specify a graffiti file to load validator graffitis from. --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it additionally requires the explicit use of - the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security like a HTTPS reverse-proxy or SSH - tunnelling. + Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it + additionally requires the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, + users should apply transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5062). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5062). --http-port Set the listen TCP port for the RESTful HTTP API server. --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the number of log files exceeds - the value specified in `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. + Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format @@ -60,47 +61,50 @@ Options: --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed origin is set to the listen - address of this server (e.g., http://localhost:5064). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS + allowed origin is set to the listen address of this server (e.g., http://localhost:5064). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the - beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and other personal information. Always use a HTTPS - connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This + flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your + validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard beacon nodes specified in - --beacon-nodes. + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the + standard beacon nodes specified in --beacon-nodes. --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be - extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the + broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node + to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex representation of the validators - voting public key. Defaults to ~/.lighthouse/{network}/secrets. + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex + representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the validator definitions it takes priority - over this value. + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the + validator definitions it takes priority over this value. -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with this flag. --validator-registration-batch-size Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the validator_definitions.yml + The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the + validator_definitions.yml --web3-signer-keep-alive-timeout Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] --web3-signer-max-idle-connections @@ -109,42 +113,50 @@ Options: Print help Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. Useful for outsourcing execution - payload construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the validator_definitions.yml file. + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. + Useful for outsourcing execution payload construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the + validator_definitions.yml file. --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific - memory allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation messages to all beacon nodes - provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if slashing protection is enabled on - the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL - GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be + provided when debugging specific memory allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation + messages to all beacon nodes provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls + only go out to the first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if + slashing protection is enabled on the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN + THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING + WEB3SIGNER'S SLASHING PROTECTION. --distributed Enables functionality required for running the validator in a distributed validator cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the validators managed by this client. This - will result in three (possibly four) epochs worth of missed attestations. If an attestation is detected during this period, it means it is very likely that you are - running a second validator client with the same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing - a slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this metric for higher validator counts - will lead to higher volume of prometheus metrics being collected. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the + validators managed by this client. This will result in three (possibly four) epochs worth of missed attestations. If an + attestation is detected during this period, it means it is very likely that you are running a second validator client with the + same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing a + slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting + immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this + metric for higher validator counts will lead to higher volume of prometheus metrics being collected. --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to HTTP API consumers who have access - to the API token. This method is useful for exporting validators, however it should be used with caution since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're certain that a new slashing - protection database is required. Usually, your database will have been initialized when you imported your validator keys. If you misplace your database and then - run with this flag you risk being slashed. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to + HTTP API consumers who have access to the API token. This method is useful for exporting validators, however it should be used + with caution since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator + definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're + certain that a new slashing protection database is required. Usually, your database will have been initialized when you imported + your validator keys. If you misplace your database and then run with this flag you risk being slashed. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive - information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent - folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs + can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, + the log file permissions will be inherited from the parent folder. --metrics Enable the Prometheus metrics HTTP server. Disabled by default. --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a beacon node that has this endpoint - implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause - missed duties when fallbacks are used. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a + beacon node that has this endpoint implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is + unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not + recommended, longer timeouts can cause missed duties when fallbacks are used. ``` \ No newline at end of file diff --git a/help_vm.md-e b/help_vm.md-e index eb0d0e6055d..a37954e603f 100644 --- a/help_vm.md-e +++ b/help_vm.md-e @@ -6,50 +6,64 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client - using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports - validators signing via a keystore on the local file system (i.e., not Web3Signer validators). + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then + be imported to a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the + same format as the "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" + command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" + command. This command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs - are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect - use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/help_vm_create.md-e b/help_vm_create.md-e index c3c56165535..573a5e87382 100644 --- a/help_vm_create.md-e +++ b/help_vm_create.md-e @@ -1,69 +1,90 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator client using the -"import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to +a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the +"ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: - --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any validator key here is already known - as a validator by that beacon node. This helps prevent the same validator being created twice and therefore slashable conditions. - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload - from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any + validator key here is already known as a validator by that beacon node. This helps prevent the same validator being + created twice and therefore slashable conditions. + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a + builder payload header and payload from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible + values: true, false] --count The number of validators to create, regardless of how many already exist - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials - with the mnemonic-derived withdrawal public key in EIP-2334 format. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator + (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will + generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. --first-index The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not + specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future - logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] --mnemonic-path If present, the mnemonic will be read in from this file. - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if it does not exist. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. - Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be + created if it does not exist. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value + from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this flag will save several seconds per - validator if the user has an alternate strategy for submitting deposits. + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this + flag will save several seconds per validator if the user has an alternate strategy for submitting deposits. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be + provided when debugging specific memory allocation issues. --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information - about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this flag is not provided, a random - password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed up. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can + often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this + flag is not provided, a random password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic + is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. ``` \ No newline at end of file diff --git a/help_vm_import.md-e b/help_vm_import.md-e index 4478f2bc1a4..3ba052b9de9 100644 --- a/help_vm_import.md-e +++ b/help_vm_import.md-e @@ -6,49 +6,62 @@ Uploads validators to a validator client using the HTTP API. The validators are Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs - are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect - use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named "validators.json". + --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually + named "validators.json". --vc-token The file containing a token required by the validator client. - --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be conducted where no changes are - made to the validator client. [default: http://localhost:5062] + --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' + will be conducted where no changes are made to the validator client. [default: http://localhost:5062] -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. This flag should be used with - caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is amiss. Users should also be careful to avoid submitting duplicate - deposits for validators that already exist on the VC. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. + This flag should be used with caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is + amiss. Users should also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file diff --git a/help_vm_move.md-e b/help_vm_move.md-e index df66cbd29a8..03a363b7a58 100644 --- a/help_vm_move.md-e +++ b/help_vm_move.md-e @@ -1,63 +1,79 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only supports validators signing -via a keystore on the local file system (i.e., not Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This +command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload - from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: true, false] + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a + builder payload header and payload from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible + values: true, false] --count The number of validators to move. - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of - the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to + $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, + debug, trace, warn, error, crit] --dest-vc-token The file containing a token required by the destination validator client. - --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have new validators added as - they are removed from the "source" validator client. - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If - not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be - ignored. + --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and + will have new validators added as they are removed from the "source" validator client. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not + specifying this flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the + genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future - logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log + file is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, + warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. - Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is + disabled. [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + [possible values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter + in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. --src-vc-token The file containing a token required by the source validator client. - --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the validators that are to be - moved. + --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and + contains the validators that are to be moved. --stdin-inputs If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value + from the VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if + there is no existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be + used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal + PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful + with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this + flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer + (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging specific memory - allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. ``` \ No newline at end of file From 71ff7324571fa787bd4606f67d055660fefed6d7 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 9 Apr 2024 23:14:47 +0300 Subject: [PATCH 22/46] update --- book/src/help_bn.md | 569 ++++++++++++++++++++++++------------- book/src/help_general.md | 157 ++++++---- book/src/help_vc.md | 286 ++++++++++++------- book/src/help_vm.md | 142 +++++---- book/src/help_vm_create.md | 217 ++++++++------ book/src/help_vm_import.md | 151 ++++++---- book/src/help_vm_move.md | 181 +++++++----- 7 files changed, 1077 insertions(+), 626 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 8687ee9cd9b..2ff603e8d75 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,8 +1,9 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing -messages to the network. +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and +stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the +network. Usage: lighthouse beacon_node [OPTIONS] @@ -10,225 +11,298 @@ Options: --auto-compact-db Enable or disable automatic compaction of the database on finalization. [default: true] --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - blob_prune_margin_epochs. [default: 0] + The margin for blob pruning in epochs. The oldest blobs are pruned up until + data_availability_boundary - blob_prune_margin_epochs. [default: 0] --blobs-dir Data directory for the blobs database. --block-cache-size Specifies how many blocks the database should cache in memory [default: 5] --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr + is also supported. --builder The URL of a service compatible with the MEV-boost API. --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local - execution engine for payload construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will - cause this condition to be hit if there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] + If this node is proposing a block and the chain has not finalized within this number of + epochs, it will NOT query any connected builders, and will use the local execution engine + for payload construction. Setting this value to anything less than 2 will cause the node + to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if + there are skips slots at the start of an epoch, right before this node is set to propose. + [default: 3] --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the - local execution engine for payload construction. [default: 3] + If this node is proposing a block and has seen this number of skip slots on the canonical + chain in a row, it will NOT query any connected builders, and will use the local execution + engine for payload construction. [default: 3] --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected - builders, and will use the local execution engine for payload construction. [default: 8] + If this node is proposing a block and has seen this number of skip slots on the canonical + chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will + use the local execution engine for payload construction. [default: 8] --builder-profit-threshold This flag is deprecated and has no effect. --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. + The HTTP user agent to send alongside requests to the builder URL. The default is + Lighthouse's version string. --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + Set the checkpoint blobs to start syncing from. Must be aligned and match + --checkpoint-block. Using --checkpoint-sync-url instead is recommended. --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url instead is recommended. + Set a checkpoint block to start syncing from. Must be aligned and match + --checkpoint-state. Using --checkpoint-sync-url instead is recommended. --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + Set a checkpoint state to start syncing from. Must be aligned and match + --checkpoint-block. Using --checkpoint-sync-url instead is recommended. --checkpoint-sync-url Set the remote beacon node HTTP endpoint to use for checkpoint sync. --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] + Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: + 180] -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` - flag Note: Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] --discovery-port The UDP port that discovery will listen on. Defaults to `port` --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. + Defaults to `port6` --enr-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 to the IP address it resolves - to and does not auto-update based on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will - update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. + 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 to the IP address it resolves to and does + not auto-update based on PONG responses in discovery. Set this only if you are sure other + nodes can connect to your local node on this address. This will update the `ip4` or `ip6` + ENR fields accordingly. To update both, set this flag twice with the different values. --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. + The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv4. --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. + The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv6. --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is - not set. + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to + your local node on this port over IPv4. The --port flag is used if this is not set. --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is - not set. + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to + your local node on this port over IPv6. The --port6 flag is used if this is not set. --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. + The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to + your local node on this port over IPv4. --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. + The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to + your local node on this port over IPv6. --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. - [default: 1] + The epoch interval with which to prune blobs from Lighthouse's database when they are + older than the data availability boundary relative to the current epoch. [default: 1] --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes - [default: 1] + The number of epochs to wait between running the migration of data from the hot DB to the + cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] + Specifies the number of blocks that a deposit log query should span. This will reduce the + size of responses from the Eth1 endpoint. [default: 1000] --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for - irregular Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. + Specifies the distance between the Eth1 chain head and the last block which should be + imported into the cache. Setting this value lower can help compensate for irregular + Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses + the same endpoint to populate the deposit cache. --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + File path which contains the hex-encoded JWT secret for the execution endpoint provided in + the --execution-endpoint flag. --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set - to empty by default + Used by the beacon node to communicate a unique identifier to execution nodes during JWT + authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty by + default --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint + flag. --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set - to empty by default + Used by the beacon node to communicate a client version to execution nodes during JWT + authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by + default --execution-timeout-multiplier Unsigned integer to multiply the default execution timeouts by. [default: 1] --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk - proposing atop the wrong parent block. [default: 250] + Set the maximum number of milliseconds to wait for fork choice before proposing a block. + You can prevent waiting at all by setting the timeout to 0, however you risk proposing + atop the wrong parent block. [default: 250] --freezer-dir Data directory for the freezer database. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 bytes. + Specify your custom graffiti to be included in blocks. Defaults to the current version and + commit, truncated to fit in 32 bytes. --historic-state-cache-size Specifies how many states from the freezer database should cache in memory [default: 1] --http-address
Set the listen address for the RESTful HTTP API server. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5052). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any + origin (not recommended in production). If no value is supplied, the CORS allowed origin + is set to the listen address of this server (e.g., http://localhost:5052). --http-duplicate-block-status Status code to send when a block that is already known is POSTed to the HTTP API. --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside - other tasks. When set to "false", HTTP API responses will be executed immediately. + The beacon processor is a scheduler which provides quality-of-service and DoS protection. + When set to "true", HTTP API requests will be queued and scheduled alongside other tasks. + When set to "false", HTTP API responses will be executed immediately. --http-port Set the listen TCP port for the RESTful HTTP API server. --http-spec-fork - Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. + Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary + to set this flag. --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from being dropped. + Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing + this value can prevent messages from being dropped. --http-tls-cert The path of the certificate to be used when serving the HTTP API server over TLS. --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. + The path of the private key to be used when serving the HTTP API server over TLS. Must not + be password-protected. --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of - :/. To set quotas for multiple protocols, separate them by ';'. This is enabled by default, using default quotas. To disable - rate limiting use the disable-inbound-rate-limiter flag instead. + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per + protocol can be set in the form of :/. To set + quotas for multiple protocols, separate them by ';'. This is enabled by default, using + default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag + instead. --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. - This directory is not pruned, users should be careful to avoid filling up their disks. + If a block succeeds gossip validation whilst failing full validation, store the block SSZ + as a file at this path. This feature is only recommended for developers. This directory is + not pruned, users should be careful to avoid filling up their disks. --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. + One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an + ENR. --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the different values. + The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and + IpV6 set this flag twice with the different values. Examples: - --listen-address '0.0.0.0' will listen over IPv4. - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or - multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. + The order of the given addresses is not relevant. However, multiple IPv4, or multiple IPv6 + addresses will not be accepted. [default: 0.0.0.0] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. - Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also - cause unnecessary consensus failures, so is disabled by default. + Refuse to skip more than this many slots when processing an attestation. This prevents + nodes on minority forks from wasting our time and disk space, but could also cause + unnecessary consensus failures, so is disabled by default. --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5054). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any + origin (not recommended in production). If no value is supplied, the CORS allowed origin + is set to the listen address of this server (e.g., http://localhost:5054). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This - flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your - validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can + be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the + endpoint where the beacon node metrics will be sent. Note: This will send information to a + remote sever which may identify and associate your validators, IP address and other + personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + Defines how many seconds to wait between each message sent to the monitoring-endpoint. + Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] --network-dir Data directory for network keys. Defaults to network/ inside the beacon node dir. --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The - discovery port can be modified by the --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port - flag will apply to the IPv4 address and --port6 to the IPv6 address. [default: 9000] + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be + set to this value and the Quic UDP port will be set to this value + 1. The discovery port + can be modified by the --discovery-port flag and the quic port can be modified by the + --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the + IPv4 address and --port6 to the IPv6 address. [default: 9000] --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. - [default: 9090] + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults + to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload - after the first call, and high values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. + The time before the start of a proposal slot at which payload attributes should be sent. + Low values are useful for execution nodes which don't improve their payload after the + first call, and high values are useful for ensuring the EL is given ample notice. Default: + 1/3 of a slot. --progressive-balances Deprecated. This optimisation is now the default and cannot be disabled. --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to - propagate and be processed by the network. The default is 1/12th of a slot (1 second on mainnet) + Maximum delay after the start of the slot at which to propose a reorging block. Lower + values can prevent failed reorgs by ensuring the block has ample time to propagate and be + processed by the network. The default is 1/12th of a slot (1 second on mainnet) --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not - be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose - additional restrictions. + Comma-separated list of integer offsets which can be used to avoid proposing reorging + blocks at certain slots. An offset of N means that reorging proposals will not be + attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at + offset 0 will be avoided. Any offsets supplied with this flag will impose additional + restrictions. --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 + Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: + 2 --proposer-reorg-parent-threshold Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% --proposer-reorg-threshold Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] + Prune blobs from Lighthouse's database when they are older than the data data availability + boundary relative to the current epoch. [default: true] --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to - syncing peers. [default: true] + Prune execution payloads from Lighthouse's database. This saves space but imposes load on + the execution client, as payloads need to be reconstructed and sent to syncing peers. + [default: true] --quic-port The UDP port that quic will listen on. Defaults to `port` + 1 --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 + The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. + Defaults to `port6` + 1 --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node - to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To - set quotas for multiple protocols, separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for - the inbound rate limiter will be used. + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per + protocol can be set in the form of :/. To set + quotas for multiple protocols, separate them by ';'. If the self rate limiter is enabled + and a protocol is not present in the configuration, the quotas used for the inbound rate + limiter will be used. --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are - dependent on validator count and setting this value to a large number can consume a large amount of memory. + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag + allows the user to set the shuffling cache size in epochs. Shufflings are dependent on + validator count and setting this value to a large number can consume a large amount of + memory. --slasher-att-cache-size Set the maximum number of attestation roots for the slasher to cache --slasher-backend Set the database backend to be used by the slasher. [possible values: lmdb, disabled] --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] + Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. + [default: true] --slasher-chunk-size Number of epochs per validator per chunk stored on disk. --slasher-dir @@ -238,127 +312,212 @@ Options: --slasher-max-db-size Maximum size of the MDBX database used by the slasher. --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot - duration. + Set the delay from the start of the slot at which the slasher should ingest attestations. + Only effective if the slasher-update-period is a multiple of the slot duration. --slasher-update-period Configure how often the slasher runs batch processing. --slasher-validator-chunk-size Number of validators per chunk stored on disk. --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] + Specifies how often a freezer DB restore point should be stored. Cannot be changed after + initialization. [default: 8192 (mainnet) or 64 (minimal)] --state-cache-size Specifies the size of the snapshot cache [default: 3] --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in - addition to) setting it here. + Emergency fallback fee recipient for use in case the validator client does not have one + configured. You should set this flag on the validator client instead of (or in addition + to) setting it here. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. --target-peers The target number of peers. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. + One or more comma-delimited trusted peer ids which always have the highest score according + to the peer scoring system. --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from the mainnet kzg ceremony. Use with caution + Path to a json file containing the trusted setup params. NOTE: This will override the + trusted setup that is generated from the mainnet kzg ceremony. Use with caution --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. + As per --validator-monitor-pubkeys, but the comma-separated list is contained within a + file at the given path. --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, - it will provide aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. - Defaults to 64. + Once the validator monitor reaches this number of local validators it will stop collecting + per-validator Prometheus metrics and issuing per-validator logs. Instead, it will provide + aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus + database and high log volume when using many validators. Defaults to 64. --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. + A comma-separated list of 0x-prefixed validator public keys. These validators will receive + special monitoring and additional logging. --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is - for verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's + sync against. The block root should be 0x-prefixed. Note that this flag is for + verification only, to perform a checkpoint sync from a recent state use + --checkpoint-sync-url. -h, --help Print help -V, --version Print version Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the - preferred method for syncing a node. Only use this flag when testing. DO NOT use on mainnet! - --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should - set a fee recipient on this BN and also consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, - regardless of recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is - disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in - resource contention which degrades staking performance. Stakers should generally choose to avoid this flag since backfill sync is not - required for staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if - you intend to run a non-validating beacon node. - --disable-duplicate-warn-logs This flag is deprecated and has no effect. - --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is - considered experimental as it may obscure performance issues. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be - provided when debugging specific memory allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will - be checked in Lighthouse and only passed to the EL if initial verification fails. - --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. - --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. - --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve - a validator. - --eth1-purge-cache Purges the eth1 block and deposit caches - --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE - logging. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING - ONLY. DO NOT USE ON MAINNET. - --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from - already-subscribed subnets, use with --subscribe-all-subnets to ensure all attestations are received for import. - --light-client-server Act as a full node supporting light clients on the p2p network [experimental] - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can - often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log - file permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient - for block publishing only. This flag should be used for a beacon node being referenced by validator client using the --proposer-node - flag. This configuration is for enabling more secure setups. - --purge-db If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a - consensus failure caused by the execution layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol - configurations. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the - inbound rate limiter will be used. - --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher - UX and the extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the - execution node. This is equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to - all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. - This generally has the effect of providing additional logging and metrics for locally controlled validators. - -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This - disables this feature, fixing the ENR's IP/PORT to those specified on boot. - -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. - --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks -``` \ No newline at end of file + --allow-insecure-genesis-sync + Enable syncing from genesis, which is generally insecure and incompatible with data + availability checks. Checkpoint syncing is the preferred method for syncing a node. Only + use this flag when testing. DO NOT use on mainnet! + --always-prefer-builder-payload + This flag is deprecated and has no effect. + --always-prepare-payload + Send payload attributes with every fork choice update. This is intended for use by block + builders, relays and developers. You should set a fee recipient on this BN and also + consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks + This flag disables all checks related to chain health. This means the builder API will + always be used for payload construction, regardless of recent chain conditions. + --compact-db + If present, apply compaction to the database on start-up. Use with caution. It is + generally not recommended unless auto-compaction is disabled. + --disable-backfill-rate-limiting + Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as + fast as possible, however it can result in resource contention which degrades staking + performance. Stakers should generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync + Explicitly disables syncing of deposit logs from the execution node. This overrides any + previous option that depends on it. Useful if you intend to run a non-validating beacon + node. + --disable-duplicate-warn-logs + This flag is deprecated and has no effect. + --disable-inbound-rate-limiter + Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts + Disable the timeouts applied to some internal locks by default. This can lead to less + spurious failures on slow hardware but is considered experimental as it may obscure + performance issues. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-optimistic-finalized-sync + Force Lighthouse to verify every execution block hash with the execution client during + finalized sync. By default block hashes will be checked in Lighthouse and only passed to + the EL if initial verification fails. + --disable-proposer-reorgs + Do not attempt to reorg late blocks from other validators when proposing. + --disable-quic + Disables the quic transport. The node will rely solely on the TCP transport for libp2p + connections. + --disable-upnp + Disables UPnP support. Setting this will prevent Lighthouse from attempting to + automatically establish external port mappings. + --dummy-eth1 + If present, uses an eth1 backend that generates static dummy data.Identical to the method + used at the 2019 Canada interop. + -e, --enr-match + 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-private-discovery + Lighthouse by default does not discover private IP addresses. Set this flag to enable + connection attempts to local addresses. + --eth1 + If present the node will connect to an eth1 node. This is required for block production, + you must use this flag if you wish to serve a validator. + --eth1-purge-cache + Purges the eth1 block and deposit caches + --genesis-backfill + Attempts to download blocks all the way back to genesis when checkpoint syncing. + --gui + Enable the graphical user interface and all its requirements. This enables --http and + --validator-monitor-auto and enables SSE logging. + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-allow-sync-stalled + Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is + useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-enable-tls + Serves the RESTful HTTP API server over TLS. This feature is currently experimental. + --import-all-attestations + Import and aggregate all attestations, regardless of validator subscriptions. This will + only import attestations from already-subscribed subnets, use with --subscribe-all-subnets + to ensure all attestations are received for import. + --light-client-server + Act as a full node supporting light clients on the p2p network [experimental] + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they can be read by any + user on the machine. Note that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --private + Prevents sending various client identification information. + --proposer-only + Sets this beacon node at be a block proposer only node. This will run the beacon node in a + minimal configuration that is sufficient for block publishing only. This flag should be + used for a beacon node being referenced by validator client using the --proposer-node + flag. This configuration is for enabling more secure setups. + --purge-db + If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states + After a checkpoint sync, reconstruct historic states in the database. This requires + syncing all the way back to genesis. + --reset-payload-statuses + When present, Lighthouse will forget the payload statuses of any already-imported blocks. + This can assist in the recovery from a consensus failure caused by the execution layer. + --self-limiter + Enables the outbound rate limiter (requests made by this node). Use the + self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is + enabled and a protocol is not present in the configuration, the quotas used for the + inbound rate limiter will be used. + --shutdown-after-sync + Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed + before shutdown. + --slasher + Run a slasher alongside the beacon node. It is currently only recommended for expert users + because of the immaturity of the slasher UX and the extra resources required. + --staking + Standard option for a staking beacon node. This will enable the HTTP server on + localhost:5052 and import deposit logs from the execution node. This is equivalent to + `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets + Subscribe to all subnets regardless of validator count. This will also advertise the + beacon node as being long-lived subscribed to all subnets. + --validator-monitor-auto + Enables the automatic detection and monitoring of validators connected to the HTTP API and + using the subnet subscription endpoint. This generally has the effect of providing + additional logging and metrics for locally controlled validators. + -x, --disable-enr-auto-update + Discovery automatically updates the nodes local ENR with an external IP address and port + as seen by other peers on the network. This disables this feature, fixing the ENR's + IP/PORT to those specified on boot. + -z, --zero-ports + Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free + ports. + --disable-packet-filter + Disables the discovery packet filter. Useful for testing in smaller networks +``` + diff --git a/book/src/help_general.md b/book/src/help_general.md index be98f462ec7..bdddc199dbe 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,73 +1,114 @@ # Lighthouse General Commands ``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and +utilities for managing validator accounts. Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the - beacon chain and publishing messages to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node - functions. Instead, it will simply run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to - provide a network boot-node since it has a reduced attack surface compared to a full beacon node. - validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] - account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] + validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. + [aliases: vm, validator-manager, validator_manager] + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and + downloads, verifies and stores blocks. Provides a HTTP API for querying the + beacon chain and publishing messages to the network. [aliases: b, bn, + beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. + This process will *not* import blocks or perform most typical beacon node + functions. Instead, it will simply run the discv5 service and assist nodes + on the network to discover each other. This is the recommended way to + provide a network boot-node since it has a reduced attack surface compared + to a full beacon node. + validator_client When connected to a beacon node, performs the duties of a staked validator + (e.g., proposing blocks and attestations). [aliases: v, vc, validator] + account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, + am, account, account_manager] help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -h, --help Print help - -V, --version Print version + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + -h, --help + Print help + -V, --version + Print version Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p + --disable-malloc-tuning If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should only + be provided when debugging specific memory allocation issues. + -l DEPRECATED Enables environment logging giving access to + sub-protocol logs such as discv5 and libp2p --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file + --logfile-compress If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note that + logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited from + the parent folder. +``` + diff --git a/book/src/help_vc.md b/book/src/help_vc.md index f4ebb667766..e414013898c 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -1,35 +1,46 @@ # Validator Client ``` -When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). +When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks +and attestations). Usage: lighthouse validator_client [OPTIONS] Options: --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. + Comma-separated addresses to one or more beacon node HTTP APIs. Default is + http://localhost:5052. --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used - in addition to the OS trust store. Commas must only be used as a delimiter, and must not be part of the certificate path. + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node + (and/or proposer node). These certificates must be in PEM format and are used in addition + to the OS trust store. Commas must only be used as a delimiter, and must not be part of + the certificate path. --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default - (when flag is omitted) is to broadcast subscriptions only. + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible + values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag + is omitted) is to broadcast subscriptions only. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local - execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value + when choosing between a builder payload header and payload from the local execution node. --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration + This flag takes a unix timestamp value that will be used to override the timestamp used in + the builder api registration -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` - flag Note: Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set - here moves too far from the previous block's gas limit. [default: 30,000,000] + The gas limit to be used in all builder proposals for all validators managed by this + validator client. Note this will not necessarily be used if the gas limit set here moves + too far from the previous block's gas limit. [default: 30,000,000] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -37,126 +48,193 @@ Options: --graffiti-file Specify a graffiti file to load validator graffitis from. --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it - additionally requires the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, - users should apply transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. + Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is + unsafe to publish on a public network. When this flag is used, it additionally requires + the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of + the risks involved. For access via the Internet, users should apply transport-layer + security like a HTTPS reverse-proxy or SSH tunnelling. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5062). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any + origin (not recommended in production). If no value is supplied, the CORS allowed origin + is set to the listen address of this server (e.g., http://localhost:5062). --http-port Set the listen TCP port for the RESTful HTTP API server. --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. - Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5064). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any + origin (not recommended in production). If no value is supplied, the CORS allowed origin + is set to the listen address of this server (e.g., http://localhost:5064). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This - flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your - validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can + be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the + endpoint where the beacon node metrics will be sent. Note: This will send information to a + remote sever which may identify and associate your validators, IP address and other + personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + Defines how many seconds to wait between each message sent to the monitoring-endpoint. + Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the - standard beacon nodes specified in --beacon-nodes. + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that + are used to send beacon block proposals. A failure will revert back to the standard beacon + nodes specified in --beacon-nodes. --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node - to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex - representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. + The directory which contains the password to unlock the validator voting keypairs. Each + password should be contained in a file where the name is the 0x-prefixed hex + representation of the validators voting public key. Defaults to + ~/.lighthouse/{network}/secrets. --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the - validator definitions it takes priority over this value. + Once the merge has happened, this address will receive transaction fees from blocks + proposed by this validator client. If a fee recipient is configured in the validator + definitions it takes priority over this value. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] + Defines the number of validators per validator/register_validator request sent to the BN. + This value can be reduced to avoid timeouts from builders. [default: 500] --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the - validator_definitions.yml + The directory which contains the validator keystores, deposit data for each validator + along with the common slashing protection database and the validator_definitions.yml --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] + Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout + [default: 90000] --web3-signer-max-idle-connections Maximum number of idle connections to maintain per web3signer host. Default is unlimited. -h, --help Print help Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. - Useful for outsourcing execution payload construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the - validator_definitions.yml file. - --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be - provided when debugging specific memory allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation - messages to all beacon nodes provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls - only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if - slashing protection is enabled on the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN - THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING - WEB3SIGNER'S SLASHING PROTECTION. - --distributed Enables functionality required for running the validator in a distributed validator cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the - validators managed by this client. This will result in three (possibly four) epochs worth of missed attestations. If an - attestation is detected during this period, it means it is very likely that you are running a second validator client with the - same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing a - slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting - immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this - metric for higher validator counts will lead to higher volume of prometheus metrics being collected. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to - HTTP API consumers who have access to the API token. This method is useful for exporting validators, however it should be used - with caution since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator - definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're - certain that a new slashing protection database is required. Usually, your database will have been initialized when you imported - your validator keys. If you misplace your database and then run with this flag you risk being slashed. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs - can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, - the log file permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a - beacon node that has this endpoint implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is - unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not - recommended, longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file + --builder-proposals + If this flag is set, Lighthouse will query the Beacon Node for only block headers during + proposals and will sign over headers. Useful for outsourcing execution payload + construction during proposals. + --disable-auto-discover + If present, do not attempt to discover new validators in the validators-dir. Validators + will need to be manually added to the validator_definitions.yml file. + --disable-latency-measurement-service + Disables the service that periodically attempts to measure latency to BNs. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-run-on-all + DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee + subscriptions and proposer preparation messages to all beacon nodes provided in the + `--beacon-nodes flag`. This option changes that behaviour such that these api calls only + go out to the first available and synced beacon node + --disable-slashing-protection-web3signer + Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O + burden on the VC but is only safe if slashing protection is enabled on the remote signer + and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING + PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG + WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed + Enables functionality required for running the validator in a distributed validator + cluster. + --enable-doppelganger-protection + If this flag is set, Lighthouse will delay startup for three epochs and monitor for + messages on the network by any of the validators managed by this client. This will result + in three (possibly four) epochs worth of missed attestations. If an attestation is + detected during this period, it means it is very likely that you are running a second + validator client with the same keys. This validator client will immediately shutdown if + this is detected in order to avoid potentially committing a slashable offense. Use this + flag in order to ENABLE this functionality, without this flag Lighthouse will begin + attesting immediately. + --enable-high-validator-count-metrics + Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled + for <= 64 validators. Enabling this metric for higher validator counts will lead to higher + volume of prometheus metrics being collected. + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export + If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows + exporting keystores and passwords to HTTP API consumers who have access to the API token. + This method is useful for exporting validators, however it should be used with caution + since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir + If present, any validators created via the HTTP will have keystore passwords stored in the + secrets-dir rather than the validator definitions file. + --init-slashing-protection + If present, do not require the slashing protection database to exist before running. You + SHOULD NOT use this flag unless you're certain that a new slashing protection database is + required. Usually, your database will have been initialized when you imported your + validator keys. If you misplace your database and then run with this flag you risk being + slashed. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they can be read by any + user on the machine. Note that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed by builders, + regardless of payload value. + --produce-block-v3 + Enable block production via the block v3 endpoint for this validator client. This should + only be enabled when paired with a beacon node that has this endpoint implemented. This + flag will be enabled by default in future. + --unencrypted-http-transport + This is a safety flag to ensure that the user is aware that the http transport is + unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts + If present, the validator client will use longer timeouts for requests made to the beacon + node. This flag is generally not recommended, longer timeouts can cause missed duties when + fallbacks are used. +``` + diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 2f7136b085f..11d25b93f0a 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,64 +6,98 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then - be imported to a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the - same format as the "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" - command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" - command. This command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which + contains all the validator keystores and other validator data. This file can then be + imported to a validator client using the "import-validators" command. Another, + optional JSON file is created which contains a list of validator deposits in the same + format as the "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are + defined in a JSON file which can be generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP API. The validators are + defined in a JSON file which can be generated using the "create-validators" command. + This command only supports validators signing via a keystore on the local file system + (i.e., not Web3Signer validators). help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -h, --help Print help + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + -h, --help + Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should only + be provided when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file + --logfile-compress If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note that + logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited from + the parent folder. +``` + diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index a3233077c26..13d4d049d8b 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,90 +1,145 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to -a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the -"ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the +validator keystores and other validator data. This file can then be imported to a validator client +using the "import-validators" command. Another, optional JSON file is created which contains a list +of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: - --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any - validator key here is already known as a validator by that beacon node. This helps prevent the same validator being - created twice and therefore slashable conditions. - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a - builder payload header and payload from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible - values: true, false] - --count The number of validators to create, regardless of how many already exist - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator - (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will - generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. - --first-index The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not - specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --mnemonic-path If present, the mnemonic will be read in from this file. - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be - created if it does not exist. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value - from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -h, --help Print help + --beacon-node + A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an + error will be raised if any validator key here is already known as a validator by that + beacon node. This helps prevent the same validator being created twice and therefore + slashable conditions. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the builder's payload value + when choosing between a builder payload header and payload from the local execution node. + --builder-proposals + When provided, all created validators will attempt to create blocks via builder rather + than the local EL. [possible values: true, false] + --count + The number of validators to create, regardless of how many already exist + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] + --deposit-gwei + The GWEI value of the deposit amount. Defaults to the minimum amount required for an + active validator (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address + If this field is set, the given eth1 address will be used to create the withdrawal + credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived + withdrawal public key in EIP-2334 format. + --first-index + The first of consecutive key indexes you wish to create. [default: 0] + --gas-limit + All created validators will use this gas limit. It is recommended to leave this as the + default value by not specifying this flag. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] + --mnemonic-path + If present, the mnemonic will be read in from this file. + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] + --output-path + The path to a directory where the validator and (optionally) deposits files will be + created. The directory will be created if it does not exist. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed by builders, + regardless of payload value. [possible values: true, false] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. + --suggested-fee-recipient + All created validators will use this value for the suggested fee recipient. Omit this flag + to use the default value from the VC. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + -h, --help + Print help Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this - flag will save several seconds per validator if the user has an alternate strategy for submitting deposits. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be - provided when debugging specific memory allocation issues. - --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can - often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this - flag is not provided, a random password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic - is safely backed up. - --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file + --disable-deposits + When provided don't generate the deposits JSON file that is commonly used for submitting + validator deposits via a web UI. Using this flag will save several seconds per validator + if the user has an alternate strategy for submitting deposits. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --force-bls-withdrawal-credentials + If present, allows BLS withdrawal credentials rather than an execution address. This is + not recommended. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they can be read by any + user on the machine. Note that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password + If present, the user will be prompted to enter the voting keystore password that will be + used to encrypt the voting keystores. If this flag is not provided, a random password will + be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic + is safely backed up. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. +``` + diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index bef0a6defb8..e011a86f547 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,67 +1,106 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON +file which can be generated using the "create-validators" command. Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually - named "validators.json". - --vc-token The file containing a token required by the validator client. - --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' - will be conducted where no changes are made to the validator client. [default: http://localhost:5062] - -h, --help Print help + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --validators-file + The path to a JSON file containing a list of validators to be imported to the validator + client. This file is usually named "validators.json". + --vc-token + The file containing a token required by the validator client. + --vc-url + A HTTP(S) address of a validator client using the keymanager-API. If this value is not + supplied then a 'dry run' will be conducted where no changes are made to the validator + client. [default: http://localhost:5062] + -h, --help + Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. - This flag should be used with caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is - amiss. Users should also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. + --disable-malloc-tuning If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should only + be provided when debugging specific memory allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the + VC. Without this flag, the process will terminate without + making any changes. This flag should be used with caution, + whilst it does not directly cause slashable conditions, it + might be an indicator that something is amiss. Users should + also be careful to avoid submitting duplicate deposits for + validators that already exist on the VC. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file + --logfile-compress If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note that + logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited from + the parent folder. +``` + diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 61d6426d1ef..244707a64a8 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,79 +1,124 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This -command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON +file which can be generated using the "create-validators" command. This command only supports +validators signing via a keystore on the local file system (i.e., not Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a - builder payload header and payload from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible - values: true, false] - --count The number of validators to move. - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --dest-vc-token The file containing a token required by the destination validator client. - --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and - will have new validators added as they are removed from the "source" validator client. - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not - specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --src-vc-token The file containing a token required by the source validator client. - --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and - contains the validators that are to be moved. - --stdin-inputs If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value - from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". - -h, --help Print help + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the builder's payload value + when choosing between a builder payload header and payload from the local execution node. + --builder-proposals + When provided, all created validators will attempt to create blocks via builder rather + than the local EL. [possible values: true, false] + --count + The number of validators to move. + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults + to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] + [possible values: info, debug, trace, warn, error, crit] + --dest-vc-token + The file containing a token required by the destination validator client. + --dest-vc-url + A HTTP(S) address of a validator client using the keymanager-API. This validator client is + the "destination" and will have new validators added as they are removed from the "source" + validator client. + --gas-limit + All created validators will use this gas limit. It is recommended to leave this as the + default value by not specifying this flag. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. + Checkpoint sync server URLs can generally be used with this flag. If not supplied, a + default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in + `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log + file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible + values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: + DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging + is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, + background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, + goerli, gnosis, chiado, sepolia, holesky] + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed by builders, + regardless of payload value. [possible values: true, false] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the + PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + invalid chain or sync more slowly. Be extremely careful with this flag. + --src-vc-token + The file containing a token required by the source validator client. + --src-vc-url + A HTTP(S) address of a validator client using the keymanager-API. This validator client is + the "source" and contains the validators that are to be moved. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. + --suggested-fee-recipient + All created validators will use this value for the suggested fee recipient. Omit this flag + to use the default value from the VC. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse + testnet. Only effective if there is no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. + This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should + only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal PoW block. Incorrect use of this flag will cause your + node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a + 256-bit decimal integer (not a hex value). This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --validators + The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword + "all". + -h, --help + Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should only + be provided when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file + --logfile-compress If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note that + logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited from + the parent folder. +``` + From 9de498097ebc5c385822f74464c56c7b2039a3e0 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 9 Apr 2024 23:16:22 +0300 Subject: [PATCH 23/46] remove -e files --- help_bn.md-e | 364 -------------------------------------------- help_general.md-e | 73 --------- help_vc.md-e | 162 -------------------- help_vm.md-e | 69 --------- help_vm_create.md-e | 90 ----------- help_vm_import.md-e | 67 -------- help_vm_move.md-e | 79 ---------- 7 files changed, 904 deletions(-) delete mode 100644 help_bn.md-e delete mode 100644 help_general.md-e delete mode 100644 help_vc.md-e delete mode 100644 help_vm.md-e delete mode 100644 help_vm_create.md-e delete mode 100644 help_vm_import.md-e delete mode 100644 help_vm_move.md-e diff --git a/help_bn.md-e b/help_bn.md-e deleted file mode 100644 index 05a76ca2a47..00000000000 --- a/help_bn.md-e +++ /dev/null @@ -1,364 +0,0 @@ -# Beacon Node - -``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing -messages to the network. - -Usage: lighthouse beacon_node [OPTIONS] - -Options: - --auto-compact-db - Enable or disable automatic compaction of the database on finalization. [default: true] - --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - blob_prune_margin_epochs. [default: 0] - --blobs-dir - Data directory for the blobs database. - --block-cache-size - Specifies how many blocks the database should cache in memory [default: 5] - --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. - --builder - The URL of a service compatible with the MEV-boost API. - --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local - execution engine for payload construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will - cause this condition to be hit if there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] - --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the - local execution engine for payload construction. [default: 3] - --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected - builders, and will use the local execution engine for payload construction. [default: 8] - --builder-profit-threshold - This flag is deprecated and has no effect. - --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. - --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. - --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url instead is recommended. - --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. - --checkpoint-sync-url - Set the remote beacon node HTTP endpoint to use for checkpoint sync. - --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` - flag Note: Users should specify separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --discovery-port - The UDP port that discovery will listen on. Defaults to `port` - --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` - --enr-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 to the IP address it resolves - to and does not auto-update based on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will - update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. - --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. - --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. - --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is - not set. - --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is - not set. - --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. - --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. - --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. - [default: 1] - --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes - [default: 1] - --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] - --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for - irregular Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. - --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. - --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. - --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set - to empty by default - --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. - --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set - to empty by default - --execution-timeout-multiplier - Unsigned integer to multiply the default execution timeouts by. [default: 1] - --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk - proposing atop the wrong parent block. [default: 250] - --freezer-dir - Data directory for the freezer database. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 bytes. - --historic-state-cache-size - Specifies how many states from the freezer database should cache in memory [default: 1] - --http-address
- Set the listen address for the RESTful HTTP API server. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5052). - --http-duplicate-block-status - Status code to send when a block that is already known is POSTed to the HTTP API. - --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside - other tasks. When set to "false", HTTP API responses will be executed immediately. - --http-port - Set the listen TCP port for the RESTful HTTP API server. - --http-spec-fork - Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. - --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from being dropped. - --http-tls-cert - The path of the certificate to be used when serving the HTTP API server over TLS. - --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. - --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of - :/. To set quotas for multiple protocols, separate them by ';'. This is enabled by default, using default quotas. To disable - rate limiting use the disable-inbound-rate-limiter flag instead. - --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. - This directory is not pruned, users should be careful to avoid filling up their disks. - --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. - --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the different values. - Examples: - - --listen-address '0.0.0.0' will listen over IPv4. - - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or - multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. - Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also - cause unnecessary consensus failures, so is disabled by default. - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5054). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This - flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your - validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --network-dir - Data directory for network keys. Defaults to network/ inside the beacon node dir. - --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The - discovery port can be modified by the --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port - flag will apply to the IPv4 address and --port6 to the IPv6 address. [default: 9000] - --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. - [default: 9090] - --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload - after the first call, and high values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. - --progressive-balances - Deprecated. This optimisation is now the default and cannot be disabled. - --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to - propagate and be processed by the network. The default is 1/12th of a slot (1 second on mainnet) - --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not - be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose - additional restrictions. - --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 - --proposer-reorg-parent-threshold - Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% - --proposer-reorg-threshold - Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% - --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] - --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to - syncing peers. [default: true] - --quic-port - The UDP port that quic will listen on. Defaults to `port` + 1 - --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node - to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To - set quotas for multiple protocols, separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for - the inbound rate limiter will be used. - --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are - dependent on validator count and setting this value to a large number can consume a large amount of memory. - --slasher-att-cache-size - Set the maximum number of attestation roots for the slasher to cache - --slasher-backend - Set the database backend to be used by the slasher. [possible values: lmdb, disabled] - --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] - --slasher-chunk-size - Number of epochs per validator per chunk stored on disk. - --slasher-dir - Set the slasher's database directory. - --slasher-history-length - Configure how many epochs of history the slasher keeps. Immutable after initialization. - --slasher-max-db-size - Maximum size of the MDBX database used by the slasher. - --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot - duration. - --slasher-update-period - Configure how often the slasher runs batch processing. - --slasher-validator-chunk-size - Number of validators per chunk stored on disk. - --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] - --state-cache-size - Specifies the size of the snapshot cache [default: 3] - --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in - addition to) setting it here. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --target-peers - The target number of peers. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with this flag. - --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. - --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from the mainnet kzg ceremony. Use with caution - --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. - --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, - it will provide aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. - Defaults to 64. - --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. - --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is - for verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. - -h, --help - Print help - -V, --version - Print version - -Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the - preferred method for syncing a node. Only use this flag when testing. DO NOT use on mainnet! - --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should - set a fee recipient on this BN and also consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, - regardless of recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is - disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in - resource contention which degrades staking performance. Stakers should generally choose to avoid this flag since backfill sync is not - required for staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if - you intend to run a non-validating beacon node. - --disable-duplicate-warn-logs This flag is deprecated and has no effect. - --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is - considered experimental as it may obscure performance issues. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be - provided when debugging specific memory allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will - be checked in Lighthouse and only passed to the EL if initial verification fails. - --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. - --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. - --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve - a validator. - --eth1-purge-cache Purges the eth1 block and deposit caches - --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE - logging. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING - ONLY. DO NOT USE ON MAINNET. - --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from - already-subscribed subnets, use with --subscribe-all-subnets to ensure all attestations are received for import. - --light-client-server Act as a full node supporting light clients on the p2p network [experimental] - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can - often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log - file permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient - for block publishing only. This flag should be used for a beacon node being referenced by validator client using the --proposer-node - flag. This configuration is for enabling more secure setups. - --purge-db If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a - consensus failure caused by the execution layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol - configurations. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the - inbound rate limiter will be used. - --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher - UX and the extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the - execution node. This is equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to - all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. - This generally has the effect of providing additional logging and metrics for locally controlled validators. - -x, --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This - disables this feature, fixing the ENR's IP/PORT to those specified on boot. - -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. - --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks -``` \ No newline at end of file diff --git a/help_general.md-e b/help_general.md-e deleted file mode 100644 index ea916614145..00000000000 --- a/help_general.md-e +++ /dev/null @@ -1,73 +0,0 @@ -# Lighthouse General Commands - -``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. - -Usage: lighthouse [OPTIONS] [COMMAND] - -Commands: - database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the - beacon chain and publishing messages to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node - functions. Instead, it will simply run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to - provide a network boot-node since it has a reduced attack surface compared to a full beacon node. - validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] - account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] - help Print this message or the help of the given subcommand(s) - -Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -h, --help Print help - -V, --version Print version - -Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file diff --git a/help_vc.md-e b/help_vc.md-e deleted file mode 100644 index 57d308c9862..00000000000 --- a/help_vc.md-e +++ /dev/null @@ -1,162 +0,0 @@ -# Validator Client - -``` -When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). - -Usage: lighthouse validator_client [OPTIONS] - -Options: - --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. - --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used - in addition to the OS trust store. Commas must only be used as a delimiter, and must not be part of the certificate path. - --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default - (when flag is omitted) is to broadcast subscriptions only. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local - execution node. - --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` - flag Note: Users should specify separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set - here moves too far from the previous block's gas limit. [default: 30,000,000] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --graffiti - Specify your custom graffiti to be included in blocks. - --graffiti-file - Specify a graffiti file to load validator graffitis from. - --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it - additionally requires the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, - users should apply transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5062). - --http-port - Set the listen TCP port for the RESTful HTTP API server. - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. - Once the number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS - allowed origin is set to the listen address of this server (e.g., http://localhost:5064). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This - flag sets the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your - validators, IP address and other personal information. Always use a HTTPS connection and never provide an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the - standard beacon nodes specified in --beacon-nodes. - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node - to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex - representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. - --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the - validator definitions it takes priority over this value. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with this flag. - --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] - --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the - validator_definitions.yml - --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] - --web3-signer-max-idle-connections - Maximum number of idle connections to maintain per web3signer host. Default is unlimited. - -h, --help - Print help - -Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. - Useful for outsourcing execution payload construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the - validator_definitions.yml file. - --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be - provided when debugging specific memory allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation - messages to all beacon nodes provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls - only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if - slashing protection is enabled on the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN - THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING - WEB3SIGNER'S SLASHING PROTECTION. - --distributed Enables functionality required for running the validator in a distributed validator cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the - validators managed by this client. This will result in three (possibly four) epochs worth of missed attestations. If an - attestation is detected during this period, it means it is very likely that you are running a second validator client with the - same keys. This validator client will immediately shutdown if this is detected in order to avoid potentially committing a - slashable offense. Use this flag in order to ENABLE this functionality, without this flag Lighthouse will begin attesting - immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this - metric for higher validator counts will lead to higher volume of prometheus metrics being collected. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to - HTTP API consumers who have access to the API token. This method is useful for exporting validators, however it should be used - with caution since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator - definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're - certain that a new slashing protection database is required. Usually, your database will have been initialized when you imported - your validator keys. If you misplace your database and then run with this flag you risk being slashed. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs - can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, - the log file permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a - beacon node that has this endpoint implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is - unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not - recommended, longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file diff --git a/help_vm.md-e b/help_vm.md-e deleted file mode 100644 index a37954e603f..00000000000 --- a/help_vm.md-e +++ /dev/null @@ -1,69 +0,0 @@ -# Validator Manager - -``` -Utilities for managing a Lighthouse validator client via the HTTP API. - -Usage: lighthouse validator_manager [OPTIONS] [COMMAND] - -Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then - be imported to a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the - same format as the "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" - command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" - command. This command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). - help Print this message or the help of the given subcommand(s) - -Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -h, --help Print help - -Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file diff --git a/help_vm_create.md-e b/help_vm_create.md-e deleted file mode 100644 index 573a5e87382..00000000000 --- a/help_vm_create.md-e +++ /dev/null @@ -1,90 +0,0 @@ -# Validator Manager Create - -``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to -a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the -"ethereum/staking-deposit-cli" tool. - -Usage: lighthouse validator_manager create [OPTIONS] --output-path - -Options: - --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any - validator key here is already known as a validator by that beacon node. This helps prevent the same validator being - created twice and therefore slashable conditions. - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a - builder payload header and payload from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible - values: true, false] - --count The number of validators to create, regardless of how many already exist - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator - (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will - generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. - --first-index The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not - specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --mnemonic-path If present, the mnemonic will be read in from this file. - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be - created if it does not exist. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value - from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -h, --help Print help - -Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this - flag will save several seconds per validator if the user has an alternate strategy for submitting deposits. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be - provided when debugging specific memory allocation issues. - --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can - often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this - flag is not provided, a random password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic - is safely backed up. - --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file diff --git a/help_vm_import.md-e b/help_vm_import.md-e deleted file mode 100644 index 3ba052b9de9..00000000000 --- a/help_vm_import.md-e +++ /dev/null @@ -1,67 +0,0 @@ -# Validator Manager Import - -``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. - -Usage: lighthouse validator_manager import [OPTIONS] --validators-file - -Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually - named "validators.json". - --vc-token The file containing a token required by the validator client. - --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' - will be conducted where no changes are made to the validator client. [default: http://localhost:5062] - -h, --help Print help - -Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. - This flag should be used with caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is - amiss. Users should also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file diff --git a/help_vm_move.md-e b/help_vm_move.md-e deleted file mode 100644 index 03a363b7a58..00000000000 --- a/help_vm_move.md-e +++ /dev/null @@ -1,79 +0,0 @@ -# Validator Manager Move - -``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This -command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). - -Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url - -Options: - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a - builder payload header and payload from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible - values: true, false] - --count The number of validators to move. - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, - debug, trace, warn, error, crit] - --dest-vc-token The file containing a token required by the destination validator client. - --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and - will have new validators added as they are removed from the "source" validator client. - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not - specifying this flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the - genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log - file is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, - warn, error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - [possible values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override this parameter - in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --src-vc-token The file containing a token required by the source validator client. - --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and - contains the validators that are to be moved. - --stdin-inputs If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value - from the VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if - there is no existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be - used if the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful - with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this - flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer - (not a hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". - -h, --help Print help - -Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file From 51c44196d276aa8a1825a4fcdda97d1fce4dac30 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 9 Apr 2024 23:17:54 +0300 Subject: [PATCH 24/46] update --- beacon_node/src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index c49a72dcb75..97fd2065619 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -68,6 +68,7 @@ pub fn cli_app() -> Command { .help("Disables the discovery packet filter. Useful for testing in smaller networks") .action(ArgAction::SetTrue) .help_heading(FLAG_HEADER) + .display_order(0) ) .arg( Arg::new("shutdown-after-sync") @@ -286,7 +287,6 @@ pub fn cli_app() -> Command { ) .arg( Arg::new("disable-enr-auto-update") - .short('x') .action(ArgAction::SetTrue) .help_heading(FLAG_HEADER) .long("disable-enr-auto-update") From a4c4bb51e84746fb428d7fbbfd8ac3cb217d4bcd Mon Sep 17 00:00:00 2001 From: realbigsean Date: Wed, 10 Apr 2024 15:54:49 -0400 Subject: [PATCH 25/46] cli help updates --- book/src/help_bn.md | 624 ++++++++++++++++--------------------- book/src/help_general.md | 129 ++++---- book/src/help_vc.md | 310 ++++++++---------- book/src/help_vm.md | 113 +++---- book/src/help_vm_create.md | 173 +++++----- book/src/help_vm_import.md | 116 +++---- book/src/help_vm_move.md | 131 ++++---- 7 files changed, 688 insertions(+), 908 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 2ff603e8d75..66f85bffe64 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,9 +1,8 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and -stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the -network. +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API +for querying the beacon chain and publishing messages to the network. Usage: lighthouse beacon_node [OPTIONS] @@ -11,298 +10,261 @@ Options: --auto-compact-db Enable or disable automatic compaction of the database on finalization. [default: true] --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until - data_availability_boundary - blob_prune_margin_epochs. [default: 0] + The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - + blob_prune_margin_epochs. [default: 0] --blobs-dir Data directory for the blobs database. --block-cache-size Specifies how many blocks the database should cache in memory [default: 5] --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr - is also supported. + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. --builder The URL of a service compatible with the MEV-boost API. --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of - epochs, it will NOT query any connected builders, and will use the local execution engine - for payload construction. Setting this value to anything less than 2 will cause the node - to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if - there are skips slots at the start of an epoch, right before this node is set to propose. - [default: 3] + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any + connected builders, and will use the local execution engine for payload construction. Setting this value to anything less + than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if + there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical - chain in a row, it will NOT query any connected builders, and will use the local execution - engine for payload construction. [default: 3] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT + query any connected builders, and will use the local execution engine for payload construction. [default: 3] --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical - chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will - use the local execution engine for payload construction. [default: 8] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past + `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution engine for payload + construction. [default: 8] --builder-profit-threshold This flag is deprecated and has no effect. --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is - Lighthouse's version string. + The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match - --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url + instead is recommended. --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match - --checkpoint-state. Using --checkpoint-sync-url instead is recommended. + Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url + instead is recommended. --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match - --checkpoint-block. Using --checkpoint-sync-url instead is recommended. + Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url + instead is recommended. --checkpoint-sync-url Set the remote beacon node HTTP endpoint to use for checkpoint sync. --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: - 180] + Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --discovery-port The UDP port that discovery will listen on. Defaults to `port` --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. - Defaults to `port6` + The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` --enr-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 to the IP address it resolves to and does - not auto-update based on PONG responses in discovery. Set this only if you are sure other - nodes can connect to your local node on this address. This will update the `ip4` or `ip6` + 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 to the IP address it resolves to and does not auto-update based on PONG responses in discovery. Set + this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other - nodes can connect to your local node on this port over IPv4. + The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local + node on this port over IPv4. --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other - nodes can connect to your local node on this port over IPv6. + The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local + node on this port over IPv6. --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to - your local node on this port over IPv4. The --port flag is used if this is not set. + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port + over IPv4. The --port flag is used if this is not set. --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to - your local node on this port over IPv6. The --port6 flag is used if this is not set. + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port + over IPv6. The --port6 flag is used if this is not set. --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to - your local node on this port over IPv4. + The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port + over IPv4. --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to - your local node on this port over IPv6. + The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port + over IPv6. --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are - older than the data availability boundary relative to the current epoch. [default: 1] + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability + boundary relative to the current epoch. [default: 1] --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the - cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can + be useful for minimizing disk writes [default: 1] --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the - size of responses from the Eth1 endpoint. [default: 1000] + Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 + endpoint. [default: 1000] --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be - imported into the cache. Setting this value lower can help compensate for irregular - Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting + this value lower can help compensate for irregular Proof-of-Work block times, but setting it too low can make the node + vulnerable to re-orgs. --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses - the same endpoint to populate the deposit cache. + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the + deposit cache. --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in - the --execution-endpoint flag. + File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT - authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty by - default + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds + to the 'id' field in the JWT claims object.Set to empty by default --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint - flag. + Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT - authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by - default + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to + the 'clv' field in the JWT claims object.Set to empty by default --execution-timeout-multiplier Unsigned integer to multiply the default execution timeouts by. [default: 1] --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. - You can prevent waiting at all by setting the timeout to 0, however you risk proposing - atop the wrong parent block. [default: 250] + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all + by setting the timeout to 0, however you risk proposing atop the wrong parent block. [default: 250] --freezer-dir Data directory for the freezer database. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and - commit, truncated to fit in 32 bytes. + Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 + bytes. --historic-state-cache-size Specifies how many states from the freezer database should cache in memory [default: 1] --http-address
Set the listen address for the RESTful HTTP API server. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any - origin (not recommended in production). If no value is supplied, the CORS allowed origin - is set to the listen address of this server (e.g., http://localhost:5052). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5052). --http-duplicate-block-status Status code to send when a block that is already known is POSTed to the HTTP API. --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. - When set to "true", HTTP API requests will be queued and scheduled alongside other tasks. - When set to "false", HTTP API responses will be executed immediately. + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API + requests will be queued and scheduled alongside other tasks. When set to "false", HTTP API responses will be executed + immediately. --http-port Set the listen TCP port for the RESTful HTTP API server. --http-spec-fork - Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary - to set this flag. + Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing - this value can prevent messages from being dropped. + Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages + from being dropped. --http-tls-cert The path of the certificate to be used when serving the HTTP API server over TLS. --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not - be password-protected. + The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per - protocol can be set in the form of :/. To set - quotas for multiple protocols, separate them by ';'. This is enabled by default, using - default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag - instead. + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the + form of :/. To set quotas for multiple protocols, separate them by ';'. This is + enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ - as a file at this path. This feature is only recommended for developers. This directory is - not pruned, users should be careful to avoid filling up their disks. + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This + feature is only recommended for developers. This directory is not pruned, users should be careful to avoid filling up + their disks. --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an - ENR. + One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and - IpV6 set this flag twice with the different values. + The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the + different values. Examples: - --listen-address '0.0.0.0' will listen over IPv4. - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. - The order of the given addresses is not relevant. However, multiple IPv4, or multiple IPv6 - addresses will not be accepted. [default: 0.0.0.0] + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses + is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents - nodes on minority forks from wasting our time and disk space, but could also cause - unnecessary consensus failures, so is disabled by default. + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from + wasting our time and disk space, but could also cause unnecessary consensus failures, so is disabled by default. --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any - origin (not recommended in production). If no value is supplied, the CORS allowed origin - is set to the listen address of this server (e.g., http://localhost:5054). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5054). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can - be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the - endpoint where the beacon node metrics will be sent. Note: This will send information to a - remote sever which may identify and associate your validators, IP address and other - personal information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on + certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This + will send information to a remote sever which may identify and associate your validators, IP address and other personal + information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. - Default: 60s + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --network-dir Data directory for network keys. Defaults to network/ inside the beacon node dir. --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be - set to this value and the Quic UDP port will be set to this value + 1. The discovery port - can be modified by the --discovery-port flag and the quic port can be modified by the - --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the - IPv4 address and --port6 to the IPv6 address. [default: 9000] + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic + UDP port will be set to this value + 1. The discovery port can be modified by the --discovery-port flag and the quic port + can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 + address and --port6 to the IPv6 address. [default: 9000] --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults - to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic + UDP port will be set to this value + 1. [default: 9090] --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. - Low values are useful for execution nodes which don't improve their payload after the - first call, and high values are useful for ensuring the EL is given ample notice. Default: - 1/3 of a slot. + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for + execution nodes which don't improve their payload after the first call, and high values are useful for ensuring the EL is + given ample notice. Default: 1/3 of a slot. --progressive-balances Deprecated. This optimisation is now the default and cannot be disabled. --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower - values can prevent failed reorgs by ensuring the block has ample time to propagate and be - processed by the network. The default is 1/12th of a slot (1 second on mainnet) + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by + ensuring the block has ample time to propagate and be processed by the network. The default is 1/12th of a slot (1 second + on mainnet) --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging - blocks at certain slots. An offset of N means that reorging proposals will not be - attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at - offset 0 will be avoided. Any offsets supplied with this flag will impose additional - restrictions. + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset + of N means that reorging proposals will not be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default + only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: - 2 + Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 --proposer-reorg-parent-threshold Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% --proposer-reorg-threshold Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability - boundary relative to the current epoch. [default: true] + Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the + current epoch. [default: true] --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on - the execution client, as payloads need to be reconstructed and sent to syncing peers. - [default: true] + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as + payloads need to be reconstructed and sent to syncing peers. [default: true] --quic-port The UDP port that quic will listen on. Defaults to `port` + 1 --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. - Defaults to `port6` + 1 + The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per - protocol can be set in the form of :/. To set - quotas for multiple protocols, separate them by ';'. If the self rate limiter is enabled - and a protocol is not present in the configuration, the quotas used for the inbound rate - limiter will be used. + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of + :/. To set quotas for multiple protocols, separate them by ';'. If the self rate + limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will + be used. --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag - allows the user to set the shuffling cache size in epochs. Shufflings are dependent on - validator count and setting this value to a large number can consume a large amount of - memory. + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the + shuffling cache size in epochs. Shufflings are dependent on validator count and setting this value to a large number can + consume a large amount of memory. --slasher-att-cache-size Set the maximum number of attestation roots for the slasher to cache --slasher-backend Set the database backend to be used by the slasher. [possible values: lmdb, disabled] --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. - [default: true] + Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] --slasher-chunk-size Number of epochs per validator per chunk stored on disk. --slasher-dir @@ -312,64 +274,55 @@ Options: --slasher-max-db-size Maximum size of the MDBX database used by the slasher. --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. - Only effective if the slasher-update-period is a multiple of the slot duration. + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the + slasher-update-period is a multiple of the slot duration. --slasher-update-period Configure how often the slasher runs batch processing. --slasher-validator-chunk-size Number of validators per chunk stored on disk. --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after - initialization. [default: 8192 (mainnet) or 64 (minimal)] + Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 + (mainnet) or 64 (minimal)] --state-cache-size Specifies the size of the snapshot cache [default: 3] --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one - configured. You should set this flag on the validator client instead of (or in addition - to) setting it here. + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this + flag on the validator client instead of (or in addition to) setting it here. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --target-peers The target number of peers. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according - to the peer scoring system. + One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the - trusted setup that is generated from the mainnet kzg ceremony. Use with caution + Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated + from the mainnet kzg ceremony. Use with caution --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a - file at the given path. + As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting - per-validator Prometheus metrics and issuing per-validator logs. Instead, it will provide - aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus - database and high log volume when using many validators. Defaults to 64. + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus + metrics and issuing per-validator logs. Instead, it will provide aggregate metrics and logs. This avoids infeasibly high + cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive - special monitoring and additional logging. + A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and + additional logging. --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's - sync against. The block root should be 0x-prefixed. Note that this flag is for - verification only, to perform a checkpoint sync from a recent state use + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root + should be 0x-prefixed. Note that this flag is for verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. -h, --help Print help @@ -377,147 +330,102 @@ Options: Print version Flags: - --allow-insecure-genesis-sync - Enable syncing from genesis, which is generally insecure and incompatible with data - availability checks. Checkpoint syncing is the preferred method for syncing a node. Only - use this flag when testing. DO NOT use on mainnet! - --always-prefer-builder-payload - This flag is deprecated and has no effect. - --always-prepare-payload - Send payload attributes with every fork choice update. This is intended for use by block - builders, relays and developers. You should set a fee recipient on this BN and also - consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks - This flag disables all checks related to chain health. This means the builder API will - always be used for payload construction, regardless of recent chain conditions. - --compact-db - If present, apply compaction to the database on start-up. Use with caution. It is - generally not recommended unless auto-compaction is disabled. - --disable-backfill-rate-limiting - Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as - fast as possible, however it can result in resource contention which degrades staking - performance. Stakers should generally choose to avoid this flag since backfill sync is not - required for staking. - --disable-deposit-contract-sync - Explicitly disables syncing of deposit logs from the execution node. This overrides any - previous option that depends on it. Useful if you intend to run a non-validating beacon - node. - --disable-duplicate-warn-logs - This flag is deprecated and has no effect. - --disable-inbound-rate-limiter - Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts - Disable the timeouts applied to some internal locks by default. This can lead to less - spurious failures on slow hardware but is considered experimental as it may obscure - performance issues. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-optimistic-finalized-sync - Force Lighthouse to verify every execution block hash with the execution client during - finalized sync. By default block hashes will be checked in Lighthouse and only passed to - the EL if initial verification fails. - --disable-proposer-reorgs - Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic - Disables the quic transport. The node will rely solely on the TCP transport for libp2p - connections. - --disable-upnp - Disables UPnP support. Setting this will prevent Lighthouse from attempting to - automatically establish external port mappings. - --dummy-eth1 - If present, uses an eth1 backend that generates static dummy data.Identical to the method - used at the 2019 Canada interop. - -e, --enr-match - 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-private-discovery - Lighthouse by default does not discover private IP addresses. Set this flag to enable - connection attempts to local addresses. - --eth1 - If present the node will connect to an eth1 node. This is required for block production, - you must use this flag if you wish to serve a validator. - --eth1-purge-cache - Purges the eth1 block and deposit caches - --genesis-backfill - Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui - Enable the graphical user interface and all its requirements. This enables --http and - --validator-monitor-auto and enables SSE logging. - --http - Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled - Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is - useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. - --http-enable-tls - Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations - Import and aggregate all attestations, regardless of validator subscriptions. This will - only import attestations from already-subscribed subnets, use with --subscribe-all-subnets - to ensure all attestations are received for import. - --light-client-server - Act as a full node supporting light clients on the p2p network [experimental] - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they can be read by any - user on the machine. Note that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --metrics - Enable the Prometheus metrics HTTP server. Disabled by default. - --private - Prevents sending various client identification information. - --proposer-only - Sets this beacon node at be a block proposer only node. This will run the beacon node in a - minimal configuration that is sufficient for block publishing only. This flag should be - used for a beacon node being referenced by validator client using the --proposer-node - flag. This configuration is for enabling more secure setups. - --purge-db - If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states - After a checkpoint sync, reconstruct historic states in the database. This requires - syncing all the way back to genesis. - --reset-payload-statuses - When present, Lighthouse will forget the payload statuses of any already-imported blocks. - This can assist in the recovery from a consensus failure caused by the execution layer. - --self-limiter - Enables the outbound rate limiter (requests made by this node). Use the - self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is - enabled and a protocol is not present in the configuration, the quotas used for the - inbound rate limiter will be used. - --shutdown-after-sync - Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed - before shutdown. - --slasher - Run a slasher alongside the beacon node. It is currently only recommended for expert users - because of the immaturity of the slasher UX and the extra resources required. - --staking - Standard option for a staking beacon node. This will enable the HTTP server on - localhost:5052 and import deposit logs from the execution node. This is equivalent to - `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets - Subscribe to all subnets regardless of validator count. This will also advertise the - beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto - Enables the automatic detection and monitoring of validators connected to the HTTP API and - using the subnet subscription endpoint. This generally has the effect of providing - additional logging and metrics for locally controlled validators. - -x, --disable-enr-auto-update - Discovery automatically updates the nodes local ENR with an external IP address and port - as seen by other peers on the network. This disables this feature, fixing the ENR's - IP/PORT to those specified on boot. - -z, --zero-ports - Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free - ports. - --disable-packet-filter - Disables the discovery packet filter. Useful for testing in smaller networks + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data + availability checks. Checkpoint syncing is the preferred method for syncing a node. Only + use this flag when testing. DO NOT use on mainnet! + --always-prefer-builder-payload This flag is deprecated and has no effect. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block + builders, relays and developers. You should set a fee recipient on this BN and also + consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will + always be used for payload construction, regardless of recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is + generally not recommended unless auto-compaction is disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain + as fast as possible, however it can result in resource contention which degrades staking + performance. Stakers should generally choose to avoid this flag since backfill sync is + not required for staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any + previous option that depends on it. Useful if you intend to run a non-validating beacon + node. + --disable-duplicate-warn-logs This flag is deprecated and has no effect. + --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port + as seen by other peers on the network. This disables this feature, fixing the ENR's + IP/PORT to those specified on boot. + --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less + spurious failures on slow hardware but is considered experimental as it may obscure + performance issues. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during + finalized sync. By default block hashes will be checked in Lighthouse and only passed to + the EL if initial verification fails. + --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks + --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. + --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p + connections. + --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to + automatically establish external port mappings. + --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the + method used at the 2019 Canada interop. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable + connection attempts to local addresses. + --eth1 If present the node will connect to an eth1 node. This is required for block production, + you must use this flag if you wish to serve a validator. + --eth1-purge-cache Purges the eth1 block and deposit caches + --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. + --gui Enable the graphical user interface and all its requirements. This enables --http and + --validator-monitor-auto and enables SSE logging. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This + is useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will + only import attestations from already-subscribed subnets, use with + --subscribe-all-subnets to ensure all attestations are received for import. + --light-client-server Act as a full node supporting light clients on the p2p network [experimental] + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by + any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the log + file permissions will be inherited from the parent folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --private Prevents sending various client identification information. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in + a minimal configuration that is sufficient for block publishing only. This flag should + be used for a beacon node being referenced by validator client using the --proposer-node + flag. This configuration is for enabling more secure setups. + --purge-db If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires + syncing all the way back to genesis. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported + blocks. This can assist in the recovery from a consensus failure caused by the execution + layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the + self-limiter-protocol flag to set per protocol configurations. If the self rate limiter + is enabled and a protocol is not present in the configuration, the quotas used for the + inbound rate limiter will be used. + --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed + before shutdown. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert + users because of the immaturity of the slasher UX and the extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on + localhost:5052 and import deposit logs from the execution node. This is equivalent to + `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the + beacon node as being long-lived subscribed to all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API + and using the subnet subscription endpoint. This generally has the effect of providing + additional logging and metrics for locally controlled validators. + -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free + ports. ``` diff --git a/book/src/help_general.md b/book/src/help_general.md index bdddc199dbe..be1e2f4f2e6 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,93 +1,80 @@ # Lighthouse General Commands ``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and -utilities for managing validator accounts. +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator +accounts. Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. - [aliases: vm, validator-manager, validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and - downloads, verifies and stores blocks. Provides a HTTP API for querying the - beacon chain and publishing messages to the network. [aliases: b, bn, - beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. - This process will *not* import blocks or perform most typical beacon node - functions. Instead, it will simply run the discv5 service and assist nodes - on the network to discover each other. This is the recommended way to - provide a network boot-node since it has a reduced attack surface compared - to a full beacon node. - validator_client When connected to a beacon node, performs the duties of a staked validator - (e.g., proposing blocks and attestations). [aliases: v, vc, validator] - account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, - am, account, account_manager] + validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, + validator_manager] + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores + blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. + [aliases: b, bn, beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import + blocks or perform most typical beacon node functions. Instead, it will simply run the discv5 service and + assist nodes on the network to discover each other. This is the recommended way to provide a network + boot-node since it has a reduced attack surface compared to a full beacon node. + validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and + attestations). [aliases: v, vc, validator] + account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] help Print this message or the help of the given subcommand(s) Options: -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help @@ -96,19 +83,15 @@ Options: Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should only - be provided when debugging specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to - sub-protocol logs such as discv5 and libp2p + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. + -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and + libp2p --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note that - logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited from - the parent folder. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator + and so this flag should be used with caution. For Windows users, the log file permissions will + be inherited from the parent folder. ``` diff --git a/book/src/help_vc.md b/book/src/help_vc.md index e414013898c..4f46f668918 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -1,46 +1,39 @@ # Validator Client ``` -When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks -and attestations). +When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). Usage: lighthouse validator_client [OPTIONS] Options: --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. Default is - http://localhost:5052. + Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node - (and/or proposer node). These certificates must be in PEM format and are used in addition - to the OS trust store. Commas must only be used as a delimiter, and must not be part of - the certificate path. + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These + certificates must be in PEM format and are used in addition to the OS trust store. Commas must only be used as a + delimiter, and must not be part of the certificate path. --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible - values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag - is omitted) is to broadcast subscriptions only. + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, + blocks, subscriptions, sync-committee. Default (when flag is omitted) is to broadcast subscriptions only. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value - when choosing between a builder payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder + payload header and payload from the local execution node. --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override the timestamp used in - the builder api registration + This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this - validator client. Note this will not necessarily be used if the gas limit set here moves - too far from the previous block's gas limit. [default: 30,000,000] + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not + necessarily be used if the gas limit set here moves too far from the previous block's gas limit. [default: 30,000,000] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -48,193 +41,156 @@ Options: --graffiti-file Specify a graffiti file to load validator graffitis from. --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is - unsafe to publish on a public network. When this flag is used, it additionally requires - the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of - the risks involved. For access via the Internet, users should apply transport-layer - security like a HTTPS reverse-proxy or SSH tunnelling. + Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public + network. When this flag is used, it additionally requires the explicit use of the `--unencrypted-http-transport` flag to + ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security + like a HTTPS reverse-proxy or SSH tunnelling. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any - origin (not recommended in production). If no value is supplied, the CORS allowed origin - is set to the listen address of this server (e.g., http://localhost:5062). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5062). --http-port Set the listen TCP port for the RESTful HTTP API server. --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any - origin (not recommended in production). If no value is supplied, the CORS allowed origin - is set to the listen address of this server (e.g., http://localhost:5064). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5064). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can - be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets the - endpoint where the beacon node metrics will be sent. Note: This will send information to a - remote sever which may identify and associate your validators, IP address and other - personal information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on + certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This + will send information to a remote sever which may identify and associate your validators, IP address and other personal + information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. - Default: 60s + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that - are used to send beacon block proposals. A failure will revert back to the standard beacon - nodes specified in --beacon-nodes. + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block + proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes. --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each - password should be contained in a file where the name is the 0x-prefixed hex - representation of the validators voting public key. Defaults to + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a + file where the name is the 0x-prefixed hex representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks - proposed by this validator client. If a fee recipient is configured in the validator - definitions it takes priority over this value. + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If + a fee recipient is configured in the validator definitions it takes priority over this value. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. - This value can be reduced to avoid timeouts from builders. [default: 500] + Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to + avoid timeouts from builders. [default: 500] --validators-dir - The directory which contains the validator keystores, deposit data for each validator - along with the common slashing protection database and the validator_definitions.yml + The directory which contains the validator keystores, deposit data for each validator along with the common slashing + protection database and the validator_definitions.yml --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout - [default: 90000] + Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] --web3-signer-max-idle-connections Maximum number of idle connections to maintain per web3signer host. Default is unlimited. -h, --help Print help Flags: - --builder-proposals - If this flag is set, Lighthouse will query the Beacon Node for only block headers during - proposals and will sign over headers. Useful for outsourcing execution payload - construction during proposals. - --disable-auto-discover - If present, do not attempt to discover new validators in the validators-dir. Validators - will need to be manually added to the validator_definitions.yml file. - --disable-latency-measurement-service - Disables the service that periodically attempts to measure latency to BNs. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-run-on-all - DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee - subscriptions and proposer preparation messages to all beacon nodes provided in the - `--beacon-nodes flag`. This option changes that behaviour such that these api calls only - go out to the first available and synced beacon node - --disable-slashing-protection-web3signer - Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O - burden on the VC but is only safe if slashing protection is enabled on the remote signer - and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING - PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG - WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. - --distributed - Enables functionality required for running the validator in a distributed validator - cluster. - --enable-doppelganger-protection - If this flag is set, Lighthouse will delay startup for three epochs and monitor for - messages on the network by any of the validators managed by this client. This will result - in three (possibly four) epochs worth of missed attestations. If an attestation is - detected during this period, it means it is very likely that you are running a second - validator client with the same keys. This validator client will immediately shutdown if - this is detected in order to avoid potentially committing a slashable offense. Use this - flag in order to ENABLE this functionality, without this flag Lighthouse will begin - attesting immediately. - --enable-high-validator-count-metrics - Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled - for <= 64 validators. Enabling this metric for higher validator counts will lead to higher - volume of prometheus metrics being collected. - --http - Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export - If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows - exporting keystores and passwords to HTTP API consumers who have access to the API token. - This method is useful for exporting validators, however it should be used with caution - since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir - If present, any validators created via the HTTP will have keystore passwords stored in the - secrets-dir rather than the validator definitions file. - --init-slashing-protection - If present, do not require the slashing protection database to exist before running. You - SHOULD NOT use this flag unless you're certain that a new slashing protection database is - required. Usually, your database will have been initialized when you imported your - validator keys. If you misplace your database and then run with this flag you risk being - slashed. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they can be read by any - user on the machine. Note that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --metrics - Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, - regardless of payload value. - --produce-block-v3 - Enable block production via the block v3 endpoint for this validator client. This should - only be enabled when paired with a beacon node that has this endpoint implemented. This - flag will be enabled by default in future. - --unencrypted-http-transport - This is a safety flag to ensure that the user is aware that the http transport is - unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts - If present, the validator client will use longer timeouts for requests made to the beacon - node. This flag is generally not recommended, longer timeouts can cause missed duties when - fallbacks are used. + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers + during proposals and will sign over headers. Useful for outsourcing execution + payload construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. + Validators will need to be manually added to the validator_definitions.yml file. + --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will + generally increase memory usage, it should only be provided when debugging specific + memory allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync + committee subscriptions and proposer preparation messages to all beacon nodes + provided in the `--beacon-nodes flag`. This option changes that behaviour such that + these api calls only go out to the first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce + the I/O burden on the VC but is only safe if slashing protection is enabled on the + remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE + CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET + SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed Enables functionality required for running the validator in a distributed validator + cluster. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for + messages on the network by any of the validators managed by this client. This will + result in three (possibly four) epochs worth of missed attestations. If an + attestation is detected during this period, it means it is very likely that you are + running a second validator client with the same keys. This validator client will + immediately shutdown if this is detected in order to avoid potentially committing a + slashable offense. Use this flag in order to ENABLE this functionality, without + this flag Lighthouse will begin attesting immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically + enabled for <= 64 validators. Enabling this metric for higher validator counts will + lead to higher volume of prometheus metrics being collected. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which + allows exporting keystores and passwords to HTTP API consumers who have access to + the API token. This method is useful for exporting validators, however it should be + used with caution since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored + in the secrets-dir rather than the validator definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before + running. You SHOULD NOT use this flag unless you're certain that a new slashing + protection database is required. Usually, your database will have been initialized + when you imported your validator keys. If you misplace your database and then run + with this flag you risk being slashed. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store + old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read + by any user on the machine. Note that logs can often contain sensitive information + about your validator and so this flag should be used with caution. For Windows + users, the log file permissions will be inherited from the parent folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, + regardless of payload value. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This + should only be enabled when paired with a beacon node that has this endpoint + implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is + unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the + beacon node. This flag is generally not recommended, longer timeouts can cause + missed duties when fallbacks are used. ``` diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 11d25b93f0a..aec4623c852 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,98 +6,83 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which - contains all the validator keystores and other validator data. This file can then be - imported to a validator client using the "import-validators" command. Another, - optional JSON file is created which contains a list of validator deposits in the same - format as the "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are - defined in a JSON file which can be generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are - defined in a JSON file which can be generated using the "create-validators" command. - This command only supports validators signing via a keystore on the local file system - (i.e., not Web3Signer validators). + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores + and other validator data. This file can then be imported to a validator client using the "import-validators" command. + Another, optional JSON file is created which contains a list of validator deposits in the same format as the + "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be + generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be + generated using the "create-validators" command. This command only supports validators signing via a keystore on the + local file system (i.e., not Web3Signer validators). help Print this message or the help of the given subcommand(s) Options: -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should only - be provided when debugging specific memory allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note that - logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited from - the parent folder. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator + and so this flag should be used with caution. For Windows users, the log file permissions will + be inherited from the parent folder. ``` diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 13d4d049d8b..0313c17104d 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,145 +1,124 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the -validator keystores and other validator data. This file can then be imported to a validator client -using the "import-validators" command. Another, optional JSON file is created which contains a list -of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other +validator data. This file can then be imported to a validator client using the "import-validators" command. Another, optional JSON +file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: --beacon-node - A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an - error will be raised if any validator key here is already known as a validator by that - beacon node. This helps prevent the same validator being created twice and therefore - slashable conditions. + A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any + validator key here is already known as a validator by that beacon node. This helps prevent the same validator being + created twice and therefore slashable conditions. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value - when choosing between a builder payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder + payload header and payload from the local execution node. --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather - than the local EL. [possible values: true, false] + When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible + values: true, false] --count The number of validators to create, regardless of how many already exist -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --deposit-gwei - The GWEI value of the deposit amount. Defaults to the minimum amount required for an - active validator (MAX_EFFECTIVE_BALANCE) + The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator + (MAX_EFFECTIVE_BALANCE) --eth1-withdrawal-address - If this field is set, the given eth1 address will be used to create the withdrawal - credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived - withdrawal public key in EIP-2334 format. + If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will + generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. --first-index The first of consecutive key indexes you wish to create. [default: 0] --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the - default value by not specifying this flag. + All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying + this flag. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --mnemonic-path If present, the mnemonic will be read in from this file. --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --output-path - The path to a directory where the validator and (optionally) deposits files will be - created. The directory will be created if it does not exist. + The path to a directory where the validator and (optionally) deposits files will be created. The directory will be + created if it does not exist. --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, - regardless of payload value. [possible values: true, false] + If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible + values: true, false] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag - to use the default value from the VC. + All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from + the VC. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. -h, --help Print help Flags: - --disable-deposits - When provided don't generate the deposits JSON file that is commonly used for submitting - validator deposits via a web UI. Using this flag will save several seconds per validator - if the user has an alternate strategy for submitting deposits. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --force-bls-withdrawal-credentials - If present, allows BLS withdrawal credentials rather than an execution address. This is - not recommended. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they can be read by any - user on the machine. Note that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --specify-voting-keystore-password - If present, the user will be prompted to enter the voting keystore password that will be - used to encrypt the voting keystores. If this flag is not provided, a random password will - be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic - is safely backed up. - --stdin-inputs - If present, read all user inputs from stdin instead of tty. + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting + validator deposits via a web UI. Using this flag will save several seconds per validator + if the user has an alternate strategy for submitting deposits. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is + not recommended. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any + user on the machine. Note that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be + used to encrypt the voting keystores. If this flag is not provided, a random password + will be used. It is not necessary to keep backups of voting keystore passwords if the + mnemonic is safely backed up. + --stdin-inputs If present, read all user inputs from stdin instead of tty. ``` diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index e011a86f547..c76ecbd1a76 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,106 +1,90 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON -file which can be generated using the "create-validators" command. +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using +the "create-validators" command. Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --validators-file - The path to a JSON file containing a list of validators to be imported to the validator - client. This file is usually named "validators.json". + The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually + named "validators.json". --vc-token The file containing a token required by the validator client. --vc-url - A HTTP(S) address of a validator client using the keymanager-API. If this value is not - supplied then a 'dry run' will be conducted where no changes are made to the validator - client. [default: http://localhost:5062] + A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be + conducted where no changes are made to the validator client. [default: http://localhost:5062] -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should only - be provided when debugging specific memory allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the - VC. Without this flag, the process will terminate without - making any changes. This flag should be used with caution, - whilst it does not directly cause slashable conditions, it - might be an indicator that something is amiss. Users should - also be careful to avoid submitting duplicate deposits for + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the + process will terminate without making any changes. This flag should be used with caution, + whilst it does not directly cause slashable conditions, it might be an indicator that + something is amiss. Users should also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note that - logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited from - the parent folder. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator + and so this flag should be used with caution. For Windows users, the log file permissions will + be inherited from the parent folder. ``` diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 244707a64a8..45b47284f20 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,124 +1,109 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON -file which can be generated using the "create-validators" command. This command only supports -validators signing via a keystore on the local file system (i.e., not Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using +the "create-validators" command. This command only supports validators signing via a keystore on the local file system (i.e., not +Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value - when choosing between a builder payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder + payload header and payload from the local execution node. --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather - than the local EL. [possible values: true, false] + When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible + values: true, false] --count The number of validators to move. -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults - to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] - [possible values: info, debug, trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] --dest-vc-token The file containing a token required by the destination validator client. --dest-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is - the "destination" and will have new validators added as they are removed from the "source" - validator client. + A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will + have new validators added as they are removed from the "source" validator client. --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the - default value by not specifying this flag. + All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying + this flag. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. - Checkpoint sync server URLs can generally be used with this flag. If not supplied, a - default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in - `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log - file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file + is generated where future logs are stored. Once the number of log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible - values: info, debug, trace, warn, error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: - DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging - is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, - background file logging is disabled. [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, - goerli, gnosis, chiado, sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, - regardless of payload value. [possible values: true, false] + If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible + values: true, false] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the - PoS transition block. Incorrect use of this flag can cause your node to possibly accept an + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the + event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. --src-vc-token The file containing a token required by the source validator client. --src-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is - the "source" and contains the validators that are to be moved. + A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the + validators that are to be moved. --stdin-inputs If present, read all user inputs from stdin instead of tty. --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag - to use the default value from the VC. + All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from + the VC. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse - testnet. Only effective if there is no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is + no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. - This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal PoW block. Incorrect use of this flag will cause your - node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of + this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a - 256-bit decimal integer (not a hex value). This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to experience a consensus + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --validators - The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword - "all". + The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should only - be provided when debugging specific memory allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note that - logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited from - the parent folder. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator + and so this flag should be used with caution. For Windows users, the log file permissions will + be inherited from the parent folder. ``` From 568bf79bba6645fbde2d2b7907f8cf6230fd8bcf Mon Sep 17 00:00:00 2001 From: realbigsean Date: Wed, 10 Apr 2024 17:28:27 -0400 Subject: [PATCH 26/46] cli help updates --- book/src/help_bn.md | 398 +++++++++++++++---------------------- book/src/help_general.md | 130 +++++------- book/src/help_vc.md | 210 ++++++++----------- book/src/help_vm.md | 116 +++++------ book/src/help_vm_create.md | 183 +++++++---------- book/src/help_vm_import.md | 127 +++++------- book/src/help_vm_move.md | 158 ++++++--------- 7 files changed, 532 insertions(+), 790 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 66f85bffe64..f5c64b11389 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,8 +1,8 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API -for querying the beacon chain and publishing messages to the network. +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages +to the network. Usage: lighthouse beacon_node [OPTIONS] @@ -10,8 +10,7 @@ Options: --auto-compact-db Enable or disable automatic compaction of the database on finalization. [default: true] --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - - blob_prune_margin_epochs. [default: 0] + The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - blob_prune_margin_epochs. [default: 0] --blobs-dir Data directory for the blobs database. --block-cache-size @@ -21,214 +20,178 @@ Options: --builder The URL of a service compatible with the MEV-boost API. --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any - connected builders, and will use the local execution engine for payload construction. Setting this value to anything less - than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if - there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local execution engine + for payload construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit + if there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT - query any connected builders, and will use the local execution engine for payload construction. [default: 3] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the local + execution engine for payload construction. [default: 3] --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past - `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution engine for payload - construction. [default: 8] + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will + use the local execution engine for payload construction. [default: 8] --builder-profit-threshold This flag is deprecated and has no effect. --builder-user-agent The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url - instead is recommended. + Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url - instead is recommended. + Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url instead is recommended. --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url - instead is recommended. + Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. --checkpoint-sync-url Set the remote beacon node HTTP endpoint to use for checkpoint sync. --checkpoint-sync-url-timeout Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --discovery-port The UDP port that discovery will listen on. Defaults to `port` --discovery-port6 The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` --enr-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 to the IP address it resolves to and does not auto-update based on PONG responses in discovery. Set - this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` - ENR fields accordingly. To update both, set this flag twice with the different values. + 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 to the IP address it resolves to and does + not auto-update based on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or + `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local - node on this port over IPv4. + The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local - node on this port over IPv6. + The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port - over IPv4. The --port flag is used if this is not set. + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is not set. --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port - over IPv6. The --port6 flag is used if this is not set. + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is not set. --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port - over IPv4. + The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port - over IPv6. + The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability - boundary relative to the current epoch. [default: 1] + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. [default: 1] --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can - be useful for minimizing disk writes [default: 1] + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 - endpoint. [default: 1000] + Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting - this value lower can help compensate for irregular Proof-of-Work block times, but setting it too low can make the node - vulnerable to re-orgs. + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for irregular + Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the - deposit cache. + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. --execution-jwt File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds - to the 'id' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty + by default --execution-jwt-secret-key Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to - the 'clv' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by + default --execution-timeout-multiplier Unsigned integer to multiply the default execution timeouts by. [default: 1] --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all - by setting the timeout to 0, however you risk proposing atop the wrong parent block. [default: 250] + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk proposing + atop the wrong parent block. [default: 250] --freezer-dir Data directory for the freezer database. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 - bytes. + Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 bytes. --historic-state-cache-size Specifies how many states from the freezer database should cache in memory [default: 1] --http-address
Set the listen address for the RESTful HTTP API server. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5052). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed + origin is set to the listen address of this server (e.g., http://localhost:5052). --http-duplicate-block-status Status code to send when a block that is already known is POSTed to the HTTP API. --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API - requests will be queued and scheduled alongside other tasks. When set to "false", HTTP API responses will be executed - immediately. + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside other + tasks. When set to "false", HTTP API responses will be executed immediately. --http-port Set the listen TCP port for the RESTful HTTP API server. --http-spec-fork Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages - from being dropped. + Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from being dropped. --http-tls-cert The path of the certificate to be used when serving the HTTP API server over TLS. --http-tls-key The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the - form of :/. To set quotas for multiple protocols, separate them by ';'. This is - enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of :/. To set + quotas for multiple protocols, separate them by ';'. This is enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag + instead. --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This - feature is only recommended for developers. This directory is not pruned, users should be careful to avoid filling up - their disks. + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. This directory + is not pruned, users should be careful to avoid filling up their disks. --libp2p-addresses One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the - different values. + The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the different values. Examples: - --listen-address '0.0.0.0' will listen over IPv4. - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses - is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or multiple + IPv6 addresses will not be accepted. [default: 0.0.0.0] --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from - wasting our time and disk space, but could also cause unnecessary consensus failures, so is disabled by default. + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also cause + unnecessary consensus failures, so is disabled by default. --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5054). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed + origin is set to the listen address of this server (e.g., http://localhost:5054). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on - certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This - will send information to a remote sever which may identify and associate your validators, IP address and other personal - information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets + the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and + other personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --network-dir Data directory for network keys. Defaults to network/ inside the beacon node dir. --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic - UDP port will be set to this value + 1. The discovery port can be modified by the --discovery-port flag and the quic port - can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 - address and --port6 to the IPv6 address. [default: 9000] + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port + can be modified by the --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the + IPv4 address and --port6 to the IPv6 address. [default: 9000] --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic - UDP port will be set to this value + 1. [default: 9090] + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for - execution nodes which don't improve their payload after the first call, and high values are useful for ensuring the EL is - given ample notice. Default: 1/3 of a slot. + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload after the + first call, and high values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. --progressive-balances Deprecated. This optimisation is now the default and cannot be disabled. --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by - ensuring the block has ample time to propagate and be processed by the network. The default is 1/12th of a slot (1 second - on mainnet) + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to propagate and be + processed by the network. The default is 1/12th of a slot (1 second on mainnet) --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset - of N means that reorging proposals will not be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default - only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not be attempted + at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional + restrictions. --proposer-reorg-epochs-since-finalization Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 --proposer-reorg-parent-threshold @@ -236,29 +199,25 @@ Options: --proposer-reorg-threshold Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the - current epoch. [default: true] + Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as - payloads need to be reconstructed and sent to syncing peers. [default: true] + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to syncing peers. + [default: true] --quic-port The UDP port that quic will listen on. Defaults to `port` + 1 --quic-port6 The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of - :/. To set quotas for multiple protocols, separate them by ';'. If the self rate - limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will - be used. + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas + for multiple protocols, separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate + limiter will be used. --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the - shuffling cache size in epochs. Shufflings are dependent on validator count and setting this value to a large number can - consume a large amount of memory. + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are dependent on + validator count and setting this value to a large number can consume a large amount of memory. --slasher-att-cache-size Set the maximum number of attestation roots for the slasher to cache --slasher-backend @@ -274,158 +233,121 @@ Options: --slasher-max-db-size Maximum size of the MDBX database used by the slasher. --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the - slasher-update-period is a multiple of the slot duration. + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot duration. --slasher-update-period Configure how often the slasher runs batch processing. --slasher-validator-chunk-size Number of validators per chunk stored on disk. --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 - (mainnet) or 64 (minimal)] + Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] --state-cache-size Specifies the size of the snapshot cache [default: 3] --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this - flag on the validator client instead of (or in addition to) setting it here. + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in addition + to) setting it here. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. --target-peers The target number of peers. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community + has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a + consensus failure. Be extremely careful with this flag. --trusted-peers One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated - from the mainnet kzg ceremony. Use with caution + Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from the mainnet kzg ceremony. Use with caution --validator-monitor-file As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus - metrics and issuing per-validator logs. Instead, it will provide aggregate metrics and logs. This avoids infeasibly high - cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, it will + provide aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and - additional logging. + A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root - should be 0x-prefixed. Note that this flag is for verification only, to perform a checkpoint sync from a recent state use - --checkpoint-sync-url. + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is for + verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. -h, --help Print help -V, --version Print version Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data - availability checks. Checkpoint syncing is the preferred method for syncing a node. Only - use this flag when testing. DO NOT use on mainnet! + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the preferred + method for syncing a node. Only use this flag when testing. DO NOT use on mainnet! --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block - builders, relays and developers. You should set a fee recipient on this BN and also - consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will - always be used for payload construction, regardless of recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is - generally not recommended unless auto-compaction is disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain - as fast as possible, however it can result in resource contention which degrades staking - performance. Stakers should generally choose to avoid this flag since backfill sync is - not required for staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any - previous option that depends on it. Useful if you intend to run a non-validating beacon - node. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should set a fee + recipient on this BN and also consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, regardless of + recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in resource + contention which degrades staking performance. Stakers should generally choose to avoid this flag since backfill sync is not required for + staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if you intend + to run a non-validating beacon node. --disable-duplicate-warn-logs This flag is deprecated and has no effect. - --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port - as seen by other peers on the network. This disables this feature, fixing the ENR's - IP/PORT to those specified on boot. + --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This disables + this feature, fixing the ENR's IP/PORT to those specified on boot. --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less - spurious failures on slow hardware but is considered experimental as it may obscure - performance issues. + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is considered + experimental as it may obscure performance issues. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during - finalized sync. By default block hashes will be checked in Lighthouse and only passed to - the EL if initial verification fails. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will be checked + in Lighthouse and only passed to the EL if initial verification fails. --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p - connections. - --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to - automatically establish external port mappings. - --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the - method used at the 2019 Canada interop. - -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable - connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, - you must use this flag if you wish to serve a validator. + --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. + --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. + --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. + --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve a + validator. --eth1-purge-cache Purges the eth1 block and deposit caches --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and - --validator-monitor-auto and enables SSE logging. + --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE logging. --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This - is useful for very small testnets. TESTING ONLY. DO NOT USE ON MAINNET. + --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING ONLY. DO NOT + USE ON MAINNET. --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will - only import attestations from already-subscribed subnets, use with - --subscribe-all-subnets to ensure all attestations are received for import. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from already-subscribed + subnets, use with --subscribe-all-subnets to ensure all attestations are received for import. --light-client-server Act as a full node supporting light clients on the p2p network [experimental] --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by - any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the log - file permissions will be inherited from the parent folder. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain + sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be + inherited from the parent folder. --metrics Enable the Prometheus metrics HTTP server. Disabled by default. --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in - a minimal configuration that is sufficient for block publishing only. This flag should - be used for a beacon node being referenced by validator client using the --proposer-node - flag. This configuration is for enabling more secure setups. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient for block + publishing only. This flag should be used for a beacon node being referenced by validator client using the --proposer-node flag. This + configuration is for enabling more secure setups. --purge-db If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires - syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported - blocks. This can assist in the recovery from a consensus failure caused by the execution - layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the - self-limiter-protocol flag to set per protocol configurations. If the self rate limiter - is enabled and a protocol is not present in the configuration, the quotas used for the - inbound rate limiter will be used. - --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed - before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert - users because of the immaturity of the slasher UX and the extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on - localhost:5052 and import deposit logs from the execution node. This is equivalent to - `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the - beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API - and using the subnet subscription endpoint. This generally has the effect of providing - additional logging and metrics for locally controlled validators. - -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free - ports. + --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a consensus + failure caused by the execution layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol configurations. If the + self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. + --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher UX and the + extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the execution node. + This is equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. This + generally has the effect of providing additional logging and metrics for locally controlled validators. + -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. ``` diff --git a/book/src/help_general.md b/book/src/help_general.md index be1e2f4f2e6..b4fd4691e94 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,97 +1,71 @@ # Lighthouse General Commands ``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator -accounts. +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, - validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores - blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. - [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import - blocks or perform most typical beacon node functions. Instead, it will simply run the discv5 service and - assist nodes on the network to discover each other. This is the recommended way to provide a network - boot-node since it has a reduced attack surface compared to a full beacon node. - validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and - attestations). [aliases: v, vc, validator] + validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain + and publishing messages to the network. [aliases: b, bn, beacon] + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node functions. + Instead, it will simply run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to provide a network boot-node + since it has a reduced attack surface compared to a full beacon node. + validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] help Print this message or the help of the given subcommand(s) Options: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - -h, --help - Print help - -V, --version - Print version + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where + network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, + warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be + used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the + oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: + 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync + more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use + of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will + cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex + value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to + override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. + -h, --help Print help + -V, --version Print version Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and - libp2p + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging + specific memory allocation issues. + -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator - and so this flag should be used with caution. For Windows users, the log file permissions will - be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain + sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited + from the parent folder. ``` diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 4f46f668918..ce9d28d408a 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -9,31 +9,27 @@ Options: --beacon-nodes Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These - certificates must be in PEM format and are used in addition to the OS trust store. Commas must only be used as a - delimiter, and must not be part of the certificate path. + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used in + addition to the OS trust store. Commas must only be used as a delimiter, and must not be part of the certificate path. --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, - blocks, subscriptions, sync-committee. Default (when flag is omitted) is to broadcast subscriptions only. + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag is + omitted) is to broadcast subscriptions only. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution + node. --builder-registration-timestamp-override This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: + Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not - necessarily be used if the gas limit set here moves too far from the previous block's gas limit. [default: 30,000,000] + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set here moves too + far from the previous block's gas limit. [default: 30,000,000] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] --graffiti @@ -41,87 +37,72 @@ Options: --graffiti-file Specify a graffiti file to load validator graffitis from. --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public - network. When this flag is used, it additionally requires the explicit use of the `--unencrypted-http-transport` flag to - ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security - like a HTTPS reverse-proxy or SSH tunnelling. + Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it additionally + requires the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, users should apply + transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5062). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed + origin is set to the listen address of this server (e.g., http://localhost:5062). --http-port Set the listen TCP port for the RESTful HTTP API server. --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the + number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5064). + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed + origin is set to the listen address of this server (e.g., http://localhost:5064). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on - certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This - will send information to a remote sever which may identify and associate your validators, IP address and other personal - information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets + the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and + other personal information. Always use a HTTPS connection and never provide an untrusted URL. --monitoring-endpoint-period Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block - proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes. + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard + beacon nodes specified in --beacon-nodes. --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly + accept an invalid chain or sync more slowly. Be extremely careful with this flag. --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a - file where the name is the 0x-prefixed hex representation of the validators voting public key. Defaults to - ~/.lighthouse/{network}/secrets. + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex + representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If - a fee recipient is configured in the validator definitions it takes priority over this value. + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the validator + definitions it takes priority over this value. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community + has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user + has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a + consensus failure. Be extremely careful with this flag. --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to - avoid timeouts from builders. [default: 500] + Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing - protection database and the validator_definitions.yml + The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the validator_definitions.yml --web3-signer-keep-alive-timeout Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] --web3-signer-max-idle-connections @@ -130,67 +111,48 @@ Options: Print help Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers - during proposals and will sign over headers. Useful for outsourcing execution - payload construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. - Validators will need to be manually added to the validator_definitions.yml file. + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. Useful for + outsourcing execution payload construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the + validator_definitions.yml file. --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will - generally increase memory usage, it should only be provided when debugging specific - memory allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync - committee subscriptions and proposer preparation messages to all beacon nodes - provided in the `--beacon-nodes flag`. This option changes that behaviour such that - these api calls only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce - the I/O burden on the VC but is only safe if slashing protection is enabled on the - remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE - CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET - SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. - --distributed Enables functionality required for running the validator in a distributed validator - cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for - messages on the network by any of the validators managed by this client. This will - result in three (possibly four) epochs worth of missed attestations. If an - attestation is detected during this period, it means it is very likely that you are - running a second validator client with the same keys. This validator client will - immediately shutdown if this is detected in order to avoid potentially committing a - slashable offense. Use this flag in order to ENABLE this functionality, without - this flag Lighthouse will begin attesting immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically - enabled for <= 64 validators. Enabling this metric for higher validator counts will - lead to higher volume of prometheus metrics being collected. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided + when debugging specific memory allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation messages + to all beacon nodes provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls only go out to the + first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if slashing + protection is enabled on the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING + PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed Enables functionality required for running the validator in a distributed validator cluster. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the validators + managed by this client. This will result in three (possibly four) epochs worth of missed attestations. If an attestation is detected during + this period, it means it is very likely that you are running a second validator client with the same keys. This validator client will + immediately shutdown if this is detected in order to avoid potentially committing a slashable offense. Use this flag in order to ENABLE + this functionality, without this flag Lighthouse will begin attesting immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this metric for + higher validator counts will lead to higher volume of prometheus metrics being collected. --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which - allows exporting keystores and passwords to HTTP API consumers who have access to - the API token. This method is useful for exporting validators, however it should be - used with caution since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored - in the secrets-dir rather than the validator definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before - running. You SHOULD NOT use this flag unless you're certain that a new slashing - protection database is required. Usually, your database will have been initialized - when you imported your validator keys. If you misplace your database and then run - with this flag you risk being slashed. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to HTTP API + consumers who have access to the API token. This method is useful for exporting validators, however it should be used with caution since it + exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator + definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're certain + that a new slashing protection database is required. Usually, your database will have been initialized when you imported your validator + keys. If you misplace your database and then run with this flag you risk being slashed. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store - old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read - by any user on the machine. Note that logs can often contain sensitive information - about your validator and so this flag should be used with caution. For Windows - users, the log file permissions will be inherited from the parent folder. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, - regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This - should only be enabled when paired with a beacon node that has this endpoint - implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is - unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the - beacon node. This flag is generally not recommended, longer timeouts can cause - missed duties when fallbacks are used. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a beacon node + that has this endpoint implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, + longer timeouts can cause missed duties when fallbacks are used. ``` diff --git a/book/src/help_vm.md b/book/src/help_vm.md index aec4623c852..b1ed222d86e 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,83 +6,61 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores - and other validator data. This file can then be imported to a validator client using the "import-validators" command. - Another, optional JSON file is created which contains a list of validator deposits in the same format as the + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported + to a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be - generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be - generated using the "create-validators" command. This command only supports validators signing via a keystore on the - local file system (i.e., not Web3Signer validators). + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This + command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). help Print this message or the help of the given subcommand(s) Options: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - -h, --help - Print help + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where + network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, + warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be + used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the + oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: + 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync + more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use + of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will + cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex + value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to + override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. + -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging + specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator - and so this flag should be used with caution. For Windows users, the log file permissions will - be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain + sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited + from the parent folder. ``` diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 0313c17104d..4c0f966f6e4 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,124 +1,87 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other -validator data. This file can then be imported to a validator client using the "import-validators" command. Another, optional JSON -file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator +client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" +tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: - --beacon-node - A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any - validator key here is already known as a validator by that beacon node. This helps prevent the same validator being - created twice and therefore slashable conditions. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. - --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible - values: true, false] - --count - The number of validators to create, regardless of how many already exist - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] - --deposit-gwei - The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator - (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address - If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will - generate withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. - --first-index - The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying - this flag. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --mnemonic-path - If present, the mnemonic will be read in from this file. - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --output-path - The path to a directory where the validator and (optionally) deposits files will be created. The directory will be - created if it does not exist. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible - values: true, false] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. - --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from - the VC. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - -h, --help - Print help + --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any validator + key here is already known as a validator by that beacon node. This helps prevent the same validator being created twice and + therefore slashable conditions. + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder + payload header and payload from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: + true, false] + --count The number of validators to create, regardless of how many already exist + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where + network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, + warn, error, crit] + --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate + withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. + --first-index The first of consecutive key indexes you wish to create. [default: 0] + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this + flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be + used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the + oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] + --mnemonic-path If present, the mnemonic will be read in from this file. + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if + it does not exist. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible + values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync + more slowly. Be extremely careful with this flag. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the + VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex + value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to + override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. + -h, --help Print help Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting - validator deposits via a web UI. Using this flag will save several seconds per validator - if the user has an alternate strategy for submitting deposits. + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this flag will + save several seconds per validator if the user has an alternate strategy for submitting deposits. --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is - not recommended. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any - user on the machine. Note that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be - used to encrypt the voting keystores. If this flag is not provided, a random password - will be used. It is not necessary to keep backups of voting keystore passwords if the - mnemonic is safely backed up. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain + sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be + inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this flag is + not provided, a random password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed + up. --stdin-inputs If present, read all user inputs from stdin instead of tty. ``` diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index c76ecbd1a76..06288056b45 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,90 +1,65 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using -the "create-validators" command. +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --validators-file - The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually - named "validators.json". - --vc-token - The file containing a token required by the validator client. - --vc-url - A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be - conducted where no changes are made to the validator client. [default: http://localhost:5062] - -h, --help - Print help + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where + network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, + warn, error, crit] + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be + used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the + oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: + 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync + more slowly. Be extremely careful with this flag. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use + of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will + cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex + value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to + override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. + --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named + "validators.json". + --vc-token The file containing a token required by the validator client. + --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be + conducted where no changes are made to the validator client. [default: http://localhost:5062] + -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the - process will terminate without making any changes. This flag should be used with caution, - whilst it does not directly cause slashable conditions, it might be an indicator that - something is amiss. Users should also be careful to avoid submitting duplicate deposits for - validators that already exist on the VC. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging + specific memory allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. This flag + should be used with caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is amiss. Users should + also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator - and so this flag should be used with caution. For Windows users, the log file permissions will - be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain + sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited + from the parent folder. ``` diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 45b47284f20..53937662179 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,109 +1,77 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using -the "create-validators" command. This command only supports validators signing via a keystore on the local file system (i.e., not -Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only +supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. - --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible - values: true, false] - --count - The number of validators to move. - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] - --dest-vc-token - The file containing a token required by the destination validator client. - --dest-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will - have new validators added as they are removed from the "source" validator client. - --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying - this flag. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file - is generated where future logs are stored. Once the number of log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible - values: true, false] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the - event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an - invalid chain or sync more slowly. Be extremely careful with this flag. - --src-vc-token - The file containing a token required by the source validator client. - --src-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the - validators that are to be moved. - --stdin-inputs - If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from - the VC. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is - no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of - this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --validators - The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". - -h, --help - Print help + --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder + payload header and payload from the local execution node. + --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: + true, false] + --count The number of validators to move. + -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where + network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. + --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, + warn, error, crit] + --dest-vc-token The file containing a token required by the destination validator client. + --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have new + validators added as they are removed from the "source" validator client. + --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this + flag. + --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be + used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already + included in this binary then this value will be ignored. + --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] + --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the + oldest log file will be overwritten. + --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] + --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible + values: true, false] + --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the + user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync + more slowly. Be extremely careful with this flag. + --src-vc-token The file containing a token required by the source validator client. + --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the + validators that are to be moved. + --stdin-inputs If present, read all user inputs from stdin instead of tty. + --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the + VC. + -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex + value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to + override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be + extremely careful with this flag. + --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". + -h, --help Print help Flags: --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging + specific memory allocation issues. --log-color Force outputting colors when emitting logs to the terminal. --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator - and so this flag should be used with caution. For Windows users, the log file permissions will - be inherited from the parent folder. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain + sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited + from the parent folder. ``` From 75c2c7271e24b3069afa19c7def868dcd61476e2 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 12 Apr 2024 10:20:02 +0300 Subject: [PATCH 27/46] md files --- book/src/help_bn.md | 3498 ++++++++++++++++++++++++++++++++---- book/src/help_general.md | 197 +- book/src/help_vc.md | 1444 +++++++++++++-- book/src/help_vm.md | 174 +- book/src/help_vm_create.md | 251 ++- book/src/help_vm_import.md | 182 +- book/src/help_vm_move.md | 219 ++- 7 files changed, 5172 insertions(+), 793 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index f5c64b11389..1cd82d73cb7 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,353 +1,3167 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain and publishing messages -to the network. +The primary component which connects to the Ethereum 2.0 P2P network +and downloads, verifies and stores blocks. Provides a HTTP API for +querying the beacon chain and publishing messages to the network. Usage: lighthouse beacon_node [OPTIONS] Options: - --auto-compact-db - Enable or disable automatic compaction of the database on finalization. [default: true] - --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - blob_prune_margin_epochs. [default: 0] - --blobs-dir - Data directory for the blobs database. - --block-cache-size - Specifies how many blocks the database should cache in memory [default: 5] - --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. - --builder - The URL of a service compatible with the MEV-boost API. - --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any connected builders, and will use the local execution engine - for payload construction. Setting this value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit - if there are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] - --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query any connected builders, and will use the local - execution engine for payload construction. [default: 3] - --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will - use the local execution engine for payload construction. [default: 8] - --builder-profit-threshold - This flag is deprecated and has no effect. - --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. - --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. - --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url instead is recommended. - --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url instead is recommended. - --checkpoint-sync-url - Set the remote beacon node HTTP endpoint to use for checkpoint sync. - --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --discovery-port - The UDP port that discovery will listen on. Defaults to `port` - --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` - --enr-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 to the IP address it resolves to and does - not auto-update based on PONG responses in discovery. Set this only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or - `ip6` ENR fields accordingly. To update both, set this flag twice with the different values. - --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. - --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. - --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. The --port flag is used if this is not set. - --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. The --port6 flag is used if this is not set. - --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv4. - --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over IPv6. - --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability boundary relative to the current epoch. [default: 1] - --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can be useful for minimizing disk writes [default: 1] - --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 endpoint. [default: 1000] - --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this value lower can help compensate for irregular - Proof-of-Work block times, but setting it too low can make the node vulnerable to re-orgs. - --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the deposit cache. - --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. - --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to the 'id' field in the JWT claims object.Set to empty - by default - --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. - --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the 'clv' field in the JWT claims object.Set to empty by - default - --execution-timeout-multiplier - Unsigned integer to multiply the default execution timeouts by. [default: 1] - --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by setting the timeout to 0, however you risk proposing - atop the wrong parent block. [default: 250] - --freezer-dir - Data directory for the freezer database. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 bytes. - --historic-state-cache-size - Specifies how many states from the freezer database should cache in memory [default: 1] - --http-address
- Set the listen address for the RESTful HTTP API server. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed - origin is set to the listen address of this server (e.g., http://localhost:5052). - --http-duplicate-block-status - Status code to send when a block that is already known is POSTed to the HTTP API. - --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API requests will be queued and scheduled alongside other - tasks. When set to "false", HTTP API responses will be executed immediately. - --http-port - Set the listen TCP port for the RESTful HTTP API server. - --http-spec-fork - Serve the spec for a specific hard fork on /eth/v1/config/spec. It should not be necessary to set this flag. - --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from being dropped. - --http-tls-cert - The path of the certificate to be used when serving the HTTP API server over TLS. - --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. - --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form of :/. To set - quotas for multiple protocols, separate them by ';'. This is enabled by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag - instead. - --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This feature is only recommended for developers. This directory - is not pruned, users should be careful to avoid filling up their disks. - --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. - --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the different values. - Examples: - - --listen-address '0.0.0.0' will listen over IPv4. - - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is not relevant. However, multiple IPv4, or multiple - IPv6 addresses will not be accepted. [default: 0.0.0.0] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting our time and disk space, but could also cause - unnecessary consensus failures, so is disabled by default. - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed - origin is set to the listen address of this server (e.g., http://localhost:5054). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets - the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and - other personal information. Always use a HTTPS connection and never provide an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --network-dir - Data directory for network keys. Defaults to network/ inside the beacon node dir. - --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP port will be set to this value + 1. The discovery port - can be modified by the --discovery-port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the - IPv4 address and --port6 to the IPv6 address. [default: 9000] - --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic UDP port will be set to this value + 1. [default: 9090] - --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for execution nodes which don't improve their payload after the - first call, and high values are useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. - --progressive-balances - Deprecated. This optimisation is now the default and cannot be disabled. - --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by ensuring the block has ample time to propagate and be - processed by the network. The default is 1/12th of a slot (1 second on mainnet) - --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of N means that reorging proposals will not be attempted - at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional - restrictions. - --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 - --proposer-reorg-parent-threshold - Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% - --proposer-reorg-threshold - Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% - --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current epoch. [default: true] - --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads need to be reconstructed and sent to syncing peers. - [default: true] - --quic-port - The UDP port that quic will listen on. Defaults to `port` + 1 - --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of :/. To set quotas - for multiple protocols, separate them by ';'. If the self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate - limiter will be used. - --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the shuffling cache size in epochs. Shufflings are dependent on - validator count and setting this value to a large number can consume a large amount of memory. - --slasher-att-cache-size - Set the maximum number of attestation roots for the slasher to cache - --slasher-backend - Set the database backend to be used by the slasher. [possible values: lmdb, disabled] - --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] - --slasher-chunk-size - Number of epochs per validator per chunk stored on disk. - --slasher-dir - Set the slasher's database directory. - --slasher-history-length - Configure how many epochs of history the slasher keeps. Immutable after initialization. - --slasher-max-db-size - Maximum size of the MDBX database used by the slasher. - --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the slasher-update-period is a multiple of the slot duration. - --slasher-update-period - Configure how often the slasher runs batch processing. - --slasher-validator-chunk-size - Number of validators per chunk stored on disk. - --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] - --state-cache-size - Specifies the size of the snapshot cache [default: 3] - --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the validator client instead of (or in addition - to) setting it here. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --target-peers - The target number of peers. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community - has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a - consensus failure. Be extremely careful with this flag. - --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. - --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from the mainnet kzg ceremony. Use with caution - --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. - --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics and issuing per-validator logs. Instead, it will - provide aggregate metrics and logs. This avoids infeasibly high cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. - --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and additional logging. - --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root should be 0x-prefixed. Note that this flag is for - verification only, to perform a checkpoint sync from a recent state use --checkpoint-sync-url. - -h, --help - Print help - -V, --version - Print version + --auto-compact-db Enable + or + disable + automatic + compaction + of + the + database + on + finalization. + [default: + true] + --blob-prune-margin-epochs The + margin + for + blob + pruning + in + epochs. + The + oldest + blobs + are + pruned + up + until + data_availability_boundary + - + blob_prune_margin_epochs. + [default: + 0] + --blobs-dir Data + directory + for + the + blobs + database. + --block-cache-size Specifies + how + many + blocks + the + database + should + cache + in + memory + [default: + 5] + --boot-nodes One + or + more + comma-delimited + base64-encoded + ENR's + to + bootstrap + the + p2p + network. + Multiaddr + is + also + supported. + --builder The + URL + of + a + service + compatible + with + the + MEV-boost + API. + --builder-fallback-epochs-since-finalization If + this + node + is + proposing + a + block + and + the + chain + has + not + finalized + within + this + number + of + epochs, + it + will + NOT + query + any + connected + builders, + and + will + use + the + local + execution + engine + for + payload + construction. + Setting + this + value + to + anything + less + than + 2 + will + cause + the + node + to + NEVER + query + connected + builders. + Setting + it + to + 2 + will + cause + this + condition + to + be + hit + if + there + are + skips + slots + at + the + start + of + an + epoch, + right + before + this + node + is + set + to + propose. + [default: + 3] + --builder-fallback-skips If + this + node + is + proposing + a + block + and + has + seen + this + number + of + skip + slots + on + the + canonical + chain + in + a + row, + it + will + NOT + query + any + connected + builders, + and + will + use + the + local + execution + engine + for + payload + construction. + [default: + 3] + --builder-fallback-skips-per-epoch If + this + node + is + proposing + a + block + and + has + seen + this + number + of + skip + slots + on + the + canonical + chain + in + the + past + `SLOTS_PER_EPOCH`, + it + will + NOT + query + any + connected + builders, + and + will + use + the + local + execution + engine + for + payload + construction. + [default: + 8] + --builder-profit-threshold This + flag + is + deprecated + and + has + no + effect. + --builder-user-agent The + HTTP + user + agent + to + send + alongside + requests + to + the + builder + URL. + The + default + is + Lighthouse's + version + string. + --checkpoint-blobs Set + the + checkpoint + blobs + to + start + syncing + from. + Must + be + aligned + and + match + --checkpoint-block. + Using + --checkpoint-sync-url + instead + is + recommended. + --checkpoint-block Set + a + checkpoint + block + to + start + syncing + from. + Must + be + aligned + and + match + --checkpoint-state. + Using + --checkpoint-sync-url + instead + is + recommended. + --checkpoint-state Set + a + checkpoint + state + to + start + syncing + from. + Must + be + aligned + and + match + --checkpoint-block. + Using + --checkpoint-sync-url + instead + is + recommended. + --checkpoint-sync-url Set + the + remote + beacon + node + HTTP + endpoint + to + use + for + checkpoint + sync. + --checkpoint-sync-url-timeout Set + the + timeout + for + checkpoint + sync + calls + to + remote + beacon + node + HTTP + endpoint. + [default: + 180] + -d, --datadir Used + to + specify + a + custom + root + data + directory + for + lighthouse + keys + and + databases. + Defaults + to + $HOME/.lighthouse/{network} + where + network + is + the + value + of + the + `network` + flag + Note: + Users + should + specify + separate + custom + datadirs + for + different + networks. + --debug-level Specifies + the + verbosity + level + used + when + emitting + logs + to + the + terminal. + [default: + info] + [possible + values: + info, + debug, + trace, + warn, + error, + crit] + --discovery-port The + UDP + port + that + discovery + will + listen + on. + Defaults + to + `port` + --discovery-port6 The + UDP + port + that + discovery + will + listen + on + over + IPv6 + if + listening + over + both + IPv4 + and + IPv6. + Defaults + to + `port6` + --enr-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 + to + the + IP + address + it + resolves + to + and + does + not + auto-update + based + on + PONG + responses + in + discovery. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + address. + This + will + update + the + `ip4` + or + `ip6` + ENR + fields + accordingly. + To + update + both, + set + this + flag + twice + with + the + different + values. + --enr-quic-port The + quic + UDP4 + port + that + will + be + set + on + the + local + ENR. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + port + over + IPv4. + --enr-quic6-port The + quic + UDP6 + port + that + will + be + set + on + the + local + ENR. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + port + over + IPv6. + --enr-tcp-port The + TCP4 + port + of + the + local + ENR. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + port + over + IPv4. + The + --port + flag + is + used + if + this + is + not + set. + --enr-tcp6-port The + TCP6 + port + of + the + local + ENR. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + port + over + IPv6. + The + --port6 + flag + is + used + if + this + is + not + set. + --enr-udp-port The + UDP4 + port + of + the + local + ENR. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + port + over + IPv4. + --enr-udp6-port The + UDP6 + port + of + the + local + ENR. + Set + this + only + if + you + are + sure + other + nodes + can + connect + to + your + local + node + on + this + port + over + IPv6. + --epochs-per-blob-prune The + epoch + interval + with + which + to + prune + blobs + from + Lighthouse's + database + when + they + are + older + than + the + data + availability + boundary + relative + to + the + current + epoch. + [default: + 1] + --epochs-per-migration The + number + of + epochs + to + wait + between + running + the + migration + of + data + from + the + hot + DB + to + the + cold + DB. + Less + frequent + runs + can + be + useful + for + minimizing + disk + writes + [default: + 1] + --eth1-blocks-per-log-query Specifies + the + number + of + blocks + that + a + deposit + log + query + should + span. + This + will + reduce + the + size + of + responses + from + the + Eth1 + endpoint. + [default: + 1000] + --eth1-cache-follow-distance Specifies + the + distance + between + the + Eth1 + chain + head + and + the + last + block + which + should + be + imported + into + the + cache. + Setting + this + value + lower + can + help + compensate + for + irregular + Proof-of-Work + block + times, + but + setting + it + too + low + can + make + the + node + vulnerable + to + re-orgs. + --execution-endpoint Server + endpoint + for + an + execution + layer + JWT-authenticated + HTTP + JSON-RPC + connection. + Uses + the + same + endpoint + to + populate + the + deposit + cache. + --execution-jwt File + path + which + contains + the + hex-encoded + JWT + secret + for + the + execution + endpoint + provided + in + the + --execution-endpoint + flag. + --execution-jwt-id Used + by + the + beacon + node + to + communicate + a + unique + identifier + to + execution + nodes + during + JWT + authentication. + It + corresponds + to + the + 'id' + field + in + the + JWT + claims + object.Set + to + empty + by + default + --execution-jwt-secret-key Hex-encoded + JWT + secret + for + the + execution + endpoint + provided + in + the + --execution-endpoint + flag. + --execution-jwt-version Used + by + the + beacon + node + to + communicate + a + client + version + to + execution + nodes + during + JWT + authentication. + It + corresponds + to + the + 'clv' + field + in + the + JWT + claims + object.Set + to + empty + by + default + --execution-timeout-multiplier Unsigned + integer + to + multiply + the + default + execution + timeouts + by. + [default: + 1] + --fork-choice-before-proposal-timeout Set + the + maximum + number + of + milliseconds + to + wait + for + fork + choice + before + proposing + a + block. + You + can + prevent + waiting + at + all + by + setting + the + timeout + to + 0, + however + you + risk + proposing + atop + the + wrong + parent + block. + [default: + 250] + --freezer-dir Data + directory + for + the + freezer + database. + --genesis-state-url A + URL + of + a + beacon-API + compatible + server + from + which + to + download + the + genesis + state. + Checkpoint + sync + server + URLs + can + generally + be + used + with + this + flag. + If + not + supplied, + a + default + URL + or + the + --checkpoint-sync-url + may + be + used. + If + the + genesis + state + is + already + included + in + this + binary + then + this + value + will + be + ignored. + --genesis-state-url-timeout The + timeout + in + seconds + for + the + request + to + --genesis-state-url. + [default: + 180] + --graffiti Specify + your + custom + graffiti + to + be + included + in + blocks. + Defaults + to + the + current + version + and + commit, + truncated + to + fit + in + 32 + bytes. + --historic-state-cache-size Specifies + how + many + states + from + the + freezer + database + should + cache + in + memory + [default: + 1] + --http-address
Set + the + listen + address + for + the + RESTful + HTTP + API + server. + --http-allow-origin Set + the + value + of + the + Access-Control-Allow-Origin + response + HTTP + header. + Use + * + to + allow + any + origin + (not + recommended + in + production). + If + no + value + is + supplied, + the + CORS + allowed + origin + is + set + to + the + listen + address + of + this + server + (e.g., + http://localhost:5052). + --http-duplicate-block-status Status + code + to + send + when + a + block + that + is + already + known + is + POSTed + to + the + HTTP + API. + --http-enable-beacon-processor The + beacon + processor + is + a + scheduler + which + provides + quality-of-service + and + DoS + protection. + When + set + to + "true", + HTTP + API + requests + will + be + queued + and + scheduled + alongside + other + tasks. + When + set + to + "false", + HTTP + API + responses + will + be + executed + immediately. + --http-port Set + the + listen + TCP + port + for + the + RESTful + HTTP + API + server. + --http-spec-fork Serve + the + spec + for + a + specific + hard + fork + on + /eth/v1/config/spec. + It + should + not + be + necessary + to + set + this + flag. + --http-sse-capacity-multiplier Multiplier + to + apply + to + the + length + of + HTTP + server-sent-event + (SSE) + channels. + Increasing + this + value + can + prevent + messages + from + being + dropped. + --http-tls-cert The + path + of + the + certificate + to + be + used + when + serving + the + HTTP + API + server + over + TLS. + --http-tls-key The + path + of + the + private + key + to + be + used + when + serving + the + HTTP + API + server + over + TLS. + Must + not + be + password-protected. + --inbound-rate-limiter-protocols Configures + the + inbound + rate + limiter + (requests + received + by + this + node).Rate + limit + quotas + per + protocol + can + be + set + in + the + form + of + :/. + To + set + quotas + for + multiple + protocols, + separate + them + by + ';'. + This + is + enabled + by + default, + using + default + quotas. + To + disable + rate + limiting + use + the + disable-inbound-rate-limiter + flag + instead. + --invalid-gossip-verified-blocks-path If + a + block + succeeds + gossip + validation + whilst + failing + full + validation, + store + the + block + SSZ + as + a + file + at + this + path. + This + feature + is + only + recommended + for + developers. + This + directory + is + not + pruned, + users + should + be + careful + to + avoid + filling + up + their + disks. + --libp2p-addresses One + or + more + comma-delimited + multiaddrs + to + manually + connect + to + a + libp2p + peer + without + an + ENR. + --listen-address [
...] The + address + lighthouse + will + listen + for + UDP + and + TCP + connections. + To + listen + over + IpV4 + and + IpV6 + set + this + flag + twice + with + the + different + values. + Examples: + - + --listen-address + '0.0.0.0' + will + listen + over + IPv4. + - + --listen-address + '::' + will + listen + over + IPv6. + - + --listen-address + '0.0.0.0' + --listen-address + '::' + will + listen + over + both + IPv4 + and + IPv6. + The + order + of + the + given + addresses + is + not + relevant. + However, + multiple + IPv4, + or + multiple + IPv6 + addresses + will + not + be + accepted. + [default: + 0.0.0.0] + --log-format Specifies + the + log + format + used + when + emitting + logs + to + the + terminal. + [possible + values: + JSON] + --logfile File + path + where + the + log + file + will + be + stored. + Once + it + grows + to + the + value + specified + in + `--logfile-max-size` + a + new + log + file + is + generated + where + future + logs + are + stored. + Once + the + number + of + log + files + exceeds + the + value + specified + in + `--logfile-max-number` + the + oldest + log + file + will + be + overwritten. + --logfile-debug-level The + verbosity + level + used + when + emitting + logs + to + the + log + file. + [default: + debug] + [possible + values: + info, + debug, + trace, + warn, + error, + crit] + --logfile-format Specifies + the + log + format + used + when + emitting + logs + to + the + logfile. + [possible + values: + DEFAULT, + JSON] + --logfile-max-number The + maximum + number + of + log + files + that + will + be + stored. + If + set + to + 0, + background + file + logging + is + disabled. + [default: + 5] + --logfile-max-size The + maximum + size + (in + MB) + each + log + file + can + grow + to + before + rotating. + If + set + to + 0, + background + file + logging + is + disabled. + [default: + 200] + --max-skip-slots Refuse + to + skip + more + than + this + many + slots + when + processing + an + attestation. + This + prevents + nodes + on + minority + forks + from + wasting + our + time + and + disk + space, + but + could + also + cause + unnecessary + consensus + failures, + so + is + disabled + by + default. + --metrics-address
Set + the + listen + address + for + the + Prometheus + metrics + HTTP + server. + --metrics-allow-origin Set + the + value + of + the + Access-Control-Allow-Origin + response + HTTP + header. + Use + * + to + allow + any + origin + (not + recommended + in + production). + If + no + value + is + supplied, + the + CORS + allowed + origin + is + set + to + the + listen + address + of + this + server + (e.g., + http://localhost:5054). + --metrics-port Set + the + listen + TCP + port + for + the + Prometheus + metrics + HTTP + server. + --monitoring-endpoint
Enables + the + monitoring + service + for + sending + system + metrics + to + a + remote + endpoint. + This + can + be + used + to + monitor + your + setup + on + certain + services + (e.g. + beaconcha.in). + This + flag + sets + the + endpoint + where + the + beacon + node + metrics + will + be + sent. + Note: + This + will + send + information + to + a + remote + sever + which + may + identify + and + associate + your + validators, + IP + address + and + other + personal + information. + Always + use + a + HTTPS + connection + and + never + provide + an + untrusted + URL. + --monitoring-endpoint-period Defines + how + many + seconds + to + wait + between + each + message + sent + to + the + monitoring-endpoint. + Default: + 60s + --network Name + of + the + Eth2 + chain + Lighthouse + will + sync + and + follow. + [possible + values: + mainnet, + prater, + goerli, + gnosis, + chiado, + sepolia, + holesky] + --network-dir Data + directory + for + network + keys. + Defaults + to + network/ + inside + the + beacon + node + dir. + --port The + TCP/UDP + ports + to + listen + on. + There + are + two + UDP + ports. + The + discovery + UDP + port + will + be + set + to + this + value + and + the + Quic + UDP + port + will + be + set + to + this + value + + + 1. + The + discovery + port + can + be + modified + by + the + --discovery-port + flag + and + the + quic + port + can + be + modified + by + the + --quic-port + flag. + If + listening + over + both + IPv4 + and + IPv6 + the + --port + flag + will + apply + to + the + IPv4 + address + and + --port6 + to + the + IPv6 + address. + [default: + 9000] + --port6 The + TCP/UDP + ports + to + listen + on + over + IPv6 + when + listening + over + both + IPv4 + and + IPv6. + Defaults + to + 9090 + when + required. + The + Quic + UDP + port + will + be + set + to + this + value + + + 1. + [default: + 9090] + --prepare-payload-lookahead The + time + before + the + start + of + a + proposal + slot + at + which + payload + attributes + should + be + sent. + Low + values + are + useful + for + execution + nodes + which + don't + improve + their + payload + after + the + first + call, + and + high + values + are + useful + for + ensuring + the + EL + is + given + ample + notice. + Default: + 1/3 + of + a + slot. + --progressive-balances Deprecated. + This + optimisation + is + now + the + default + and + cannot + be + disabled. + --proposer-reorg-cutoff Maximum + delay + after + the + start + of + the + slot + at + which + to + propose + a + reorging + block. + Lower + values + can + prevent + failed + reorgs + by + ensuring + the + block + has + ample + time + to + propagate + and + be + processed + by + the + network. + The + default + is + 1/12th + of + a + slot + (1 + second + on + mainnet) + --proposer-reorg-disallowed-offsets Comma-separated + list + of + integer + offsets + which + can + be + used + to + avoid + proposing + reorging + blocks + at + certain + slots. + An + offset + of + N + means + that + reorging + proposals + will + not + be + attempted + at + any + slot + such + that + `slot + % + SLOTS_PER_EPOCH + == + N`. + By + default + only + re-orgs + at + offset + 0 + will + be + avoided. + Any + offsets + supplied + with + this + flag + will + impose + additional + restrictions. + --proposer-reorg-epochs-since-finalization Maximum + number + of + epochs + since + finalization + at + which + proposer + reorgs + are + allowed. + Default: + 2 + --proposer-reorg-parent-threshold Percentage + of + parent + vote + weight + above + which + to + attempt + a + proposer + reorg. + Default: + 160% + --proposer-reorg-threshold Percentage + of + head + vote + weight + below + which + to + attempt + a + proposer + reorg. + Default: + 20% + --prune-blobs Prune + blobs + from + Lighthouse's + database + when + they + are + older + than + the + data + data + availability + boundary + relative + to + the + current + epoch. + [default: + true] + --prune-payloads Prune + execution + payloads + from + Lighthouse's + database. + This + saves + space + but + imposes + load + on + the + execution + client, + as + payloads + need + to + be + reconstructed + and + sent + to + syncing + peers. + [default: + true] + --quic-port The + UDP + port + that + quic + will + listen + on. + Defaults + to + `port` + + + 1 + --quic-port6 The + UDP + port + that + quic + will + listen + on + over + IPv6 + if + listening + over + both + IPv4 + and + IPv6. + Defaults + to + `port6` + + + 1 + --safe-slots-to-import-optimistically Used + to + coordinate + manual + overrides + of + the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY + parameter. + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + this + parameter + in + the + event + of + an + attack + at + the + PoS + transition + block. + Incorrect + use + of + this + flag + can + cause + your + node + to + possibly + accept + an + invalid + chain + or + sync + more + slowly. + Be + extremely + careful + with + this + flag. + --self-limiter-protocols Enables + the + outbound + rate + limiter + (requests + made + by + this + node).Rate + limit + quotas + per + protocol + can + be + set + in + the + form + of + :/. + To + set + quotas + for + multiple + protocols, + separate + them + by + ';'. + If + the + self + rate + limiter + is + enabled + and + a + protocol + is + not + present + in + the + configuration, + the + quotas + used + for + the + inbound + rate + limiter + will + be + used. + --shuffling-cache-size Some + HTTP + API + requests + can + be + optimised + by + caching + the + shufflings + at + each + epoch. + This + flag + allows + the + user + to + set + the + shuffling + cache + size + in + epochs. + Shufflings + are + dependent + on + validator + count + and + setting + this + value + to + a + large + number + can + consume + a + large + amount + of + memory. + --slasher-att-cache-size Set + the + maximum + number + of + attestation + roots + for + the + slasher + to + cache + --slasher-backend Set + the + database + backend + to + be + used + by + the + slasher. + [possible + values: + lmdb, + disabled] + --slasher-broadcast Broadcast + slashings + found + by + the + slasher + to + the + rest + of + the + network + [Enabled + by + default]. + [default: + true] + --slasher-chunk-size Number + of + epochs + per + validator + per + chunk + stored + on + disk. + --slasher-dir Set + the + slasher's + database + directory. + --slasher-history-length Configure + how + many + epochs + of + history + the + slasher + keeps. + Immutable + after + initialization. + --slasher-max-db-size Maximum + size + of + the + MDBX + database + used + by + the + slasher. + --slasher-slot-offset Set + the + delay + from + the + start + of + the + slot + at + which + the + slasher + should + ingest + attestations. + Only + effective + if + the + slasher-update-period + is + a + multiple + of + the + slot + duration. + --slasher-update-period Configure + how + often + the + slasher + runs + batch + processing. + --slasher-validator-chunk-size Number + of + validators + per + chunk + stored + on + disk. + --slots-per-restore-point Specifies + how + often + a + freezer + DB + restore + point + should + be + stored. + Cannot + be + changed + after + initialization. + [default: + 8192 + (mainnet) + or + 64 + (minimal)] + --state-cache-size Specifies + the + size + of + the + snapshot + cache + [default: + 3] + --suggested-fee-recipient Emergency + fallback + fee + recipient + for + use + in + case + the + validator + client + does + not + have + one + configured. + You + should + set + this + flag + on + the + validator + client + instead + of + (or + in + addition + to) + setting + it + here. + -t, --testnet-dir Path + to + directory + containing + eth2_testnet + specs. + Defaults + to + a + hard-coded + Lighthouse + testnet. + Only + effective + if + there + is + no + existing + database. + --target-peers The + target + number + of + peers. + --terminal-block-hash-epoch-override Used + to + coordinate + manual + overrides + to + the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH + parameter. + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + the + terminal + PoW + block. + Incorrect + use + of + this + flag + will + cause + your + node + to + experience + a + consensus + failure. + Be + extremely + careful + with + this + flag. + --terminal-block-hash-override Used + to + coordinate + manual + overrides + to + the + TERMINAL_BLOCK_HASH + parameter. + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + the + terminal + PoW + block. + Incorrect + use + of + this + flag + will + cause + your + node + to + experience + a + consensus + failure. + Be + extremely + careful + with + this + flag. + --terminal-total-difficulty-override Used + to + coordinate + manual + overrides + to + the + TERMINAL_TOTAL_DIFFICULTY + parameter. + Accepts + a + 256-bit + decimal + integer + (not + a + hex + value). + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + the + terminal + difficulty. + Incorrect + use + of + this + flag + will + cause + your + node + to + experience + a + consensus + failure. + Be + extremely + careful + with + this + flag. + --trusted-peers One + or + more + comma-delimited + trusted + peer + ids + which + always + have + the + highest + score + according + to + the + peer + scoring + system. + --trusted-setup-file-override Path + to + a + json + file + containing + the + trusted + setup + params. + NOTE: + This + will + override + the + trusted + setup + that + is + generated + from + the + mainnet + kzg + ceremony. + Use + with + caution + --validator-monitor-file As + per + --validator-monitor-pubkeys, + but + the + comma-separated + list + is + contained + within + a + file + at + the + given + path. + --validator-monitor-individual-tracking-threshold Once + the + validator + monitor + reaches + this + number + of + local + validators + it + will + stop + collecting + per-validator + Prometheus + metrics + and + issuing + per-validator + logs. + Instead, + it + will + provide + aggregate + metrics + and + logs. + This + avoids + infeasibly + high + cardinality + in + the + Prometheus + database + and + high + log + volume + when + using + many + validators. + Defaults + to + 64. + --validator-monitor-pubkeys A + comma-separated + list + of + 0x-prefixed + validator + public + keys. + These + validators + will + receive + special + monitoring + and + additional + logging. + --wss-checkpoint Specify + a + weak + subjectivity + checkpoint + in + `block_root:epoch` + format + to + verify + the + node's + sync + against. + The + block + root + should + be + 0x-prefixed. + Note + that + this + flag + is + for + verification + only, + to + perform + a + checkpoint + sync + from + a + recent + state + use + --checkpoint-sync-url. + -h, --help Print + help + -V, --version Print + version Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data availability checks. Checkpoint syncing is the preferred - method for syncing a node. Only use this flag when testing. DO NOT use on mainnet! - --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block builders, relays and developers. You should set a fee - recipient on this BN and also consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will always be used for payload construction, regardless of - recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is generally not recommended unless auto-compaction is disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as fast as possible, however it can result in resource - contention which degrades staking performance. Stakers should generally choose to avoid this flag since backfill sync is not required for - staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any previous option that depends on it. Useful if you intend - to run a non-validating beacon node. - --disable-duplicate-warn-logs This flag is deprecated and has no effect. - --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port as seen by other peers on the network. This disables - this feature, fixing the ENR's IP/PORT to those specified on boot. - --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less spurious failures on slow hardware but is considered - experimental as it may obscure performance issues. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during finalized sync. By default block hashes will be checked - in Lighthouse and only passed to the EL if initial verification fails. - --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks - --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p connections. - --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to automatically establish external port mappings. - --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, you must use this flag if you wish to serve a - validator. - --eth1-purge-cache Purges the eth1 block and deposit caches - --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and --validator-monitor-auto and enables SSE logging. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled Forces the HTTP to indicate that the node is synced when sync is actually stalled. This is useful for very small testnets. TESTING ONLY. DO NOT - USE ON MAINNET. - --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will only import attestations from already-subscribed - subnets, use with --subscribe-all-subnets to ensure all attestations are received for import. - --light-client-server Act as a full node supporting light clients on the p2p network [experimental] - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a minimal configuration that is sufficient for block - publishing only. This flag should be used for a beacon node being referenced by validator client using the --proposer-node flag. This - configuration is for enabling more secure setups. - --purge-db If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. This can assist in the recovery from a consensus - failure caused by the execution layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the self-limiter-protocol flag to set per protocol configurations. If the - self rate limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be used. - --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users because of the immaturity of the slasher UX and the - extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on localhost:5052 and import deposit logs from the execution node. - This is equivalent to `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and using the subnet subscription endpoint. This - generally has the effect of providing additional logging and metrics for locally controlled validators. - -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. + --allow-insecure-genesis-sync + Enable syncing from genesis, which is generally insecure and + incompatible with data availability checks. Checkpoint + syncing is the preferred method for syncing a node. Only use + this flag when testing. DO NOT use on mainnet! + --always-prefer-builder-payload + This flag is deprecated and has no effect. + --always-prepare-payload + Send payload attributes with every fork choice update. This + is intended for use by block builders, relays and developers. + You should set a fee recipient on this BN and also consider + adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks + This flag disables all checks related to chain health. This + means the builder API will always be used for payload + construction, regardless of recent chain conditions. + --compact-db + If present, apply compaction to the database on start-up. Use + with caution. It is generally not recommended unless + auto-compaction is disabled. + --disable-backfill-rate-limiting + Disable the backfill sync rate-limiting. This allow users to + just sync the entire chain as fast as possible, however it + can result in resource contention which degrades staking + performance. Stakers should generally choose to avoid this + flag since backfill sync is not required for staking. + --disable-deposit-contract-sync + Explicitly disables syncing of deposit logs from the + execution node. This overrides any previous option that + depends on it. Useful if you intend to run a non-validating + beacon node. + --disable-duplicate-warn-logs + This flag is deprecated and has no effect. + --disable-enr-auto-update + Discovery automatically updates the nodes local ENR with an + external IP address and port as seen by other peers on the + network. This disables this feature, fixing the ENR's IP/PORT + to those specified on boot. + --disable-inbound-rate-limiter + Disables the inbound rate limiter (requests received by this + node). + --disable-lock-timeouts + Disable the timeouts applied to some internal locks by + default. This can lead to less spurious failures on slow + hardware but is considered experimental as it may obscure + performance issues. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + --disable-optimistic-finalized-sync + Force Lighthouse to verify every execution block hash with + the execution client during finalized sync. By default block + hashes will be checked in Lighthouse and only passed to the + EL if initial verification fails. + --disable-packet-filter + Disables the discovery packet filter. Useful for testing in + smaller networks + --disable-proposer-reorgs + Do not attempt to reorg late blocks from other validators + when proposing. + --disable-quic + Disables the quic transport. The node will rely solely on the + TCP transport for libp2p connections. + --disable-upnp + Disables UPnP support. Setting this will prevent Lighthouse + from attempting to automatically establish external port + mappings. + --dummy-eth1 + If present, uses an eth1 backend that generates static dummy + data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match + 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-private-discovery + Lighthouse by default does not discover private IP addresses. + Set this flag to enable connection attempts to local + addresses. + --eth1 + If present the node will connect to an eth1 node. This is + required for block production, you must use this flag if you + wish to serve a validator. + --eth1-purge-cache + Purges the eth1 block and deposit caches + --genesis-backfill + Attempts to download blocks all the way back to genesis when + checkpoint syncing. + --gui + Enable the graphical user interface and all its requirements. + This enables --http and --validator-monitor-auto and enables + SSE logging. + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-allow-sync-stalled + Forces the HTTP to indicate that the node is synced when sync + is actually stalled. This is useful for very small testnets. + TESTING ONLY. DO NOT USE ON MAINNET. + --http-enable-tls + Serves the RESTful HTTP API server over TLS. This feature is + currently experimental. + --import-all-attestations + Import and aggregate all attestations, regardless of + validator subscriptions. This will only import attestations + from already-subscribed subnets, use with + --subscribe-all-subnets to ensure all attestations are + received for import. + --light-client-server + Act as a full node supporting light clients on the p2p + network [experimental] + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by + default. + --private + Prevents sending various client identification information. + --proposer-only + Sets this beacon node at be a block proposer only node. This + will run the beacon node in a minimal configuration that is + sufficient for block publishing only. This flag should be + used for a beacon node being referenced by validator client + using the --proposer-node flag. This configuration is for + enabling more secure setups. + --purge-db + If present, the chain database will be deleted. Use with + caution. + --reconstruct-historic-states + After a checkpoint sync, reconstruct historic states in the + database. This requires syncing all the way back to genesis. + --reset-payload-statuses + When present, Lighthouse will forget the payload statuses of + any already-imported blocks. This can assist in the recovery + from a consensus failure caused by the execution layer. + --self-limiter + Enables the outbound rate limiter (requests made by this + node). Use the self-limiter-protocol flag to set per protocol + configurations. If the self rate limiter is enabled and a + protocol is not present in the configuration, the quotas used + for the inbound rate limiter will be used. + --shutdown-after-sync + Shutdown beacon node as soon as sync is completed. Backfill + sync will not be performed before shutdown. + --slasher + Run a slasher alongside the beacon node. It is currently only + recommended for expert users because of the immaturity of the + slasher UX and the extra resources required. + --staking + Standard option for a staking beacon node. This will enable + the HTTP server on localhost:5052 and import deposit logs + from the execution node. This is equivalent to `--http` on + merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets + Subscribe to all subnets regardless of validator count. This + will also advertise the beacon node as being long-lived + subscribed to all subnets. + --validator-monitor-auto + Enables the automatic detection and monitoring of validators + connected to the HTTP API and using the subnet subscription + endpoint. This generally has the effect of providing + additional logging and metrics for locally controlled + validators. + -z, --zero-ports + Sets all listening TCP/UDP ports to 0, allowing the OS to + choose some arbitrary free ports. ``` diff --git a/book/src/help_general.md b/book/src/help_general.md index b4fd4691e94..37a721be1b2 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,71 +1,154 @@ # Lighthouse General Commands ``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon +node, a validator client and utilities for managing validator accounts. Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API for querying the beacon chain - and publishing messages to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import blocks or perform most typical beacon node functions. - Instead, it will simply run the discv5 service and assist nodes on the network to discover each other. This is the recommended way to provide a network boot-node - since it has a reduced attack surface compared to a full beacon node. - validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). [aliases: v, vc, validator] - account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] - help Print this message or the help of the given subcommand(s) + validator_manager Utilities for managing a Lighthouse validator + client via the HTTP API. [aliases: vm, + validator-manager, validator_manager] + beacon_node The primary component which connects to the + Ethereum 2.0 P2P network and downloads, + verifies and stores blocks. Provides a HTTP + API for querying the beacon chain and + publishing messages to the network. [aliases: + b, bn, beacon] + boot_node Start a special Lighthouse process that only + serves as a discv5 boot-node. This process + will *not* import blocks or perform most + typical beacon node functions. Instead, it + will simply run the discv5 service and assist + nodes on the network to discover each other. + This is the recommended way to provide a + network boot-node since it has a reduced + attack surface compared to a full beacon node. + validator_client When connected to a beacon node, performs the + duties of a staked validator (e.g., proposing + blocks and attestations). [aliases: v, vc, + validator] + account_manager Utilities for generating and managing Ethereum + 2.0 accounts. [aliases: a, am, account, + account_manager] + help Print this message or the help of the given + subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where - network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, - warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be - used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the - oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: - 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync - more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use - of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex - value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to - override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - -h, --help Print help - -V, --version Print version + -d, --datadir + Used to specify a custom root data directory for lighthouse + keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users + should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the + terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to + download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will + be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to + --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the + terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to + the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of + log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. + [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the + logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set + to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before + rotating. If set to 0, background file logging is disabled. + [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. + [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override + this parameter in the event of an attack at the PoS + transition block. Incorrect use of this flag can cause your + node to possibly accept an invalid chain or sync more slowly. + Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to + a hard-coded Lighthouse testnet. Only effective if there is + no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the + terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely + careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience + a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the + TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit + decimal integer (not a hex value). This flag should only be + used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with + this flag. + -h, --help + Print help + -V, --version + Print version Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and libp2p - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited - from the parent folder. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + -l + DEPRECATED Enables environment logging giving access to + sub-protocol logs such as discv5 and libp2p + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. ``` diff --git a/book/src/help_vc.md b/book/src/help_vc.md index ce9d28d408a..595e5c45895 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -1,158 +1,1308 @@ # Validator Client ``` -When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). +When connected to a beacon node, performs the duties of a staked +validator (e.g., proposing blocks and attestations). Usage: lighthouse validator_client [OPTIONS] Options: - --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. - --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These certificates must be in PEM format and are used in - addition to the OS trust store. Commas must only be used as a delimiter, and must not be part of the certificate path. - --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, blocks, subscriptions, sync-committee. Default (when flag is - omitted) is to broadcast subscriptions only. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution - node. - --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: - Users should specify separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] - --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not necessarily be used if the gas limit set here moves too - far from the previous block's gas limit. [default: 30,000,000] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - --graffiti - Specify your custom graffiti to be included in blocks. - --graffiti-file - Specify a graffiti file to load validator graffitis from. - --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public network. When this flag is used, it additionally - requires the explicit use of the `--unencrypted-http-transport` flag to ensure the user is aware of the risks involved. For access via the Internet, users should apply - transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed - origin is set to the listen address of this server (e.g., http://localhost:5062). - --http-port - Set the listen TCP port for the RESTful HTTP API server. - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is generated where future logs are stored. Once the - number of log files exceeds the value specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in production). If no value is supplied, the CORS allowed - origin is set to the listen address of this server (e.g., http://localhost:5064). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on certain services (e.g. beaconcha.in). This flag sets - the endpoint where the beacon node metrics will be sent. Note: This will send information to a remote sever which may identify and associate your validators, IP address and - other personal information. Always use a HTTPS connection and never provide an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure will revert back to the standard - beacon nodes specified in --beacon-nodes. - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly - accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a file where the name is the 0x-prefixed hex - representation of the validators voting public key. Defaults to ~/.lighthouse/{network}/secrets. - --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a fee recipient is configured in the validator - definitions it takes priority over this value. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no existing database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear understanding that the broad Ethereum community - has elected to override the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex value). This flag should only be used if the user - has a clear understanding that the broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a - consensus failure. Be extremely careful with this flag. - --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to avoid timeouts from builders. [default: 500] - --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing protection database and the validator_definitions.yml - --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] - --web3-signer-max-idle-connections - Maximum number of idle connections to maintain per web3signer host. Default is unlimited. - -h, --help - Print help + --beacon-nodes Comma-separated + addresses + to + one + or + more + beacon + node + HTTP + APIs. + Default + is + http://localhost:5052. + --beacon-nodes-tls-certs Comma-separated + paths + to + custom + TLS + certificates + to + use + when + connecting + to + a + beacon + node + (and/or + proposer + node). + These + certificates + must + be + in + PEM + format + and + are + used + in + addition + to + the + OS + trust + store. + Commas + must + only + be + used + as + a + delimiter, + and + must + not + be + part + of + the + certificate + path. + --broadcast Comma-separated + list + of + beacon + API + topics + to + broadcast + to + all + beacon + nodes. + Possible + values + are: + none, + attestations, + blocks, + subscriptions, + sync-committee. + Default + (when + flag + is + omitted) + is + to + broadcast + subscriptions + only. + --builder-boost-factor Defines + the + boost + factor, + a + percentage + multiplier + to + apply + to + the + builder's + payload + value + when + choosing + between + a + builder + payload + header + and + payload + from + the + local + execution + node. + --builder-registration-timestamp-override This + flag + takes + a + unix + timestamp + value + that + will + be + used + to + override + the + timestamp + used + in + the + builder + api + registration + -d, --datadir Used + to + specify + a + custom + root + data + directory + for + lighthouse + keys + and + databases. + Defaults + to + $HOME/.lighthouse/{network} + where + network + is + the + value + of + the + `network` + flag + Note: + Users + should + specify + separate + custom + datadirs + for + different + networks. + --debug-level Specifies + the + verbosity + level + used + when + emitting + logs + to + the + terminal. + [default: + info] + [possible + values: + info, + debug, + trace, + warn, + error, + crit] + --gas-limit The + gas + limit + to + be + used + in + all + builder + proposals + for + all + validators + managed + by + this + validator + client. + Note + this + will + not + necessarily + be + used + if + the + gas + limit + set + here + moves + too + far + from + the + previous + block's + gas + limit. + [default: + 30,000,000] + --genesis-state-url A + URL + of + a + beacon-API + compatible + server + from + which + to + download + the + genesis + state. + Checkpoint + sync + server + URLs + can + generally + be + used + with + this + flag. + If + not + supplied, + a + default + URL + or + the + --checkpoint-sync-url + may + be + used. + If + the + genesis + state + is + already + included + in + this + binary + then + this + value + will + be + ignored. + --genesis-state-url-timeout The + timeout + in + seconds + for + the + request + to + --genesis-state-url. + [default: + 180] + --graffiti Specify + your + custom + graffiti + to + be + included + in + blocks. + --graffiti-file Specify + a + graffiti + file + to + load + validator + graffitis + from. + --http-address
Set + the + address + for + the + HTTP + address. + The + HTTP + server + is + not + encrypted + and + therefore + it + is + unsafe + to + publish + on + a + public + network. + When + this + flag + is + used, + it + additionally + requires + the + explicit + use + of + the + `--unencrypted-http-transport` + flag + to + ensure + the + user + is + aware + of + the + risks + involved. + For + access + via + the + Internet, + users + should + apply + transport-layer + security + like + a + HTTPS + reverse-proxy + or + SSH + tunnelling. + --http-allow-origin Set + the + value + of + the + Access-Control-Allow-Origin + response + HTTP + header. + Use + * + to + allow + any + origin + (not + recommended + in + production). + If + no + value + is + supplied, + the + CORS + allowed + origin + is + set + to + the + listen + address + of + this + server + (e.g., + http://localhost:5062). + --http-port Set + the + listen + TCP + port + for + the + RESTful + HTTP + API + server. + --log-format Specifies + the + log + format + used + when + emitting + logs + to + the + terminal. + [possible + values: + JSON] + --logfile File + path + where + the + log + file + will + be + stored. + Once + it + grows + to + the + value + specified + in + `--logfile-max-size` + a + new + log + file + is + generated + where + future + logs + are + stored. + Once + the + number + of + log + files + exceeds + the + value + specified + in + `--logfile-max-number` + the + oldest + log + file + will + be + overwritten. + --logfile-debug-level The + verbosity + level + used + when + emitting + logs + to + the + log + file. + [default: + debug] + [possible + values: + info, + debug, + trace, + warn, + error, + crit] + --logfile-format Specifies + the + log + format + used + when + emitting + logs + to + the + logfile. + [possible + values: + DEFAULT, + JSON] + --logfile-max-number The + maximum + number + of + log + files + that + will + be + stored. + If + set + to + 0, + background + file + logging + is + disabled. + [default: + 5] + --logfile-max-size The + maximum + size + (in + MB) + each + log + file + can + grow + to + before + rotating. + If + set + to + 0, + background + file + logging + is + disabled. + [default: + 200] + --metrics-address
Set + the + listen + address + for + the + Prometheus + metrics + HTTP + server. + --metrics-allow-origin Set + the + value + of + the + Access-Control-Allow-Origin + response + HTTP + header. + Use + * + to + allow + any + origin + (not + recommended + in + production). + If + no + value + is + supplied, + the + CORS + allowed + origin + is + set + to + the + listen + address + of + this + server + (e.g., + http://localhost:5064). + --metrics-port Set + the + listen + TCP + port + for + the + Prometheus + metrics + HTTP + server. + --monitoring-endpoint
Enables + the + monitoring + service + for + sending + system + metrics + to + a + remote + endpoint. + This + can + be + used + to + monitor + your + setup + on + certain + services + (e.g. + beaconcha.in). + This + flag + sets + the + endpoint + where + the + beacon + node + metrics + will + be + sent. + Note: + This + will + send + information + to + a + remote + sever + which + may + identify + and + associate + your + validators, + IP + address + and + other + personal + information. + Always + use + a + HTTPS + connection + and + never + provide + an + untrusted + URL. + --monitoring-endpoint-period Defines + how + many + seconds + to + wait + between + each + message + sent + to + the + monitoring-endpoint. + Default: + 60s + --network Name + of + the + Eth2 + chain + Lighthouse + will + sync + and + follow. + [possible + values: + mainnet, + prater, + goerli, + gnosis, + chiado, + sepolia, + holesky] + --proposer-nodes Comma-separated + addresses + to + one + or + more + beacon + node + HTTP + APIs. + These + specify + nodes + that + are + used + to + send + beacon + block + proposals. + A + failure + will + revert + back + to + the + standard + beacon + nodes + specified + in + --beacon-nodes. + --safe-slots-to-import-optimistically Used + to + coordinate + manual + overrides + of + the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY + parameter. + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + this + parameter + in + the + event + of + an + attack + at + the + PoS + transition + block. + Incorrect + use + of + this + flag + can + cause + your + node + to + possibly + accept + an + invalid + chain + or + sync + more + slowly. + Be + extremely + careful + with + this + flag. + --secrets-dir The + directory + which + contains + the + password + to + unlock + the + validator + voting + keypairs. + Each + password + should + be + contained + in + a + file + where + the + name + is + the + 0x-prefixed + hex + representation + of + the + validators + voting + public + key. + Defaults + to + ~/.lighthouse/{network}/secrets. + --suggested-fee-recipient Once + the + merge + has + happened, + this + address + will + receive + transaction + fees + from + blocks + proposed + by + this + validator + client. + If + a + fee + recipient + is + configured + in + the + validator + definitions + it + takes + priority + over + this + value. + -t, --testnet-dir Path + to + directory + containing + eth2_testnet + specs. + Defaults + to + a + hard-coded + Lighthouse + testnet. + Only + effective + if + there + is + no + existing + database. + --terminal-block-hash-epoch-override Used + to + coordinate + manual + overrides + to + the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH + parameter. + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + the + terminal + PoW + block. + Incorrect + use + of + this + flag + will + cause + your + node + to + experience + a + consensus + failure. + Be + extremely + careful + with + this + flag. + --terminal-block-hash-override Used + to + coordinate + manual + overrides + to + the + TERMINAL_BLOCK_HASH + parameter. + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + the + terminal + PoW + block. + Incorrect + use + of + this + flag + will + cause + your + node + to + experience + a + consensus + failure. + Be + extremely + careful + with + this + flag. + --terminal-total-difficulty-override Used + to + coordinate + manual + overrides + to + the + TERMINAL_TOTAL_DIFFICULTY + parameter. + Accepts + a + 256-bit + decimal + integer + (not + a + hex + value). + This + flag + should + only + be + used + if + the + user + has + a + clear + understanding + that + the + broad + Ethereum + community + has + elected + to + override + the + terminal + difficulty. + Incorrect + use + of + this + flag + will + cause + your + node + to + experience + a + consensus + failure. + Be + extremely + careful + with + this + flag. + --validator-registration-batch-size Defines + the + number + of + validators + per + validator/register_validator + request + sent + to + the + BN. + This + value + can + be + reduced + to + avoid + timeouts + from + builders. + [default: + 500] + --validators-dir The + directory + which + contains + the + validator + keystores, + deposit + data + for + each + validator + along + with + the + common + slashing + protection + database + and + the + validator_definitions.yml + --web3-signer-keep-alive-timeout Keep-alive + timeout + for + each + web3signer + connection. + Set + to + 'null' + to + never + timeout + [default: + 90000] + --web3-signer-max-idle-connections Maximum + number + of + idle + connections + to + maintain + per + web3signer + host. + Default + is + unlimited. + -h, --help Print + help Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers during proposals and will sign over headers. Useful for - outsourcing execution payload construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. Validators will need to be manually added to the - validator_definitions.yml file. - --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided - when debugging specific memory allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync committee subscriptions and proposer preparation messages - to all beacon nodes provided in the `--beacon-nodes flag`. This option changes that behaviour such that these api calls only go out to the - first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the I/O burden on the VC but is only safe if slashing - protection is enabled on the remote signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT SLASHING - PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. - --distributed Enables functionality required for running the validator in a distributed validator cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for messages on the network by any of the validators - managed by this client. This will result in three (possibly four) epochs worth of missed attestations. If an attestation is detected during - this period, it means it is very likely that you are running a second validator client with the same keys. This validator client will - immediately shutdown if this is detected in order to avoid potentially committing a slashable offense. Use this flag in order to ENABLE - this functionality, without this flag Lighthouse will begin attesting immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically enabled for <= 64 validators. Enabling this metric for - higher validator counts will lead to higher volume of prometheus metrics being collected. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which allows exporting keystores and passwords to HTTP API - consumers who have access to the API token. This method is useful for exporting validators, however it should be used with caution since it - exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored in the secrets-dir rather than the validator - definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before running. You SHOULD NOT use this flag unless you're certain - that a new slashing protection database is required. Usually, your database will have been initialized when you imported your validator - keys. If you misplace your database and then run with this flag you risk being slashed. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This should only be enabled when paired with a beacon node - that has this endpoint implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, - longer timeouts can cause missed duties when fallbacks are used. + --builder-proposals + If this flag is set, Lighthouse will query the Beacon Node + for only block headers during proposals and will sign over + headers. Useful for outsourcing execution payload + construction during proposals. + --disable-auto-discover + If present, do not attempt to discover new validators in the + validators-dir. Validators will need to be manually added to + the validator_definitions.yml file. + --disable-latency-measurement-service + Disables the service that periodically attempts to measure + latency to BNs. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + --disable-run-on-all + DEPRECATED. Use --broadcast. By default, Lighthouse publishes + attestation, sync committee subscriptions and proposer + preparation messages to all beacon nodes provided in the + `--beacon-nodes flag`. This option changes that behaviour + such that these api calls only go out to the first available + and synced beacon node + --disable-slashing-protection-web3signer + Disable Lighthouse's slashing protection for all web3signer + keys. This can reduce the I/O burden on the VC but is only + safe if slashing protection is enabled on the remote signer + and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS + YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE + REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG + WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed + Enables functionality required for running the validator in a + distributed validator cluster. + --enable-doppelganger-protection + If this flag is set, Lighthouse will delay startup for three + epochs and monitor for messages on the network by any of the + validators managed by this client. This will result in three + (possibly four) epochs worth of missed attestations. If an + attestation is detected during this period, it means it is + very likely that you are running a second validator client + with the same keys. This validator client will immediately + shutdown if this is detected in order to avoid potentially + committing a slashable offense. Use this flag in order to + ENABLE this functionality, without this flag Lighthouse will + begin attesting immediately. + --enable-high-validator-count-metrics + Enable per validator metrics for > 64 validators. Note: This + flag is automatically enabled for <= 64 validators. Enabling + this metric for higher validator counts will lead to higher + volume of prometheus metrics being collected. + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export + If present, allow access to the DELETE /lighthouse/keystores + HTTP API method, which allows exporting keystores and + passwords to HTTP API consumers who have access to the API + token. This method is useful for exporting validators, + however it should be used with caution since it exposes + private key data to authorized users. + --http-store-passwords-in-secrets-dir + If present, any validators created via the HTTP will have + keystore passwords stored in the secrets-dir rather than the + validator definitions file. + --init-slashing-protection + If present, do not require the slashing protection database + to exist before running. You SHOULD NOT use this flag unless + you're certain that a new slashing protection database is + required. Usually, your database will have been initialized + when you imported your validator keys. If you misplace your + database and then run with this flag you risk being slashed. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by + default. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks + constructed by builders, regardless of payload value. + --produce-block-v3 + Enable block production via the block v3 endpoint for this + validator client. This should only be enabled when paired + with a beacon node that has this endpoint implemented. This + flag will be enabled by default in future. + --unencrypted-http-transport + This is a safety flag to ensure that the user is aware that + the http transport is unencrypted and using a custom HTTP + address is unsafe. + --use-long-timeouts + If present, the validator client will use longer timeouts for + requests made to the beacon node. This flag is generally not + recommended, longer timeouts can cause missed duties when + fallbacks are used. ``` diff --git a/book/src/help_vm.md b/book/src/help_vm.md index b1ed222d86e..4a4368dade4 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,61 +6,133 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported - to a validator client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the - "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This - command only supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). + create Creates new validators from BIP-39 mnemonic. A JSON file + will be created which contains all the validator + keystores and other validator data. This file can then be + imported to a validator client using the + "import-validators" command. Another, optional JSON file + is created which contains a list of validator deposits in + the same format as the "ethereum/staking-deposit-cli" + tool. + import Uploads validators to a validator client using the HTTP + API. The validators are defined in a JSON file which can + be generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP + API. The validators are defined in a JSON file which can + be generated using the "create-validators" command. This + command only supports validators signing via a keystore + on the local file system (i.e., not Web3Signer + validators). help Print this message or the help of the given subcommand(s) Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where - network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, - warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be - used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the - oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: - 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync - more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use - of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex - value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to - override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - -h, --help Print help + -d, --datadir + Used to specify a custom root data directory for lighthouse + keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users + should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the + terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to + download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will + be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to + --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the + terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to + the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of + log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. + [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the + logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set + to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before + rotating. If set to 0, background file logging is disabled. + [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. + [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override + this parameter in the event of an attack at the PoS + transition block. Incorrect use of this flag can cause your + node to possibly accept an invalid chain or sync more slowly. + Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to + a hard-coded Lighthouse testnet. Only effective if there is + no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the + terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely + careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience + a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the + TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit + decimal integer (not a hex value). This flag should only be + used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with + this flag. + -h, --help + Print help Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited - from the parent folder. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. ``` diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 4c0f966f6e4..a590351eab9 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,87 +1,186 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other validator data. This file can then be imported to a validator -client using the "import-validators" command. Another, optional JSON file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" -tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be +created which contains all the validator keystores and other validator +data. This file can then be imported to a validator client using the +"import-validators" command. Another, optional JSON file is created +which contains a list of validator deposits in the same format as the +"ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: - --beacon-node A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any validator - key here is already known as a validator by that beacon node. This helps prevent the same validator being created twice and - therefore slashable conditions. - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: - true, false] - --count The number of validators to create, regardless of how many already exist - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where - network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, - warn, error, crit] - --deposit-gwei The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate - withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. - --first-index The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this - flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be - used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the - oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --mnemonic-path If present, the mnemonic will be read in from this file. - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] - --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if - it does not exist. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible - values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync - more slowly. Be extremely careful with this flag. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the - VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex - value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to - override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - -h, --help Print help + --beacon-node + A HTTP(S) address of a beacon node using the beacon-API. If + this value is provided, an error will be raised if any + validator key here is already known as a validator by that + beacon node. This helps prevent the same validator being + created twice and therefore slashable conditions. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to + the builder's payload value when choosing between a builder + payload header and payload from the local execution node. + --builder-proposals + When provided, all created validators will attempt to create + blocks via builder rather than the local EL. [possible + values: true, false] + --count + The number of validators to create, regardless of how many + already exist + -d, --datadir + Used to specify a custom root data directory for lighthouse + keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users + should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the + terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --deposit-gwei + The GWEI value of the deposit amount. Defaults to the minimum + amount required for an active validator + (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address + If this field is set, the given eth1 address will be used to + create the withdrawal credentials. Otherwise, it will + generate withdrawal credentials with the mnemonic-derived + withdrawal public key in EIP-2334 format. + --first-index + The first of consecutive key indexes you wish to create. + [default: 0] + --gas-limit + All created validators will use this gas limit. It is + recommended to leave this as the default value by not + specifying this flag. + --genesis-state-url + A URL of a beacon-API compatible server from which to + download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will + be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to + --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the + terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to + the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of + log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. + [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the + logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set + to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before + rotating. If set to 0, background file logging is disabled. + [default: 200] + --mnemonic-path + If present, the mnemonic will be read in from this file. + --network + Name of the Eth2 chain Lighthouse will sync and follow. + [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --output-path + The path to a directory where the validator and (optionally) + deposits files will be created. The directory will be created + if it does not exist. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks + constructed by builders, regardless of payload value. + [possible values: true, false] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override + this parameter in the event of an attack at the PoS + transition block. Incorrect use of this flag can cause your + node to possibly accept an invalid chain or sync more slowly. + Be extremely careful with this flag. + --suggested-fee-recipient + All created validators will use this value for the suggested + fee recipient. Omit this flag to use the default value from + the VC. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to + a hard-coded Lighthouse testnet. Only effective if there is + no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the + terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely + careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience + a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the + TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit + decimal integer (not a hex value). This flag should only be + used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with + this flag. + -h, --help + Print help Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting validator deposits via a web UI. Using this flag will - save several seconds per validator if the user has an alternate strategy for submitting deposits. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not recommended. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be used to encrypt the voting keystores. If this flag is - not provided, a random password will be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed - up. - --stdin-inputs If present, read all user inputs from stdin instead of tty. + --disable-deposits + When provided don't generate the deposits JSON file that is + commonly used for submitting validator deposits via a web UI. + Using this flag will save several seconds per validator if + the user has an alternate strategy for submitting deposits. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + --force-bls-withdrawal-credentials + If present, allows BLS withdrawal credentials rather than an + execution address. This is not recommended. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. + --specify-voting-keystore-password + If present, the user will be prompted to enter the voting + keystore password that will be used to encrypt the voting + keystores. If this flag is not provided, a random password + will be used. It is not necessary to keep backups of voting + keystore passwords if the mnemonic is safely backed up. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. ``` diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 06288056b45..7e021c2a45c 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,65 +1,139 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. +Uploads validators to a validator client using the HTTP API. The +validators are defined in a JSON file which can be generated using the +"create-validators" command. Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where - network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, - warn, error, crit] - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be - used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the - oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: - 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync - more slowly. Be extremely careful with this flag. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use - of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex - value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to - override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - --validators-file The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named - "validators.json". - --vc-token The file containing a token required by the validator client. - --vc-url A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be - conducted where no changes are made to the validator client. [default: http://localhost:5062] - -h, --help Print help + -d, --datadir + Used to specify a custom root data directory for lighthouse + keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users + should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the + terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to + download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will + be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to + --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the + terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to + the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of + log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. + [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the + logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set + to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before + rotating. If set to 0, background file logging is disabled. + [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. + [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override + this parameter in the event of an attack at the PoS + transition block. Incorrect use of this flag can cause your + node to possibly accept an invalid chain or sync more slowly. + Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to + a hard-coded Lighthouse testnet. Only effective if there is + no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the + terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely + careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience + a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the + TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit + decimal integer (not a hex value). This flag should only be + used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with + this flag. + --validators-file + The path to a JSON file containing a list of validators to be + imported to the validator client. This file is usually named + "validators.json". + --vc-token + The file containing a token required by the validator client. + --vc-url + A HTTP(S) address of a validator client using the + keymanager-API. If this value is not supplied then a 'dry + run' will be conducted where no changes are made to the + validator client. [default: http://localhost:5062] + -h, --help + Print help Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process will terminate without making any changes. This flag - should be used with caution, whilst it does not directly cause slashable conditions, it might be an indicator that something is amiss. Users should - also be careful to avoid submitting duplicate deposits for validators that already exist on the VC. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited - from the parent folder. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + --ignore-duplicates + If present, ignore any validators which already exist on the + VC. Without this flag, the process will terminate without + making any changes. This flag should be used with caution, + whilst it does not directly cause slashable conditions, it + might be an indicator that something is amiss. Users should + also be careful to avoid submitting duplicate deposits for + validators that already exist on the VC. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. ``` diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 53937662179..66cb1e7afbe 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,77 +1,164 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using the "create-validators" command. This command only -supports validators signing via a keystore on the local file system (i.e., not Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The +validators are defined in a JSON file which can be generated using the +"create-validators" command. This command only supports validators +signing via a keystore on the local file system (i.e., not Web3Signer +validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: - --builder-boost-factor Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. - --builder-proposals When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: - true, false] - --count The number of validators to move. - -d, --datadir Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} where - network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. - --debug-level Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, - warn, error, crit] - --dest-vc-token The file containing a token required by the destination validator client. - --dest-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have new - validators added as they are removed from the "source" validator client. - --gas-limit All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this - flag. - --genesis-state-url A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally be - used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is already - included in this binary then this value will be ignored. - --genesis-state-url-timeout The timeout in seconds for the request to --genesis-state-url. [default: 180] - --log-format Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - --logfile File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` the - oldest log file will be overwritten. - --logfile-debug-level The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] - --logfile-format Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - --logfile-max-number The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] - --logfile-max-size The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] - --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible - values: true, false] - --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if the - user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain or sync - more slowly. Be extremely careful with this flag. - --src-vc-token The file containing a token required by the source validator client. - --src-vc-url A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the - validators that are to be moved. - --stdin-inputs If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the - VC. - -t, --testnet-dir Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. - --terminal-block-hash-epoch-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-block-hash-override Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. - --terminal-total-difficulty-override Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a hex - value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has elected to - override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus failure. Be - extremely careful with this flag. - --validators The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". - -h, --help Print help + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to + the builder's payload value when choosing between a builder + payload header and payload from the local execution node. + --builder-proposals + When provided, all created validators will attempt to create + blocks via builder rather than the local EL. [possible + values: true, false] + --count + The number of validators to move. + -d, --datadir + Used to specify a custom root data directory for lighthouse + keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users + should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the + terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --dest-vc-token + The file containing a token required by the destination + validator client. + --dest-vc-url + A HTTP(S) address of a validator client using the + keymanager-API. This validator client is the "destination" + and will have new validators added as they are removed from + the "source" validator client. + --gas-limit + All created validators will use this gas limit. It is + recommended to leave this as the default value by not + specifying this flag. + --genesis-state-url + A URL of a beacon-API compatible server from which to + download the genesis state. Checkpoint sync server URLs can + generally be used with this flag. If not supplied, a default + URL or the --checkpoint-sync-url may be used. If the genesis + state is already included in this binary then this value will + be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to + --genesis-state-url. [default: 180] + --log-format + Specifies the log format used when emitting logs to the + terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to + the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of + log files exceeds the value specified in + `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. + [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the + logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set + to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before + rotating. If set to 0, background file logging is disabled. + [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. + [possible values: mainnet, prater, goerli, gnosis, chiado, + sepolia, holesky] + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks + constructed by builders, regardless of payload value. + [possible values: true, false] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override + this parameter in the event of an attack at the PoS + transition block. Incorrect use of this flag can cause your + node to possibly accept an invalid chain or sync more slowly. + Be extremely careful with this flag. + --src-vc-token + The file containing a token required by the source validator + client. + --src-vc-url + A HTTP(S) address of a validator client using the + keymanager-API. This validator client is the "source" and + contains the validators that are to be moved. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. + --suggested-fee-recipient + All created validators will use this value for the suggested + fee recipient. Omit this flag to use the default value from + the VC. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to + a hard-coded Lighthouse testnet. Only effective if there is + no existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag + should only be used if the user has a clear understanding + that the broad Ethereum community has elected to override the + terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely + careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH parameter. This flag should only be used + if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience + a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the + TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit + decimal integer (not a hex value). This flag should only be + used if the user has a clear understanding that the broad + Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node + to experience a consensus failure. Be extremely careful with + this flag. + --validators + The validators to be moved. Either a list of 0x-prefixed + validator pubkeys or the keyword "all". + -h, --help + Print help Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase memory usage, it should only be provided when debugging - specific memory allocation issues. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user on the machine. Note that logs can often contain - sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited - from the parent folder. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing + this flag will generally increase memory usage, it should + only be provided when debugging specific memory allocation + issues. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the + space needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable + meaning they can be read by any user on the machine. Note + that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For + Windows users, the log file permissions will be inherited + from the parent folder. ``` From 0a624c93d6eadd2799d632e3b05635ffe273eb94 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 12 Apr 2024 10:35:46 +0300 Subject: [PATCH 28/46] merge conflicts --- beacon_node/src/cli.rs | 5 +- beacon_node/src/config.rs | 2 +- book/src/help_bn.md | 3574 +++++------------------------------- book/src/help_general.md | 176 +- book/src/help_vc.md | 1485 ++------------- book/src/help_vm.md | 155 +- book/src/help_vm_create.md | 213 +-- book/src/help_vm_import.md | 156 +- book/src/help_vm_move.md | 178 +- 9 files changed, 905 insertions(+), 5039 deletions(-) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 6bd1d19974c..fabaa9af387 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -482,8 +482,7 @@ pub fn cli_app() -> Command { .requires("enable_http") .value_name("FORK") .help("This flag is deprecated and has no effect.") - .takes_value(true) - .hidden(true) + .hide(true) .action(ArgAction::Set) .display_order(0) ) @@ -523,7 +522,7 @@ pub fn cli_app() -> Command { .help_heading(FLAG_HEADER) .requires("enable_http") .help("This flag is deprecated and has no effect.") - .hidden(true) + .hide(true) .display_order(0) ) .arg( diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index f015d2a9d5b..f37615e6d00 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -128,7 +128,7 @@ pub fn get_config( client_config.http_api.allow_origin = Some(allow_origin.to_string()); } - if cli_args.is_present("http-spec-fork") { + if cli_args.get_one::("http-spec-fork").is_some() { warn!( log, "Ignoring --http-spec-fork"; diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 1cd82d73cb7..5cb823e8862 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,3167 +1,425 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network -and downloads, verifies and stores blocks. Provides a HTTP API for -querying the beacon chain and publishing messages to the network. +The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API +for querying the beacon chain and publishing messages to the network. Usage: lighthouse beacon_node [OPTIONS] Options: - --auto-compact-db Enable - or - disable - automatic - compaction - of - the - database - on - finalization. - [default: - true] - --blob-prune-margin-epochs The - margin - for - blob - pruning - in - epochs. - The - oldest - blobs - are - pruned - up - until - data_availability_boundary - - - blob_prune_margin_epochs. - [default: - 0] - --blobs-dir Data - directory - for - the - blobs - database. - --block-cache-size Specifies - how - many - blocks - the - database - should - cache - in - memory - [default: - 5] - --boot-nodes One - or - more - comma-delimited - base64-encoded - ENR's - to - bootstrap - the - p2p - network. - Multiaddr - is - also - supported. - --builder The - URL - of - a - service - compatible - with - the - MEV-boost - API. - --builder-fallback-epochs-since-finalization If - this - node - is - proposing - a - block - and - the - chain - has - not - finalized - within - this - number - of - epochs, - it - will - NOT - query - any - connected - builders, - and - will - use - the - local - execution - engine - for - payload - construction. - Setting - this - value - to - anything - less - than - 2 - will - cause - the - node - to - NEVER - query - connected - builders. - Setting - it - to - 2 - will - cause - this - condition - to - be - hit - if - there - are - skips - slots - at - the - start - of - an - epoch, - right - before - this - node - is - set - to - propose. - [default: - 3] - --builder-fallback-skips If - this - node - is - proposing - a - block - and - has - seen - this - number - of - skip - slots - on - the - canonical - chain - in - a - row, - it - will - NOT - query - any - connected - builders, - and - will - use - the - local - execution - engine - for - payload - construction. - [default: - 3] - --builder-fallback-skips-per-epoch If - this - node - is - proposing - a - block - and - has - seen - this - number - of - skip - slots - on - the - canonical - chain - in - the - past - `SLOTS_PER_EPOCH`, - it - will - NOT - query - any - connected - builders, - and - will - use - the - local - execution - engine - for - payload - construction. - [default: - 8] - --builder-profit-threshold This - flag - is - deprecated - and - has - no - effect. - --builder-user-agent The - HTTP - user - agent - to - send - alongside - requests - to - the - builder - URL. - The - default - is - Lighthouse's - version - string. - --checkpoint-blobs Set - the - checkpoint - blobs - to - start - syncing - from. - Must - be - aligned - and - match - --checkpoint-block. - Using - --checkpoint-sync-url - instead - is - recommended. - --checkpoint-block Set - a - checkpoint - block - to - start - syncing - from. - Must - be - aligned - and - match - --checkpoint-state. - Using - --checkpoint-sync-url - instead - is - recommended. - --checkpoint-state Set - a - checkpoint - state - to - start - syncing - from. - Must - be - aligned - and - match - --checkpoint-block. - Using - --checkpoint-sync-url - instead - is - recommended. - --checkpoint-sync-url Set - the - remote - beacon - node - HTTP - endpoint - to - use - for - checkpoint - sync. - --checkpoint-sync-url-timeout Set - the - timeout - for - checkpoint - sync - calls - to - remote - beacon - node - HTTP - endpoint. - [default: - 180] - -d, --datadir Used - to - specify - a - custom - root - data - directory - for - lighthouse - keys - and - databases. - Defaults - to - $HOME/.lighthouse/{network} - where - network - is - the - value - of - the - `network` - flag - Note: - Users - should - specify - separate - custom - datadirs - for - different - networks. - --debug-level Specifies - the - verbosity - level - used - when - emitting - logs - to - the - terminal. - [default: - info] - [possible - values: - info, - debug, - trace, - warn, - error, - crit] - --discovery-port The - UDP - port - that - discovery - will - listen - on. - Defaults - to - `port` - --discovery-port6 The - UDP - port - that - discovery - will - listen - on - over - IPv6 - if - listening - over - both - IPv4 - and - IPv6. - Defaults - to - `port6` - --enr-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 - to - the - IP - address - it - resolves - to - and - does - not - auto-update - based - on - PONG - responses - in - discovery. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - address. - This - will - update - the - `ip4` - or - `ip6` - ENR - fields - accordingly. - To - update - both, - set - this - flag - twice - with - the - different - values. - --enr-quic-port The - quic - UDP4 - port - that - will - be - set - on - the - local - ENR. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - port - over - IPv4. - --enr-quic6-port The - quic - UDP6 - port - that - will - be - set - on - the - local - ENR. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - port - over - IPv6. - --enr-tcp-port The - TCP4 - port - of - the - local - ENR. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - port - over - IPv4. - The - --port - flag - is - used - if - this - is - not - set. - --enr-tcp6-port The - TCP6 - port - of - the - local - ENR. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - port - over - IPv6. - The - --port6 - flag - is - used - if - this - is - not - set. - --enr-udp-port The - UDP4 - port - of - the - local - ENR. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - port - over - IPv4. - --enr-udp6-port The - UDP6 - port - of - the - local - ENR. - Set - this - only - if - you - are - sure - other - nodes - can - connect - to - your - local - node - on - this - port - over - IPv6. - --epochs-per-blob-prune The - epoch - interval - with - which - to - prune - blobs - from - Lighthouse's - database - when - they - are - older - than - the - data - availability - boundary - relative - to - the - current - epoch. - [default: - 1] - --epochs-per-migration The - number - of - epochs - to - wait - between - running - the - migration - of - data - from - the - hot - DB - to - the - cold - DB. - Less - frequent - runs - can - be - useful - for - minimizing - disk - writes - [default: - 1] - --eth1-blocks-per-log-query Specifies - the - number - of - blocks - that - a - deposit - log - query - should - span. - This - will - reduce - the - size - of - responses - from - the - Eth1 - endpoint. - [default: - 1000] - --eth1-cache-follow-distance Specifies - the - distance - between - the - Eth1 - chain - head - and - the - last - block - which - should - be - imported - into - the - cache. - Setting - this - value - lower - can - help - compensate - for - irregular - Proof-of-Work - block - times, - but - setting - it - too - low - can - make - the - node - vulnerable - to - re-orgs. - --execution-endpoint Server - endpoint - for - an - execution - layer - JWT-authenticated - HTTP - JSON-RPC - connection. - Uses - the - same - endpoint - to - populate - the - deposit - cache. - --execution-jwt File - path - which - contains - the - hex-encoded - JWT - secret - for - the - execution - endpoint - provided - in - the - --execution-endpoint - flag. - --execution-jwt-id Used - by - the - beacon - node - to - communicate - a - unique - identifier - to - execution - nodes - during - JWT - authentication. - It - corresponds - to - the - 'id' - field - in - the - JWT - claims - object.Set - to - empty - by - default - --execution-jwt-secret-key Hex-encoded - JWT - secret - for - the - execution - endpoint - provided - in - the - --execution-endpoint - flag. - --execution-jwt-version Used - by - the - beacon - node - to - communicate - a - client - version - to - execution - nodes - during - JWT - authentication. - It - corresponds - to - the - 'clv' - field - in - the - JWT - claims - object.Set - to - empty - by - default - --execution-timeout-multiplier Unsigned - integer - to - multiply - the - default - execution - timeouts - by. - [default: - 1] - --fork-choice-before-proposal-timeout Set - the - maximum - number - of - milliseconds - to - wait - for - fork - choice - before - proposing - a - block. - You - can - prevent - waiting - at - all - by - setting - the - timeout - to - 0, - however - you - risk - proposing - atop - the - wrong - parent - block. - [default: - 250] - --freezer-dir Data - directory - for - the - freezer - database. - --genesis-state-url A - URL - of - a - beacon-API - compatible - server - from - which - to - download - the - genesis - state. - Checkpoint - sync - server - URLs - can - generally - be - used - with - this - flag. - If - not - supplied, - a - default - URL - or - the - --checkpoint-sync-url - may - be - used. - If - the - genesis - state - is - already - included - in - this - binary - then - this - value - will - be - ignored. - --genesis-state-url-timeout The - timeout - in - seconds - for - the - request - to - --genesis-state-url. - [default: - 180] - --graffiti Specify - your - custom - graffiti - to - be - included - in - blocks. - Defaults - to - the - current - version - and - commit, - truncated - to - fit - in - 32 - bytes. - --historic-state-cache-size Specifies - how - many - states - from - the - freezer - database - should - cache - in - memory - [default: - 1] - --http-address
Set - the - listen - address - for - the - RESTful - HTTP - API - server. - --http-allow-origin Set - the - value - of - the - Access-Control-Allow-Origin - response - HTTP - header. - Use - * - to - allow - any - origin - (not - recommended - in - production). - If - no - value - is - supplied, - the - CORS - allowed - origin - is - set - to - the - listen - address - of - this - server - (e.g., - http://localhost:5052). - --http-duplicate-block-status Status - code - to - send - when - a - block - that - is - already - known - is - POSTed - to - the - HTTP - API. - --http-enable-beacon-processor The - beacon - processor - is - a - scheduler - which - provides - quality-of-service - and - DoS - protection. - When - set - to - "true", - HTTP - API - requests - will - be - queued - and - scheduled - alongside - other - tasks. - When - set - to - "false", - HTTP - API - responses - will - be - executed - immediately. - --http-port Set - the - listen - TCP - port - for - the - RESTful - HTTP - API - server. - --http-spec-fork Serve - the - spec - for - a - specific - hard - fork - on - /eth/v1/config/spec. - It - should - not - be - necessary - to - set - this - flag. - --http-sse-capacity-multiplier Multiplier - to - apply - to - the - length - of - HTTP - server-sent-event - (SSE) - channels. - Increasing - this - value - can - prevent - messages - from - being - dropped. - --http-tls-cert The - path - of - the - certificate - to - be - used - when - serving - the - HTTP - API - server - over - TLS. - --http-tls-key The - path - of - the - private - key - to - be - used - when - serving - the - HTTP - API - server - over - TLS. - Must - not - be - password-protected. - --inbound-rate-limiter-protocols Configures - the - inbound - rate - limiter - (requests - received - by - this - node).Rate - limit - quotas - per - protocol - can - be - set - in - the - form - of - :/. - To - set - quotas - for - multiple - protocols, - separate - them - by - ';'. - This - is - enabled - by - default, - using - default - quotas. - To - disable - rate - limiting - use - the - disable-inbound-rate-limiter - flag - instead. - --invalid-gossip-verified-blocks-path If - a - block - succeeds - gossip - validation - whilst - failing - full - validation, - store - the - block - SSZ - as - a - file - at - this - path. - This - feature - is - only - recommended - for - developers. - This - directory - is - not - pruned, - users - should - be - careful - to - avoid - filling - up - their - disks. - --libp2p-addresses One - or - more - comma-delimited - multiaddrs - to - manually - connect - to - a - libp2p - peer - without - an - ENR. - --listen-address [
...] The - address - lighthouse - will - listen - for - UDP - and - TCP - connections. - To - listen - over - IpV4 - and - IpV6 - set - this - flag - twice - with - the - different - values. - Examples: - - - --listen-address - '0.0.0.0' - will - listen - over - IPv4. - - - --listen-address - '::' - will - listen - over - IPv6. - - - --listen-address - '0.0.0.0' - --listen-address - '::' - will - listen - over - both - IPv4 - and - IPv6. - The - order - of - the - given - addresses - is - not - relevant. - However, - multiple - IPv4, - or - multiple - IPv6 - addresses - will - not - be - accepted. - [default: - 0.0.0.0] - --log-format Specifies - the - log - format - used - when - emitting - logs - to - the - terminal. - [possible - values: - JSON] - --logfile File - path - where - the - log - file - will - be - stored. - Once - it - grows - to - the - value - specified - in - `--logfile-max-size` - a - new - log - file - is - generated - where - future - logs - are - stored. - Once - the - number - of - log - files - exceeds - the - value - specified - in - `--logfile-max-number` - the - oldest - log - file - will - be - overwritten. - --logfile-debug-level The - verbosity - level - used - when - emitting - logs - to - the - log - file. - [default: - debug] - [possible - values: - info, - debug, - trace, - warn, - error, - crit] - --logfile-format Specifies - the - log - format - used - when - emitting - logs - to - the - logfile. - [possible - values: - DEFAULT, - JSON] - --logfile-max-number The - maximum - number - of - log - files - that - will - be - stored. - If - set - to - 0, - background - file - logging - is - disabled. - [default: - 5] - --logfile-max-size The - maximum - size - (in - MB) - each - log - file - can - grow - to - before - rotating. - If - set - to - 0, - background - file - logging - is - disabled. - [default: - 200] - --max-skip-slots Refuse - to - skip - more - than - this - many - slots - when - processing - an - attestation. - This - prevents - nodes - on - minority - forks - from - wasting - our - time - and - disk - space, - but - could - also - cause - unnecessary - consensus - failures, - so - is - disabled - by - default. - --metrics-address
Set - the - listen - address - for - the - Prometheus - metrics - HTTP - server. - --metrics-allow-origin Set - the - value - of - the - Access-Control-Allow-Origin - response - HTTP - header. - Use - * - to - allow - any - origin - (not - recommended - in - production). - If - no - value - is - supplied, - the - CORS - allowed - origin - is - set - to - the - listen - address - of - this - server - (e.g., - http://localhost:5054). - --metrics-port Set - the - listen - TCP - port - for - the - Prometheus - metrics - HTTP - server. - --monitoring-endpoint
Enables - the - monitoring - service - for - sending - system - metrics - to - a - remote - endpoint. - This - can - be - used - to - monitor - your - setup - on - certain - services - (e.g. - beaconcha.in). - This - flag - sets - the - endpoint - where - the - beacon - node - metrics - will - be - sent. - Note: - This - will - send - information - to - a - remote - sever - which - may - identify - and - associate - your - validators, - IP - address - and - other - personal - information. - Always - use - a - HTTPS - connection - and - never - provide - an - untrusted - URL. - --monitoring-endpoint-period Defines - how - many - seconds - to - wait - between - each - message - sent - to - the - monitoring-endpoint. - Default: - 60s - --network Name - of - the - Eth2 - chain - Lighthouse - will - sync - and - follow. - [possible - values: - mainnet, - prater, - goerli, - gnosis, - chiado, - sepolia, - holesky] - --network-dir Data - directory - for - network - keys. - Defaults - to - network/ - inside - the - beacon - node - dir. - --port The - TCP/UDP - ports - to - listen - on. - There - are - two - UDP - ports. - The - discovery - UDP - port - will - be - set - to - this - value - and - the - Quic - UDP - port - will - be - set - to - this - value - + - 1. - The - discovery - port - can - be - modified - by - the - --discovery-port - flag - and - the - quic - port - can - be - modified - by - the - --quic-port - flag. - If - listening - over - both - IPv4 - and - IPv6 - the - --port - flag - will - apply - to - the - IPv4 - address - and - --port6 - to - the - IPv6 - address. - [default: - 9000] - --port6 The - TCP/UDP - ports - to - listen - on - over - IPv6 - when - listening - over - both - IPv4 - and - IPv6. - Defaults - to - 9090 - when - required. - The - Quic - UDP - port - will - be - set - to - this - value - + - 1. - [default: - 9090] - --prepare-payload-lookahead The - time - before - the - start - of - a - proposal - slot - at - which - payload - attributes - should - be - sent. - Low - values - are - useful - for - execution - nodes - which - don't - improve - their - payload - after - the - first - call, - and - high - values - are - useful - for - ensuring - the - EL - is - given - ample - notice. - Default: - 1/3 - of - a - slot. - --progressive-balances Deprecated. - This - optimisation - is - now - the - default - and - cannot - be - disabled. - --proposer-reorg-cutoff Maximum - delay - after - the - start - of - the - slot - at - which - to - propose - a - reorging - block. - Lower - values - can - prevent - failed - reorgs - by - ensuring - the - block - has - ample - time - to - propagate - and - be - processed - by - the - network. - The - default - is - 1/12th - of - a - slot - (1 - second - on - mainnet) - --proposer-reorg-disallowed-offsets Comma-separated - list - of - integer - offsets - which - can - be - used - to - avoid - proposing - reorging - blocks - at - certain - slots. - An - offset - of - N - means - that - reorging - proposals - will - not - be - attempted - at - any - slot - such - that - `slot - % - SLOTS_PER_EPOCH - == - N`. - By - default - only - re-orgs - at - offset - 0 - will - be - avoided. - Any - offsets - supplied - with - this - flag - will - impose - additional - restrictions. - --proposer-reorg-epochs-since-finalization Maximum - number - of - epochs - since - finalization - at - which - proposer - reorgs - are - allowed. - Default: - 2 - --proposer-reorg-parent-threshold Percentage - of - parent - vote - weight - above - which - to - attempt - a - proposer - reorg. - Default: - 160% - --proposer-reorg-threshold Percentage - of - head - vote - weight - below - which - to - attempt - a - proposer - reorg. - Default: - 20% - --prune-blobs Prune - blobs - from - Lighthouse's - database - when - they - are - older - than - the - data - data - availability - boundary - relative - to - the - current - epoch. - [default: - true] - --prune-payloads Prune - execution - payloads - from - Lighthouse's - database. - This - saves - space - but - imposes - load - on - the - execution - client, - as - payloads - need - to - be - reconstructed - and - sent - to - syncing - peers. - [default: - true] - --quic-port The - UDP - port - that - quic - will - listen - on. - Defaults - to - `port` - + - 1 - --quic-port6 The - UDP - port - that - quic - will - listen - on - over - IPv6 - if - listening - over - both - IPv4 - and - IPv6. - Defaults - to - `port6` - + - 1 - --safe-slots-to-import-optimistically Used - to - coordinate - manual - overrides - of - the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY - parameter. - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - this - parameter - in - the - event - of - an - attack - at - the - PoS - transition - block. - Incorrect - use - of - this - flag - can - cause - your - node - to - possibly - accept - an - invalid - chain - or - sync - more - slowly. - Be - extremely - careful - with - this - flag. - --self-limiter-protocols Enables - the - outbound - rate - limiter - (requests - made - by - this - node).Rate - limit - quotas - per - protocol - can - be - set - in - the - form - of - :/. - To - set - quotas - for - multiple - protocols, - separate - them - by - ';'. - If - the - self - rate - limiter - is - enabled - and - a - protocol - is - not - present - in - the - configuration, - the - quotas - used - for - the - inbound - rate - limiter - will - be - used. - --shuffling-cache-size Some - HTTP - API - requests - can - be - optimised - by - caching - the - shufflings - at - each - epoch. - This - flag - allows - the - user - to - set - the - shuffling - cache - size - in - epochs. - Shufflings - are - dependent - on - validator - count - and - setting - this - value - to - a - large - number - can - consume - a - large - amount - of - memory. - --slasher-att-cache-size Set - the - maximum - number - of - attestation - roots - for - the - slasher - to - cache - --slasher-backend Set - the - database - backend - to - be - used - by - the - slasher. - [possible - values: - lmdb, - disabled] - --slasher-broadcast Broadcast - slashings - found - by - the - slasher - to - the - rest - of - the - network - [Enabled - by - default]. - [default: - true] - --slasher-chunk-size Number - of - epochs - per - validator - per - chunk - stored - on - disk. - --slasher-dir Set - the - slasher's - database - directory. - --slasher-history-length Configure - how - many - epochs - of - history - the - slasher - keeps. - Immutable - after - initialization. - --slasher-max-db-size Maximum - size - of - the - MDBX - database - used - by - the - slasher. - --slasher-slot-offset Set - the - delay - from - the - start - of - the - slot - at - which - the - slasher - should - ingest - attestations. - Only - effective - if - the - slasher-update-period - is - a - multiple - of - the - slot - duration. - --slasher-update-period Configure - how - often - the - slasher - runs - batch - processing. - --slasher-validator-chunk-size Number - of - validators - per - chunk - stored - on - disk. - --slots-per-restore-point Specifies - how - often - a - freezer - DB - restore - point - should - be - stored. - Cannot - be - changed - after - initialization. - [default: - 8192 - (mainnet) - or - 64 - (minimal)] - --state-cache-size Specifies - the - size - of - the - snapshot - cache - [default: - 3] - --suggested-fee-recipient Emergency - fallback - fee - recipient - for - use - in - case - the - validator - client - does - not - have - one - configured. - You - should - set - this - flag - on - the - validator - client - instead - of - (or - in - addition - to) - setting - it - here. - -t, --testnet-dir Path - to - directory - containing - eth2_testnet - specs. - Defaults - to - a - hard-coded - Lighthouse - testnet. - Only - effective - if - there - is - no - existing - database. - --target-peers The - target - number - of - peers. - --terminal-block-hash-epoch-override Used - to - coordinate - manual - overrides - to - the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH - parameter. - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - the - terminal - PoW - block. - Incorrect - use - of - this - flag - will - cause - your - node - to - experience - a - consensus - failure. - Be - extremely - careful - with - this - flag. - --terminal-block-hash-override Used - to - coordinate - manual - overrides - to - the - TERMINAL_BLOCK_HASH - parameter. - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - the - terminal - PoW - block. - Incorrect - use - of - this - flag - will - cause - your - node - to - experience - a - consensus - failure. - Be - extremely - careful - with - this - flag. - --terminal-total-difficulty-override Used - to - coordinate - manual - overrides - to - the - TERMINAL_TOTAL_DIFFICULTY - parameter. - Accepts - a - 256-bit - decimal - integer - (not - a - hex - value). - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - the - terminal - difficulty. - Incorrect - use - of - this - flag - will - cause - your - node - to - experience - a - consensus - failure. - Be - extremely - careful - with - this - flag. - --trusted-peers One - or - more - comma-delimited - trusted - peer - ids - which - always - have - the - highest - score - according - to - the - peer - scoring - system. - --trusted-setup-file-override Path - to - a - json - file - containing - the - trusted - setup - params. - NOTE: - This - will - override - the - trusted - setup - that - is - generated - from - the - mainnet - kzg - ceremony. - Use - with - caution - --validator-monitor-file As - per - --validator-monitor-pubkeys, - but - the - comma-separated - list - is - contained - within - a - file - at - the - given - path. - --validator-monitor-individual-tracking-threshold Once - the - validator - monitor - reaches - this - number - of - local - validators - it - will - stop - collecting - per-validator - Prometheus - metrics - and - issuing - per-validator - logs. - Instead, - it - will - provide - aggregate - metrics - and - logs. - This - avoids - infeasibly - high - cardinality - in - the - Prometheus - database - and - high - log - volume - when - using - many - validators. - Defaults - to - 64. - --validator-monitor-pubkeys A - comma-separated - list - of - 0x-prefixed - validator - public - keys. - These - validators - will - receive - special - monitoring - and - additional - logging. - --wss-checkpoint Specify - a - weak - subjectivity - checkpoint - in - `block_root:epoch` - format - to - verify - the - node's - sync - against. - The - block - root - should - be - 0x-prefixed. - Note - that - this - flag - is - for - verification - only, - to - perform - a - checkpoint - sync - from - a - recent - state - use - --checkpoint-sync-url. - -h, --help Print - help - -V, --version Print - version + --auto-compact-db + Enable or disable automatic compaction of the database on finalization. [default: true] + --blob-prune-margin-epochs + The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - + blob_prune_margin_epochs. [default: 0] + --blobs-dir + Data directory for the blobs database. + --block-cache-size + Specifies how many blocks the database should cache in memory [default: 5] + --boot-nodes + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. + --builder + The URL of a service compatible with the MEV-boost API. + --builder-fallback-epochs-since-finalization + If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any + connected builders, and will use the local execution engine for payload construction. Setting this value to anything less + than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if there + are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] + --builder-fallback-skips + If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query + any connected builders, and will use the local execution engine for payload construction. [default: 3] + --builder-fallback-skips-per-epoch + If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past + `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution engine for payload + construction. [default: 8] + --builder-profit-threshold + This flag is deprecated and has no effect. + --builder-user-agent + The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. + --checkpoint-blobs + Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url + instead is recommended. + --checkpoint-block + Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url + instead is recommended. + --checkpoint-state + Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url + instead is recommended. + --checkpoint-sync-url + Set the remote beacon node HTTP endpoint to use for checkpoint sync. + --checkpoint-sync-url-timeout + Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --discovery-port + The UDP port that discovery will listen on. Defaults to `port` + --discovery-port6 + The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + --enr-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 to the IP address it resolves to and does not auto-update based on PONG responses in discovery. Set this + only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR + fields accordingly. To update both, set this flag twice with the different values. + --enr-quic-port + The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local + node on this port over IPv4. + --enr-quic6-port + The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local + node on this port over IPv6. + --enr-tcp-port + The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over + IPv4. The --port flag is used if this is not set. + --enr-tcp6-port + The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over + IPv6. The --port6 flag is used if this is not set. + --enr-udp-port + The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over + IPv4. + --enr-udp6-port + The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over + IPv6. + --epochs-per-blob-prune + The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability + boundary relative to the current epoch. [default: 1] + --epochs-per-migration + The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can + be useful for minimizing disk writes [default: 1] + --eth1-blocks-per-log-query + Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 + endpoint. [default: 1000] + --eth1-cache-follow-distance + Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this + value lower can help compensate for irregular Proof-of-Work block times, but setting it too low can make the node + vulnerable to re-orgs. + --execution-endpoint + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the + deposit cache. + --execution-jwt + File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + --execution-jwt-id + Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to + the 'id' field in the JWT claims object.Set to empty by default + --execution-jwt-secret-key + Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + --execution-jwt-version + Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the + 'clv' field in the JWT claims object.Set to empty by default + --execution-timeout-multiplier + Unsigned integer to multiply the default execution timeouts by. [default: 1] + --fork-choice-before-proposal-timeout + Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by + setting the timeout to 0, however you risk proposing atop the wrong parent block. [default: 250] + --freezer-dir + Data directory for the freezer database. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 + bytes. + --historic-state-cache-size + Specifies how many states from the freezer database should cache in memory [default: 1] + --http-address
+ Set the listen address for the RESTful HTTP API server. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5052). + --http-duplicate-block-status + Status code to send when a block that is already known is POSTed to the HTTP API. + --http-enable-beacon-processor + The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API + requests will be queued and scheduled alongside other tasks. When set to "false", HTTP API responses will be executed + immediately. + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --http-sse-capacity-multiplier + Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from + being dropped. + --http-tls-cert + The path of the certificate to be used when serving the HTTP API server over TLS. + --http-tls-key + The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. + --inbound-rate-limiter-protocols + Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form + of :/. To set quotas for multiple protocols, separate them by ';'. This is enabled + by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + --invalid-gossip-verified-blocks-path + If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This + feature is only recommended for developers. This directory is not pruned, users should be careful to avoid filling up their + disks. + --libp2p-addresses + One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. + --listen-address [
...] + The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the + different values. + Examples: + - --listen-address '0.0.0.0' will listen over IPv4. + - --listen-address '::' will listen over IPv6. + - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is + not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] + --max-skip-slots + Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting + our time and disk space, but could also cause unnecessary consensus failures, so is disabled by default. + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5054). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on + certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This + will send information to a remote sever which may identify and associate your validators, IP address and other personal + information. Always use a HTTPS connection and never provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --network-dir + Data directory for network keys. Defaults to network/ inside the beacon node dir. + --port + The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP + port will be set to this value + 1. The discovery port can be modified by the --discovery-port flag and the quic port can + be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 address + and --port6 to the IPv6 address. [default: 9000] + --port6 + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic + UDP port will be set to this value + 1. [default: 9090] + --prepare-payload-lookahead + The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for + execution nodes which don't improve their payload after the first call, and high values are useful for ensuring the EL is + given ample notice. Default: 1/3 of a slot. + --progressive-balances + Deprecated. This optimisation is now the default and cannot be disabled. + --proposer-reorg-cutoff + Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by + ensuring the block has ample time to propagate and be processed by the network. The default is 1/12th of a slot (1 second + on mainnet) + --proposer-reorg-disallowed-offsets + Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of + N means that reorging proposals will not be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only + re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + --proposer-reorg-epochs-since-finalization + Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 + --proposer-reorg-parent-threshold + Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% + --proposer-reorg-threshold + Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% + --prune-blobs + Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current + epoch. [default: true] + --prune-payloads + Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads + need to be reconstructed and sent to syncing peers. [default: true] + --quic-port + The UDP port that quic will listen on. Defaults to `port` + 1 + --quic-port6 + The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. + --self-limiter-protocols + Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of + :/. To set quotas for multiple protocols, separate them by ';'. If the self rate + limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be + used. + --shuffling-cache-size + Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the + shuffling cache size in epochs. Shufflings are dependent on validator count and setting this value to a large number can + consume a large amount of memory. + --slasher-att-cache-size + Set the maximum number of attestation roots for the slasher to cache + --slasher-backend + Set the database backend to be used by the slasher. [possible values: lmdb, disabled] + --slasher-broadcast + Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] + --slasher-chunk-size + Number of epochs per validator per chunk stored on disk. + --slasher-dir + Set the slasher's database directory. + --slasher-history-length + Configure how many epochs of history the slasher keeps. Immutable after initialization. + --slasher-max-db-size + Maximum size of the MDBX database used by the slasher. + --slasher-slot-offset + Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the + slasher-update-period is a multiple of the slot duration. + --slasher-update-period + Configure how often the slasher runs batch processing. + --slasher-validator-chunk-size + Number of validators per chunk stored on disk. + --slots-per-restore-point + Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 + (mainnet) or 64 (minimal)] + --state-cache-size + Specifies the size of the snapshot cache [default: 3] + --suggested-fee-recipient + Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this + flag on the validator client instead of (or in addition to) setting it here. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --target-peers + The target number of peers. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --trusted-peers + One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. + --trusted-setup-file-override + Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from + the mainnet kzg ceremony. Use with caution + --validator-monitor-file + As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. + --validator-monitor-individual-tracking-threshold + Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics + and issuing per-validator logs. Instead, it will provide aggregate metrics and logs. This avoids infeasibly high + cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + --validator-monitor-pubkeys + A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and + additional logging. + --wss-checkpoint + Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root + should be 0x-prefixed. Note that this flag is for verification only, to perform a checkpoint sync from a recent state use + --checkpoint-sync-url. + -h, --help + Print help + -V, --version + Print version Flags: - --allow-insecure-genesis-sync - Enable syncing from genesis, which is generally insecure and - incompatible with data availability checks. Checkpoint - syncing is the preferred method for syncing a node. Only use - this flag when testing. DO NOT use on mainnet! - --always-prefer-builder-payload - This flag is deprecated and has no effect. - --always-prepare-payload - Send payload attributes with every fork choice update. This - is intended for use by block builders, relays and developers. - You should set a fee recipient on this BN and also consider - adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks - This flag disables all checks related to chain health. This - means the builder API will always be used for payload - construction, regardless of recent chain conditions. - --compact-db - If present, apply compaction to the database on start-up. Use - with caution. It is generally not recommended unless - auto-compaction is disabled. - --disable-backfill-rate-limiting - Disable the backfill sync rate-limiting. This allow users to - just sync the entire chain as fast as possible, however it - can result in resource contention which degrades staking - performance. Stakers should generally choose to avoid this - flag since backfill sync is not required for staking. - --disable-deposit-contract-sync - Explicitly disables syncing of deposit logs from the - execution node. This overrides any previous option that - depends on it. Useful if you intend to run a non-validating - beacon node. - --disable-duplicate-warn-logs - This flag is deprecated and has no effect. - --disable-enr-auto-update - Discovery automatically updates the nodes local ENR with an - external IP address and port as seen by other peers on the - network. This disables this feature, fixing the ENR's IP/PORT - to those specified on boot. - --disable-inbound-rate-limiter - Disables the inbound rate limiter (requests received by this - node). - --disable-lock-timeouts - Disable the timeouts applied to some internal locks by - default. This can lead to less spurious failures on slow - hardware but is considered experimental as it may obscure - performance issues. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - --disable-optimistic-finalized-sync - Force Lighthouse to verify every execution block hash with - the execution client during finalized sync. By default block - hashes will be checked in Lighthouse and only passed to the - EL if initial verification fails. - --disable-packet-filter - Disables the discovery packet filter. Useful for testing in - smaller networks - --disable-proposer-reorgs - Do not attempt to reorg late blocks from other validators - when proposing. - --disable-quic - Disables the quic transport. The node will rely solely on the - TCP transport for libp2p connections. - --disable-upnp - Disables UPnP support. Setting this will prevent Lighthouse - from attempting to automatically establish external port - mappings. - --dummy-eth1 - If present, uses an eth1 backend that generates static dummy - data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match - 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-private-discovery - Lighthouse by default does not discover private IP addresses. - Set this flag to enable connection attempts to local - addresses. - --eth1 - If present the node will connect to an eth1 node. This is - required for block production, you must use this flag if you - wish to serve a validator. - --eth1-purge-cache - Purges the eth1 block and deposit caches - --genesis-backfill - Attempts to download blocks all the way back to genesis when - checkpoint syncing. - --gui - Enable the graphical user interface and all its requirements. - This enables --http and --validator-monitor-auto and enables - SSE logging. - --http - Enable the RESTful HTTP API server. Disabled by default. - --http-allow-sync-stalled - Forces the HTTP to indicate that the node is synced when sync - is actually stalled. This is useful for very small testnets. - TESTING ONLY. DO NOT USE ON MAINNET. - --http-enable-tls - Serves the RESTful HTTP API server over TLS. This feature is - currently experimental. - --import-all-attestations - Import and aggregate all attestations, regardless of - validator subscriptions. This will only import attestations - from already-subscribed subnets, use with - --subscribe-all-subnets to ensure all attestations are - received for import. - --light-client-server - Act as a full node supporting light clients on the p2p - network [experimental] - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. - --metrics - Enable the Prometheus metrics HTTP server. Disabled by - default. - --private - Prevents sending various client identification information. - --proposer-only - Sets this beacon node at be a block proposer only node. This - will run the beacon node in a minimal configuration that is - sufficient for block publishing only. This flag should be - used for a beacon node being referenced by validator client - using the --proposer-node flag. This configuration is for - enabling more secure setups. - --purge-db - If present, the chain database will be deleted. Use with - caution. - --reconstruct-historic-states - After a checkpoint sync, reconstruct historic states in the - database. This requires syncing all the way back to genesis. - --reset-payload-statuses - When present, Lighthouse will forget the payload statuses of - any already-imported blocks. This can assist in the recovery - from a consensus failure caused by the execution layer. - --self-limiter - Enables the outbound rate limiter (requests made by this - node). Use the self-limiter-protocol flag to set per protocol - configurations. If the self rate limiter is enabled and a - protocol is not present in the configuration, the quotas used - for the inbound rate limiter will be used. - --shutdown-after-sync - Shutdown beacon node as soon as sync is completed. Backfill - sync will not be performed before shutdown. - --slasher - Run a slasher alongside the beacon node. It is currently only - recommended for expert users because of the immaturity of the - slasher UX and the extra resources required. - --staking - Standard option for a staking beacon node. This will enable - the HTTP server on localhost:5052 and import deposit logs - from the execution node. This is equivalent to `--http` on - merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets - Subscribe to all subnets regardless of validator count. This - will also advertise the beacon node as being long-lived - subscribed to all subnets. - --validator-monitor-auto - Enables the automatic detection and monitoring of validators - connected to the HTTP API and using the subnet subscription - endpoint. This generally has the effect of providing - additional logging and metrics for locally controlled - validators. - -z, --zero-ports - Sets all listening TCP/UDP ports to 0, allowing the OS to - choose some arbitrary free ports. -``` - + --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data + availability checks. Checkpoint syncing is the preferred method for syncing a node. Only + use this flag when testing. DO NOT use on mainnet! + --always-prefer-builder-payload This flag is deprecated and has no effect. + --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block + builders, relays and developers. You should set a fee recipient on this BN and also + consider adjusting the --prepare-payload-lookahead flag. + --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will + always be used for payload construction, regardless of recent chain conditions. + --compact-db If present, apply compaction to the database on start-up. Use with caution. It is + generally not recommended unless auto-compaction is disabled. + --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as + fast as possible, however it can result in resource contention which degrades staking + performance. Stakers should generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any + previous option that depends on it. Useful if you intend to run a non-validating beacon + node. + --disable-duplicate-warn-logs This flag is deprecated and has no effect. + --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port + as seen by other peers on the network. This disables this feature, fixing the ENR's + IP/PORT to those specified on boot. + --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less + spurious failures on slow hardware but is considered experimental as it may obscure + performance issues. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during + finalized sync. By default block hashes will be checked in Lighthouse and only passed to + the EL if initial verification fails. + --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks + --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. + --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p + connections. + --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to + automatically establish external port mappings. + --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method + used at the 2019 Canada interop. + -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable + connection attempts to local addresses. + --eth1 If present the node will connect to an eth1 node. This is required for block production, + you must use this flag if you wish to serve a validator. + --eth1-purge-cache Purges the eth1 block and deposit caches + --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. + --gui Enable the graphical user interface and all its requirements. This enables --http and + --validator-monitor-auto and enables SSE logging. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. + --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will + only import attestations from already-subscribed subnets, use with --subscribe-all-subnets + to ensure all attestations are received for import. + --light-client-server Act as a full node supporting light clients on the p2p network [experimental] + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any + user on the machine. Note that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --private Prevents sending various client identification information. + --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a + minimal configuration that is sufficient for block publishing only. This flag should be + used for a beacon node being referenced by validator client using the --proposer-node + flag. This configuration is for enabling more secure setups. + --purge-db If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires + syncing all the way back to genesis. + --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. + This can assist in the recovery from a consensus failure caused by the execution layer. + --self-limiter Enables the outbound rate limiter (requests made by this node). Use the + self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is + enabled and a protocol is not present in the configuration, the quotas used for the + inbound rate limiter will be used. + --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed + before shutdown. + --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users + because of the immaturity of the slasher UX and the extra resources required. + --staking Standard option for a staking beacon node. This will enable the HTTP server on + localhost:5052 and import deposit logs from the execution node. This is equivalent to + `--http` on merge-ready networks, or `--http --eth1` pre-merge + --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the + beacon node as being long-lived subscribed to all subnets. + --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and + using the subnet subscription endpoint. This generally has the effect of providing + additional logging and metrics for locally controlled validators. + -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free + ports. +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index 37a721be1b2..657767b92c0 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,154 +1,96 @@ # Lighthouse General Commands ``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon -node, a validator client and utilities for managing validator accounts. +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator +accounts. Usage: lighthouse [OPTIONS] [COMMAND] Commands: database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator - client via the HTTP API. [aliases: vm, - validator-manager, validator_manager] - beacon_node The primary component which connects to the - Ethereum 2.0 P2P network and downloads, - verifies and stores blocks. Provides a HTTP - API for querying the beacon chain and - publishing messages to the network. [aliases: + validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, + validator_manager] + beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores + blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. [aliases: b, bn, beacon] - boot_node Start a special Lighthouse process that only - serves as a discv5 boot-node. This process - will *not* import blocks or perform most - typical beacon node functions. Instead, it - will simply run the discv5 service and assist - nodes on the network to discover each other. - This is the recommended way to provide a - network boot-node since it has a reduced - attack surface compared to a full beacon node. - validator_client When connected to a beacon node, performs the - duties of a staked validator (e.g., proposing - blocks and attestations). [aliases: v, vc, - validator] - account_manager Utilities for generating and managing Ethereum - 2.0 accounts. [aliases: a, am, account, - account_manager] - help Print this message or the help of the given - subcommand(s) + boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import + blocks or perform most typical beacon node functions. Instead, it will simply run the discv5 service and + assist nodes on the network to discover each other. This is the recommended way to provide a network + boot-node since it has a reduced attack surface compared to a full beacon node. + validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and + attestations). [aliases: v, vc, validator] + account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] + help Print this message or the help of the given subcommand(s) Options: -d, --datadir - Used to specify a custom root data directory for lighthouse - keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users - should specify separate custom datadirs for different + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the - terminal. [default: info] [possible values: info, debug, + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --genesis-state-url - A URL of a beacon-API compatible server from which to - download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will - be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to - --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format - Specifies the log format used when emitting logs to the - terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to - the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of - log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be - overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. - [default: debug] [possible values: info, debug, trace, warn, + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the - logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set - to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before - rotating. If set to 0, background file logging is disabled. + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. - [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS - transition block. Incorrect use of this flag can cause your - node to possibly accept an invalid chain or sync more slowly. - Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to - a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the - terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely - careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience - a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the - TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit - decimal integer (not a hex value). This flag should only be - used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. -h, --help Print help -V, --version Print version Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - -l - DEPRECATED Enables environment logging giving access to - sub-protocol logs such as discv5 and libp2p - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. -``` - + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. + -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and + libp2p + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator and + so this flag should be used with caution. For Windows users, the log file permissions will be + inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 595e5c45895..84a17906eb3 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -1,1308 +1,195 @@ # Validator Client ``` -When connected to a beacon node, performs the duties of a staked -validator (e.g., proposing blocks and attestations). +When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). Usage: lighthouse validator_client [OPTIONS] Options: - --beacon-nodes Comma-separated - addresses - to - one - or - more - beacon - node - HTTP - APIs. - Default - is - http://localhost:5052. - --beacon-nodes-tls-certs Comma-separated - paths - to - custom - TLS - certificates - to - use - when - connecting - to - a - beacon - node - (and/or - proposer - node). - These - certificates - must - be - in - PEM - format - and - are - used - in - addition - to - the - OS - trust - store. - Commas - must - only - be - used - as - a - delimiter, - and - must - not - be - part - of - the - certificate - path. - --broadcast Comma-separated - list - of - beacon - API - topics - to - broadcast - to - all - beacon - nodes. - Possible - values - are: - none, - attestations, - blocks, - subscriptions, - sync-committee. - Default - (when - flag - is - omitted) - is - to - broadcast - subscriptions - only. - --builder-boost-factor Defines - the - boost - factor, - a - percentage - multiplier - to - apply - to - the - builder's - payload - value - when - choosing - between - a - builder - payload - header - and - payload - from - the - local - execution - node. - --builder-registration-timestamp-override This - flag - takes - a - unix - timestamp - value - that - will - be - used - to - override - the - timestamp - used - in - the - builder - api - registration - -d, --datadir Used - to - specify - a - custom - root - data - directory - for - lighthouse - keys - and - databases. - Defaults - to - $HOME/.lighthouse/{network} - where - network - is - the - value - of - the - `network` - flag - Note: - Users - should - specify - separate - custom - datadirs - for - different - networks. - --debug-level Specifies - the - verbosity - level - used - when - emitting - logs - to - the - terminal. - [default: - info] - [possible - values: - info, - debug, - trace, - warn, - error, - crit] - --gas-limit The - gas - limit - to - be - used - in - all - builder - proposals - for - all - validators - managed - by - this - validator - client. - Note - this - will - not - necessarily - be - used - if - the - gas - limit - set - here - moves - too - far - from - the - previous - block's - gas - limit. - [default: - 30,000,000] - --genesis-state-url A - URL - of - a - beacon-API - compatible - server - from - which - to - download - the - genesis - state. - Checkpoint - sync - server - URLs - can - generally - be - used - with - this - flag. - If - not - supplied, - a - default - URL - or - the - --checkpoint-sync-url - may - be - used. - If - the - genesis - state - is - already - included - in - this - binary - then - this - value - will - be - ignored. - --genesis-state-url-timeout The - timeout - in - seconds - for - the - request - to - --genesis-state-url. - [default: - 180] - --graffiti Specify - your - custom - graffiti - to - be - included - in - blocks. - --graffiti-file Specify - a - graffiti - file - to - load - validator - graffitis - from. - --http-address
Set - the - address - for - the - HTTP - address. - The - HTTP - server - is - not - encrypted - and - therefore - it - is - unsafe - to - publish - on - a - public - network. - When - this - flag - is - used, - it - additionally - requires - the - explicit - use - of - the - `--unencrypted-http-transport` - flag - to - ensure - the - user - is - aware - of - the - risks - involved. - For - access - via - the - Internet, - users - should - apply - transport-layer - security - like - a - HTTPS - reverse-proxy - or - SSH - tunnelling. - --http-allow-origin Set - the - value - of - the - Access-Control-Allow-Origin - response - HTTP - header. - Use - * - to - allow - any - origin - (not - recommended - in - production). - If - no - value - is - supplied, - the - CORS - allowed - origin - is - set - to - the - listen - address - of - this - server - (e.g., - http://localhost:5062). - --http-port Set - the - listen - TCP - port - for - the - RESTful - HTTP - API - server. - --log-format Specifies - the - log - format - used - when - emitting - logs - to - the - terminal. - [possible - values: - JSON] - --logfile File - path - where - the - log - file - will - be - stored. - Once - it - grows - to - the - value - specified - in - `--logfile-max-size` - a - new - log - file - is - generated - where - future - logs - are - stored. - Once - the - number - of - log - files - exceeds - the - value - specified - in - `--logfile-max-number` - the - oldest - log - file - will - be - overwritten. - --logfile-debug-level The - verbosity - level - used - when - emitting - logs - to - the - log - file. - [default: - debug] - [possible - values: - info, - debug, - trace, - warn, - error, - crit] - --logfile-format Specifies - the - log - format - used - when - emitting - logs - to - the - logfile. - [possible - values: - DEFAULT, - JSON] - --logfile-max-number The - maximum - number - of - log - files - that - will - be - stored. - If - set - to - 0, - background - file - logging - is - disabled. - [default: - 5] - --logfile-max-size The - maximum - size - (in - MB) - each - log - file - can - grow - to - before - rotating. - If - set - to - 0, - background - file - logging - is - disabled. - [default: - 200] - --metrics-address
Set - the - listen - address - for - the - Prometheus - metrics - HTTP - server. - --metrics-allow-origin Set - the - value - of - the - Access-Control-Allow-Origin - response - HTTP - header. - Use - * - to - allow - any - origin - (not - recommended - in - production). - If - no - value - is - supplied, - the - CORS - allowed - origin - is - set - to - the - listen - address - of - this - server - (e.g., - http://localhost:5064). - --metrics-port Set - the - listen - TCP - port - for - the - Prometheus - metrics - HTTP - server. - --monitoring-endpoint
Enables - the - monitoring - service - for - sending - system - metrics - to - a - remote - endpoint. - This - can - be - used - to - monitor - your - setup - on - certain - services - (e.g. - beaconcha.in). - This - flag - sets - the - endpoint - where - the - beacon - node - metrics - will - be - sent. - Note: - This - will - send - information - to - a - remote - sever - which - may - identify - and - associate - your - validators, - IP - address - and - other - personal - information. - Always - use - a - HTTPS - connection - and - never - provide - an - untrusted - URL. - --monitoring-endpoint-period Defines - how - many - seconds - to - wait - between - each - message - sent - to - the - monitoring-endpoint. - Default: - 60s - --network Name - of - the - Eth2 - chain - Lighthouse - will - sync - and - follow. - [possible - values: - mainnet, - prater, - goerli, - gnosis, - chiado, - sepolia, - holesky] - --proposer-nodes Comma-separated - addresses - to - one - or - more - beacon - node - HTTP - APIs. - These - specify - nodes - that - are - used - to - send - beacon - block - proposals. - A - failure - will - revert - back - to - the - standard - beacon - nodes - specified - in - --beacon-nodes. - --safe-slots-to-import-optimistically Used - to - coordinate - manual - overrides - of - the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY - parameter. - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - this - parameter - in - the - event - of - an - attack - at - the - PoS - transition - block. - Incorrect - use - of - this - flag - can - cause - your - node - to - possibly - accept - an - invalid - chain - or - sync - more - slowly. - Be - extremely - careful - with - this - flag. - --secrets-dir The - directory - which - contains - the - password - to - unlock - the - validator - voting - keypairs. - Each - password - should - be - contained - in - a - file - where - the - name - is - the - 0x-prefixed - hex - representation - of - the - validators - voting - public - key. - Defaults - to - ~/.lighthouse/{network}/secrets. - --suggested-fee-recipient Once - the - merge - has - happened, - this - address - will - receive - transaction - fees - from - blocks - proposed - by - this - validator - client. - If - a - fee - recipient - is - configured - in - the - validator - definitions - it - takes - priority - over - this - value. - -t, --testnet-dir Path - to - directory - containing - eth2_testnet - specs. - Defaults - to - a - hard-coded - Lighthouse - testnet. - Only - effective - if - there - is - no - existing - database. - --terminal-block-hash-epoch-override Used - to - coordinate - manual - overrides - to - the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH - parameter. - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - the - terminal - PoW - block. - Incorrect - use - of - this - flag - will - cause - your - node - to - experience - a - consensus - failure. - Be - extremely - careful - with - this - flag. - --terminal-block-hash-override Used - to - coordinate - manual - overrides - to - the - TERMINAL_BLOCK_HASH - parameter. - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - the - terminal - PoW - block. - Incorrect - use - of - this - flag - will - cause - your - node - to - experience - a - consensus - failure. - Be - extremely - careful - with - this - flag. - --terminal-total-difficulty-override Used - to - coordinate - manual - overrides - to - the - TERMINAL_TOTAL_DIFFICULTY - parameter. - Accepts - a - 256-bit - decimal - integer - (not - a - hex - value). - This - flag - should - only - be - used - if - the - user - has - a - clear - understanding - that - the - broad - Ethereum - community - has - elected - to - override - the - terminal - difficulty. - Incorrect - use - of - this - flag - will - cause - your - node - to - experience - a - consensus - failure. - Be - extremely - careful - with - this - flag. - --validator-registration-batch-size Defines - the - number - of - validators - per - validator/register_validator - request - sent - to - the - BN. - This - value - can - be - reduced - to - avoid - timeouts - from - builders. - [default: - 500] - --validators-dir The - directory - which - contains - the - validator - keystores, - deposit - data - for - each - validator - along - with - the - common - slashing - protection - database - and - the - validator_definitions.yml - --web3-signer-keep-alive-timeout Keep-alive - timeout - for - each - web3signer - connection. - Set - to - 'null' - to - never - timeout - [default: - 90000] - --web3-signer-max-idle-connections Maximum - number - of - idle - connections - to - maintain - per - web3signer - host. - Default - is - unlimited. - -h, --help Print - help + --beacon-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. + --beacon-nodes-tls-certs + Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These + certificates must be in PEM format and are used in addition to the OS trust store. Commas must only be used as a delimiter, + and must not be part of the certificate path. + --broadcast + Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, + blocks, subscriptions, sync-committee. Default (when flag is omitted) is to broadcast subscriptions only. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder + payload header and payload from the local execution node. + --builder-registration-timestamp-override + This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different + networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, + trace, warn, error, crit] + --gas-limit + The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not + necessarily be used if the gas limit set here moves too far from the previous block's gas limit. [default: 30,000,000] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. + --graffiti-file + Specify a graffiti file to load validator graffitis from. + --http-address
+ Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public + network. When this flag is used, it additionally requires the explicit use of the `--unencrypted-http-transport` flag to + ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security + like a HTTPS reverse-proxy or SSH tunnelling. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5062). + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --log-format + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, + error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. + [default: 200] + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in + production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., + http://localhost:5064). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on + certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This + will send information to a remote sever which may identify and associate your validators, IP address and other personal + information. Always use a HTTPS connection and never provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] + --proposer-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block + proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes. + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. + --secrets-dir + The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a + file where the name is the 0x-prefixed hex representation of the validators voting public key. Defaults to + ~/.lighthouse/{network}/secrets. + --suggested-fee-recipient + Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a + fee recipient is configured in the validator definitions it takes priority over this value. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --validator-registration-batch-size + Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to + avoid timeouts from builders. [default: 500] + --validators-dir + The directory which contains the validator keystores, deposit data for each validator along with the common slashing + protection database and the validator_definitions.yml + --web3-signer-keep-alive-timeout + Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] + --web3-signer-max-idle-connections + Maximum number of idle connections to maintain per web3signer host. Default is unlimited. + -h, --help + Print help Flags: - --builder-proposals - If this flag is set, Lighthouse will query the Beacon Node - for only block headers during proposals and will sign over - headers. Useful for outsourcing execution payload - construction during proposals. - --disable-auto-discover - If present, do not attempt to discover new validators in the - validators-dir. Validators will need to be manually added to - the validator_definitions.yml file. - --disable-latency-measurement-service - Disables the service that periodically attempts to measure - latency to BNs. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - --disable-run-on-all - DEPRECATED. Use --broadcast. By default, Lighthouse publishes - attestation, sync committee subscriptions and proposer - preparation messages to all beacon nodes provided in the - `--beacon-nodes flag`. This option changes that behaviour - such that these api calls only go out to the first available - and synced beacon node - --disable-slashing-protection-web3signer - Disable Lighthouse's slashing protection for all web3signer - keys. This can reduce the I/O burden on the VC but is only - safe if slashing protection is enabled on the remote signer - and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS - YOU ARE CERTAIN THAT SLASHING PROTECTION IS ENABLED ON THE - REMOTE SIGNER. YOU WILL GET SLASHED IF YOU USE THIS FLAG - WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. - --distributed - Enables functionality required for running the validator in a - distributed validator cluster. - --enable-doppelganger-protection - If this flag is set, Lighthouse will delay startup for three - epochs and monitor for messages on the network by any of the - validators managed by this client. This will result in three - (possibly four) epochs worth of missed attestations. If an - attestation is detected during this period, it means it is - very likely that you are running a second validator client - with the same keys. This validator client will immediately - shutdown if this is detected in order to avoid potentially - committing a slashable offense. Use this flag in order to - ENABLE this functionality, without this flag Lighthouse will - begin attesting immediately. - --enable-high-validator-count-metrics - Enable per validator metrics for > 64 validators. Note: This - flag is automatically enabled for <= 64 validators. Enabling - this metric for higher validator counts will lead to higher - volume of prometheus metrics being collected. - --http - Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export - If present, allow access to the DELETE /lighthouse/keystores - HTTP API method, which allows exporting keystores and - passwords to HTTP API consumers who have access to the API - token. This method is useful for exporting validators, - however it should be used with caution since it exposes - private key data to authorized users. - --http-store-passwords-in-secrets-dir - If present, any validators created via the HTTP will have - keystore passwords stored in the secrets-dir rather than the - validator definitions file. - --init-slashing-protection - If present, do not require the slashing protection database - to exist before running. You SHOULD NOT use this flag unless - you're certain that a new slashing protection database is - required. Usually, your database will have been initialized - when you imported your validator keys. If you misplace your - database and then run with this flag you risk being slashed. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. - --metrics - Enable the Prometheus metrics HTTP server. Disabled by - default. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks - constructed by builders, regardless of payload value. - --produce-block-v3 - Enable block production via the block v3 endpoint for this - validator client. This should only be enabled when paired - with a beacon node that has this endpoint implemented. This - flag will be enabled by default in future. - --unencrypted-http-transport - This is a safety flag to ensure that the user is aware that - the http transport is unencrypted and using a custom HTTP - address is unsafe. - --use-long-timeouts - If present, the validator client will use longer timeouts for - requests made to the beacon node. This flag is generally not - recommended, longer timeouts can cause missed duties when - fallbacks are used. -``` - + --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers + during proposals and will sign over headers. Useful for outsourcing execution payload + construction during proposals. + --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. + Validators will need to be manually added to the validator_definitions.yml file. + --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory + allocation issues. + --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync + committee subscriptions and proposer preparation messages to all beacon nodes + provided in the `--beacon-nodes flag`. This option changes that behaviour such that + these api calls only go out to the first available and synced beacon node + --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the + I/O burden on the VC but is only safe if slashing protection is enabled on the remote + signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN + THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU + USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. + --distributed Enables functionality required for running the validator in a distributed validator + cluster. + --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for + messages on the network by any of the validators managed by this client. This will + result in three (possibly four) epochs worth of missed attestations. If an + attestation is detected during this period, it means it is very likely that you are + running a second validator client with the same keys. This validator client will + immediately shutdown if this is detected in order to avoid potentially committing a + slashable offense. Use this flag in order to ENABLE this functionality, without this + flag Lighthouse will begin attesting immediately. + --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically + enabled for <= 64 validators. Enabling this metric for higher validator counts will + lead to higher volume of prometheus metrics being collected. + --http Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which + allows exporting keystores and passwords to HTTP API consumers who have access to the + API token. This method is useful for exporting validators, however it should be used + with caution since it exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored + in the secrets-dir rather than the validator definitions file. + --init-slashing-protection If present, do not require the slashing protection database to exist before running. + You SHOULD NOT use this flag unless you're certain that a new slashing protection + database is required. Usually, your database will have been initialized when you + imported your validator keys. If you misplace your database and then run with this + flag you risk being slashed. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store + old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by + any user on the machine. Note that logs can often contain sensitive information about + your validator and so this flag should be used with caution. For Windows users, the + log file permissions will be inherited from the parent folder. + --metrics Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, + regardless of payload value. + --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This + should only be enabled when paired with a beacon node that has this endpoint + implemented. This flag will be enabled by default in future. + --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is + unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the + beacon node. This flag is generally not recommended, longer timeouts can cause missed + duties when fallbacks are used. +``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 4a4368dade4..6d95737eaad 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,133 +6,82 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file - will be created which contains all the validator - keystores and other validator data. This file can then be - imported to a validator client using the - "import-validators" command. Another, optional JSON file - is created which contains a list of validator deposits in - the same format as the "ethereum/staking-deposit-cli" - tool. - import Uploads validators to a validator client using the HTTP - API. The validators are defined in a JSON file which can - be generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP - API. The validators are defined in a JSON file which can - be generated using the "create-validators" command. This - command only supports validators signing via a keystore - on the local file system (i.e., not Web3Signer - validators). + create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and + other validator data. This file can then be imported to a validator client using the "import-validators" command. + Another, optional JSON file is created which contains a list of validator deposits in the same format as the + "ethereum/staking-deposit-cli" tool. + import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be + generated using the "create-validators" command. + move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be + generated using the "create-validators" command. This command only supports validators signing via a keystore on the + local file system (i.e., not Web3Signer validators). help Print this message or the help of the given subcommand(s) Options: -d, --datadir - Used to specify a custom root data directory for lighthouse - keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users - should specify separate custom datadirs for different + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the - terminal. [default: info] [possible values: info, debug, + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --genesis-state-url - A URL of a beacon-API compatible server from which to - download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will - be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to - --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format - Specifies the log format used when emitting logs to the - terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to - the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of - log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be - overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. - [default: debug] [possible values: info, debug, trace, warn, + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the - logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set - to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before - rotating. If set to 0, background file logging is disabled. + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. - [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS - transition block. Incorrect use of this flag can cause your - node to possibly accept an invalid chain or sync more slowly. - Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to - a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the - terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely - careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience - a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the - TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit - decimal integer (not a hex value). This flag should only be - used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. -h, --help Print help Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. -``` - + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator and + so this flag should be used with caution. For Windows users, the log file permissions will be + inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index a590351eab9..08de9d9838e 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,186 +1,123 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be -created which contains all the validator keystores and other validator -data. This file can then be imported to a validator client using the -"import-validators" command. Another, optional JSON file is created -which contains a list of validator deposits in the same format as the -"ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other +validator data. This file can then be imported to a validator client using the "import-validators" command. Another, optional JSON +file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: --beacon-node - A HTTP(S) address of a beacon node using the beacon-API. If - this value is provided, an error will be raised if any - validator key here is already known as a validator by that - beacon node. This helps prevent the same validator being - created twice and therefore slashable conditions. + A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any + validator key here is already known as a validator by that beacon node. This helps prevent the same validator being created + twice and therefore slashable conditions. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to - the builder's payload value when choosing between a builder + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution node. --builder-proposals - When provided, all created validators will attempt to create - blocks via builder rather than the local EL. [possible - values: true, false] + When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: + true, false] --count - The number of validators to create, regardless of how many - already exist + The number of validators to create, regardless of how many already exist -d, --datadir - Used to specify a custom root data directory for lighthouse - keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users - should specify separate custom datadirs for different + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the - terminal. [default: info] [possible values: info, debug, + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --deposit-gwei - The GWEI value of the deposit amount. Defaults to the minimum - amount required for an active validator + The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator (MAX_EFFECTIVE_BALANCE) --eth1-withdrawal-address - If this field is set, the given eth1 address will be used to - create the withdrawal credentials. Otherwise, it will - generate withdrawal credentials with the mnemonic-derived - withdrawal public key in EIP-2334 format. + If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate + withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. --first-index - The first of consecutive key indexes you wish to create. - [default: 0] + The first of consecutive key indexes you wish to create. [default: 0] --gas-limit - All created validators will use this gas limit. It is - recommended to leave this as the default value by not - specifying this flag. + All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this + flag. --genesis-state-url - A URL of a beacon-API compatible server from which to - download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will - be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to - --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format - Specifies the log format used when emitting logs to the - terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to - the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of - log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be - overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. - [default: debug] [possible values: info, debug, trace, warn, + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the - logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set - to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before - rotating. If set to 0, background file logging is disabled. + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --mnemonic-path If present, the mnemonic will be read in from this file. --network - Name of the Eth2 chain Lighthouse will sync and follow. - [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] --output-path - The path to a directory where the validator and (optionally) - deposits files will be created. The directory will be created + The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if it does not exist. --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks - constructed by builders, regardless of payload value. - [possible values: true, false] + If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible + values: true, false] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS - transition block. Incorrect use of this flag can cause your - node to possibly accept an invalid chain or sync more slowly. - Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. --suggested-fee-recipient - All created validators will use this value for the suggested - fee recipient. Omit this flag to use the default value from + All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to - a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the - terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely - careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience - a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the - TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit - decimal integer (not a hex value). This flag should only be - used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. -h, --help Print help Flags: - --disable-deposits - When provided don't generate the deposits JSON file that is - commonly used for submitting validator deposits via a web UI. - Using this flag will save several seconds per validator if - the user has an alternate strategy for submitting deposits. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - --force-bls-withdrawal-credentials - If present, allows BLS withdrawal credentials rather than an - execution address. This is not recommended. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. - --specify-voting-keystore-password - If present, the user will be prompted to enter the voting - keystore password that will be used to encrypt the voting - keystores. If this flag is not provided, a random password - will be used. It is not necessary to keep backups of voting - keystore passwords if the mnemonic is safely backed up. - --stdin-inputs - If present, read all user inputs from stdin instead of tty. -``` - + --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting + validator deposits via a web UI. Using this flag will save several seconds per validator if + the user has an alternate strategy for submitting deposits. + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally + increase memory usage, it should only be provided when debugging specific memory allocation + issues. + --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not + recommended. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old + logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any + user on the machine. Note that logs can often contain sensitive information about your + validator and so this flag should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be + used to encrypt the voting keystores. If this flag is not provided, a random password will + be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic + is safely backed up. + --stdin-inputs If present, read all user inputs from stdin instead of tty. +``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 7e021c2a45c..d6022ee3f1d 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,139 +1,89 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The -validators are defined in a JSON file which can be generated using the -"create-validators" command. +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using +the "create-validators" command. Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: -d, --datadir - Used to specify a custom root data directory for lighthouse - keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users - should specify separate custom datadirs for different + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the - terminal. [default: info] [possible values: info, debug, + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --genesis-state-url - A URL of a beacon-API compatible server from which to - download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will - be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to - --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format - Specifies the log format used when emitting logs to the - terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to - the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of - log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be - overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. - [default: debug] [possible values: info, debug, trace, warn, + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the - logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set - to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before - rotating. If set to 0, background file logging is disabled. + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. - [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS - transition block. Incorrect use of this flag can cause your - node to possibly accept an invalid chain or sync more slowly. - Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to - a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the - terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely - careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience - a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the - TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit - decimal integer (not a hex value). This flag should only be - used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --validators-file - The path to a JSON file containing a list of validators to be - imported to the validator client. This file is usually named + The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named "validators.json". --vc-token The file containing a token required by the validator client. --vc-url - A HTTP(S) address of a validator client using the - keymanager-API. If this value is not supplied then a 'dry - run' will be conducted where no changes are made to the - validator client. [default: http://localhost:5062] + A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be + conducted where no changes are made to the validator client. [default: http://localhost:5062] -h, --help Print help Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - --ignore-duplicates - If present, ignore any validators which already exist on the - VC. Without this flag, the process will terminate without - making any changes. This flag should be used with caution, - whilst it does not directly cause slashable conditions, it - might be an indicator that something is amiss. Users should - also be careful to avoid submitting duplicate deposits for - validators that already exist on the VC. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. -``` - + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. + --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process + will terminate without making any changes. This flag should be used with caution, whilst it does + not directly cause slashable conditions, it might be an indicator that something is amiss. Users + should also be careful to avoid submitting duplicate deposits for validators that already exist + on the VC. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator and + so this flag should be used with caution. For Windows users, the log file permissions will be + inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 66cb1e7afbe..69bc6b3ee90 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,164 +1,108 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The -validators are defined in a JSON file which can be generated using the -"create-validators" command. This command only supports validators -signing via a keystore on the local file system (i.e., not Web3Signer -validators). +Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using +the "create-validators" command. This command only supports validators signing via a keystore on the local file system (i.e., not +Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to - the builder's payload value when choosing between a builder + Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the local execution node. --builder-proposals - When provided, all created validators will attempt to create - blocks via builder rather than the local EL. [possible - values: true, false] + When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: + true, false] --count The number of validators to move. -d, --datadir - Used to specify a custom root data directory for lighthouse - keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users - should specify separate custom datadirs for different + Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} + where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the - terminal. [default: info] [possible values: info, debug, + Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, trace, warn, error, crit] --dest-vc-token - The file containing a token required by the destination - validator client. + The file containing a token required by the destination validator client. --dest-vc-url - A HTTP(S) address of a validator client using the - keymanager-API. This validator client is the "destination" - and will have new validators added as they are removed from - the "source" validator client. + A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have + new validators added as they are removed from the "source" validator client. --gas-limit - All created validators will use this gas limit. It is - recommended to leave this as the default value by not - specifying this flag. + All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this + flag. --genesis-state-url - A URL of a beacon-API compatible server from which to - download the genesis state. Checkpoint sync server URLs can - generally be used with this flag. If not supplied, a default - URL or the --checkpoint-sync-url may be used. If the genesis - state is already included in this binary then this value will - be ignored. + A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally + be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is + already included in this binary then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to - --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. [default: 180] --log-format - Specifies the log format used when emitting logs to the - terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to - the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of - log files exceeds the value specified in - `--logfile-max-number` the oldest log file will be - overwritten. + File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is + generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` + the oldest log file will be overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. - [default: debug] [possible values: info, debug, trace, warn, + The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the - logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set - to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before - rotating. If set to 0, background file logging is disabled. + The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. - [possible values: mainnet, prater, goerli, gnosis, chiado, - sepolia, holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, + holesky] --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks - constructed by builders, regardless of payload value. - [possible values: true, false] + If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible + values: true, false] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS - transition block. Incorrect use of this flag can cause your - node to possibly accept an invalid chain or sync more slowly. - Be extremely careful with this flag. + Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of + an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain + or sync more slowly. Be extremely careful with this flag. --src-vc-token - The file containing a token required by the source validator - client. + The file containing a token required by the source validator client. --src-vc-url - A HTTP(S) address of a validator client using the - keymanager-API. This validator client is the "source" and - contains the validators that are to be moved. + A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the + validators that are to be moved. --stdin-inputs If present, read all user inputs from stdin instead of tty. --suggested-fee-recipient - All created validators will use this value for the suggested - fee recipient. Omit this flag to use the default value from + All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from the VC. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to - a hard-coded Lighthouse testnet. Only effective if there is - no existing database. + Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no + existing database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag - should only be used if the user has a clear understanding - that the broad Ethereum community has elected to override the - terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely - careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if + the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. + Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH parameter. This flag should only be used - if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience - a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a + clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this + flag will cause your node to experience a consensus failure. Be extremely careful with this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the - TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit - decimal integer (not a hex value). This flag should only be - used if the user has a clear understanding that the broad - Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node - to experience a consensus failure. Be extremely careful with - this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a + hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has + elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --validators - The validators to be moved. Either a list of 0x-prefixed - validator pubkeys or the keyword "all". + The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". -h, --help Print help Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing - this flag will generally increase memory usage, it should - only be provided when debugging specific memory allocation - issues. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the - space needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable - meaning they can be read by any user on the machine. Note - that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For - Windows users, the log file permissions will be inherited - from the parent folder. -``` - + --disable-log-timestamp If present, do not include timestamps in logging output. + --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase + memory usage, it should only be provided when debugging specific memory allocation issues. + --log-color Force outputting colors when emitting logs to the terminal. + --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. + --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user + on the machine. Note that logs can often contain sensitive information about your validator and + so this flag should be used with caution. For Windows users, the log file permissions will be + inherited from the parent folder. +``` \ No newline at end of file From e23b96b29120ca143ff50f0b83ea966ab8f45820 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 12 Apr 2024 10:52:28 +0300 Subject: [PATCH 29/46] md --- book/src/help_bn.md | 2 +- book/src/help_general.md | 2 +- book/src/help_vc.md | 2 +- book/src/help_vm.md | 2 +- book/src/help_vm_create.md | 2 +- book/src/help_vm_import.md | 2 +- book/src/help_vm_move.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 5cb823e8862..a10402d8ab7 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -422,4 +422,4 @@ Flags: additional logging and metrics for locally controlled validators. -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index 657767b92c0..c780a2b77f4 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -93,4 +93,4 @@ Flags: on the machine. Note that logs can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 84a17906eb3..8e70e243ca1 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -192,4 +192,4 @@ Flags: --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 6d95737eaad..0999eecbd6b 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -84,4 +84,4 @@ Flags: on the machine. Note that logs can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 08de9d9838e..45123e82be8 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -120,4 +120,4 @@ Flags: be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index d6022ee3f1d..10140318f02 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -86,4 +86,4 @@ Flags: on the machine. Note that logs can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 69bc6b3ee90..24d6d7b5f4e 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -105,4 +105,4 @@ Flags: on the machine. Note that logs can often contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file From 7f4af13ceafd0369ceb8b31604fef2be713c6dd4 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 16 Apr 2024 01:06:16 +0300 Subject: [PATCH 30/46] help text, text width, and a few flag fixes --- account_manager/src/lib.rs | 13 + account_manager/src/validator/mod.rs | 10 + account_manager/src/wallet/mod.rs | 10 + beacon_node/src/cli.rs | 12 +- beacon_node/src/config.rs | 2 - book/src/help_bn.md | 748 +++++++++++++-------- book/src/help_general.md | 177 +++-- book/src/help_vc.md | 368 ++++++---- book/src/help_vm.md | 157 +++-- book/src/help_vm_create.md | 212 +++--- book/src/help_vm_import.md | 155 +++-- book/src/help_vm_move.md | 173 +++-- boot_node/src/cli.rs | 12 +- database_manager/src/lib.rs | 9 + lighthouse/src/main.rs | 12 + validator_client/src/cli.rs | 10 + validator_manager/src/create_validators.rs | 9 + validator_manager/src/import_validators.rs | 9 + validator_manager/src/lib.rs | 13 +- validator_manager/src/move_validators.rs | 10 + 20 files changed, 1351 insertions(+), 770 deletions(-) diff --git a/account_manager/src/lib.rs b/account_manager/src/lib.rs index 4963d9354b3..755f8a84d0b 100644 --- a/account_manager/src/lib.rs +++ b/account_manager/src/lib.rs @@ -2,8 +2,11 @@ mod common; pub mod validator; pub mod wallet; +use clap::Arg; +use clap::ArgAction; use clap::ArgMatches; use clap::Command; +use clap_utils::FLAG_HEADER; use environment::Environment; use types::EthSpec; @@ -17,6 +20,16 @@ pub fn cli_app() -> Command { Command::new(CMD) .visible_aliases(["a", "am", "account", CMD]) .about("Utilities for generating and managing Ethereum 2.0 accounts.") + .display_order(0) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .subcommand(wallet::cli_app()) .subcommand(validator::cli_app()) } diff --git a/account_manager/src/validator/mod.rs b/account_manager/src/validator/mod.rs index b699301cde3..ccb3a940a1f 100644 --- a/account_manager/src/validator/mod.rs +++ b/account_manager/src/validator/mod.rs @@ -8,6 +8,7 @@ pub mod slashing_protection; use crate::{VALIDATOR_DIR_FLAG, VALIDATOR_DIR_FLAG_ALIAS}; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use directory::{parse_path_or_default_with_flag, DEFAULT_VALIDATOR_DIR}; use environment::Environment; use std::path::PathBuf; @@ -19,6 +20,15 @@ pub fn cli_app() -> Command { Command::new(CMD) .display_order(0) .about("Provides commands for managing Eth2 validators.") + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new(VALIDATOR_DIR_FLAG) .long(VALIDATOR_DIR_FLAG) diff --git a/account_manager/src/wallet/mod.rs b/account_manager/src/wallet/mod.rs index 1a4b55f8764..59f5f362529 100644 --- a/account_manager/src/wallet/mod.rs +++ b/account_manager/src/wallet/mod.rs @@ -4,6 +4,7 @@ pub mod recover; use crate::WALLETS_DIR_FLAG; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use directory::{ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_WALLET_DIR}; use std::path::PathBuf; @@ -13,6 +14,15 @@ pub fn cli_app() -> Command { Command::new(CMD) .about("Manage wallets, from which validator keys can be derived.") .display_order(0) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new(WALLETS_DIR_FLAG) .long(WALLETS_DIR_FLAG) diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index fabaa9af387..c7691eb3521 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -4,6 +4,7 @@ use strum::VariantNames; pub fn cli_app() -> Command { Command::new("beacon_node") + .display_order(0) .visible_aliases(["b", "bn", "beacon"]) .version(crate_version!()) .author("Sigma Prime ") @@ -14,6 +15,15 @@ pub fn cli_app() -> Command { /* * Configuration directory locations. */ + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new("network-dir") .long("network-dir") @@ -271,7 +281,7 @@ pub fn cli_app() -> Command { local node on this address. This will update the `ip4` or `ip6` ENR fields \ accordingly. To update both, set this flag twice with the different values.") .action(ArgAction::Append) - .num_args(0..=2) + .num_args(1..=2) .display_order(0) ) .arg( diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index f37615e6d00..38c6eb4da7f 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -945,8 +945,6 @@ pub fn parse_listening_addresses( .map_err(|parse_error| format!("Failed to parse --port6 as an integer: {parse_error}"))? .unwrap_or(9090); - println!("{}", port); - // parse the possible discovery ports. let maybe_disc_port = cli_args .get_one::("discovery-port") diff --git a/book/src/help_bn.md b/book/src/help_bn.md index a10402d8ab7..f61ee6e0a8b 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,425 +1,605 @@ # Beacon Node ``` -The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores blocks. Provides a HTTP API -for querying the beacon chain and publishing messages to the network. +The primary component which connects to the Ethereum 2.0 P2P network and +downloads, verifies and stores blocks. Provides a HTTP API for querying the +beacon chain and publishing messages to the network. Usage: lighthouse beacon_node [OPTIONS] Options: --auto-compact-db - Enable or disable automatic compaction of the database on finalization. [default: true] + Enable or disable automatic compaction of the database on + finalization. [default: true] --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - - blob_prune_margin_epochs. [default: 0] + The margin for blob pruning in epochs. The oldest blobs are pruned up + until data_availability_boundary - blob_prune_margin_epochs. [default: + 0] --blobs-dir Data directory for the blobs database. --block-cache-size - Specifies how many blocks the database should cache in memory [default: 5] + Specifies how many blocks the database should cache in memory + [default: 5] --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p + network. Multiaddr is also supported. --builder The URL of a service compatible with the MEV-boost API. --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT query any - connected builders, and will use the local execution engine for payload construction. Setting this value to anything less - than 2 will cause the node to NEVER query connected builders. Setting it to 2 will cause this condition to be hit if there - are skips slots at the start of an epoch, right before this node is set to propose. [default: 3] + If this node is proposing a block and the chain has not finalized + within this number of epochs, it will NOT query any connected + builders, and will use the local execution engine for payload + construction. Setting this value to anything less than 2 will cause + the node to NEVER query connected builders. Setting it to 2 will cause + this condition to be hit if there are skips slots at the start of an + epoch, right before this node is set to propose. [default: 3] --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it will NOT query - any connected builders, and will use the local execution engine for payload construction. [default: 3] + If this node is proposing a block and has seen this number of skip + slots on the canonical chain in a row, it will NOT query any connected + builders, and will use the local execution engine for payload + construction. [default: 3] --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past - `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution engine for payload - construction. [default: 8] + If this node is proposing a block and has seen this number of skip + slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will + NOT query any connected builders, and will use the local execution + engine for payload construction. [default: 8] --builder-profit-threshold This flag is deprecated and has no effect. --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version string. + The HTTP user agent to send alongside requests to the builder URL. The + default is Lighthouse's version string. --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url - instead is recommended. + Set the checkpoint blobs to start syncing from. Must be aligned and + match --checkpoint-block. Using --checkpoint-sync-url instead is + recommended. --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using --checkpoint-sync-url - instead is recommended. + Set a checkpoint block to start syncing from. Must be aligned and + match --checkpoint-state. Using --checkpoint-sync-url instead is + recommended. --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using --checkpoint-sync-url - instead is recommended. + Set a checkpoint state to start syncing from. Must be aligned and + match --checkpoint-block. Using --checkpoint-sync-url instead is + recommended. --checkpoint-sync-url Set the remote beacon node HTTP endpoint to use for checkpoint sync. --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] + Set the timeout for checkpoint sync calls to remote beacon node HTTP + endpoint. [default: 180] -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --discovery-port The UDP port that discovery will listen on. Defaults to `port` --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` - --enr-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 to the IP address it resolves to and does not auto-update based on PONG responses in discovery. Set this - only if you are sure other nodes can connect to your local node on this address. This will update the `ip4` or `ip6` ENR - fields accordingly. To update both, set this flag twice with the different values. + The UDP port that discovery will listen on over IPv6 if listening over + both IPv4 and IPv6. Defaults to `port6` + --enr-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 + to the IP address it resolves to and does not auto-update based on + PONG responses in discovery. Set this only if you are sure other nodes + can connect to your local node on this address. This will update the + `ip4` or `ip6` ENR fields accordingly. To update both, set this flag + twice with the different values. --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local - node on this port over IPv4. + The quic UDP4 port that will be set on the local ENR. Set this only if + you are sure other nodes can connect to your local node on this port + over IPv4. --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect to your local - node on this port over IPv6. + The quic UDP6 port that will be set on the local ENR. Set this only if + you are sure other nodes can connect to your local node on this port + over IPv6. --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over - IPv4. The --port flag is used if this is not set. + The TCP4 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv4. The + --port flag is used if this is not set. --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over - IPv6. The --port6 flag is used if this is not set. + The TCP6 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv6. The + --port6 flag is used if this is not set. --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over - IPv4. + The UDP4 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv4. --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on this port over - IPv6. + The UDP6 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv6. --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data availability - boundary relative to the current epoch. [default: 1] + The epoch interval with which to prune blobs from Lighthouse's + database when they are older than the data availability boundary + relative to the current epoch. [default: 1] --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less frequent runs can - be useful for minimizing disk writes [default: 1] + The number of epochs to wait between running the migration of data + from the hot DB to the cold DB. Less frequent runs can be useful for + minimizing disk writes [default: 1] --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses from the Eth1 - endpoint. [default: 1000] + Specifies the number of blocks that a deposit log query should span. + This will reduce the size of responses from the Eth1 endpoint. + [default: 1000] --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the cache. Setting this - value lower can help compensate for irregular Proof-of-Work block times, but setting it too low can make the node - vulnerable to re-orgs. + Specifies the distance between the Eth1 chain head and the last block + which should be imported into the cache. Setting this value lower can + help compensate for irregular Proof-of-Work block times, but setting + it too low can make the node vulnerable to re-orgs. --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to populate the - deposit cache. + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC + connection. Uses the same endpoint to populate the deposit cache. --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + File path which contains the hex-encoded JWT secret for the execution + endpoint provided in the --execution-endpoint flag. --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It corresponds to - the 'id' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a unique identifier to + execution nodes during JWT authentication. It corresponds to the 'id' + field in the JWT claims object.Set to empty by default --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. + Hex-encoded JWT secret for the execution endpoint provided in the + --execution-endpoint flag. --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It corresponds to the - 'clv' field in the JWT claims object.Set to empty by default + Used by the beacon node to communicate a client version to execution + nodes during JWT authentication. It corresponds to the 'clv' field in + the JWT claims object.Set to empty by default --execution-timeout-multiplier - Unsigned integer to multiply the default execution timeouts by. [default: 1] + Unsigned integer to multiply the default execution timeouts by. + [default: 1] --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent waiting at all by - setting the timeout to 0, however you risk proposing atop the wrong parent block. [default: 250] + Set the maximum number of milliseconds to wait for fork choice before + proposing a block. You can prevent waiting at all by setting the + timeout to 0, however you risk proposing atop the wrong parent block. + [default: 250] --freezer-dir Data directory for the freezer database. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated to fit in 32 - bytes. + Specify your custom graffiti to be included in blocks. Defaults to the + current version and commit, truncated to fit in 32 bytes. --historic-state-cache-size - Specifies how many states from the freezer database should cache in memory [default: 1] + Specifies how many states from the freezer database should cache in + memory [default: 1] --http-address
Set the listen address for the RESTful HTTP API server. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5052). + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5052). --http-duplicate-block-status - Status code to send when a block that is already known is POSTed to the HTTP API. + Status code to send when a block that is already known is POSTed to + the HTTP API. --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to "true", HTTP API - requests will be queued and scheduled alongside other tasks. When set to "false", HTTP API responses will be executed - immediately. + The beacon processor is a scheduler which provides quality-of-service + and DoS protection. When set to "true", HTTP API requests will be + queued and scheduled alongside other tasks. When set to "false", HTTP + API responses will be executed immediately. --http-port Set the listen TCP port for the RESTful HTTP API server. --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can prevent messages from - being dropped. + Multiplier to apply to the length of HTTP server-sent-event (SSE) + channels. Increasing this value can prevent messages from being + dropped. --http-tls-cert - The path of the certificate to be used when serving the HTTP API server over TLS. + The path of the certificate to be used when serving the HTTP API + server over TLS. --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not be password-protected. + The path of the private key to be used when serving the HTTP API + server over TLS. Must not be password-protected. --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this node).Rate limit quotas per protocol can be set in the form - of :/. To set quotas for multiple protocols, separate them by ';'. This is enabled - by default, using default quotas. To disable rate limiting use the disable-inbound-rate-limiter flag instead. + Configures the inbound rate limiter (requests received by this + node).Rate limit quotas per protocol can be set in the form of + :/. To set quotas for multiple + protocols, separate them by ';'. This is enabled by default, using + default quotas. To disable rate limiting use the + disable-inbound-rate-limiter flag instead. --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this path. This - feature is only recommended for developers. This directory is not pruned, users should be careful to avoid filling up their - disks. + If a block succeeds gossip validation whilst failing full validation, + store the block SSZ as a file at this path. This feature is only + recommended for developers. This directory is not pruned, users should + be careful to avoid filling up their disks. --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. + One or more comma-delimited multiaddrs to manually connect to a libp2p + peer without an ENR. --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag twice with the - different values. + The address lighthouse will listen for UDP and TCP connections. To + listen over IpV4 and IpV6 set this flag twice with the different + values. Examples: - --listen-address '0.0.0.0' will listen over IPv4. - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the given addresses is - not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be accepted. [default: 0.0.0.0] + - --listen-address '0.0.0.0' --listen-address '::' will listen over + both IPv4 and IPv6. The order of the given addresses is not relevant. + However, multiple IPv4, or multiple IPv6 addresses will not be + accepted. [default: 0.0.0.0] --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority forks from wasting - our time and disk space, but could also cause unnecessary consensus failures, so is disabled by default. + Refuse to skip more than this many slots when processing an + attestation. This prevents nodes on minority forks from wasting our + time and disk space, but could also cause unnecessary consensus + failures, so is disabled by default. --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5054). + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5054). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on - certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This - will send information to a remote sever which may identify and associate your validators, IP address and other personal - information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote + endpoint. This can be used to monitor your setup on certain services + (e.g. beaconcha.in). This flag sets the endpoint where the beacon node + metrics will be sent. Note: This will send information to a remote + sever which may identify and associate your validators, IP address and + other personal information. Always use a HTTPS connection and never + provide an untrusted URL. --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + Defines how many seconds to wait between each message sent to the + monitoring-endpoint. Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --network-dir - Data directory for network keys. Defaults to network/ inside the beacon node dir. + Data directory for network keys. Defaults to network/ inside the + beacon node dir. --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value and the Quic UDP - port will be set to this value + 1. The discovery port can be modified by the --discovery-port flag and the quic port can - be modified by the --quic-port flag. If listening over both IPv4 and IPv6 the --port flag will apply to the IPv4 address - and --port6 to the IPv6 address. [default: 9000] + The TCP/UDP ports to listen on. There are two UDP ports. The discovery + UDP port will be set to this value and the Quic UDP port will be set + to this value + 1. The discovery port can be modified by the + --discovery-port flag and the quic port can be modified by the + --quic-port flag. If listening over both IPv4 and IPv6 the --port flag + will apply to the IPv4 address and --port6 to the IPv6 address. + [default: 9000] --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when required. The Quic - UDP port will be set to this value + 1. [default: 9090] + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 + and IPv6. Defaults to 9090 when required. The Quic UDP port will be + set to this value + 1. [default: 9090] --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are useful for - execution nodes which don't improve their payload after the first call, and high values are useful for ensuring the EL is - given ample notice. Default: 1/3 of a slot. + The time before the start of a proposal slot at which payload + attributes should be sent. Low values are useful for execution nodes + which don't improve their payload after the first call, and high + values are useful for ensuring the EL is given ample notice. Default: + 1/3 of a slot. --progressive-balances - Deprecated. This optimisation is now the default and cannot be disabled. + Deprecated. This optimisation is now the default and cannot be + disabled. --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent failed reorgs by - ensuring the block has ample time to propagate and be processed by the network. The default is 1/12th of a slot (1 second - on mainnet) + Maximum delay after the start of the slot at which to propose a + reorging block. Lower values can prevent failed reorgs by ensuring the + block has ample time to propagate and be processed by the network. The + default is 1/12th of a slot (1 second on mainnet) --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain slots. An offset of - N means that reorging proposals will not be attempted at any slot such that `slot % SLOTS_PER_EPOCH == N`. By default only - re-orgs at offset 0 will be avoided. Any offsets supplied with this flag will impose additional restrictions. + Comma-separated list of integer offsets which can be used to avoid + proposing reorging blocks at certain slots. An offset of N means that + reorging proposals will not be attempted at any slot such that `slot % + SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be + avoided. Any offsets supplied with this flag will impose additional + restrictions. --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 + Maximum number of epochs since finalization at which proposer reorgs + are allowed. Default: 2 --proposer-reorg-parent-threshold - Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% + Percentage of parent vote weight above which to attempt a proposer + reorg. Default: 160% --proposer-reorg-threshold - Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% + Percentage of head vote weight below which to attempt a proposer + reorg. Default: 20% --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative to the current - epoch. [default: true] + Prune blobs from Lighthouse's database when they are older than the + data data availability boundary relative to the current epoch. + [default: true] --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution client, as payloads - need to be reconstructed and sent to syncing peers. [default: true] + Prune execution payloads from Lighthouse's database. This saves space + but imposes load on the execution client, as payloads need to be + reconstructed and sent to syncing peers. [default: true] --quic-port The UDP port that quic will listen on. Defaults to `port` + 1 --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + 1 + The UDP port that quic will listen on over IPv6 if listening over both + IPv4 and IPv6. Defaults to `port6` + 1 --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate limit quotas per protocol can be set in the form of - :/. To set quotas for multiple protocols, separate them by ';'. If the self rate - limiter is enabled and a protocol is not present in the configuration, the quotas used for the inbound rate limiter will be - used. + Enables the outbound rate limiter (requests made by this node).Rate + limit quotas per protocol can be set in the form of + :/. To set quotas for multiple + protocols, separate them by ';'. If the self rate limiter is enabled + and a protocol is not present in the configuration, the quotas used + for the inbound rate limiter will be used. --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user to set the - shuffling cache size in epochs. Shufflings are dependent on validator count and setting this value to a large number can - consume a large amount of memory. + Some HTTP API requests can be optimised by caching the shufflings at + each epoch. This flag allows the user to set the shuffling cache size + in epochs. Shufflings are dependent on validator count and setting + this value to a large number can consume a large amount of memory. --slasher-att-cache-size Set the maximum number of attestation roots for the slasher to cache --slasher-backend - Set the database backend to be used by the slasher. [possible values: lmdb, disabled] + Set the database backend to be used by the slasher. [possible values: + lmdb, disabled] --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] + Broadcast slashings found by the slasher to the rest of the network + [Enabled by default]. [default: true] --slasher-chunk-size Number of epochs per validator per chunk stored on disk. --slasher-dir Set the slasher's database directory. --slasher-history-length - Configure how many epochs of history the slasher keeps. Immutable after initialization. + Configure how many epochs of history the slasher keeps. Immutable + after initialization. --slasher-max-db-size Maximum size of the MDBX database used by the slasher. --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if the - slasher-update-period is a multiple of the slot duration. + Set the delay from the start of the slot at which the slasher should + ingest attestations. Only effective if the slasher-update-period is a + multiple of the slot duration. --slasher-update-period Configure how often the slasher runs batch processing. --slasher-validator-chunk-size Number of validators per chunk stored on disk. --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. [default: 8192 - (mainnet) or 64 (minimal)] + Specifies how often a freezer DB restore point should be stored. + Cannot be changed after initialization. [default: 8192 (mainnet) or 64 + (minimal)] --state-cache-size Specifies the size of the snapshot cache [default: 3] --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this - flag on the validator client instead of (or in addition to) setting it here. + Emergency fallback fee recipient for use in case the validator client + does not have one configured. You should set this flag on the + validator client instead of (or in addition to) setting it here. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --target-peers The target number of peers. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according to the peer scoring system. + One or more comma-delimited trusted peer ids which always have the + highest score according to the peer scoring system. --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is generated from - the mainnet kzg ceremony. Use with caution + Path to a json file containing the trusted setup params. NOTE: This + will override the trusted setup that is generated from the mainnet kzg + ceremony. Use with caution --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given path. + As per --validator-monitor-pubkeys, but the comma-separated list is + contained within a file at the given path. --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator Prometheus metrics - and issuing per-validator logs. Instead, it will provide aggregate metrics and logs. This avoids infeasibly high - cardinality in the Prometheus database and high log volume when using many validators. Defaults to 64. + Once the validator monitor reaches this number of local validators it + will stop collecting per-validator Prometheus metrics and issuing + per-validator logs. Instead, it will provide aggregate metrics and + logs. This avoids infeasibly high cardinality in the Prometheus + database and high log volume when using many validators. Defaults to + 64. --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special monitoring and - additional logging. + A comma-separated list of 0x-prefixed validator public keys. These + validators will receive special monitoring and additional logging. --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The block root - should be 0x-prefixed. Note that this flag is for verification only, to perform a checkpoint sync from a recent state use - --checkpoint-sync-url. - -h, --help - Print help + Specify a weak subjectivity checkpoint in `block_root:epoch` format to + verify the node's sync against. The block root should be 0x-prefixed. + Note that this flag is for verification only, to perform a checkpoint + sync from a recent state use --checkpoint-sync-url. -V, --version Print version Flags: - --allow-insecure-genesis-sync Enable syncing from genesis, which is generally insecure and incompatible with data - availability checks. Checkpoint syncing is the preferred method for syncing a node. Only - use this flag when testing. DO NOT use on mainnet! - --always-prefer-builder-payload This flag is deprecated and has no effect. - --always-prepare-payload Send payload attributes with every fork choice update. This is intended for use by block - builders, relays and developers. You should set a fee recipient on this BN and also - consider adjusting the --prepare-payload-lookahead flag. - --builder-fallback-disable-checks This flag disables all checks related to chain health. This means the builder API will - always be used for payload construction, regardless of recent chain conditions. - --compact-db If present, apply compaction to the database on start-up. Use with caution. It is - generally not recommended unless auto-compaction is disabled. - --disable-backfill-rate-limiting Disable the backfill sync rate-limiting. This allow users to just sync the entire chain as - fast as possible, however it can result in resource contention which degrades staking - performance. Stakers should generally choose to avoid this flag since backfill sync is not - required for staking. - --disable-deposit-contract-sync Explicitly disables syncing of deposit logs from the execution node. This overrides any - previous option that depends on it. Useful if you intend to run a non-validating beacon - node. - --disable-duplicate-warn-logs This flag is deprecated and has no effect. - --disable-enr-auto-update Discovery automatically updates the nodes local ENR with an external IP address and port - as seen by other peers on the network. This disables this feature, fixing the ENR's - IP/PORT to those specified on boot. - --disable-inbound-rate-limiter Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts Disable the timeouts applied to some internal locks by default. This can lead to less - spurious failures on slow hardware but is considered experimental as it may obscure - performance issues. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-optimistic-finalized-sync Force Lighthouse to verify every execution block hash with the execution client during - finalized sync. By default block hashes will be checked in Lighthouse and only passed to - the EL if initial verification fails. - --disable-packet-filter Disables the discovery packet filter. Useful for testing in smaller networks - --disable-proposer-reorgs Do not attempt to reorg late blocks from other validators when proposing. - --disable-quic Disables the quic transport. The node will rely solely on the TCP transport for libp2p - connections. - --disable-upnp Disables UPnP support. Setting this will prevent Lighthouse from attempting to - automatically establish external port mappings. - --dummy-eth1 If present, uses an eth1 backend that generates static dummy data.Identical to the method - used at the 2019 Canada interop. - -e, --enr-match 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-private-discovery Lighthouse by default does not discover private IP addresses. Set this flag to enable - connection attempts to local addresses. - --eth1 If present the node will connect to an eth1 node. This is required for block production, - you must use this flag if you wish to serve a validator. - --eth1-purge-cache Purges the eth1 block and deposit caches - --genesis-backfill Attempts to download blocks all the way back to genesis when checkpoint syncing. - --gui Enable the graphical user interface and all its requirements. This enables --http and - --validator-monitor-auto and enables SSE logging. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-enable-tls Serves the RESTful HTTP API server over TLS. This feature is currently experimental. - --import-all-attestations Import and aggregate all attestations, regardless of validator subscriptions. This will - only import attestations from already-subscribed subnets, use with --subscribe-all-subnets - to ensure all attestations are received for import. - --light-client-server Act as a full node supporting light clients on the p2p network [experimental] - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any - user on the machine. Note that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --private Prevents sending various client identification information. - --proposer-only Sets this beacon node at be a block proposer only node. This will run the beacon node in a - minimal configuration that is sufficient for block publishing only. This flag should be - used for a beacon node being referenced by validator client using the --proposer-node - flag. This configuration is for enabling more secure setups. - --purge-db If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states After a checkpoint sync, reconstruct historic states in the database. This requires - syncing all the way back to genesis. - --reset-payload-statuses When present, Lighthouse will forget the payload statuses of any already-imported blocks. - This can assist in the recovery from a consensus failure caused by the execution layer. - --self-limiter Enables the outbound rate limiter (requests made by this node). Use the - self-limiter-protocol flag to set per protocol configurations. If the self rate limiter is - enabled and a protocol is not present in the configuration, the quotas used for the - inbound rate limiter will be used. - --shutdown-after-sync Shutdown beacon node as soon as sync is completed. Backfill sync will not be performed - before shutdown. - --slasher Run a slasher alongside the beacon node. It is currently only recommended for expert users - because of the immaturity of the slasher UX and the extra resources required. - --staking Standard option for a staking beacon node. This will enable the HTTP server on - localhost:5052 and import deposit logs from the execution node. This is equivalent to - `--http` on merge-ready networks, or `--http --eth1` pre-merge - --subscribe-all-subnets Subscribe to all subnets regardless of validator count. This will also advertise the - beacon node as being long-lived subscribed to all subnets. - --validator-monitor-auto Enables the automatic detection and monitoring of validators connected to the HTTP API and - using the subnet subscription endpoint. This generally has the effect of providing - additional logging and metrics for locally controlled validators. - -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free - ports. -``` \ No newline at end of file + --allow-insecure-genesis-sync + Enable syncing from genesis, which is generally insecure and + incompatible with data availability checks. Checkpoint syncing is the + preferred method for syncing a node. Only use this flag when testing. + DO NOT use on mainnet! + --always-prefer-builder-payload + This flag is deprecated and has no effect. + --always-prepare-payload + Send payload attributes with every fork choice update. This is + intended for use by block builders, relays and developers. You should + set a fee recipient on this BN and also consider adjusting the + --prepare-payload-lookahead flag. + --builder-fallback-disable-checks + This flag disables all checks related to chain health. This means the + builder API will always be used for payload construction, regardless + of recent chain conditions. + --compact-db + If present, apply compaction to the database on start-up. Use with + caution. It is generally not recommended unless auto-compaction is + disabled. + --disable-backfill-rate-limiting + Disable the backfill sync rate-limiting. This allow users to just sync + the entire chain as fast as possible, however it can result in + resource contention which degrades staking performance. Stakers should + generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync + Explicitly disables syncing of deposit logs from the execution node. + This overrides any previous option that depends on it. Useful if you + intend to run a non-validating beacon node. + --disable-duplicate-warn-logs + This flag is deprecated and has no effect. + --disable-enr-auto-update + Discovery automatically updates the nodes local ENR with an external + IP address and port as seen by other peers on the network. This + disables this feature, fixing the ENR's IP/PORT to those specified on + boot. + --disable-inbound-rate-limiter + Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts + Disable the timeouts applied to some internal locks by default. This + can lead to less spurious failures on slow hardware but is considered + experimental as it may obscure performance issues. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --disable-optimistic-finalized-sync + Force Lighthouse to verify every execution block hash with the + execution client during finalized sync. By default block hashes will + be checked in Lighthouse and only passed to the EL if initial + verification fails. + --disable-packet-filter + Disables the discovery packet filter. Useful for testing in smaller + networks + --disable-proposer-reorgs + Do not attempt to reorg late blocks from other validators when + proposing. + --disable-quic + Disables the quic transport. The node will rely solely on the TCP + transport for libp2p connections. + --disable-upnp + Disables UPnP support. Setting this will prevent Lighthouse from + attempting to automatically establish external port mappings. + --dummy-eth1 + If present, uses an eth1 backend that generates static dummy + data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match + 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-private-discovery + Lighthouse by default does not discover private IP addresses. Set this + flag to enable connection attempts to local addresses. + --eth1 + If present the node will connect to an eth1 node. This is required for + block production, you must use this flag if you wish to serve a + validator. + --eth1-purge-cache + Purges the eth1 block and deposit caches + --genesis-backfill + Attempts to download blocks all the way back to genesis when + checkpoint syncing. + --gui + Enable the graphical user interface and all its requirements. This + enables --http and --validator-monitor-auto and enables SSE logging. + -h, --help + Prints help information + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-enable-tls + Serves the RESTful HTTP API server over TLS. This feature is currently + experimental. + --import-all-attestations + Import and aggregate all attestations, regardless of validator + subscriptions. This will only import attestations from + already-subscribed subnets, use with --subscribe-all-subnets to ensure + all attestations are received for import. + --light-client-server + Act as a full node supporting light clients on the p2p network + [experimental] + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --private + Prevents sending various client identification information. + --proposer-only + Sets this beacon node at be a block proposer only node. This will run + the beacon node in a minimal configuration that is sufficient for + block publishing only. This flag should be used for a beacon node + being referenced by validator client using the --proposer-node flag. + This configuration is for enabling more secure setups. + --purge-db + If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states + After a checkpoint sync, reconstruct historic states in the database. + This requires syncing all the way back to genesis. + --reset-payload-statuses + When present, Lighthouse will forget the payload statuses of any + already-imported blocks. This can assist in the recovery from a + consensus failure caused by the execution layer. + --self-limiter + Enables the outbound rate limiter (requests made by this node). Use + the self-limiter-protocol flag to set per protocol configurations. If + the self rate limiter is enabled and a protocol is not present in the + configuration, the quotas used for the inbound rate limiter will be + used. + --shutdown-after-sync + Shutdown beacon node as soon as sync is completed. Backfill sync will + not be performed before shutdown. + --slasher + Run a slasher alongside the beacon node. It is currently only + recommended for expert users because of the immaturity of the slasher + UX and the extra resources required. + --staking + Standard option for a staking beacon node. This will enable the HTTP + server on localhost:5052 and import deposit logs from the execution + node. This is equivalent to `--http` on merge-ready networks, or + `--http --eth1` pre-merge + --subscribe-all-subnets + Subscribe to all subnets regardless of validator count. This will also + advertise the beacon node as being long-lived subscribed to all + subnets. + --validator-monitor-auto + Enables the automatic detection and monitoring of validators connected + to the HTTP API and using the subnet subscription endpoint. This + generally has the effect of providing additional logging and metrics + for locally controlled validators. + -z, --zero-ports + Sets all listening TCP/UDP ports to 0, allowing the OS to choose some + arbitrary free ports. +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index c780a2b77f4..f31345f3dc0 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,96 +1,139 @@ # Lighthouse General Commands ``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator -accounts. +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a +validator client and utilities for managing validator accounts. Usage: lighthouse [OPTIONS] [COMMAND] Commands: - database_manager Manage a beacon node database [aliases: db] - validator_manager Utilities for managing a Lighthouse validator client via the HTTP API. [aliases: vm, validator-manager, - validator_manager] - beacon_node The primary component which connects to the Ethereum 2.0 P2P network and downloads, verifies and stores - blocks. Provides a HTTP API for querying the beacon chain and publishing messages to the network. [aliases: - b, bn, beacon] - boot_node Start a special Lighthouse process that only serves as a discv5 boot-node. This process will *not* import - blocks or perform most typical beacon node functions. Instead, it will simply run the discv5 service and - assist nodes on the network to discover each other. This is the recommended way to provide a network - boot-node since it has a reduced attack surface compared to a full beacon node. - validator_client When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and - attestations). [aliases: v, vc, validator] - account_manager Utilities for generating and managing Ethereum 2.0 accounts. [aliases: a, am, account, account_manager] - help Print this message or the help of the given subcommand(s) + account_manager + Utilities for generating and managing Ethereum 2.0 accounts. [aliases: + a, am, account, account_manager] + beacon_node + The primary component which connects to the Ethereum 2.0 P2P network + and downloads, verifies and stores blocks. Provides a HTTP API for + querying the beacon chain and publishing messages to the network. + [aliases: b, bn, beacon] + boot_node + Start a special Lighthouse process that only serves as a discv5 + boot-node. This process will *not* import blocks or perform most + typical beacon node functions. Instead, it will simply run the discv5 + service and assist nodes on the network to discover each other. This + is the recommended way to provide a network boot-node since it has a + reduced attack surface compared to a full beacon node. + database_manager + Manage a beacon node database [aliases: db] + validator_client + When connected to a beacon node, performs the duties of a staked + validator (e.g., proposing blocks and attestations). [aliases: v, vc, + validator] + validator_manager + Utilities for managing a Lighthouse validator client via the HTTP API. + [aliases: vm, validator-manager, validator_manager] + help + Print this message or the help of the given subcommand(s) Options: -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - -h, --help - Print help + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. -V, --version Print version Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. - -l DEPRECATED Enables environment logging giving access to sub-protocol logs such as discv5 and - libp2p - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator and - so this flag should be used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. -``` \ No newline at end of file + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + -l + DEPRECATED Enables environment logging giving access to sub-protocol + logs such as discv5 and libp2p + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 8e70e243ca1..642bb3791ea 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -1,195 +1,279 @@ # Validator Client ``` -When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). +When connected to a beacon node, performs the duties of a staked validator +(e.g., proposing blocks and attestations). Usage: lighthouse validator_client [OPTIONS] Options: --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. Default is http://localhost:5052. + Comma-separated addresses to one or more beacon node HTTP APIs. + Default is http://localhost:5052. --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when connecting to a beacon node (and/or proposer node). These - certificates must be in PEM format and are used in addition to the OS trust store. Commas must only be used as a delimiter, - and must not be part of the certificate path. + Comma-separated paths to custom TLS certificates to use when + connecting to a beacon node (and/or proposer node). These certificates + must be in PEM format and are used in addition to the OS trust store. + Commas must only be used as a delimiter, and must not be part of the + certificate path. --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon nodes. Possible values are: none, attestations, - blocks, subscriptions, sync-committee. Default (when flag is omitted) is to broadcast subscriptions only. + Comma-separated list of beacon API topics to broadcast to all beacon + nodes. Possible values are: none, attestations, blocks, subscriptions, + sync-committee. Default (when flag is omitted) is to broadcast + subscriptions only. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the + builder's payload value when choosing between a builder payload header + and payload from the local execution node. --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override the timestamp used in the builder api registration + This flag takes a unix timestamp value that will be used to override + the timestamp used in the builder api registration -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --gas-limit - The gas limit to be used in all builder proposals for all validators managed by this validator client. Note this will not - necessarily be used if the gas limit set here moves too far from the previous block's gas limit. [default: 30,000,000] + The gas limit to be used in all builder proposals for all validators + managed by this validator client. Note this will not necessarily be + used if the gas limit set here moves too far from the previous block's + gas limit. [default: 30,000,000] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --graffiti Specify your custom graffiti to be included in blocks. --graffiti-file Specify a graffiti file to load validator graffitis from. --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted and therefore it is unsafe to publish on a public - network. When this flag is used, it additionally requires the explicit use of the `--unencrypted-http-transport` flag to - ensure the user is aware of the risks involved. For access via the Internet, users should apply transport-layer security - like a HTTPS reverse-proxy or SSH tunnelling. + Set the address for the HTTP address. The HTTP server is not encrypted + and therefore it is unsafe to publish on a public network. When this + flag is used, it additionally requires the explicit use of the + `--unencrypted-http-transport` flag to ensure the user is aware of the + risks involved. For access via the Internet, users should apply + transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5062). + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5062). --http-port Set the listen TCP port for the RESTful HTTP API server. --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --metrics-address
Set the listen address for the Prometheus metrics HTTP server. --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not recommended in - production). If no value is supplied, the CORS allowed origin is set to the listen address of this server (e.g., - http://localhost:5064). + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5064). --metrics-port Set the listen TCP port for the Prometheus metrics HTTP server. --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor your setup on - certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node metrics will be sent. Note: This - will send information to a remote sever which may identify and associate your validators, IP address and other personal - information. Always use a HTTPS connection and never provide an untrusted URL. + Enables the monitoring service for sending system metrics to a remote + endpoint. This can be used to monitor your setup on certain services + (e.g. beaconcha.in). This flag sets the endpoint where the beacon node + metrics will be sent. Note: This will send information to a remote + sever which may identify and associate your validators, IP address and + other personal information. Always use a HTTPS connection and never + provide an untrusted URL. --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s + Defines how many seconds to wait between each message sent to the + monitoring-endpoint. Default: 60s --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block - proposals. A failure will revert back to the standard beacon nodes specified in --beacon-nodes. + Comma-separated addresses to one or more beacon node HTTP APIs. These + specify nodes that are used to send beacon block proposals. A failure + will revert back to the standard beacon nodes specified in + --beacon-nodes. --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. --secrets-dir - The directory which contains the password to unlock the validator voting keypairs. Each password should be contained in a - file where the name is the 0x-prefixed hex representation of the validators voting public key. Defaults to - ~/.lighthouse/{network}/secrets. + The directory which contains the password to unlock the validator + voting keypairs. Each password should be contained in a file where the + name is the 0x-prefixed hex representation of the validators voting + public key. Defaults to ~/.lighthouse/{network}/secrets. --suggested-fee-recipient - Once the merge has happened, this address will receive transaction fees from blocks proposed by this validator client. If a - fee recipient is configured in the validator definitions it takes priority over this value. + Once the merge has happened, this address will receive transaction + fees from blocks proposed by this validator client. If a fee recipient + is configured in the validator definitions it takes priority over this + value. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. --validator-registration-batch-size - Defines the number of validators per validator/register_validator request sent to the BN. This value can be reduced to - avoid timeouts from builders. [default: 500] + Defines the number of validators per validator/register_validator + request sent to the BN. This value can be reduced to avoid timeouts + from builders. [default: 500] --validators-dir - The directory which contains the validator keystores, deposit data for each validator along with the common slashing - protection database and the validator_definitions.yml + The directory which contains the validator keystores, deposit data for + each validator along with the common slashing protection database and + the validator_definitions.yml --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to never timeout [default: 90000] + Keep-alive timeout for each web3signer connection. Set to 'null' to + never timeout [default: 90000] --web3-signer-max-idle-connections - Maximum number of idle connections to maintain per web3signer host. Default is unlimited. - -h, --help - Print help + Maximum number of idle connections to maintain per web3signer host. + Default is unlimited. Flags: - --builder-proposals If this flag is set, Lighthouse will query the Beacon Node for only block headers - during proposals and will sign over headers. Useful for outsourcing execution payload - construction during proposals. - --disable-auto-discover If present, do not attempt to discover new validators in the validators-dir. - Validators will need to be manually added to the validator_definitions.yml file. - --disable-latency-measurement-service Disables the service that periodically attempts to measure latency to BNs. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory - allocation issues. - --disable-run-on-all DEPRECATED. Use --broadcast. By default, Lighthouse publishes attestation, sync - committee subscriptions and proposer preparation messages to all beacon nodes - provided in the `--beacon-nodes flag`. This option changes that behaviour such that - these api calls only go out to the first available and synced beacon node - --disable-slashing-protection-web3signer Disable Lighthouse's slashing protection for all web3signer keys. This can reduce the - I/O burden on the VC but is only safe if slashing protection is enabled on the remote - signer and is implemented correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN - THAT SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET SLASHED IF YOU - USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING PROTECTION. - --distributed Enables functionality required for running the validator in a distributed validator - cluster. - --enable-doppelganger-protection If this flag is set, Lighthouse will delay startup for three epochs and monitor for - messages on the network by any of the validators managed by this client. This will - result in three (possibly four) epochs worth of missed attestations. If an - attestation is detected during this period, it means it is very likely that you are - running a second validator client with the same keys. This validator client will - immediately shutdown if this is detected in order to avoid potentially committing a - slashable offense. Use this flag in order to ENABLE this functionality, without this - flag Lighthouse will begin attesting immediately. - --enable-high-validator-count-metrics Enable per validator metrics for > 64 validators. Note: This flag is automatically - enabled for <= 64 validators. Enabling this metric for higher validator counts will - lead to higher volume of prometheus metrics being collected. - --http Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export If present, allow access to the DELETE /lighthouse/keystores HTTP API method, which - allows exporting keystores and passwords to HTTP API consumers who have access to the - API token. This method is useful for exporting validators, however it should be used - with caution since it exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir If present, any validators created via the HTTP will have keystore passwords stored - in the secrets-dir rather than the validator definitions file. - --init-slashing-protection If present, do not require the slashing protection database to exist before running. - You SHOULD NOT use this flag unless you're certain that a new slashing protection - database is required. Usually, your database will have been initialized when you - imported your validator keys. If you misplace your database and then run with this - flag you risk being slashed. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store - old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by - any user on the machine. Note that logs can often contain sensitive information about - your validator and so this flag should be used with caution. For Windows users, the - log file permissions will be inherited from the parent folder. - --metrics Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, - regardless of payload value. - --produce-block-v3 Enable block production via the block v3 endpoint for this validator client. This - should only be enabled when paired with a beacon node that has this endpoint - implemented. This flag will be enabled by default in future. - --unencrypted-http-transport This is a safety flag to ensure that the user is aware that the http transport is - unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts If present, the validator client will use longer timeouts for requests made to the - beacon node. This flag is generally not recommended, longer timeouts can cause missed - duties when fallbacks are used. -``` \ No newline at end of file + --builder-proposals + If this flag is set, Lighthouse will query the Beacon Node for only + block headers during proposals and will sign over headers. Useful for + outsourcing execution payload construction during proposals. + --disable-auto-discover + If present, do not attempt to discover new validators in the + validators-dir. Validators will need to be manually added to the + validator_definitions.yml file. + --disable-latency-measurement-service + Disables the service that periodically attempts to measure latency to + BNs. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --disable-run-on-all + DEPRECATED. Use --broadcast. By default, Lighthouse publishes + attestation, sync committee subscriptions and proposer preparation + messages to all beacon nodes provided in the `--beacon-nodes flag`. + This option changes that behaviour such that these api calls only go + out to the first available and synced beacon node + --disable-slashing-protection-web3signer + Disable Lighthouse's slashing protection for all web3signer keys. This + can reduce the I/O burden on the VC but is only safe if slashing + protection is enabled on the remote signer and is implemented + correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT + SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET + SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING + PROTECTION. + --distributed + Enables functionality required for running the validator in a + distributed validator cluster. + --enable-doppelganger-protection + If this flag is set, Lighthouse will delay startup for three epochs + and monitor for messages on the network by any of the validators + managed by this client. This will result in three (possibly four) + epochs worth of missed attestations. If an attestation is detected + during this period, it means it is very likely that you are running a + second validator client with the same keys. This validator client will + immediately shutdown if this is detected in order to avoid potentially + committing a slashable offense. Use this flag in order to ENABLE this + functionality, without this flag Lighthouse will begin attesting + immediately. + --enable-high-validator-count-metrics + Enable per validator metrics for > 64 validators. Note: This flag is + automatically enabled for <= 64 validators. Enabling this metric for + higher validator counts will lead to higher volume of prometheus + metrics being collected. + -h, --help + Prints help information + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export + If present, allow access to the DELETE /lighthouse/keystores HTTP API + method, which allows exporting keystores and passwords to HTTP API + consumers who have access to the API token. This method is useful for + exporting validators, however it should be used with caution since it + exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir + If present, any validators created via the HTTP will have keystore + passwords stored in the secrets-dir rather than the validator + definitions file. + --init-slashing-protection + If present, do not require the slashing protection database to exist + before running. You SHOULD NOT use this flag unless you're certain + that a new slashing protection database is required. Usually, your + database will have been initialized when you imported your validator + keys. If you misplace your database and then run with this flag you + risk being slashed. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed + by builders, regardless of payload value. + --produce-block-v3 + Enable block production via the block v3 endpoint for this validator + client. This should only be enabled when paired with a beacon node + that has this endpoint implemented. This flag will be enabled by + default in future. + --unencrypted-http-transport + This is a safety flag to ensure that the user is aware that the http + transport is unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts + If present, the validator client will use longer timeouts for requests + made to the beacon node. This flag is generally not recommended, + longer timeouts can cause missed duties when fallbacks are used. +``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 0999eecbd6b..1b9324f4199 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -6,82 +6,121 @@ Utilities for managing a Lighthouse validator client via the HTTP API. Usage: lighthouse validator_manager [OPTIONS] [COMMAND] Commands: - create Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and - other validator data. This file can then be imported to a validator client using the "import-validators" command. - Another, optional JSON file is created which contains a list of validator deposits in the same format as the - "ethereum/staking-deposit-cli" tool. - import Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be - generated using the "create-validators" command. - move Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be - generated using the "create-validators" command. This command only supports validators signing via a keystore on the - local file system (i.e., not Web3Signer validators). - help Print this message or the help of the given subcommand(s) + create + Creates new validators from BIP-39 mnemonic. A JSON file will be + created which contains all the validator keystores and other validator + data. This file can then be imported to a validator client using the + "import-validators" command. Another, optional JSON file is created + which contains a list of validator deposits in the same format as the + "ethereum/staking-deposit-cli" tool. + import + Uploads validators to a validator client using the HTTP API. The + validators are defined in a JSON file which can be generated using the + "create-validators" command. + move + Uploads validators to a validator client using the HTTP API. The + validators are defined in a JSON file which can be generated using the + "create-validators" command. This command only supports validators + signing via a keystore on the local file system (i.e., not Web3Signer + validators). + help + Print this message or the help of the given subcommand(s) Options: -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - -h, --help - Print help + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator and - so this flag should be used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. -``` \ No newline at end of file + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 45123e82be8..7a01cf16374 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -1,123 +1,167 @@ # Validator Manager Create ``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which contains all the validator keystores and other -validator data. This file can then be imported to a validator client using the "import-validators" command. Another, optional JSON -file is created which contains a list of validator deposits in the same format as the "ethereum/staking-deposit-cli" tool. +Creates new validators from BIP-39 mnemonic. A JSON file will be created which +contains all the validator keystores and other validator data. This file can +then be imported to a validator client using the "import-validators" command. +Another, optional JSON file is created which contains a list of validator +deposits in the same format as the "ethereum/staking-deposit-cli" tool. Usage: lighthouse validator_manager create [OPTIONS] --output-path Options: --beacon-node - A HTTP(S) address of a beacon node using the beacon-API. If this value is provided, an error will be raised if any - validator key here is already known as a validator by that beacon node. This helps prevent the same validator being created - twice and therefore slashable conditions. + A HTTP(S) address of a beacon node using the beacon-API. If this value + is provided, an error will be raised if any validator key here is + already known as a validator by that beacon node. This helps prevent + the same validator being created twice and therefore slashable + conditions. --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the + builder's payload value when choosing between a builder payload header + and payload from the local execution node. --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: - true, false] + When provided, all created validators will attempt to create blocks + via builder rather than the local EL. [possible values: true, false] --count - The number of validators to create, regardless of how many already exist + The number of validators to create, regardless of how many already + exist -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --deposit-gwei - The GWEI value of the deposit amount. Defaults to the minimum amount required for an active validator - (MAX_EFFECTIVE_BALANCE) + The GWEI value of the deposit amount. Defaults to the minimum amount + required for an active validator (MAX_EFFECTIVE_BALANCE) --eth1-withdrawal-address - If this field is set, the given eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate - withdrawal credentials with the mnemonic-derived withdrawal public key in EIP-2334 format. + If this field is set, the given eth1 address will be used to create + the withdrawal credentials. Otherwise, it will generate withdrawal + credentials with the mnemonic-derived withdrawal public key in + EIP-2334 format. --first-index The first of consecutive key indexes you wish to create. [default: 0] --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this - flag. + All created validators will use this gas limit. It is recommended to + leave this as the default value by not specifying this flag. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --mnemonic-path If present, the mnemonic will be read in from this file. --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --output-path - The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created - if it does not exist. + The path to a directory where the validator and (optionally) deposits + files will be created. The directory will be created if it does not + exist. --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible - values: true, false] + If this flag is set, Lighthouse will always prefer blocks constructed + by builders, regardless of payload value. [possible values: true, + false] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from - the VC. + All created validators will use this value for the suggested fee + recipient. Omit this flag to use the default value from the VC. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - -h, --help - Print help + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. Flags: - --disable-deposits When provided don't generate the deposits JSON file that is commonly used for submitting - validator deposits via a web UI. Using this flag will save several seconds per validator if - the user has an alternate strategy for submitting deposits. - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally - increase memory usage, it should only be provided when debugging specific memory allocation - issues. - --force-bls-withdrawal-credentials If present, allows BLS withdrawal credentials rather than an execution address. This is not - recommended. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old - logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any - user on the machine. Note that logs can often contain sensitive information about your - validator and so this flag should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --specify-voting-keystore-password If present, the user will be prompted to enter the voting keystore password that will be - used to encrypt the voting keystores. If this flag is not provided, a random password will - be used. It is not necessary to keep backups of voting keystore passwords if the mnemonic - is safely backed up. - --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file + --disable-deposits + When provided don't generate the deposits JSON file that is commonly + used for submitting validator deposits via a web UI. Using this flag + will save several seconds per validator if the user has an alternate + strategy for submitting deposits. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --force-bls-withdrawal-credentials + If present, allows BLS withdrawal credentials rather than an execution + address. This is not recommended. + -h, --help + Prints help information + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password + If present, the user will be prompted to enter the voting keystore + password that will be used to encrypt the voting keystores. If this + flag is not provided, a random password will be used. It is not + necessary to keep backups of voting keystore passwords if the mnemonic + is safely backed up. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. +``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 10140318f02..02f5747d69f 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -1,89 +1,124 @@ # Validator Manager Import ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using -the "create-validators" command. +Uploads validators to a validator client using the HTTP API. The validators are +defined in a JSON file which can be generated using the "create-validators" +command. Usage: lighthouse validator_manager import [OPTIONS] --validators-file Options: -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. --validators-file - The path to a JSON file containing a list of validators to be imported to the validator client. This file is usually named - "validators.json". + The path to a JSON file containing a list of validators to be imported + to the validator client. This file is usually named "validators.json". --vc-token The file containing a token required by the validator client. --vc-url - A HTTP(S) address of a validator client using the keymanager-API. If this value is not supplied then a 'dry run' will be - conducted where no changes are made to the validator client. [default: http://localhost:5062] - -h, --help - Print help + A HTTP(S) address of a validator client using the keymanager-API. If + this value is not supplied then a 'dry run' will be conducted where no + changes are made to the validator client. [default: + http://localhost:5062] Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. - --ignore-duplicates If present, ignore any validators which already exist on the VC. Without this flag, the process - will terminate without making any changes. This flag should be used with caution, whilst it does - not directly cause slashable conditions, it might be an indicator that something is amiss. Users - should also be careful to avoid submitting duplicate deposits for validators that already exist - on the VC. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator and - so this flag should be used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. -``` \ No newline at end of file + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + --ignore-duplicates + If present, ignore any validators which already exist on the VC. + Without this flag, the process will terminate without making any + changes. This flag should be used with caution, whilst it does not + directly cause slashable conditions, it might be an indicator that + something is amiss. Users should also be careful to avoid submitting + duplicate deposits for validators that already exist on the VC. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 24d6d7b5f4e..2bca6652319 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -1,108 +1,145 @@ # Validator Manager Move ``` -Uploads validators to a validator client using the HTTP API. The validators are defined in a JSON file which can be generated using -the "create-validators" command. This command only supports validators signing via a keystore on the local file system (i.e., not -Web3Signer validators). +Uploads validators to a validator client using the HTTP API. The validators are +defined in a JSON file which can be generated using the "create-validators" +command. This command only supports validators signing via a keystore on the +local file system (i.e., not Web3Signer validators). Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url Options: --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the builder's payload value when choosing between a builder - payload header and payload from the local execution node. + Defines the boost factor, a percentage multiplier to apply to the + builder's payload value when choosing between a builder payload header + and payload from the local execution node. --builder-proposals - When provided, all created validators will attempt to create blocks via builder rather than the local EL. [possible values: - true, false] + When provided, all created validators will attempt to create blocks + via builder rather than the local EL. [possible values: true, false] --count The number of validators to move. -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to $HOME/.lighthouse/{network} - where network is the value of the `network` flag Note: Users should specify separate custom datadirs for different - networks. + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: info, debug, - trace, warn, error, crit] + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] --dest-vc-token - The file containing a token required by the destination validator client. + The file containing a token required by the destination validator + client. --dest-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "destination" and will have - new validators added as they are removed from the "source" validator client. + A HTTP(S) address of a validator client using the keymanager-API. This + validator client is the "destination" and will have new validators + added as they are removed from the "source" validator client. --gas-limit - All created validators will use this gas limit. It is recommended to leave this as the default value by not specifying this - flag. + All created validators will use this gas limit. It is recommended to + leave this as the default value by not specifying this flag. --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server URLs can generally - be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may be used. If the genesis state is - already included in this binary then this value will be ignored. + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] + The timeout in seconds for the request to --genesis-state-url. + [default: 180] --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a new log file is - generated where future logs are stored. Once the number of log files exceeds the value specified in `--logfile-max-number` - the oldest log file will be overwritten. + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, debug, trace, warn, - error, crit] + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. [default: 5] + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is disabled. - [default: 200] + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, chiado, sepolia, - holesky] + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible - values: true, false] + If this flag is set, Lighthouse will always prefer blocks constructed + by builders, regardless of payload value. [possible values: true, + false] --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override this parameter in the event of - an attack at the PoS transition block. Incorrect use of this flag can cause your node to possibly accept an invalid chain - or sync more slowly. Be extremely careful with this flag. + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. --src-vc-token The file containing a token required by the source validator client. --src-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This validator client is the "source" and contains the - validators that are to be moved. + A HTTP(S) address of a validator client using the keymanager-API. This + validator client is the "source" and contains the validators that are + to be moved. --stdin-inputs If present, read all user inputs from stdin instead of tty. --suggested-fee-recipient - All created validators will use this value for the suggested fee recipient. Omit this flag to use the default value from - the VC. + All created validators will use this value for the suggested fee + recipient. Omit this flag to use the default value from the VC. -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective if there is no - existing database. + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal PoW block. - Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if the user has a - clear understanding that the broad Ethereum community has elected to override the terminal PoW block. Incorrect use of this - flag will cause your node to experience a consensus failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal integer (not a - hex value). This flag should only be used if the user has a clear understanding that the broad Ethereum community has - elected to override the terminal difficulty. Incorrect use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. --validators - The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". - -h, --help - Print help + The validators to be moved. Either a list of 0x-prefixed validator + pubkeys or the keyword "all". Flags: - --disable-log-timestamp If present, do not include timestamps in logging output. - --disable-malloc-tuning If present, do not configure the system allocator. Providing this flag will generally increase - memory usage, it should only be provided when debugging specific memory allocation issues. - --log-color Force outputting colors when emitting logs to the terminal. - --logfile-compress If present, compress old log files. This can help reduce the space needed to store old logs. - --logfile-no-restricted-perms If present, log files will be generated as world-readable meaning they can be read by any user - on the machine. Note that logs can often contain sensitive information about your validator and - so this flag should be used with caution. For Windows users, the log file permissions will be - inherited from the parent folder. -``` \ No newline at end of file + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index 0854078e281..307b3043a2c 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -12,6 +12,16 @@ pub fn cli_app() -> Command { This is the recommended way to provide a network boot-node since it has a reduced attack \ surface compared to a full beacon node.") .styles(get_color_style()) + .display_order(0) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new("enr-address") .long("enr-address") @@ -23,7 +33,7 @@ pub fn cli_app() -> Command { local node on this address. This will update the `ip4` or `ip6` ENR fields \ accordingly. To update both, set this flag twice with the different values.") .action(ArgAction::Append) - .num_args(0..=2) + .num_args(1..=2) .required(true) .conflicts_with("network-dir") .display_order(0) diff --git a/database_manager/src/lib.rs b/database_manager/src/lib.rs index 804fc9da2a1..7a8e5141bfe 100644 --- a/database_manager/src/lib.rs +++ b/database_manager/src/lib.rs @@ -177,6 +177,15 @@ pub fn cli_app() -> Command { .visible_aliases(["db"]) .styles(get_color_style()) .about("Manage a beacon node database") + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new("slots-per-restore-point") .long("slots-per-restore-point") diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index 4b6ef255d88..5743bedfd70 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -80,6 +80,9 @@ fn main() { .version(SHORT_VERSION.as_str()) .author("Sigma Prime ") .styles(get_color_style()) + .next_line_help(true) + .term_width(80) + .disable_help_flag(true) .about( "Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon \ node, a validator client and utilities for managing validator accounts.", @@ -382,6 +385,15 @@ fn main() { .global(true) .display_order(0) ) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .subcommand(beacon_node::cli_app()) .subcommand(boot_node::cli_app()) .subcommand(validator_client::cli_app()) diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index ed91712b056..b4c66570c89 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -5,10 +5,20 @@ pub fn cli_app() -> Command { Command::new("validator_client") .visible_aliases(["v", "vc", "validator"]) .styles(get_color_style()) + .display_order(0) .about( "When connected to a beacon node, performs the duties of a staked \ validator (e.g., proposing blocks and attestations).", ) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new("beacon-nodes") .long("beacon-nodes") diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index 762cef9bc0f..2144b0ac7fa 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -45,6 +45,15 @@ pub fn cli_app() -> Command { Another, optional JSON file is created which contains a list of validator \ deposits in the same format as the \"ethereum/staking-deposit-cli\" tool.", ) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new(OUTPUT_PATH_FLAG) .long(OUTPUT_PATH_FLAG) diff --git a/validator_manager/src/import_validators.rs b/validator_manager/src/import_validators.rs index b72ecf1f55e..1f864cdf416 100644 --- a/validator_manager/src/import_validators.rs +++ b/validator_manager/src/import_validators.rs @@ -21,6 +21,15 @@ pub fn cli_app() -> Command { are defined in a JSON file which can be generated using the \"create-validators\" \ command.", ) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new(VALIDATORS_FILE_FLAG) .long(VALIDATORS_FILE_FLAG) diff --git a/validator_manager/src/lib.rs b/validator_manager/src/lib.rs index 297bf397f5e..16b6bbddf47 100644 --- a/validator_manager/src/lib.rs +++ b/validator_manager/src/lib.rs @@ -1,5 +1,5 @@ -use clap::{ArgMatches, Command}; -use clap_utils::get_color_style; +use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::{get_color_style, FLAG_HEADER}; use common::write_to_json_file; use environment::Environment; use serde::Serialize; @@ -44,6 +44,15 @@ pub fn cli_app() -> Command { .display_order(0) .styles(get_color_style()) .about("Utilities for managing a Lighthouse validator client via the HTTP API.") + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .subcommand(create_validators::cli_app()) .subcommand(import_validators::cli_app()) .subcommand(move_validators::cli_app()) diff --git a/validator_manager/src/move_validators.rs b/validator_manager/src/move_validators.rs index b95e759e9f8..9bc64b66e84 100644 --- a/validator_manager/src/move_validators.rs +++ b/validator_manager/src/move_validators.rs @@ -2,6 +2,7 @@ use super::common::*; use crate::DumpConfig; use account_utils::{read_password_from_user, ZeroizeString}; use clap::{Arg, ArgAction, ArgMatches, Command}; +use clap_utils::FLAG_HEADER; use eth2::{ lighthouse_vc::{ std_types::{ @@ -74,6 +75,15 @@ pub fn cli_app() -> Command { command. This command only supports validators signing via a keystore on the local \ file system (i.e., not Web3Signer validators).", ) + .arg( + Arg::new("help") + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER) + ) .arg( Arg::new(SRC_VC_URL_FLAG) .long(SRC_VC_URL_FLAG) From bd4e5c99576b28c7e31ec8017674c7bd7ee0d64d Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 16 Apr 2024 01:22:14 +0300 Subject: [PATCH 31/46] fmt --- account_manager/src/lib.rs | 12 ++++++------ account_manager/src/validator/mod.rs | 12 ++++++------ database_manager/src/lib.rs | 12 ++++++------ validator_manager/src/create_validators.rs | 12 ++++++------ validator_manager/src/import_validators.rs | 12 ++++++------ validator_manager/src/lib.rs | 12 ++++++------ validator_manager/src/move_validators.rs | 12 ++++++------ 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/account_manager/src/lib.rs b/account_manager/src/lib.rs index 755f8a84d0b..f1160fff9c5 100644 --- a/account_manager/src/lib.rs +++ b/account_manager/src/lib.rs @@ -23,12 +23,12 @@ pub fn cli_app() -> Command { .display_order(0) .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .subcommand(wallet::cli_app()) .subcommand(validator::cli_app()) diff --git a/account_manager/src/validator/mod.rs b/account_manager/src/validator/mod.rs index ccb3a940a1f..6616bb0c45c 100644 --- a/account_manager/src/validator/mod.rs +++ b/account_manager/src/validator/mod.rs @@ -22,12 +22,12 @@ pub fn cli_app() -> Command { .about("Provides commands for managing Eth2 validators.") .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .arg( Arg::new(VALIDATOR_DIR_FLAG) diff --git a/database_manager/src/lib.rs b/database_manager/src/lib.rs index 7a8e5141bfe..fafff0f0f9d 100644 --- a/database_manager/src/lib.rs +++ b/database_manager/src/lib.rs @@ -179,12 +179,12 @@ pub fn cli_app() -> Command { .about("Manage a beacon node database") .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .arg( Arg::new("slots-per-restore-point") diff --git a/validator_manager/src/create_validators.rs b/validator_manager/src/create_validators.rs index 2144b0ac7fa..592ef416347 100644 --- a/validator_manager/src/create_validators.rs +++ b/validator_manager/src/create_validators.rs @@ -47,12 +47,12 @@ pub fn cli_app() -> Command { ) .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .arg( Arg::new(OUTPUT_PATH_FLAG) diff --git a/validator_manager/src/import_validators.rs b/validator_manager/src/import_validators.rs index 1f864cdf416..f193e8d0fbd 100644 --- a/validator_manager/src/import_validators.rs +++ b/validator_manager/src/import_validators.rs @@ -23,12 +23,12 @@ pub fn cli_app() -> Command { ) .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .arg( Arg::new(VALIDATORS_FILE_FLAG) diff --git a/validator_manager/src/lib.rs b/validator_manager/src/lib.rs index 16b6bbddf47..101d6d21360 100644 --- a/validator_manager/src/lib.rs +++ b/validator_manager/src/lib.rs @@ -46,12 +46,12 @@ pub fn cli_app() -> Command { .about("Utilities for managing a Lighthouse validator client via the HTTP API.") .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .subcommand(create_validators::cli_app()) .subcommand(import_validators::cli_app()) diff --git a/validator_manager/src/move_validators.rs b/validator_manager/src/move_validators.rs index 9bc64b66e84..d2149d742c1 100644 --- a/validator_manager/src/move_validators.rs +++ b/validator_manager/src/move_validators.rs @@ -77,12 +77,12 @@ pub fn cli_app() -> Command { ) .arg( Arg::new("help") - .long("help") - .short('h') - .help("Prints help information") - .action(ArgAction::HelpLong) - .display_order(0) - .help_heading(FLAG_HEADER) + .long("help") + .short('h') + .help("Prints help information") + .action(ArgAction::HelpLong) + .display_order(0) + .help_heading(FLAG_HEADER), ) .arg( Arg::new(SRC_VC_URL_FLAG) From f5f114ff91ed525422fcc610b39f3bf336775b0a Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 25 Apr 2024 23:41:29 +0300 Subject: [PATCH 32/46] revert --- testing/simulator/src/no_eth1_sim.rs | 182 ------------ testing/simulator/src/sync_sim.rs | 402 --------------------------- 2 files changed, 584 deletions(-) delete mode 100644 testing/simulator/src/no_eth1_sim.rs delete mode 100644 testing/simulator/src/sync_sim.rs diff --git a/testing/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs deleted file mode 100644 index b8f6b2254ee..00000000000 --- a/testing/simulator/src/no_eth1_sim.rs +++ /dev/null @@ -1,182 +0,0 @@ -use crate::{checks, LocalNetwork}; -use clap::ArgMatches; -use futures::prelude::*; -use node_test_rig::{ - environment::{EnvironmentBuilder, LoggerConfig}, - testing_client_config, testing_validator_config, ClientGenesis, ValidatorFiles, -}; -use rayon::prelude::*; -use std::cmp::max; -use std::net::Ipv4Addr; -use std::time::{Duration, SystemTime, UNIX_EPOCH}; -use tokio::time::sleep; -use types::{Epoch, EthSpec, MainnetEthSpec}; - -pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { - let node_count = matches - .get_one::("nodes") - .expect("missing nodes default") - .parse::() - .expect("missing nodes default"); - let validators_per_node = matches - .get_one::("validators_per_node") - .expect("missing validators_per_node default") - .parse::() - .expect("missing validators_per_node default"); - let speed_up_factor = matches - .get_one::("speed_up_factor") - .expect("missing speed_up_factor default") - .parse::() - .expect("missing speed_up_factor default"); - let continue_after_checks = matches.get_flag("continue_after_checks"); - - println!("Beacon Chain Simulator:"); - println!(" nodes:{}", node_count); - println!(" validators_per_node:{}", validators_per_node); - println!(" continue_after_checks:{}", continue_after_checks); - - // Generate the directories and keystores required for the validator clients. - let validator_files = (0..node_count) - .into_par_iter() - .map(|i| { - println!( - "Generating keystores for validator {} of {}", - i + 1, - node_count - ); - - let indices = - (i * validators_per_node..(i + 1) * validators_per_node).collect::>(); - ValidatorFiles::with_keystores(&indices).unwrap() - }) - .collect::>(); - - let mut env = EnvironmentBuilder::mainnet() - .initialize_logger(LoggerConfig { - path: None, - debug_level: String::from("debug"), - logfile_debug_level: String::from("debug"), - log_format: None, - logfile_format: None, - log_color: false, - disable_log_timestamp: false, - max_log_size: 0, - max_log_number: 0, - compression: false, - is_restricted: true, - sse_logging: false, - })? - .multi_threaded_tokio_runtime()? - .build()?; - - let eth1_block_time = Duration::from_millis(15_000 / speed_up_factor); - - let spec = &mut env.eth2_config.spec; - - let total_validator_count = validators_per_node * node_count; - - spec.seconds_per_slot /= speed_up_factor; - spec.seconds_per_slot = max(1, spec.seconds_per_slot); - spec.eth1_follow_distance = 16; - spec.genesis_delay = eth1_block_time.as_secs() * spec.eth1_follow_distance * 2; - spec.min_genesis_time = 0; - spec.min_genesis_active_validator_count = total_validator_count as u64; - spec.seconds_per_eth1_block = 1; - - let genesis_delay = Duration::from_secs(5); - let genesis_time = SystemTime::now() - .duration_since(UNIX_EPOCH) - .map_err(|_| "should get system time")? - + genesis_delay; - - let slot_duration = Duration::from_secs(spec.seconds_per_slot); - - let context = env.core_context(); - - let mut beacon_config = testing_client_config(); - - beacon_config.genesis = ClientGenesis::Interop { - validator_count: total_validator_count, - genesis_time: genesis_time.as_secs(), - }; - beacon_config.dummy_eth1_backend = true; - beacon_config.sync_eth1_chain = true; - - beacon_config.network.enr_address = (Some(Ipv4Addr::LOCALHOST), None); - - let main_future = async { - let network = LocalNetwork::new(context.clone(), beacon_config.clone()).await?; - /* - * One by one, add beacon nodes to the network. - */ - - for _ in 0..node_count - 1 { - network - .add_beacon_node(beacon_config.clone(), false) - .await?; - } - - /* - * Create a future that will add validator clients to the network. Each validator client is - * attached to a single corresponding beacon node. Spawn each validator in a new task. - */ - let executor = context.executor.clone(); - for (i, files) in validator_files.into_iter().enumerate() { - let network_1 = network.clone(); - executor.spawn( - async move { - println!("Adding validator client {}", i); - network_1 - .add_validator_client(testing_validator_config(), i, files, i % 2 == 0) - .await - .expect("should add validator"); - }, - "vc", - ); - } - - let duration_to_genesis = network.duration_to_genesis().await; - println!("Duration to genesis: {}", duration_to_genesis.as_secs()); - sleep(duration_to_genesis).await; - - let (finalization, block_prod) = futures::join!( - // Check that the chain finalizes at the first given opportunity. - checks::verify_first_finalization(network.clone(), slot_duration), - // Check that a block is produced at every slot. - checks::verify_full_block_production_up_to( - network.clone(), - Epoch::new(4).start_slot(MainnetEthSpec::slots_per_epoch()), - slot_duration, - ), - ); - finalization?; - block_prod?; - - // The `final_future` either completes immediately or never completes, depending on the value - // of `continue_after_checks`. - - if continue_after_checks { - future::pending::<()>().await; - } - /* - * End the simulation by dropping the network. This will kill all running beacon nodes and - * validator clients. - */ - println!( - "Simulation complete. Finished with {} beacon nodes and {} validator clients", - network.beacon_node_count() + network.proposer_node_count(), - network.validator_client_count() - ); - - // Be explicit about dropping the network, as this kills all the nodes. This ensures - // all the checks have adequate time to pass. - drop(network); - Ok::<(), String>(()) - }; - - env.runtime().block_on(main_future).unwrap(); - - env.fire_signal(); - env.shutdown_on_idle(); - Ok(()) -} diff --git a/testing/simulator/src/sync_sim.rs b/testing/simulator/src/sync_sim.rs deleted file mode 100644 index e1917b3f9aa..00000000000 --- a/testing/simulator/src/sync_sim.rs +++ /dev/null @@ -1,402 +0,0 @@ -use crate::checks::{epoch_delay, verify_all_finalized_at}; -use crate::local_network::LocalNetwork; -use clap::ArgMatches; -use futures::prelude::*; -use node_test_rig::{ - environment::{EnvironmentBuilder, LoggerConfig}, - testing_client_config, ClientGenesis, ValidatorFiles, -}; -use node_test_rig::{testing_validator_config, ClientConfig}; -use std::cmp::max; -use std::net::Ipv4Addr; -use std::time::{Duration, SystemTime, UNIX_EPOCH}; -use types::{Epoch, EthSpec}; - -pub fn run_syncing_sim(matches: &ArgMatches) -> Result<(), String> { - let initial_delay = matches - .get_one::("initial_delay") - .unwrap() - .parse::() - .unwrap(); - let sync_timeout = matches - .get_one::("sync_timeout") - .unwrap() - .parse::() - .unwrap(); - let speed_up_factor = matches - .get_one::("speedup") - .unwrap() - .parse::() - .unwrap(); - let strategy = matches.get_one::("strategy").unwrap().clone(); - - println!("Syncing Simulator:"); - println!(" initial_delay:{}", initial_delay); - println!(" sync timeout: {}", sync_timeout); - println!(" speed up factor:{}", speed_up_factor); - println!(" strategy:{}", strategy); - - let log_level = "debug"; - let log_format = None; - - syncing_sim( - speed_up_factor, - initial_delay, - sync_timeout, - strategy, - log_level, - log_format, - ) -} - -fn syncing_sim( - speed_up_factor: u64, - initial_delay: u64, - sync_timeout: u64, - strategy: String, - log_level: &str, - log_format: Option<&str>, -) -> Result<(), String> { - let mut env = EnvironmentBuilder::minimal() - .initialize_logger(LoggerConfig { - path: None, - debug_level: String::from(log_level), - logfile_debug_level: String::from("debug"), - log_format: log_format.map(String::from), - logfile_format: None, - log_color: false, - disable_log_timestamp: false, - max_log_size: 0, - max_log_number: 0, - compression: false, - is_restricted: true, - sse_logging: false, - })? - .multi_threaded_tokio_runtime()? - .build()?; - - let spec = &mut env.eth2_config.spec; - let end_after_checks = true; - let eth1_block_time = Duration::from_millis(15_000 / speed_up_factor); - - // Set fork epochs to test syncing across fork boundaries - spec.altair_fork_epoch = Some(Epoch::new(1)); - spec.bellatrix_fork_epoch = Some(Epoch::new(2)); - spec.seconds_per_slot /= speed_up_factor; - spec.seconds_per_slot = max(1, spec.seconds_per_slot); - spec.eth1_follow_distance = 16; - spec.genesis_delay = eth1_block_time.as_secs() * spec.eth1_follow_distance * 2; - spec.min_genesis_time = 0; - spec.min_genesis_active_validator_count = 64; - spec.seconds_per_eth1_block = 1; - - let num_validators = 8; - let slot_duration = Duration::from_secs(spec.seconds_per_slot); - let context = env.core_context(); - let mut beacon_config = testing_client_config(); - - let genesis_time = SystemTime::now() - .duration_since(UNIX_EPOCH) - .map_err(|_| "should get system time")? - + Duration::from_secs(5); - beacon_config.genesis = ClientGenesis::Interop { - validator_count: num_validators, - genesis_time: genesis_time.as_secs(), - }; - beacon_config.dummy_eth1_backend = true; - beacon_config.sync_eth1_chain = true; - - beacon_config.network.enr_address = (Some(Ipv4Addr::LOCALHOST), None); - - // Generate the directories and keystores required for the validator clients. - let validator_indices = (0..num_validators).collect::>(); - let validator_files = ValidatorFiles::with_keystores(&validator_indices).unwrap(); - - let main_future = async { - /* - * Create a new `LocalNetwork` with one beacon node. - */ - let network = LocalNetwork::new(context, beacon_config.clone()).await?; - - /* - * Add a validator client which handles all validators from the genesis state. - */ - network - .add_validator_client(testing_validator_config(), 0, validator_files, true) - .await?; - - // Check all syncing strategies one after other. - pick_strategy( - &strategy, - network.clone(), - beacon_config.clone(), - slot_duration, - initial_delay, - sync_timeout, - ) - .await?; - - // The `final_future` either completes immediately or never completes, depending on the value - // of `end_after_checks`. - - if !end_after_checks { - future::pending::<()>().await; - } - - /* - * End the simulation by dropping the network. This will kill all running beacon nodes and - * validator clients. - */ - println!( - "Simulation complete. Finished with {} beacon nodes and {} validator clients", - network.beacon_node_count(), - network.validator_client_count() - ); - - // Be explicit about dropping the network, as this kills all the nodes. This ensures - // all the checks have adequate time to pass. - drop(network); - Ok::<(), String>(()) - }; - - env.runtime().block_on(main_future).unwrap(); - - env.fire_signal(); - env.shutdown_on_idle(); - - Ok(()) -} - -pub async fn pick_strategy( - strategy: &str, - network: LocalNetwork, - beacon_config: ClientConfig, - slot_duration: Duration, - initial_delay: u64, - sync_timeout: u64, -) -> Result<(), String> { - match strategy { - "one-node" => { - verify_one_node_sync( - network, - beacon_config, - slot_duration, - initial_delay, - sync_timeout, - ) - .await - } - "two-nodes" => { - verify_two_nodes_sync( - network, - beacon_config, - slot_duration, - initial_delay, - sync_timeout, - ) - .await - } - "mixed" => { - verify_in_between_sync( - network, - beacon_config, - slot_duration, - initial_delay, - sync_timeout, - ) - .await - } - "all" => { - verify_syncing( - network, - beacon_config, - slot_duration, - initial_delay, - sync_timeout, - ) - .await - } - _ => Err("Invalid strategy".into()), - } -} - -/// Verify one node added after `initial_delay` epochs is in sync -/// after `sync_timeout` epochs. -pub async fn verify_one_node_sync( - network: LocalNetwork, - beacon_config: ClientConfig, - slot_duration: Duration, - initial_delay: u64, - sync_timeout: u64, -) -> Result<(), String> { - let epoch_duration = slot_duration * (E::slots_per_epoch() as u32); - let network_c = network.clone(); - // Delay for `initial_delay` epochs before adding another node to start syncing - epoch_delay( - Epoch::new(initial_delay), - slot_duration, - E::slots_per_epoch(), - ) - .await; - // Add a beacon node - network.add_beacon_node(beacon_config, false).await?; - // Check every `epoch_duration` if nodes are synced - // limited to at most `sync_timeout` epochs - let mut interval = tokio::time::interval(epoch_duration); - let mut count = 0; - loop { - interval.tick().await; - if count >= sync_timeout || !check_still_syncing(&network_c).await? { - break; - } - count += 1; - } - let epoch = network.bootnode_epoch().await?; - verify_all_finalized_at(network, epoch) - .map_err(|e| format!("One node sync error: {}", e)) - .await -} - -/// Verify two nodes added after `initial_delay` epochs are in sync -/// after `sync_timeout` epochs. -pub async fn verify_two_nodes_sync( - network: LocalNetwork, - beacon_config: ClientConfig, - slot_duration: Duration, - initial_delay: u64, - sync_timeout: u64, -) -> Result<(), String> { - let epoch_duration = slot_duration * (E::slots_per_epoch() as u32); - let network_c = network.clone(); - // Delay for `initial_delay` epochs before adding another node to start syncing - epoch_delay( - Epoch::new(initial_delay), - slot_duration, - E::slots_per_epoch(), - ) - .await; - // Add beacon nodes - network - .add_beacon_node(beacon_config.clone(), false) - .await?; - network.add_beacon_node(beacon_config, false).await?; - // Check every `epoch_duration` if nodes are synced - // limited to at most `sync_timeout` epochs - let mut interval = tokio::time::interval(epoch_duration); - let mut count = 0; - loop { - interval.tick().await; - if count >= sync_timeout || !check_still_syncing(&network_c).await? { - break; - } - count += 1; - } - let epoch = network.bootnode_epoch().await?; - verify_all_finalized_at(network, epoch) - .map_err(|e| format!("One node sync error: {}", e)) - .await -} - -/// Add 2 syncing nodes after `initial_delay` epochs, -/// Add another node after `sync_timeout - 5` epochs and verify all are -/// in sync after `sync_timeout + 5` epochs. -pub async fn verify_in_between_sync( - network: LocalNetwork, - beacon_config: ClientConfig, - slot_duration: Duration, - initial_delay: u64, - sync_timeout: u64, -) -> Result<(), String> { - let epoch_duration = slot_duration * (E::slots_per_epoch() as u32); - let network_c = network.clone(); - // Delay for `initial_delay` epochs before adding another node to start syncing - let config1 = beacon_config.clone(); - epoch_delay( - Epoch::new(initial_delay), - slot_duration, - E::slots_per_epoch(), - ) - .await; - // Add two beacon nodes - network - .add_beacon_node(beacon_config.clone(), false) - .await?; - network.add_beacon_node(beacon_config, false).await?; - // Delay before adding additional syncing nodes. - epoch_delay( - Epoch::new(sync_timeout - 5), - slot_duration, - E::slots_per_epoch(), - ) - .await; - // Add a beacon node - network.add_beacon_node(config1.clone(), false).await?; - // Check every `epoch_duration` if nodes are synced - // limited to at most `sync_timeout` epochs - let mut interval = tokio::time::interval(epoch_duration); - let mut count = 0; - loop { - interval.tick().await; - if count >= sync_timeout || !check_still_syncing(&network_c).await? { - break; - } - count += 1; - } - let epoch = network.bootnode_epoch().await?; - verify_all_finalized_at(network, epoch) - .map_err(|e| format!("One node sync error: {}", e)) - .await -} - -/// Run syncing strategies one after other. -pub async fn verify_syncing( - network: LocalNetwork, - beacon_config: ClientConfig, - slot_duration: Duration, - initial_delay: u64, - sync_timeout: u64, -) -> Result<(), String> { - verify_one_node_sync( - network.clone(), - beacon_config.clone(), - slot_duration, - initial_delay, - sync_timeout, - ) - .await?; - println!("Completed one node sync"); - verify_two_nodes_sync( - network.clone(), - beacon_config.clone(), - slot_duration, - initial_delay, - sync_timeout, - ) - .await?; - println!("Completed two node sync"); - verify_in_between_sync( - network, - beacon_config, - slot_duration, - initial_delay, - sync_timeout, - ) - .await?; - println!("Completed in between sync"); - Ok(()) -} - -pub async fn check_still_syncing(network: &LocalNetwork) -> Result { - // get syncing status of nodes - let mut status = Vec::new(); - for remote_node in network.remote_nodes()? { - status.push( - remote_node - .get_node_syncing() - .await - .map(|body| body.data.is_syncing) - .map_err(|e| format!("Get syncing status via http failed: {:?}", e))?, - ) - } - Ok(status.iter().any(|is_syncing| *is_syncing)) -} From ac451a847953dd9ec2bbfd54e9f187a8f60c4719 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 25 Apr 2024 23:43:24 +0300 Subject: [PATCH 33/46] revert --- testing/simulator/src/basic_sim.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/simulator/src/basic_sim.rs b/testing/simulator/src/basic_sim.rs index f7449611694..f08b7faac69 100644 --- a/testing/simulator/src/basic_sim.rs +++ b/testing/simulator/src/basic_sim.rs @@ -51,9 +51,8 @@ pub fn run_basic_sim(matches: &ArgMatches) -> Result<(), String> { let log_level = matches .get_one::("debug-level") .expect("missing speed_up_factor default"); - + let continue_after_checks = matches.get_flag("continue_after_checks"); - let post_merge_sim = matches.get_flag("post-merge"); println!("Basic Simulator:"); println!(" nodes: {}", node_count); From de33110caa80f6e1ec037bdb74e95c4f2897d901 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Fri, 26 Apr 2024 10:57:07 +0300 Subject: [PATCH 34/46] resolve merge conflicts --- book/src/help_vc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 9e28d36f4c0..73640da90d6 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -171,7 +171,7 @@ Options: the validator_definitions.yml --web3-signer-keep-alive-timeout Keep-alive timeout for each web3signer connection. Set to 'null' to - never timeout [default: 90000] + never timeout [default: 20000] --web3-signer-max-idle-connections Maximum number of idle connections to maintain per web3signer host. Default is unlimited. @@ -276,4 +276,4 @@ Flags: If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause missed duties when fallbacks are used. -``` +``` \ No newline at end of file From 6a81d120ffb471471ceecd043e6c7d86a1b6b5d9 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Sat, 27 Apr 2024 15:26:49 +0300 Subject: [PATCH 35/46] revert simulator changes --- testing/simulator/src/cli.rs | 121 +------------------------- testing/simulator/src/fallback_sim.rs | 14 ++- 2 files changed, 8 insertions(+), 127 deletions(-) diff --git a/testing/simulator/src/cli.rs b/testing/simulator/src/cli.rs index 96b37fa61ab..421a2d1d00f 100644 --- a/testing/simulator/src/cli.rs +++ b/testing/simulator/src/cli.rs @@ -6,123 +6,7 @@ pub fn cli_app() -> Command { .author("Sigma Prime ") .about("Options for interacting with simulator") .subcommand( - Command::new("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 \ - simulation using a local `anvil` instance (you must have `anvil` \ - installed and avaliable on your path). All beacon nodes independently listen \ - for genesis from the deposit contract, then start operating. \ - \ - 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("4") - .help("Number of beacon nodes")) - .arg(Arg::new("proposer-nodes") - .short('p') - .long("proposer_nodes") - .action(ArgAction::Set) - .default_value("2") - .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("post-merge") - .short('m') - .long("post-merge") - .action(ArgAction::SetTrue) - .help("Simulate the merge transition")) - .arg(Arg::new("continue_after_checks") - .short('c') - .long("continue_after_checks") - .action(ArgAction::SetTrue) - .help("Continue after checks (default false)")) - ) - .subcommand( - Command::new("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::new("nodes") - .short('n') - .long("nodes") - .action(ArgAction::Set) - .default_value("4") - .help("Number of beacon nodes")) - .arg(Arg::new("proposer-nodes") - .short('p') - .long("proposer_nodes") - .action(ArgAction::Set) - .default_value("2") - .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")) - .arg(Arg::new("continue_after_checks") - .short('c') - .long("continue_after_checks") - .action(ArgAction::SetTrue) - .help("Continue after checks (default false)")) - ) - .subcommand( - Command::new("syncing-sim") - .about("Run the syncing simulation") - .arg( - Arg::new("speedup") - .short('s') - .long("speedup") - .action(ArgAction::Set) - .default_value("15") - .help("Speed up factor for eth1 blocks and slot production"), - ) - .arg( - Arg::new("initial_delay") - .short('i') - .long("initial_delay") - .action(ArgAction::Set) - .default_value("5") - .help("Epoch delay for new beacon node to start syncing"), - ) - .arg( - Arg::new("sync_timeout") - .long("sync_timeout") - .action(ArgAction::Set) - .default_value("10") - .help("Number of epochs after which newly added beacon nodes must be synced"), - ) - .arg( - Arg::new("strategy") - .long("strategy") - .action(ArgAction::Set) - .default_value("all") - .value_parser(["one-node", "two-nodes", "mixed", "all"]) - .help("Sync verification strategy to run."), - ) - .subcommand( - Command::new("basic-sim") + Command::new("basic-sim") .about( "Runs a Beacon Chain simulation with `n` beacon node and validator clients, \ each with `v` validators. \ @@ -237,7 +121,6 @@ pub fn cli_app() -> Command { .long("continue_after_checks") .action(ArgAction::Set) .help("Continue after checks (default false)"), - ) - ) + ), ) } diff --git a/testing/simulator/src/fallback_sim.rs b/testing/simulator/src/fallback_sim.rs index a7c16b743ac..8e98e17261c 100644 --- a/testing/simulator/src/fallback_sim.rs +++ b/testing/simulator/src/fallback_sim.rs @@ -34,13 +34,13 @@ const SUGGESTED_FEE_RECIPIENT: [u8; 20] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]; pub fn run_fallback_sim(matches: &ArgMatches) -> Result<(), String> { - let vc_count = matches + let vc_count = matches .get_one::("vc-count") .unwrap() .parse::() .unwrap(); - - let validators_per_vc = matches + + let validators_per_vc = matches .get_one::("validators-per-vc") .unwrap() .parse::() @@ -50,17 +50,15 @@ pub fn run_fallback_sim(matches: &ArgMatches) -> Result<(), String> { .unwrap() .parse::() .unwrap(); - + assert!(bns_per_vc > 1); let speed_up_factor = matches .get_one::("speed-up-factor") .unwrap() .parse::() .unwrap(); - let log_level = matches - .get_one::("debug-level") - .unwrap(); - + let log_level = matches.get_one::("debug-level").unwrap(); + let continue_after_checks = matches.get_flag("continue-after-checks"); println!("Fallback Simulator:"); From b8bea910a83ff1cfd12332cae1c26b9433dd2fb9 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Sat, 27 Apr 2024 15:37:41 +0300 Subject: [PATCH 36/46] require at least one arg --- boot_node/src/cli.rs | 2 +- validator_client/src/cli.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index 307b3043a2c..440a9d27e2d 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -69,7 +69,7 @@ pub fn cli_app() -> Command { - --listen-address '0.0.0.0' --listen-address '::' will listen over both \ Ipv4 and Ipv6. The order of the given addresses is not relevant. However, \ multiple Ipv4, or multiple Ipv6 addresses will not be accepted.") - .num_args(0..=2) + .num_args(1..=2) .default_value("0.0.0.0") .action(ArgAction::Append) .display_order(0) diff --git a/validator_client/src/cli.rs b/validator_client/src/cli.rs index 142fadcc5a3..66b467c1e22 100644 --- a/validator_client/src/cli.rs +++ b/validator_client/src/cli.rs @@ -399,7 +399,6 @@ pub fn cli_app() -> Command { .display_order(0) ) .arg( - // TODO take note here Arg::new("disable-latency-measurement-service") .long("disable-latency-measurement-service") .help("Disables the service that periodically attempts to measure latency to BNs.") From be90ac75cc7662408822ddb082cad9ef47f2295f Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 30 Apr 2024 17:35:55 +0300 Subject: [PATCH 37/46] fix eth sim cli --- testing/simulator/src/basic_sim.rs | 16 ++++++++-------- testing/simulator/src/cli.rs | 2 +- testing/simulator/src/fallback_sim.rs | 22 +++++++++++++--------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/testing/simulator/src/basic_sim.rs b/testing/simulator/src/basic_sim.rs index f08b7faac69..f69d107e344 100644 --- a/testing/simulator/src/basic_sim.rs +++ b/testing/simulator/src/basic_sim.rs @@ -39,20 +39,20 @@ pub fn run_basic_sim(matches: &ArgMatches) -> Result<(), String> { .unwrap_or(0); println!("PROPOSER-NODES: {}", proposer_nodes); let validators_per_node = matches - .get_one::("validators_per_node") - .expect("missing validators_per_node default") + .get_one::("validators-per-node") + .expect("missing validators-per-node default") .parse::() - .expect("missing validators_per_node default"); + .expect("missing validators-per-node default"); let speed_up_factor = matches - .get_one::("speed_up_factor") - .expect("missing speed_up_factor default") + .get_one::("speed-up-factor") + .expect("missing speed-up-factor default") .parse::() - .expect("missing speed_up_factor default"); + .expect("missing speed-up-factor default"); let log_level = matches .get_one::("debug-level") - .expect("missing speed_up_factor default"); + .expect("missing debug-level"); - let continue_after_checks = matches.get_flag("continue_after_checks"); + let continue_after_checks = matches.get_flag("continue-after-checks"); println!("Basic Simulator:"); println!(" nodes: {}", node_count); diff --git a/testing/simulator/src/cli.rs b/testing/simulator/src/cli.rs index 421a2d1d00f..a82c8b85775 100644 --- a/testing/simulator/src/cli.rs +++ b/testing/simulator/src/cli.rs @@ -119,7 +119,7 @@ pub fn cli_app() -> Command { Arg::new("continue-after-checks") .short('c') .long("continue_after_checks") - .action(ArgAction::Set) + .action(ArgAction::SetTrue) .help("Continue after checks (default false)"), ), ) diff --git a/testing/simulator/src/fallback_sim.rs b/testing/simulator/src/fallback_sim.rs index 8e98e17261c..33f497f37ff 100644 --- a/testing/simulator/src/fallback_sim.rs +++ b/testing/simulator/src/fallback_sim.rs @@ -36,28 +36,32 @@ const SUGGESTED_FEE_RECIPIENT: [u8; 20] = pub fn run_fallback_sim(matches: &ArgMatches) -> Result<(), String> { let vc_count = matches .get_one::("vc-count") - .unwrap() + .expect("missing vc-count default") .parse::() - .unwrap(); + .expect("missing vc-count default"); let validators_per_vc = matches .get_one::("validators-per-vc") - .unwrap() + .expect("missing validators-per-vc default") .parse::() - .unwrap(); + .expect("missing validators-per-vc default"); + let bns_per_vc = matches .get_one::("bns-per-vc") - .unwrap() + .expect("missing bns-per-vc default") .parse::() - .unwrap(); + .expect("missing bns-per-vc default"); assert!(bns_per_vc > 1); let speed_up_factor = matches .get_one::("speed-up-factor") - .unwrap() + .expect("missing speed-up-factor default") .parse::() - .unwrap(); - let log_level = matches.get_one::("debug-level").unwrap(); + .expect("missing speed-up-factor default"); + + let log_level = matches + .get_one::("debug-level") + .expect("missing debug-level default"); let continue_after_checks = matches.get_flag("continue-after-checks"); From c5a305829f65991b437b2ae0138ff64adb6b2e13 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Sun, 12 May 2024 15:18:48 +0300 Subject: [PATCH 38/46] book changes --- book/src/help_bn.md | 536 ++++++++++++------------------------- book/src/help_general.md | 2 +- book/src/help_vc.md | 2 +- book/src/help_vm.md | 2 +- book/src/help_vm_create.md | 2 +- book/src/help_vm_import.md | 2 +- book/src/help_vm_move.md | 2 +- 7 files changed, 172 insertions(+), 376 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index d7388214d35..10d8e18c7c4 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -378,7 +378,7 @@ Options: Cannot be changed after initialization. [default: 8192 (mainnet) or 64 (minimal)] --state-cache-size - Specifies the size of the snapshot cache [default: 3] + Specifies the size of the state cache [default: 128] --suggested-fee-recipient Emergency fallback fee recipient for use in case the validator client does not have one configured. You should set this flag on the @@ -438,372 +438,168 @@ Options: -V, --version Print version -OPTIONS: - --auto-compact-db - Enable or disable automatic compaction of the database on finalization. [default: true] - - --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up until data_availability_boundary - - blob_prune_margin_epochs. [default: 0] - --blobs-dir - Data directory for the blobs database. - - --block-cache-size - Specifies how many blocks the database should cache in memory [default: 5] - - --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p network. Multiaddr is also supported. - - --builder - The URL of a service compatible with the MEV-boost API. - - --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized within this number of epochs, it will NOT - query any connected builders, and will use the local execution engine for payload construction. Setting this - value to anything less than 2 will cause the node to NEVER query connected builders. Setting it to 2 will - cause this condition to be hit if there are skips slots at the start of an epoch, right before this node is - set to propose. [default: 3] - --builder-fallback-skips - If this node is proposing a block and has seen this number of skip slots on the canonical chain in a row, it - will NOT query any connected builders, and will use the local execution engine for payload construction. - [default: 3] - --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip slots on the canonical chain in the past - `SLOTS_PER_EPOCH`, it will NOT query any connected builders, and will use the local execution engine for - payload construction. [default: 8] - --builder-profit-threshold - This flag is deprecated and has no effect. - - --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version - string. - --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and match --checkpoint-block. Using - --checkpoint-sync-url instead is recommended. - --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and match --checkpoint-state. Using - --checkpoint-sync-url instead is recommended. - --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and match --checkpoint-block. Using - --checkpoint-sync-url instead is recommended. - --checkpoint-sync-url - Set the remote beacon node HTTP endpoint to use for checkpoint sync. - - --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP endpoint. [default: 180] - - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and databases. Defaults to - $HOME/.lighthouse/{network} where network is the value of the `network` flag Note: Users should specify - separate custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. [default: info] [possible values: - info, debug, trace, warn, error, crit] - --discovery-port - The UDP port that discovery will listen on. Defaults to `port` - - --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to - `port6` - --enr-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 to the IP address it resolves to and does not auto-update based on PONG - responses in discovery. Set this only if you are sure other nodes can connect to your local node on this - address. This will update the `ip4` or `ip6` ENR fields accordingly. To update both, set this flag twice - with the different values. - --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if you are sure other nodes can connect - to your local node on this port over IPv4. - --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if you are sure other nodes can connect - to your local node on this port over IPv6. - --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv4. The --port flag is used if this is not set. - --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv6. The --port6 flag is used if this is not set. - --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv4. - --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other nodes can connect to your local node on - this port over IPv6. - --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's database when they are older than the data - availability boundary relative to the current epoch. [default: 1] - --epochs-per-migration - The number of epochs to wait between running the migration of data from the hot DB to the cold DB. Less - frequent runs can be useful for minimizing disk writes [default: 1] - --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. This will reduce the size of responses - from the Eth1 endpoint. [default: 1000] - --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block which should be imported into the - cache. Setting this value lower can help compensate for irregular Proof-of-Work block times, but setting it - too low can make the node vulnerable to re-orgs. - --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC connection. Uses the same endpoint to - populate the deposit cache. - --execution-jwt - File path which contains the hex-encoded JWT secret for the execution endpoint provided in the --execution- - endpoint flag. - --execution-jwt-id - Used by the beacon node to communicate a unique identifier to execution nodes during JWT authentication. It - corresponds to the 'id' field in the JWT claims object.Set to empty by default - --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the --execution-endpoint flag. - - --execution-jwt-version - Used by the beacon node to communicate a client version to execution nodes during JWT authentication. It - corresponds to the 'clv' field in the JWT claims object.Set to empty by default - --execution-timeout-multiplier - Unsigned integer to multiply the default execution timeouts by. [default: 1] - - --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before proposing a block. You can prevent - waiting at all by setting the timeout to 0, however you risk proposing atop the wrong parent block. - [default: 250] - --freezer-dir - Data directory for the freezer database. - - --genesis-state-url - A URL of a beacon-API compatible server from which to download the genesis state. Checkpoint sync server - URLs can generally be used with this flag. If not supplied, a default URL or the --checkpoint-sync-url may - be used. If the genesis state is already included in this binary then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. [default: 180] - - --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the current version and commit, truncated - to fit in 32 bytes. - --historic-state-cache-size - Specifies how many states from the freezer database should cache in memory [default: 1] - - --http-address
- Set the listen address for the RESTful HTTP API server. - - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not - recommended in production). If no value is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5052). - --http-duplicate-block-status - Status code to send when a block that is already known is POSTed to the HTTP API. - - --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service and DoS protection. When set to - "true", HTTP API requests will be queued and scheduled alongside other tasks. When set to "false", HTTP API - responses will be executed immediately. - --http-port - Set the listen TCP port for the RESTful HTTP API server. - - --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) channels. Increasing this value can - prevent messages from being dropped. - --http-tls-cert - The path of the certificate to be used when serving the HTTP API server over TLS. - - --http-tls-key - The path of the private key to be used when serving the HTTP API server over TLS. Must not be password- - protected. - --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, store the block SSZ as a file at this - path. This feature is only recommended for developers. This directory is not pruned, users should be careful - to avoid filling up their disks. - --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p peer without an ENR. - - --listen-address
... - The address lighthouse will listen for UDP and TCP connections. To listen over IpV4 and IpV6 set this flag - twice with the different values. - Examples: - - --listen-address '0.0.0.0' will listen over IPv4. - - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over both IPv4 and IPv6. The order of the - given addresses is not relevant. However, multiple IPv4, or multiple IPv6 addresses will not be accepted. - [default: 0.0.0.0] - --log-format - Specifies the log format used when emitting logs to the terminal. [possible values: JSON] - - --logfile - File path where the log file will be stored. Once it grows to the value specified in `--logfile-max-size` a - new log file is generated where future logs are stored. Once the number of log files exceeds the value - specified in `--logfile-max-number` the oldest log file will be overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: debug] [possible values: info, - debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. [possible values: DEFAULT, JSON] - - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, background file logging is disabled. - [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If set to 0, background file logging is - disabled. [default: 200] - --max-skip-slots - Refuse to skip more than this many slots when processing an attestation. This prevents nodes on minority - forks from wasting our time and disk space, but could also cause unnecessary consensus failures, so is - disabled by default. - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. Use * to allow any origin (not - recommended in production). If no value is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5054). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote endpoint. This can be used to monitor - your setup on certain services (e.g. beaconcha.in). This flag sets the endpoint where the beacon node - metrics will be sent. Note: This will send information to a remote sever which may identify and associate - your validators, IP address and other personal information. Always use a HTTPS connection and never provide - an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the monitoring-endpoint. Default: 60s - - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - chiado, sepolia, holesky] - --network-dir - Data directory for network keys. Defaults to network/ inside the beacon node dir. - - --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery UDP port will be set to this value - and the Quic UDP port will be set to this value + 1. The discovery port can be modified by the --discovery- - port flag and the quic port can be modified by the --quic-port flag. If listening over both IPv4 - and IPv6 the --port flag will apply to the IPv4 address and --port6 to the IPv6 address. [default: 9000] - --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 and IPv6. Defaults to 9090 when - required. The Quic UDP port will be set to this value + 1. [default: 9090] - --prepare-payload-lookahead - The time before the start of a proposal slot at which payload attributes should be sent. Low values are - useful for execution nodes which don't improve their payload after the first call, and high values are - useful for ensuring the EL is given ample notice. Default: 1/3 of a slot. - --progressive-balances - Deprecated. This optimisation is now the default and cannot be disabled. [possible values: fast, disabled, - checked, strict] - --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a reorging block. Lower values can prevent - failed reorgs by ensuring the block has ample time to propagate and be processed by the network. The default - is 1/12th of a slot (1 second on mainnet) - --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid proposing reorging blocks at certain - slots. An offset of N means that reorging proposals will not be attempted at any slot such that `slot % - SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be avoided. Any offsets supplied with this - flag will impose additional restrictions. - --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs are allowed. Default: 2 - - --proposer-reorg-parent-threshold - Percentage of parent vote weight above which to attempt a proposer reorg. Default: 160% - - --proposer-reorg-threshold - Percentage of head vote weight below which to attempt a proposer reorg. Default: 20% - - --prune-blobs - Prune blobs from Lighthouse's database when they are older than the data data availability boundary relative - to the current epoch. [default: true] - --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space but imposes load on the execution - client, as payloads need to be reconstructed and sent to syncing peers. [default: true] - --quic-port - The UDP port that quic will listen on. Defaults to `port` + 1 - - --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both IPv4 and IPv6. Defaults to `port6` + - 1 - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - this parameter in the event of an attack at the PoS transition block. Incorrect use of this flag can cause - your node to possibly accept an invalid chain or sync more slowly. Be extremely careful with this flag. - --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at each epoch. This flag allows the user - to set the shuffling cache size in epochs. Shufflings are dependent on validator count and setting this - value to a large number can consume a large amount of memory. - --slasher-att-cache-size - Set the maximum number of attestation roots for the slasher to cache - - --slasher-backend - Set the database backend to be used by the slasher. [possible values: lmdb, disabled] - - --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network [Enabled by default]. [default: true] - - --slasher-chunk-size - Number of epochs per validator per chunk stored on disk. - - --slasher-dir - Set the slasher's database directory. - - --slasher-history-length - Configure how many epochs of history the slasher keeps. Immutable after initialization. - - --slasher-max-db-size - Maximum size of the MDBX database used by the slasher. - - --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should ingest attestations. Only effective if - the slasher-update-period is a multiple of the slot duration. - --slasher-update-period - Configure how often the slasher runs batch processing. - - --slasher-validator-chunk-size - Number of validators per chunk stored on disk. - - --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. - [default: 8192 (mainnet) or 64 (minimal)] - --state-cache-size - Specifies the size of the state cache [default: 128] - - --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client does not have one configured. You - should set this flag on the validator client instead of (or in addition to) setting it here. - --target-peers - The target number of peers. - - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should - only be used if the user has a clear understanding that the broad Ethereum community has elected to override - the terminal PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. - Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH parameter. This flag should only be used if - the user has a clear understanding that the broad Ethereum community has elected to override the terminal - PoW block. Incorrect use of this flag will cause your node to experience a consensus failure. Be extremely - careful with this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY parameter. Accepts a 256-bit decimal - integer (not a hex value). This flag should only be used if the user has a clear understanding that the - broad Ethereum community has elected to override the terminal difficulty. Incorrect use of this flag will - cause your node to experience a consensus failure. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a hard-coded Lighthouse testnet. Only effective - if there is no existing database. - --trusted-peers - One or more comma-delimited trusted peer ids which always have the highest score according to the peer - scoring system. - --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This will override the trusted setup that is - generated from the mainnet kzg ceremony. Use with caution - --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is contained within a file at the given - path. - --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it will stop collecting per-validator - Prometheus metrics and issuing per-validator logs. Instead, it will provide aggregate metrics and logs. This - avoids infeasibly high cardinality in the Prometheus database and high log volume when using many - validators. Defaults to 64. - --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These validators will receive special - monitoring and additional logging. - --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to verify the node's sync against. The - block root should be 0x-prefixed. Note that this flag is for verification only, to perform a checkpoint sync - from a recent state use --checkpoint-sync-url. -``` - +Flags: + --allow-insecure-genesis-sync + Enable syncing from genesis, which is generally insecure and + incompatible with data availability checks. Checkpoint syncing is the + preferred method for syncing a node. Only use this flag when testing. + DO NOT use on mainnet! + --always-prefer-builder-payload + This flag is deprecated and has no effect. + --always-prepare-payload + Send payload attributes with every fork choice update. This is + intended for use by block builders, relays and developers. You should + set a fee recipient on this BN and also consider adjusting the + --prepare-payload-lookahead flag. + --builder-fallback-disable-checks + This flag disables all checks related to chain health. This means the + builder API will always be used for payload construction, regardless + of recent chain conditions. + --compact-db + If present, apply compaction to the database on start-up. Use with + caution. It is generally not recommended unless auto-compaction is + disabled. + --disable-backfill-rate-limiting + Disable the backfill sync rate-limiting. This allow users to just sync + the entire chain as fast as possible, however it can result in + resource contention which degrades staking performance. Stakers should + generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync + Explicitly disables syncing of deposit logs from the execution node. + This overrides any previous option that depends on it. Useful if you + intend to run a non-validating beacon node. + --disable-duplicate-warn-logs + This flag is deprecated and has no effect. + --disable-enr-auto-update + Discovery automatically updates the nodes local ENR with an external + IP address and port as seen by other peers on the network. This + disables this feature, fixing the ENR's IP/PORT to those specified on + boot. + --disable-inbound-rate-limiter + Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts + Disable the timeouts applied to some internal locks by default. This + can lead to less spurious failures on slow hardware but is considered + experimental as it may obscure performance issues. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --disable-optimistic-finalized-sync + Force Lighthouse to verify every execution block hash with the + execution client during finalized sync. By default block hashes will + be checked in Lighthouse and only passed to the EL if initial + verification fails. + --disable-packet-filter + Disables the discovery packet filter. Useful for testing in smaller + networks + --disable-proposer-reorgs + Do not attempt to reorg late blocks from other validators when + proposing. + --disable-quic + Disables the quic transport. The node will rely solely on the TCP + transport for libp2p connections. + --disable-upnp + Disables UPnP support. Setting this will prevent Lighthouse from + attempting to automatically establish external port mappings. + --dummy-eth1 + If present, uses an eth1 backend that generates static dummy + data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match + 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-private-discovery + Lighthouse by default does not discover private IP addresses. Set this + flag to enable connection attempts to local addresses. + --eth1 + If present the node will connect to an eth1 node. This is required for + block production, you must use this flag if you wish to serve a + validator. + --eth1-purge-cache + Purges the eth1 block and deposit caches + --genesis-backfill + Attempts to download blocks all the way back to genesis when + checkpoint syncing. + --gui + Enable the graphical user interface and all its requirements. This + enables --http and --validator-monitor-auto and enables SSE logging. + -h, --help + Prints help information + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-enable-tls + Serves the RESTful HTTP API server over TLS. This feature is currently + experimental. + --import-all-attestations + Import and aggregate all attestations, regardless of validator + subscriptions. This will only import attestations from + already-subscribed subnets, use with --subscribe-all-subnets to ensure + all attestations are received for import. + --light-client-server + Act as a full node supporting light clients on the p2p network + [experimental] + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --private + Prevents sending various client identification information. + --proposer-only + Sets this beacon node at be a block proposer only node. This will run + the beacon node in a minimal configuration that is sufficient for + block publishing only. This flag should be used for a beacon node + being referenced by validator client using the --proposer-node flag. + This configuration is for enabling more secure setups. + --purge-db + If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states + After a checkpoint sync, reconstruct historic states in the database. + This requires syncing all the way back to genesis. + --reset-payload-statuses + When present, Lighthouse will forget the payload statuses of any + already-imported blocks. This can assist in the recovery from a + consensus failure caused by the execution layer. + --self-limiter + Enables the outbound rate limiter (requests made by this node). Use + the self-limiter-protocol flag to set per protocol configurations. If + the self rate limiter is enabled and a protocol is not present in the + configuration, the quotas used for the inbound rate limiter will be + used. + --shutdown-after-sync + Shutdown beacon node as soon as sync is completed. Backfill sync will + not be performed before shutdown. + --slasher + Run a slasher alongside the beacon node. It is currently only + recommended for expert users because of the immaturity of the slasher + UX and the extra resources required. + --staking + Standard option for a staking beacon node. This will enable the HTTP + server on localhost:5052 and import deposit logs from the execution + node. This is equivalent to `--http` on merge-ready networks, or + `--http --eth1` pre-merge + --subscribe-all-subnets + Subscribe to all subnets regardless of validator count. This will also + advertise the beacon node as being long-lived subscribed to all + subnets. + --validator-monitor-auto + Enables the automatic detection and monitoring of validators connected + to the HTTP API and using the subnet subscription endpoint. This + generally has the effect of providing additional logging and metrics + for locally controlled validators. + -z, --zero-ports + Sets all listening TCP/UDP ports to 0, allowing the OS to choose some + arbitrary free ports. +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index f31345f3dc0..f5e3b857e15 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -136,4 +136,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 73640da90d6..d373a9a6c4c 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -276,4 +276,4 @@ Flags: If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 1b9324f4199..7a61e197f2c 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -123,4 +123,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 7a01cf16374..67631f19a40 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -164,4 +164,4 @@ Flags: is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 02f5747d69f..d55f074c901 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -121,4 +121,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 2bca6652319..4b11b51a9af 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -142,4 +142,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` \ No newline at end of file From 0be7b71aa76932cf9a2900f50d2dc0cccbd4e99a Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 14 May 2024 11:50:10 +0300 Subject: [PATCH 39/46] md changes --- book/src/help_bn.md | 3 ++- book/src/help_general.md | 3 ++- book/src/help_vc.md | 5 +++-- book/src/help_vm.md | 3 ++- book/src/help_vm_create.md | 3 ++- book/src/help_vm_import.md | 3 ++- book/src/help_vm_move.md | 3 ++- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 10d8e18c7c4..aaaa576402e 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -602,4 +602,5 @@ Flags: -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. -``` \ No newline at end of file +``` + diff --git a/book/src/help_general.md b/book/src/help_general.md index f5e3b857e15..9498b01853d 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -136,4 +136,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vc.md b/book/src/help_vc.md index d373a9a6c4c..b647a7b8f4e 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -171,7 +171,7 @@ Options: the validator_definitions.yml --web3-signer-keep-alive-timeout Keep-alive timeout for each web3signer connection. Set to 'null' to - never timeout [default: 20000] + never timeout [default: 90000] --web3-signer-max-idle-connections Maximum number of idle connections to maintain per web3signer host. Default is unlimited. @@ -276,4 +276,5 @@ Flags: If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 7a61e197f2c..25860abadad 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -123,4 +123,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 67631f19a40..6d7e42d29fd 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -164,4 +164,5 @@ Flags: is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index d55f074c901..e0acec28616 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -121,4 +121,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 4b11b51a9af..348fd3dc819 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -142,4 +142,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + From f8a85362d5853b3998e84f57a5a67569bf996341 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 14 May 2024 12:09:54 +0300 Subject: [PATCH 40/46] cli check --- book/src/help_bn.md | 3 +- book/src/help_general.md | 3 +- book/src/help_vc.md | 5 +- book/src/help_vm.md | 3 +- book/src/help_vm_create.md | 3 +- book/src/help_vm_import.md | 3 +- book/src/help_vm_move.md | 3 +- help_bn.md-e | 605 +++++++++++++++++++++++++++++++++++++ help_general.md-e | 139 +++++++++ help_vc.md-e | 279 +++++++++++++++++ help_vm.md-e | 126 ++++++++ help_vm_create.md-e | 167 ++++++++++ help_vm_import.md-e | 124 ++++++++ help_vm_move.md-e | 145 +++++++++ 14 files changed, 1593 insertions(+), 15 deletions(-) create mode 100644 help_bn.md-e create mode 100644 help_general.md-e create mode 100644 help_vc.md-e create mode 100644 help_vm.md-e create mode 100644 help_vm_create.md-e create mode 100644 help_vm_import.md-e create mode 100644 help_vm_move.md-e diff --git a/book/src/help_bn.md b/book/src/help_bn.md index aaaa576402e..3b51cbd3f61 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -602,5 +602,4 @@ Flags: -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. -``` - +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md index 9498b01853d..f31345f3dc0 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -136,5 +136,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` - +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index b647a7b8f4e..73640da90d6 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -171,7 +171,7 @@ Options: the validator_definitions.yml --web3-signer-keep-alive-timeout Keep-alive timeout for each web3signer connection. Set to 'null' to - never timeout [default: 90000] + never timeout [default: 20000] --web3-signer-max-idle-connections Maximum number of idle connections to maintain per web3signer host. Default is unlimited. @@ -276,5 +276,4 @@ Flags: If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause missed duties when fallbacks are used. -``` - +``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 25860abadad..1b9324f4199 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -123,5 +123,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` - +``` \ No newline at end of file diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 6d7e42d29fd..7a01cf16374 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -164,5 +164,4 @@ Flags: is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` - +``` \ No newline at end of file diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index e0acec28616..02f5747d69f 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -121,5 +121,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` - +``` \ No newline at end of file diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 348fd3dc819..2bca6652319 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -142,5 +142,4 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` - +``` \ No newline at end of file diff --git a/help_bn.md-e b/help_bn.md-e new file mode 100644 index 00000000000..10d8e18c7c4 --- /dev/null +++ b/help_bn.md-e @@ -0,0 +1,605 @@ +# Beacon Node + +``` +The primary component which connects to the Ethereum 2.0 P2P network and +downloads, verifies and stores blocks. Provides a HTTP API for querying the +beacon chain and publishing messages to the network. + +Usage: lighthouse beacon_node [OPTIONS] + +Options: + --auto-compact-db + Enable or disable automatic compaction of the database on + finalization. [default: true] + --blob-prune-margin-epochs + The margin for blob pruning in epochs. The oldest blobs are pruned up + until data_availability_boundary - blob_prune_margin_epochs. [default: + 0] + --blobs-dir + Data directory for the blobs database. + --block-cache-size + Specifies how many blocks the database should cache in memory + [default: 5] + --boot-nodes + One or more comma-delimited base64-encoded ENR's to bootstrap the p2p + network. Multiaddr is also supported. + --builder + The URL of a service compatible with the MEV-boost API. + --builder-fallback-epochs-since-finalization + If this node is proposing a block and the chain has not finalized + within this number of epochs, it will NOT query any connected + builders, and will use the local execution engine for payload + construction. Setting this value to anything less than 2 will cause + the node to NEVER query connected builders. Setting it to 2 will cause + this condition to be hit if there are skips slots at the start of an + epoch, right before this node is set to propose. [default: 3] + --builder-fallback-skips + If this node is proposing a block and has seen this number of skip + slots on the canonical chain in a row, it will NOT query any connected + builders, and will use the local execution engine for payload + construction. [default: 3] + --builder-fallback-skips-per-epoch + If this node is proposing a block and has seen this number of skip + slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will + NOT query any connected builders, and will use the local execution + engine for payload construction. [default: 8] + --builder-profit-threshold + This flag is deprecated and has no effect. + --builder-user-agent + The HTTP user agent to send alongside requests to the builder URL. The + default is Lighthouse's version string. + --checkpoint-blobs + Set the checkpoint blobs to start syncing from. Must be aligned and + match --checkpoint-block. Using --checkpoint-sync-url instead is + recommended. + --checkpoint-block + Set a checkpoint block to start syncing from. Must be aligned and + match --checkpoint-state. Using --checkpoint-sync-url instead is + recommended. + --checkpoint-state + Set a checkpoint state to start syncing from. Must be aligned and + match --checkpoint-block. Using --checkpoint-sync-url instead is + recommended. + --checkpoint-sync-url + Set the remote beacon node HTTP endpoint to use for checkpoint sync. + --checkpoint-sync-url-timeout + Set the timeout for checkpoint sync calls to remote beacon node HTTP + endpoint. [default: 180] + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --discovery-port + The UDP port that discovery will listen on. Defaults to `port` + --discovery-port6 + The UDP port that discovery will listen on over IPv6 if listening over + both IPv4 and IPv6. Defaults to `port6` + --enr-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 + to the IP address it resolves to and does not auto-update based on + PONG responses in discovery. Set this only if you are sure other nodes + can connect to your local node on this address. This will update the + `ip4` or `ip6` ENR fields accordingly. To update both, set this flag + twice with the different values. + --enr-quic-port + The quic UDP4 port that will be set on the local ENR. Set this only if + you are sure other nodes can connect to your local node on this port + over IPv4. + --enr-quic6-port + The quic UDP6 port that will be set on the local ENR. Set this only if + you are sure other nodes can connect to your local node on this port + over IPv6. + --enr-tcp-port + The TCP4 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv4. The + --port flag is used if this is not set. + --enr-tcp6-port + The TCP6 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv6. The + --port6 flag is used if this is not set. + --enr-udp-port + The UDP4 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv4. + --enr-udp6-port + The UDP6 port of the local ENR. Set this only if you are sure other + nodes can connect to your local node on this port over IPv6. + --epochs-per-blob-prune + The epoch interval with which to prune blobs from Lighthouse's + database when they are older than the data availability boundary + relative to the current epoch. [default: 1] + --epochs-per-migration + The number of epochs to wait between running the migration of data + from the hot DB to the cold DB. Less frequent runs can be useful for + minimizing disk writes [default: 1] + --eth1-blocks-per-log-query + Specifies the number of blocks that a deposit log query should span. + This will reduce the size of responses from the Eth1 endpoint. + [default: 1000] + --eth1-cache-follow-distance + Specifies the distance between the Eth1 chain head and the last block + which should be imported into the cache. Setting this value lower can + help compensate for irregular Proof-of-Work block times, but setting + it too low can make the node vulnerable to re-orgs. + --execution-endpoint + Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC + connection. Uses the same endpoint to populate the deposit cache. + --execution-jwt + File path which contains the hex-encoded JWT secret for the execution + endpoint provided in the --execution-endpoint flag. + --execution-jwt-id + Used by the beacon node to communicate a unique identifier to + execution nodes during JWT authentication. It corresponds to the 'id' + field in the JWT claims object.Set to empty by default + --execution-jwt-secret-key + Hex-encoded JWT secret for the execution endpoint provided in the + --execution-endpoint flag. + --execution-jwt-version + Used by the beacon node to communicate a client version to execution + nodes during JWT authentication. It corresponds to the 'clv' field in + the JWT claims object.Set to empty by default + --execution-timeout-multiplier + Unsigned integer to multiply the default execution timeouts by. + [default: 1] + --fork-choice-before-proposal-timeout + Set the maximum number of milliseconds to wait for fork choice before + proposing a block. You can prevent waiting at all by setting the + timeout to 0, however you risk proposing atop the wrong parent block. + [default: 250] + --freezer-dir + Data directory for the freezer database. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. Defaults to the + current version and commit, truncated to fit in 32 bytes. + --historic-state-cache-size + Specifies how many states from the freezer database should cache in + memory [default: 1] + --http-address
+ Set the listen address for the RESTful HTTP API server. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5052). + --http-duplicate-block-status + Status code to send when a block that is already known is POSTed to + the HTTP API. + --http-enable-beacon-processor + The beacon processor is a scheduler which provides quality-of-service + and DoS protection. When set to "true", HTTP API requests will be + queued and scheduled alongside other tasks. When set to "false", HTTP + API responses will be executed immediately. + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --http-sse-capacity-multiplier + Multiplier to apply to the length of HTTP server-sent-event (SSE) + channels. Increasing this value can prevent messages from being + dropped. + --http-tls-cert + The path of the certificate to be used when serving the HTTP API + server over TLS. + --http-tls-key + The path of the private key to be used when serving the HTTP API + server over TLS. Must not be password-protected. + --inbound-rate-limiter-protocols + Configures the inbound rate limiter (requests received by this + node).Rate limit quotas per protocol can be set in the form of + :/. To set quotas for multiple + protocols, separate them by ';'. This is enabled by default, using + default quotas. To disable rate limiting use the + disable-inbound-rate-limiter flag instead. + --invalid-gossip-verified-blocks-path + If a block succeeds gossip validation whilst failing full validation, + store the block SSZ as a file at this path. This feature is only + recommended for developers. This directory is not pruned, users should + be careful to avoid filling up their disks. + --libp2p-addresses + One or more comma-delimited multiaddrs to manually connect to a libp2p + peer without an ENR. + --listen-address [
...] + The address lighthouse will listen for UDP and TCP connections. To + listen over IpV4 and IpV6 set this flag twice with the different + values. + Examples: + - --listen-address '0.0.0.0' will listen over IPv4. + - --listen-address '::' will listen over IPv6. + - --listen-address '0.0.0.0' --listen-address '::' will listen over + both IPv4 and IPv6. The order of the given addresses is not relevant. + However, multiple IPv4, or multiple IPv6 addresses will not be + accepted. [default: 0.0.0.0] + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --max-skip-slots + Refuse to skip more than this many slots when processing an + attestation. This prevents nodes on minority forks from wasting our + time and disk space, but could also cause unnecessary consensus + failures, so is disabled by default. + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5054). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote + endpoint. This can be used to monitor your setup on certain services + (e.g. beaconcha.in). This flag sets the endpoint where the beacon node + metrics will be sent. Note: This will send information to a remote + sever which may identify and associate your validators, IP address and + other personal information. Always use a HTTPS connection and never + provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the + monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --network-dir + Data directory for network keys. Defaults to network/ inside the + beacon node dir. + --port + The TCP/UDP ports to listen on. There are two UDP ports. The discovery + UDP port will be set to this value and the Quic UDP port will be set + to this value + 1. The discovery port can be modified by the + --discovery-port flag and the quic port can be modified by the + --quic-port flag. If listening over both IPv4 and IPv6 the --port flag + will apply to the IPv4 address and --port6 to the IPv6 address. + [default: 9000] + --port6 + The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 + and IPv6. Defaults to 9090 when required. The Quic UDP port will be + set to this value + 1. [default: 9090] + --prepare-payload-lookahead + The time before the start of a proposal slot at which payload + attributes should be sent. Low values are useful for execution nodes + which don't improve their payload after the first call, and high + values are useful for ensuring the EL is given ample notice. Default: + 1/3 of a slot. + --progressive-balances + Deprecated. This optimisation is now the default and cannot be + disabled. + --proposer-reorg-cutoff + Maximum delay after the start of the slot at which to propose a + reorging block. Lower values can prevent failed reorgs by ensuring the + block has ample time to propagate and be processed by the network. The + default is 1/12th of a slot (1 second on mainnet) + --proposer-reorg-disallowed-offsets + Comma-separated list of integer offsets which can be used to avoid + proposing reorging blocks at certain slots. An offset of N means that + reorging proposals will not be attempted at any slot such that `slot % + SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be + avoided. Any offsets supplied with this flag will impose additional + restrictions. + --proposer-reorg-epochs-since-finalization + Maximum number of epochs since finalization at which proposer reorgs + are allowed. Default: 2 + --proposer-reorg-parent-threshold + Percentage of parent vote weight above which to attempt a proposer + reorg. Default: 160% + --proposer-reorg-threshold + Percentage of head vote weight below which to attempt a proposer + reorg. Default: 20% + --prune-blobs + Prune blobs from Lighthouse's database when they are older than the + data data availability boundary relative to the current epoch. + [default: true] + --prune-payloads + Prune execution payloads from Lighthouse's database. This saves space + but imposes load on the execution client, as payloads need to be + reconstructed and sent to syncing peers. [default: true] + --quic-port + The UDP port that quic will listen on. Defaults to `port` + 1 + --quic-port6 + The UDP port that quic will listen on over IPv6 if listening over both + IPv4 and IPv6. Defaults to `port6` + 1 + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + --self-limiter-protocols + Enables the outbound rate limiter (requests made by this node).Rate + limit quotas per protocol can be set in the form of + :/. To set quotas for multiple + protocols, separate them by ';'. If the self rate limiter is enabled + and a protocol is not present in the configuration, the quotas used + for the inbound rate limiter will be used. + --shuffling-cache-size + Some HTTP API requests can be optimised by caching the shufflings at + each epoch. This flag allows the user to set the shuffling cache size + in epochs. Shufflings are dependent on validator count and setting + this value to a large number can consume a large amount of memory. + --slasher-att-cache-size + Set the maximum number of attestation roots for the slasher to cache + --slasher-backend + Set the database backend to be used by the slasher. [possible values: + lmdb, disabled] + --slasher-broadcast + Broadcast slashings found by the slasher to the rest of the network + [Enabled by default]. [default: true] + --slasher-chunk-size + Number of epochs per validator per chunk stored on disk. + --slasher-dir + Set the slasher's database directory. + --slasher-history-length + Configure how many epochs of history the slasher keeps. Immutable + after initialization. + --slasher-max-db-size + Maximum size of the MDBX database used by the slasher. + --slasher-slot-offset + Set the delay from the start of the slot at which the slasher should + ingest attestations. Only effective if the slasher-update-period is a + multiple of the slot duration. + --slasher-update-period + Configure how often the slasher runs batch processing. + --slasher-validator-chunk-size + Number of validators per chunk stored on disk. + --slots-per-restore-point + Specifies how often a freezer DB restore point should be stored. + Cannot be changed after initialization. [default: 8192 (mainnet) or 64 + (minimal)] + --state-cache-size + Specifies the size of the state cache [default: 128] + --suggested-fee-recipient + Emergency fallback fee recipient for use in case the validator client + does not have one configured. You should set this flag on the + validator client instead of (or in addition to) setting it here. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --target-peers + The target number of peers. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --trusted-peers + One or more comma-delimited trusted peer ids which always have the + highest score according to the peer scoring system. + --trusted-setup-file-override + Path to a json file containing the trusted setup params. NOTE: This + will override the trusted setup that is generated from the mainnet kzg + ceremony. Use with caution + --validator-monitor-file + As per --validator-monitor-pubkeys, but the comma-separated list is + contained within a file at the given path. + --validator-monitor-individual-tracking-threshold + Once the validator monitor reaches this number of local validators it + will stop collecting per-validator Prometheus metrics and issuing + per-validator logs. Instead, it will provide aggregate metrics and + logs. This avoids infeasibly high cardinality in the Prometheus + database and high log volume when using many validators. Defaults to + 64. + --validator-monitor-pubkeys + A comma-separated list of 0x-prefixed validator public keys. These + validators will receive special monitoring and additional logging. + --wss-checkpoint + Specify a weak subjectivity checkpoint in `block_root:epoch` format to + verify the node's sync against. The block root should be 0x-prefixed. + Note that this flag is for verification only, to perform a checkpoint + sync from a recent state use --checkpoint-sync-url. + -V, --version + Print version + +Flags: + --allow-insecure-genesis-sync + Enable syncing from genesis, which is generally insecure and + incompatible with data availability checks. Checkpoint syncing is the + preferred method for syncing a node. Only use this flag when testing. + DO NOT use on mainnet! + --always-prefer-builder-payload + This flag is deprecated and has no effect. + --always-prepare-payload + Send payload attributes with every fork choice update. This is + intended for use by block builders, relays and developers. You should + set a fee recipient on this BN and also consider adjusting the + --prepare-payload-lookahead flag. + --builder-fallback-disable-checks + This flag disables all checks related to chain health. This means the + builder API will always be used for payload construction, regardless + of recent chain conditions. + --compact-db + If present, apply compaction to the database on start-up. Use with + caution. It is generally not recommended unless auto-compaction is + disabled. + --disable-backfill-rate-limiting + Disable the backfill sync rate-limiting. This allow users to just sync + the entire chain as fast as possible, however it can result in + resource contention which degrades staking performance. Stakers should + generally choose to avoid this flag since backfill sync is not + required for staking. + --disable-deposit-contract-sync + Explicitly disables syncing of deposit logs from the execution node. + This overrides any previous option that depends on it. Useful if you + intend to run a non-validating beacon node. + --disable-duplicate-warn-logs + This flag is deprecated and has no effect. + --disable-enr-auto-update + Discovery automatically updates the nodes local ENR with an external + IP address and port as seen by other peers on the network. This + disables this feature, fixing the ENR's IP/PORT to those specified on + boot. + --disable-inbound-rate-limiter + Disables the inbound rate limiter (requests received by this node). + --disable-lock-timeouts + Disable the timeouts applied to some internal locks by default. This + can lead to less spurious failures on slow hardware but is considered + experimental as it may obscure performance issues. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --disable-optimistic-finalized-sync + Force Lighthouse to verify every execution block hash with the + execution client during finalized sync. By default block hashes will + be checked in Lighthouse and only passed to the EL if initial + verification fails. + --disable-packet-filter + Disables the discovery packet filter. Useful for testing in smaller + networks + --disable-proposer-reorgs + Do not attempt to reorg late blocks from other validators when + proposing. + --disable-quic + Disables the quic transport. The node will rely solely on the TCP + transport for libp2p connections. + --disable-upnp + Disables UPnP support. Setting this will prevent Lighthouse from + attempting to automatically establish external port mappings. + --dummy-eth1 + If present, uses an eth1 backend that generates static dummy + data.Identical to the method used at the 2019 Canada interop. + -e, --enr-match + 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-private-discovery + Lighthouse by default does not discover private IP addresses. Set this + flag to enable connection attempts to local addresses. + --eth1 + If present the node will connect to an eth1 node. This is required for + block production, you must use this flag if you wish to serve a + validator. + --eth1-purge-cache + Purges the eth1 block and deposit caches + --genesis-backfill + Attempts to download blocks all the way back to genesis when + checkpoint syncing. + --gui + Enable the graphical user interface and all its requirements. This + enables --http and --validator-monitor-auto and enables SSE logging. + -h, --help + Prints help information + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-enable-tls + Serves the RESTful HTTP API server over TLS. This feature is currently + experimental. + --import-all-attestations + Import and aggregate all attestations, regardless of validator + subscriptions. This will only import attestations from + already-subscribed subnets, use with --subscribe-all-subnets to ensure + all attestations are received for import. + --light-client-server + Act as a full node supporting light clients on the p2p network + [experimental] + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --private + Prevents sending various client identification information. + --proposer-only + Sets this beacon node at be a block proposer only node. This will run + the beacon node in a minimal configuration that is sufficient for + block publishing only. This flag should be used for a beacon node + being referenced by validator client using the --proposer-node flag. + This configuration is for enabling more secure setups. + --purge-db + If present, the chain database will be deleted. Use with caution. + --reconstruct-historic-states + After a checkpoint sync, reconstruct historic states in the database. + This requires syncing all the way back to genesis. + --reset-payload-statuses + When present, Lighthouse will forget the payload statuses of any + already-imported blocks. This can assist in the recovery from a + consensus failure caused by the execution layer. + --self-limiter + Enables the outbound rate limiter (requests made by this node). Use + the self-limiter-protocol flag to set per protocol configurations. If + the self rate limiter is enabled and a protocol is not present in the + configuration, the quotas used for the inbound rate limiter will be + used. + --shutdown-after-sync + Shutdown beacon node as soon as sync is completed. Backfill sync will + not be performed before shutdown. + --slasher + Run a slasher alongside the beacon node. It is currently only + recommended for expert users because of the immaturity of the slasher + UX and the extra resources required. + --staking + Standard option for a staking beacon node. This will enable the HTTP + server on localhost:5052 and import deposit logs from the execution + node. This is equivalent to `--http` on merge-ready networks, or + `--http --eth1` pre-merge + --subscribe-all-subnets + Subscribe to all subnets regardless of validator count. This will also + advertise the beacon node as being long-lived subscribed to all + subnets. + --validator-monitor-auto + Enables the automatic detection and monitoring of validators connected + to the HTTP API and using the subnet subscription endpoint. This + generally has the effect of providing additional logging and metrics + for locally controlled validators. + -z, --zero-ports + Sets all listening TCP/UDP ports to 0, allowing the OS to choose some + arbitrary free ports. +``` \ No newline at end of file diff --git a/help_general.md-e b/help_general.md-e new file mode 100644 index 00000000000..f5e3b857e15 --- /dev/null +++ b/help_general.md-e @@ -0,0 +1,139 @@ +# Lighthouse General Commands + +``` +Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a +validator client and utilities for managing validator accounts. + +Usage: lighthouse [OPTIONS] [COMMAND] + +Commands: + account_manager + Utilities for generating and managing Ethereum 2.0 accounts. [aliases: + a, am, account, account_manager] + beacon_node + The primary component which connects to the Ethereum 2.0 P2P network + and downloads, verifies and stores blocks. Provides a HTTP API for + querying the beacon chain and publishing messages to the network. + [aliases: b, bn, beacon] + boot_node + Start a special Lighthouse process that only serves as a discv5 + boot-node. This process will *not* import blocks or perform most + typical beacon node functions. Instead, it will simply run the discv5 + service and assist nodes on the network to discover each other. This + is the recommended way to provide a network boot-node since it has a + reduced attack surface compared to a full beacon node. + database_manager + Manage a beacon node database [aliases: db] + validator_client + When connected to a beacon node, performs the duties of a staked + validator (e.g., proposing blocks and attestations). [aliases: v, vc, + validator] + validator_manager + Utilities for managing a Lighthouse validator client via the HTTP API. + [aliases: vm, validator-manager, validator_manager] + help + Print this message or the help of the given subcommand(s) + +Options: + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + -V, --version + Print version + +Flags: + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + -l + DEPRECATED Enables environment logging giving access to sub-protocol + logs such as discv5 and libp2p + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_vc.md-e b/help_vc.md-e new file mode 100644 index 00000000000..d373a9a6c4c --- /dev/null +++ b/help_vc.md-e @@ -0,0 +1,279 @@ +# Validator Client + +``` +When connected to a beacon node, performs the duties of a staked validator +(e.g., proposing blocks and attestations). + +Usage: lighthouse validator_client [OPTIONS] + +Options: + --beacon-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. + Default is http://localhost:5052. + --beacon-nodes-tls-certs + Comma-separated paths to custom TLS certificates to use when + connecting to a beacon node (and/or proposer node). These certificates + must be in PEM format and are used in addition to the OS trust store. + Commas must only be used as a delimiter, and must not be part of the + certificate path. + --broadcast + Comma-separated list of beacon API topics to broadcast to all beacon + nodes. Possible values are: none, attestations, blocks, subscriptions, + sync-committee. Default (when flag is omitted) is to broadcast + subscriptions only. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the + builder's payload value when choosing between a builder payload header + and payload from the local execution node. + --builder-registration-timestamp-override + This flag takes a unix timestamp value that will be used to override + the timestamp used in the builder api registration + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --gas-limit + The gas limit to be used in all builder proposals for all validators + managed by this validator client. Note this will not necessarily be + used if the gas limit set here moves too far from the previous block's + gas limit. [default: 30,000,000] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --graffiti + Specify your custom graffiti to be included in blocks. + --graffiti-file + Specify a graffiti file to load validator graffitis from. + --http-address
+ Set the address for the HTTP address. The HTTP server is not encrypted + and therefore it is unsafe to publish on a public network. When this + flag is used, it additionally requires the explicit use of the + `--unencrypted-http-transport` flag to ensure the user is aware of the + risks involved. For access via the Internet, users should apply + transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. + --http-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5062). + --http-port + Set the listen TCP port for the RESTful HTTP API server. + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --metrics-address
+ Set the listen address for the Prometheus metrics HTTP server. + --metrics-allow-origin + Set the value of the Access-Control-Allow-Origin response HTTP header. + Use * to allow any origin (not recommended in production). If no value + is supplied, the CORS allowed origin is set to the listen address of + this server (e.g., http://localhost:5064). + --metrics-port + Set the listen TCP port for the Prometheus metrics HTTP server. + --monitoring-endpoint
+ Enables the monitoring service for sending system metrics to a remote + endpoint. This can be used to monitor your setup on certain services + (e.g. beaconcha.in). This flag sets the endpoint where the beacon node + metrics will be sent. Note: This will send information to a remote + sever which may identify and associate your validators, IP address and + other personal information. Always use a HTTPS connection and never + provide an untrusted URL. + --monitoring-endpoint-period + Defines how many seconds to wait between each message sent to the + monitoring-endpoint. Default: 60s + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --proposer-nodes + Comma-separated addresses to one or more beacon node HTTP APIs. These + specify nodes that are used to send beacon block proposals. A failure + will revert back to the standard beacon nodes specified in + --beacon-nodes. + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + --secrets-dir + The directory which contains the password to unlock the validator + voting keypairs. Each password should be contained in a file where the + name is the 0x-prefixed hex representation of the validators voting + public key. Defaults to ~/.lighthouse/{network}/secrets. + --suggested-fee-recipient + Once the merge has happened, this address will receive transaction + fees from blocks proposed by this validator client. If a fee recipient + is configured in the validator definitions it takes priority over this + value. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --validator-registration-batch-size + Defines the number of validators per validator/register_validator + request sent to the BN. This value can be reduced to avoid timeouts + from builders. [default: 500] + --validators-dir + The directory which contains the validator keystores, deposit data for + each validator along with the common slashing protection database and + the validator_definitions.yml + --web3-signer-keep-alive-timeout + Keep-alive timeout for each web3signer connection. Set to 'null' to + never timeout [default: 20000] + --web3-signer-max-idle-connections + Maximum number of idle connections to maintain per web3signer host. + Default is unlimited. + +Flags: + --builder-proposals + If this flag is set, Lighthouse will query the Beacon Node for only + block headers during proposals and will sign over headers. Useful for + outsourcing execution payload construction during proposals. + --disable-auto-discover + If present, do not attempt to discover new validators in the + validators-dir. Validators will need to be manually added to the + validator_definitions.yml file. + --disable-latency-measurement-service + Disables the service that periodically attempts to measure latency to + BNs. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --disable-run-on-all + DEPRECATED. Use --broadcast. By default, Lighthouse publishes + attestation, sync committee subscriptions and proposer preparation + messages to all beacon nodes provided in the `--beacon-nodes flag`. + This option changes that behaviour such that these api calls only go + out to the first available and synced beacon node + --disable-slashing-protection-web3signer + Disable Lighthouse's slashing protection for all web3signer keys. This + can reduce the I/O burden on the VC but is only safe if slashing + protection is enabled on the remote signer and is implemented + correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT + SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET + SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING + PROTECTION. + --distributed + Enables functionality required for running the validator in a + distributed validator cluster. + --enable-doppelganger-protection + If this flag is set, Lighthouse will delay startup for three epochs + and monitor for messages on the network by any of the validators + managed by this client. This will result in three (possibly four) + epochs worth of missed attestations. If an attestation is detected + during this period, it means it is very likely that you are running a + second validator client with the same keys. This validator client will + immediately shutdown if this is detected in order to avoid potentially + committing a slashable offense. Use this flag in order to ENABLE this + functionality, without this flag Lighthouse will begin attesting + immediately. + --enable-high-validator-count-metrics + Enable per validator metrics for > 64 validators. Note: This flag is + automatically enabled for <= 64 validators. Enabling this metric for + higher validator counts will lead to higher volume of prometheus + metrics being collected. + -h, --help + Prints help information + --http + Enable the RESTful HTTP API server. Disabled by default. + --http-allow-keystore-export + If present, allow access to the DELETE /lighthouse/keystores HTTP API + method, which allows exporting keystores and passwords to HTTP API + consumers who have access to the API token. This method is useful for + exporting validators, however it should be used with caution since it + exposes private key data to authorized users. + --http-store-passwords-in-secrets-dir + If present, any validators created via the HTTP will have keystore + passwords stored in the secrets-dir rather than the validator + definitions file. + --init-slashing-protection + If present, do not require the slashing protection database to exist + before running. You SHOULD NOT use this flag unless you're certain + that a new slashing protection database is required. Usually, your + database will have been initialized when you imported your validator + keys. If you misplace your database and then run with this flag you + risk being slashed. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --metrics + Enable the Prometheus metrics HTTP server. Disabled by default. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed + by builders, regardless of payload value. + --produce-block-v3 + Enable block production via the block v3 endpoint for this validator + client. This should only be enabled when paired with a beacon node + that has this endpoint implemented. This flag will be enabled by + default in future. + --unencrypted-http-transport + This is a safety flag to ensure that the user is aware that the http + transport is unencrypted and using a custom HTTP address is unsafe. + --use-long-timeouts + If present, the validator client will use longer timeouts for requests + made to the beacon node. This flag is generally not recommended, + longer timeouts can cause missed duties when fallbacks are used. +``` \ No newline at end of file diff --git a/help_vm.md-e b/help_vm.md-e new file mode 100644 index 00000000000..7a61e197f2c --- /dev/null +++ b/help_vm.md-e @@ -0,0 +1,126 @@ +# Validator Manager + +``` +Utilities for managing a Lighthouse validator client via the HTTP API. + +Usage: lighthouse validator_manager [OPTIONS] [COMMAND] + +Commands: + create + Creates new validators from BIP-39 mnemonic. A JSON file will be + created which contains all the validator keystores and other validator + data. This file can then be imported to a validator client using the + "import-validators" command. Another, optional JSON file is created + which contains a list of validator deposits in the same format as the + "ethereum/staking-deposit-cli" tool. + import + Uploads validators to a validator client using the HTTP API. The + validators are defined in a JSON file which can be generated using the + "create-validators" command. + move + Uploads validators to a validator client using the HTTP API. The + validators are defined in a JSON file which can be generated using the + "create-validators" command. This command only supports validators + signing via a keystore on the local file system (i.e., not Web3Signer + validators). + help + Print this message or the help of the given subcommand(s) + +Options: + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + +Flags: + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_vm_create.md-e b/help_vm_create.md-e new file mode 100644 index 00000000000..67631f19a40 --- /dev/null +++ b/help_vm_create.md-e @@ -0,0 +1,167 @@ +# Validator Manager Create + +``` +Creates new validators from BIP-39 mnemonic. A JSON file will be created which +contains all the validator keystores and other validator data. This file can +then be imported to a validator client using the "import-validators" command. +Another, optional JSON file is created which contains a list of validator +deposits in the same format as the "ethereum/staking-deposit-cli" tool. + +Usage: lighthouse validator_manager create [OPTIONS] --output-path + +Options: + --beacon-node + A HTTP(S) address of a beacon node using the beacon-API. If this value + is provided, an error will be raised if any validator key here is + already known as a validator by that beacon node. This helps prevent + the same validator being created twice and therefore slashable + conditions. + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the + builder's payload value when choosing between a builder payload header + and payload from the local execution node. + --builder-proposals + When provided, all created validators will attempt to create blocks + via builder rather than the local EL. [possible values: true, false] + --count + The number of validators to create, regardless of how many already + exist + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --deposit-gwei + The GWEI value of the deposit amount. Defaults to the minimum amount + required for an active validator (MAX_EFFECTIVE_BALANCE) + --eth1-withdrawal-address + If this field is set, the given eth1 address will be used to create + the withdrawal credentials. Otherwise, it will generate withdrawal + credentials with the mnemonic-derived withdrawal public key in + EIP-2334 format. + --first-index + The first of consecutive key indexes you wish to create. [default: 0] + --gas-limit + All created validators will use this gas limit. It is recommended to + leave this as the default value by not specifying this flag. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --mnemonic-path + If present, the mnemonic will be read in from this file. + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --output-path + The path to a directory where the validator and (optionally) deposits + files will be created. The directory will be created if it does not + exist. + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed + by builders, regardless of payload value. [possible values: true, + false] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + --suggested-fee-recipient + All created validators will use this value for the suggested fee + recipient. Omit this flag to use the default value from the VC. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + +Flags: + --disable-deposits + When provided don't generate the deposits JSON file that is commonly + used for submitting validator deposits via a web UI. Using this flag + will save several seconds per validator if the user has an alternate + strategy for submitting deposits. + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + --force-bls-withdrawal-credentials + If present, allows BLS withdrawal credentials rather than an execution + address. This is not recommended. + -h, --help + Prints help information + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. + --specify-voting-keystore-password + If present, the user will be prompted to enter the voting keystore + password that will be used to encrypt the voting keystores. If this + flag is not provided, a random password will be used. It is not + necessary to keep backups of voting keystore passwords if the mnemonic + is safely backed up. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. +``` \ No newline at end of file diff --git a/help_vm_import.md-e b/help_vm_import.md-e new file mode 100644 index 00000000000..d55f074c901 --- /dev/null +++ b/help_vm_import.md-e @@ -0,0 +1,124 @@ +# Validator Manager Import + +``` +Uploads validators to a validator client using the HTTP API. The validators are +defined in a JSON file which can be generated using the "create-validators" +command. + +Usage: lighthouse validator_manager import [OPTIONS] --validators-file + +Options: + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --validators-file + The path to a JSON file containing a list of validators to be imported + to the validator client. This file is usually named "validators.json". + --vc-token + The file containing a token required by the validator client. + --vc-url + A HTTP(S) address of a validator client using the keymanager-API. If + this value is not supplied then a 'dry run' will be conducted where no + changes are made to the validator client. [default: + http://localhost:5062] + +Flags: + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + --ignore-duplicates + If present, ignore any validators which already exist on the VC. + Without this flag, the process will terminate without making any + changes. This flag should be used with caution, whilst it does not + directly cause slashable conditions, it might be an indicator that + something is amiss. Users should also be careful to avoid submitting + duplicate deposits for validators that already exist on the VC. + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file diff --git a/help_vm_move.md-e b/help_vm_move.md-e new file mode 100644 index 00000000000..4b11b51a9af --- /dev/null +++ b/help_vm_move.md-e @@ -0,0 +1,145 @@ +# Validator Manager Move + +``` +Uploads validators to a validator client using the HTTP API. The validators are +defined in a JSON file which can be generated using the "create-validators" +command. This command only supports validators signing via a keystore on the +local file system (i.e., not Web3Signer validators). + +Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url + +Options: + --builder-boost-factor + Defines the boost factor, a percentage multiplier to apply to the + builder's payload value when choosing between a builder payload header + and payload from the local execution node. + --builder-proposals + When provided, all created validators will attempt to create blocks + via builder rather than the local EL. [possible values: true, false] + --count + The number of validators to move. + -d, --datadir + Used to specify a custom root data directory for lighthouse keys and + databases. Defaults to $HOME/.lighthouse/{network} where network is + the value of the `network` flag Note: Users should specify separate + custom datadirs for different networks. + --debug-level + Specifies the verbosity level used when emitting logs to the terminal. + [default: info] [possible values: info, debug, trace, warn, error, + crit] + --dest-vc-token + The file containing a token required by the destination validator + client. + --dest-vc-url + A HTTP(S) address of a validator client using the keymanager-API. This + validator client is the "destination" and will have new validators + added as they are removed from the "source" validator client. + --gas-limit + All created validators will use this gas limit. It is recommended to + leave this as the default value by not specifying this flag. + --genesis-state-url + A URL of a beacon-API compatible server from which to download the + genesis state. Checkpoint sync server URLs can generally be used with + this flag. If not supplied, a default URL or the --checkpoint-sync-url + may be used. If the genesis state is already included in this binary + then this value will be ignored. + --genesis-state-url-timeout + The timeout in seconds for the request to --genesis-state-url. + [default: 180] + --log-format + Specifies the log format used when emitting logs to the terminal. + [possible values: JSON] + --logfile + File path where the log file will be stored. Once it grows to the + value specified in `--logfile-max-size` a new log file is generated + where future logs are stored. Once the number of log files exceeds the + value specified in `--logfile-max-number` the oldest log file will be + overwritten. + --logfile-debug-level + The verbosity level used when emitting logs to the log file. [default: + debug] [possible values: info, debug, trace, warn, error, crit] + --logfile-format + Specifies the log format used when emitting logs to the logfile. + [possible values: DEFAULT, JSON] + --logfile-max-number + The maximum number of log files that will be stored. If set to 0, + background file logging is disabled. [default: 5] + --logfile-max-size + The maximum size (in MB) each log file can grow to before rotating. If + set to 0, background file logging is disabled. [default: 200] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible + values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + --prefer-builder-proposals + If this flag is set, Lighthouse will always prefer blocks constructed + by builders, regardless of payload value. [possible values: true, + false] + --safe-slots-to-import-optimistically + Used to coordinate manual overrides of the + SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override this parameter in the event of an + attack at the PoS transition block. Incorrect use of this flag can + cause your node to possibly accept an invalid chain or sync more + slowly. Be extremely careful with this flag. + --src-vc-token + The file containing a token required by the source validator client. + --src-vc-url + A HTTP(S) address of a validator client using the keymanager-API. This + validator client is the "source" and contains the validators that are + to be moved. + --stdin-inputs + If present, read all user inputs from stdin instead of tty. + --suggested-fee-recipient + All created validators will use this value for the suggested fee + recipient. Omit this flag to use the default value from the VC. + -t, --testnet-dir + Path to directory containing eth2_testnet specs. Defaults to a + hard-coded Lighthouse testnet. Only effective if there is no existing + database. + --terminal-block-hash-epoch-override + Used to coordinate manual overrides to the + TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only + be used if the user has a clear understanding that the broad Ethereum + community has elected to override the terminal PoW block. Incorrect + use of this flag will cause your node to experience a consensus + failure. Be extremely careful with this flag. + --terminal-block-hash-override + Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH + parameter. This flag should only be used if the user has a clear + understanding that the broad Ethereum community has elected to + override the terminal PoW block. Incorrect use of this flag will cause + your node to experience a consensus failure. Be extremely careful with + this flag. + --terminal-total-difficulty-override + Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY + parameter. Accepts a 256-bit decimal integer (not a hex value). This + flag should only be used if the user has a clear understanding that + the broad Ethereum community has elected to override the terminal + difficulty. Incorrect use of this flag will cause your node to + experience a consensus failure. Be extremely careful with this flag. + --validators + The validators to be moved. Either a list of 0x-prefixed validator + pubkeys or the keyword "all". + +Flags: + --disable-log-timestamp + If present, do not include timestamps in logging output. + --disable-malloc-tuning + If present, do not configure the system allocator. Providing this flag + will generally increase memory usage, it should only be provided when + debugging specific memory allocation issues. + -h, --help + Prints help information + --log-color + Force outputting colors when emitting logs to the terminal. + --logfile-compress + If present, compress old log files. This can help reduce the space + needed to store old logs. + --logfile-no-restricted-perms + If present, log files will be generated as world-readable meaning they + can be read by any user on the machine. Note that logs can often + contain sensitive information about your validator and so this flag + should be used with caution. For Windows users, the log file + permissions will be inherited from the parent folder. +``` \ No newline at end of file From 61da93fa86e0e8e55a91df98725eac443cf3bb2d Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 14 May 2024 12:10:10 +0300 Subject: [PATCH 41/46] cli check --- help_bn.md-e | 605 -------------------------------------------- help_general.md-e | 139 ---------- help_vc.md-e | 279 -------------------- help_vm.md-e | 126 --------- help_vm_create.md-e | 167 ------------ help_vm_import.md-e | 124 --------- help_vm_move.md-e | 145 ----------- 7 files changed, 1585 deletions(-) delete mode 100644 help_bn.md-e delete mode 100644 help_general.md-e delete mode 100644 help_vc.md-e delete mode 100644 help_vm.md-e delete mode 100644 help_vm_create.md-e delete mode 100644 help_vm_import.md-e delete mode 100644 help_vm_move.md-e diff --git a/help_bn.md-e b/help_bn.md-e deleted file mode 100644 index 10d8e18c7c4..00000000000 --- a/help_bn.md-e +++ /dev/null @@ -1,605 +0,0 @@ -# Beacon Node - -``` -The primary component which connects to the Ethereum 2.0 P2P network and -downloads, verifies and stores blocks. Provides a HTTP API for querying the -beacon chain and publishing messages to the network. - -Usage: lighthouse beacon_node [OPTIONS] - -Options: - --auto-compact-db - Enable or disable automatic compaction of the database on - finalization. [default: true] - --blob-prune-margin-epochs - The margin for blob pruning in epochs. The oldest blobs are pruned up - until data_availability_boundary - blob_prune_margin_epochs. [default: - 0] - --blobs-dir - Data directory for the blobs database. - --block-cache-size - Specifies how many blocks the database should cache in memory - [default: 5] - --boot-nodes - One or more comma-delimited base64-encoded ENR's to bootstrap the p2p - network. Multiaddr is also supported. - --builder - The URL of a service compatible with the MEV-boost API. - --builder-fallback-epochs-since-finalization - If this node is proposing a block and the chain has not finalized - within this number of epochs, it will NOT query any connected - builders, and will use the local execution engine for payload - construction. Setting this value to anything less than 2 will cause - the node to NEVER query connected builders. Setting it to 2 will cause - this condition to be hit if there are skips slots at the start of an - epoch, right before this node is set to propose. [default: 3] - --builder-fallback-skips - If this node is proposing a block and has seen this number of skip - slots on the canonical chain in a row, it will NOT query any connected - builders, and will use the local execution engine for payload - construction. [default: 3] - --builder-fallback-skips-per-epoch - If this node is proposing a block and has seen this number of skip - slots on the canonical chain in the past `SLOTS_PER_EPOCH`, it will - NOT query any connected builders, and will use the local execution - engine for payload construction. [default: 8] - --builder-profit-threshold - This flag is deprecated and has no effect. - --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The - default is Lighthouse's version string. - --checkpoint-blobs - Set the checkpoint blobs to start syncing from. Must be aligned and - match --checkpoint-block. Using --checkpoint-sync-url instead is - recommended. - --checkpoint-block - Set a checkpoint block to start syncing from. Must be aligned and - match --checkpoint-state. Using --checkpoint-sync-url instead is - recommended. - --checkpoint-state - Set a checkpoint state to start syncing from. Must be aligned and - match --checkpoint-block. Using --checkpoint-sync-url instead is - recommended. - --checkpoint-sync-url - Set the remote beacon node HTTP endpoint to use for checkpoint sync. - --checkpoint-sync-url-timeout - Set the timeout for checkpoint sync calls to remote beacon node HTTP - endpoint. [default: 180] - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --discovery-port - The UDP port that discovery will listen on. Defaults to `port` - --discovery-port6 - The UDP port that discovery will listen on over IPv6 if listening over - both IPv4 and IPv6. Defaults to `port6` - --enr-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 - to the IP address it resolves to and does not auto-update based on - PONG responses in discovery. Set this only if you are sure other nodes - can connect to your local node on this address. This will update the - `ip4` or `ip6` ENR fields accordingly. To update both, set this flag - twice with the different values. - --enr-quic-port - The quic UDP4 port that will be set on the local ENR. Set this only if - you are sure other nodes can connect to your local node on this port - over IPv4. - --enr-quic6-port - The quic UDP6 port that will be set on the local ENR. Set this only if - you are sure other nodes can connect to your local node on this port - over IPv6. - --enr-tcp-port - The TCP4 port of the local ENR. Set this only if you are sure other - nodes can connect to your local node on this port over IPv4. The - --port flag is used if this is not set. - --enr-tcp6-port - The TCP6 port of the local ENR. Set this only if you are sure other - nodes can connect to your local node on this port over IPv6. The - --port6 flag is used if this is not set. - --enr-udp-port - The UDP4 port of the local ENR. Set this only if you are sure other - nodes can connect to your local node on this port over IPv4. - --enr-udp6-port - The UDP6 port of the local ENR. Set this only if you are sure other - nodes can connect to your local node on this port over IPv6. - --epochs-per-blob-prune - The epoch interval with which to prune blobs from Lighthouse's - database when they are older than the data availability boundary - relative to the current epoch. [default: 1] - --epochs-per-migration - The number of epochs to wait between running the migration of data - from the hot DB to the cold DB. Less frequent runs can be useful for - minimizing disk writes [default: 1] - --eth1-blocks-per-log-query - Specifies the number of blocks that a deposit log query should span. - This will reduce the size of responses from the Eth1 endpoint. - [default: 1000] - --eth1-cache-follow-distance - Specifies the distance between the Eth1 chain head and the last block - which should be imported into the cache. Setting this value lower can - help compensate for irregular Proof-of-Work block times, but setting - it too low can make the node vulnerable to re-orgs. - --execution-endpoint - Server endpoint for an execution layer JWT-authenticated HTTP JSON-RPC - connection. Uses the same endpoint to populate the deposit cache. - --execution-jwt - File path which contains the hex-encoded JWT secret for the execution - endpoint provided in the --execution-endpoint flag. - --execution-jwt-id - Used by the beacon node to communicate a unique identifier to - execution nodes during JWT authentication. It corresponds to the 'id' - field in the JWT claims object.Set to empty by default - --execution-jwt-secret-key - Hex-encoded JWT secret for the execution endpoint provided in the - --execution-endpoint flag. - --execution-jwt-version - Used by the beacon node to communicate a client version to execution - nodes during JWT authentication. It corresponds to the 'clv' field in - the JWT claims object.Set to empty by default - --execution-timeout-multiplier - Unsigned integer to multiply the default execution timeouts by. - [default: 1] - --fork-choice-before-proposal-timeout - Set the maximum number of milliseconds to wait for fork choice before - proposing a block. You can prevent waiting at all by setting the - timeout to 0, however you risk proposing atop the wrong parent block. - [default: 250] - --freezer-dir - Data directory for the freezer database. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --graffiti - Specify your custom graffiti to be included in blocks. Defaults to the - current version and commit, truncated to fit in 32 bytes. - --historic-state-cache-size - Specifies how many states from the freezer database should cache in - memory [default: 1] - --http-address
- Set the listen address for the RESTful HTTP API server. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. - Use * to allow any origin (not recommended in production). If no value - is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5052). - --http-duplicate-block-status - Status code to send when a block that is already known is POSTed to - the HTTP API. - --http-enable-beacon-processor - The beacon processor is a scheduler which provides quality-of-service - and DoS protection. When set to "true", HTTP API requests will be - queued and scheduled alongside other tasks. When set to "false", HTTP - API responses will be executed immediately. - --http-port - Set the listen TCP port for the RESTful HTTP API server. - --http-sse-capacity-multiplier - Multiplier to apply to the length of HTTP server-sent-event (SSE) - channels. Increasing this value can prevent messages from being - dropped. - --http-tls-cert - The path of the certificate to be used when serving the HTTP API - server over TLS. - --http-tls-key - The path of the private key to be used when serving the HTTP API - server over TLS. Must not be password-protected. - --inbound-rate-limiter-protocols - Configures the inbound rate limiter (requests received by this - node).Rate limit quotas per protocol can be set in the form of - :/. To set quotas for multiple - protocols, separate them by ';'. This is enabled by default, using - default quotas. To disable rate limiting use the - disable-inbound-rate-limiter flag instead. - --invalid-gossip-verified-blocks-path - If a block succeeds gossip validation whilst failing full validation, - store the block SSZ as a file at this path. This feature is only - recommended for developers. This directory is not pruned, users should - be careful to avoid filling up their disks. - --libp2p-addresses - One or more comma-delimited multiaddrs to manually connect to a libp2p - peer without an ENR. - --listen-address [
...] - The address lighthouse will listen for UDP and TCP connections. To - listen over IpV4 and IpV6 set this flag twice with the different - values. - Examples: - - --listen-address '0.0.0.0' will listen over IPv4. - - --listen-address '::' will listen over IPv6. - - --listen-address '0.0.0.0' --listen-address '::' will listen over - both IPv4 and IPv6. The order of the given addresses is not relevant. - However, multiple IPv4, or multiple IPv6 addresses will not be - accepted. [default: 0.0.0.0] - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --max-skip-slots - Refuse to skip more than this many slots when processing an - attestation. This prevents nodes on minority forks from wasting our - time and disk space, but could also cause unnecessary consensus - failures, so is disabled by default. - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. - Use * to allow any origin (not recommended in production). If no value - is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5054). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote - endpoint. This can be used to monitor your setup on certain services - (e.g. beaconcha.in). This flag sets the endpoint where the beacon node - metrics will be sent. Note: This will send information to a remote - sever which may identify and associate your validators, IP address and - other personal information. Always use a HTTPS connection and never - provide an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the - monitoring-endpoint. Default: 60s - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --network-dir - Data directory for network keys. Defaults to network/ inside the - beacon node dir. - --port - The TCP/UDP ports to listen on. There are two UDP ports. The discovery - UDP port will be set to this value and the Quic UDP port will be set - to this value + 1. The discovery port can be modified by the - --discovery-port flag and the quic port can be modified by the - --quic-port flag. If listening over both IPv4 and IPv6 the --port flag - will apply to the IPv4 address and --port6 to the IPv6 address. - [default: 9000] - --port6 - The TCP/UDP ports to listen on over IPv6 when listening over both IPv4 - and IPv6. Defaults to 9090 when required. The Quic UDP port will be - set to this value + 1. [default: 9090] - --prepare-payload-lookahead - The time before the start of a proposal slot at which payload - attributes should be sent. Low values are useful for execution nodes - which don't improve their payload after the first call, and high - values are useful for ensuring the EL is given ample notice. Default: - 1/3 of a slot. - --progressive-balances - Deprecated. This optimisation is now the default and cannot be - disabled. - --proposer-reorg-cutoff - Maximum delay after the start of the slot at which to propose a - reorging block. Lower values can prevent failed reorgs by ensuring the - block has ample time to propagate and be processed by the network. The - default is 1/12th of a slot (1 second on mainnet) - --proposer-reorg-disallowed-offsets - Comma-separated list of integer offsets which can be used to avoid - proposing reorging blocks at certain slots. An offset of N means that - reorging proposals will not be attempted at any slot such that `slot % - SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be - avoided. Any offsets supplied with this flag will impose additional - restrictions. - --proposer-reorg-epochs-since-finalization - Maximum number of epochs since finalization at which proposer reorgs - are allowed. Default: 2 - --proposer-reorg-parent-threshold - Percentage of parent vote weight above which to attempt a proposer - reorg. Default: 160% - --proposer-reorg-threshold - Percentage of head vote weight below which to attempt a proposer - reorg. Default: 20% - --prune-blobs - Prune blobs from Lighthouse's database when they are older than the - data data availability boundary relative to the current epoch. - [default: true] - --prune-payloads - Prune execution payloads from Lighthouse's database. This saves space - but imposes load on the execution client, as payloads need to be - reconstructed and sent to syncing peers. [default: true] - --quic-port - The UDP port that quic will listen on. Defaults to `port` + 1 - --quic-port6 - The UDP port that quic will listen on over IPv6 if listening over both - IPv4 and IPv6. Defaults to `port6` + 1 - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - --self-limiter-protocols - Enables the outbound rate limiter (requests made by this node).Rate - limit quotas per protocol can be set in the form of - :/. To set quotas for multiple - protocols, separate them by ';'. If the self rate limiter is enabled - and a protocol is not present in the configuration, the quotas used - for the inbound rate limiter will be used. - --shuffling-cache-size - Some HTTP API requests can be optimised by caching the shufflings at - each epoch. This flag allows the user to set the shuffling cache size - in epochs. Shufflings are dependent on validator count and setting - this value to a large number can consume a large amount of memory. - --slasher-att-cache-size - Set the maximum number of attestation roots for the slasher to cache - --slasher-backend - Set the database backend to be used by the slasher. [possible values: - lmdb, disabled] - --slasher-broadcast - Broadcast slashings found by the slasher to the rest of the network - [Enabled by default]. [default: true] - --slasher-chunk-size - Number of epochs per validator per chunk stored on disk. - --slasher-dir - Set the slasher's database directory. - --slasher-history-length - Configure how many epochs of history the slasher keeps. Immutable - after initialization. - --slasher-max-db-size - Maximum size of the MDBX database used by the slasher. - --slasher-slot-offset - Set the delay from the start of the slot at which the slasher should - ingest attestations. Only effective if the slasher-update-period is a - multiple of the slot duration. - --slasher-update-period - Configure how often the slasher runs batch processing. - --slasher-validator-chunk-size - Number of validators per chunk stored on disk. - --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. - Cannot be changed after initialization. [default: 8192 (mainnet) or 64 - (minimal)] - --state-cache-size - Specifies the size of the state cache [default: 128] - --suggested-fee-recipient - Emergency fallback fee recipient for use in case the validator client - does not have one configured. You should set this flag on the - validator client instead of (or in addition to) setting it here. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --target-peers - The target number of peers. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --trusted-peers - One or more comma-delimited trusted peer ids which always have the - highest score according to the peer scoring system. - --trusted-setup-file-override - Path to a json file containing the trusted setup params. NOTE: This - will override the trusted setup that is generated from the mainnet kzg - ceremony. Use with caution - --validator-monitor-file - As per --validator-monitor-pubkeys, but the comma-separated list is - contained within a file at the given path. - --validator-monitor-individual-tracking-threshold - Once the validator monitor reaches this number of local validators it - will stop collecting per-validator Prometheus metrics and issuing - per-validator logs. Instead, it will provide aggregate metrics and - logs. This avoids infeasibly high cardinality in the Prometheus - database and high log volume when using many validators. Defaults to - 64. - --validator-monitor-pubkeys - A comma-separated list of 0x-prefixed validator public keys. These - validators will receive special monitoring and additional logging. - --wss-checkpoint - Specify a weak subjectivity checkpoint in `block_root:epoch` format to - verify the node's sync against. The block root should be 0x-prefixed. - Note that this flag is for verification only, to perform a checkpoint - sync from a recent state use --checkpoint-sync-url. - -V, --version - Print version - -Flags: - --allow-insecure-genesis-sync - Enable syncing from genesis, which is generally insecure and - incompatible with data availability checks. Checkpoint syncing is the - preferred method for syncing a node. Only use this flag when testing. - DO NOT use on mainnet! - --always-prefer-builder-payload - This flag is deprecated and has no effect. - --always-prepare-payload - Send payload attributes with every fork choice update. This is - intended for use by block builders, relays and developers. You should - set a fee recipient on this BN and also consider adjusting the - --prepare-payload-lookahead flag. - --builder-fallback-disable-checks - This flag disables all checks related to chain health. This means the - builder API will always be used for payload construction, regardless - of recent chain conditions. - --compact-db - If present, apply compaction to the database on start-up. Use with - caution. It is generally not recommended unless auto-compaction is - disabled. - --disable-backfill-rate-limiting - Disable the backfill sync rate-limiting. This allow users to just sync - the entire chain as fast as possible, however it can result in - resource contention which degrades staking performance. Stakers should - generally choose to avoid this flag since backfill sync is not - required for staking. - --disable-deposit-contract-sync - Explicitly disables syncing of deposit logs from the execution node. - This overrides any previous option that depends on it. Useful if you - intend to run a non-validating beacon node. - --disable-duplicate-warn-logs - This flag is deprecated and has no effect. - --disable-enr-auto-update - Discovery automatically updates the nodes local ENR with an external - IP address and port as seen by other peers on the network. This - disables this feature, fixing the ENR's IP/PORT to those specified on - boot. - --disable-inbound-rate-limiter - Disables the inbound rate limiter (requests received by this node). - --disable-lock-timeouts - Disable the timeouts applied to some internal locks by default. This - can lead to less spurious failures on slow hardware but is considered - experimental as it may obscure performance issues. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --disable-optimistic-finalized-sync - Force Lighthouse to verify every execution block hash with the - execution client during finalized sync. By default block hashes will - be checked in Lighthouse and only passed to the EL if initial - verification fails. - --disable-packet-filter - Disables the discovery packet filter. Useful for testing in smaller - networks - --disable-proposer-reorgs - Do not attempt to reorg late blocks from other validators when - proposing. - --disable-quic - Disables the quic transport. The node will rely solely on the TCP - transport for libp2p connections. - --disable-upnp - Disables UPnP support. Setting this will prevent Lighthouse from - attempting to automatically establish external port mappings. - --dummy-eth1 - If present, uses an eth1 backend that generates static dummy - data.Identical to the method used at the 2019 Canada interop. - -e, --enr-match - 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-private-discovery - Lighthouse by default does not discover private IP addresses. Set this - flag to enable connection attempts to local addresses. - --eth1 - If present the node will connect to an eth1 node. This is required for - block production, you must use this flag if you wish to serve a - validator. - --eth1-purge-cache - Purges the eth1 block and deposit caches - --genesis-backfill - Attempts to download blocks all the way back to genesis when - checkpoint syncing. - --gui - Enable the graphical user interface and all its requirements. This - enables --http and --validator-monitor-auto and enables SSE logging. - -h, --help - Prints help information - --http - Enable the RESTful HTTP API server. Disabled by default. - --http-enable-tls - Serves the RESTful HTTP API server over TLS. This feature is currently - experimental. - --import-all-attestations - Import and aggregate all attestations, regardless of validator - subscriptions. This will only import attestations from - already-subscribed subnets, use with --subscribe-all-subnets to ensure - all attestations are received for import. - --light-client-server - Act as a full node supporting light clients on the p2p network - [experimental] - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --metrics - Enable the Prometheus metrics HTTP server. Disabled by default. - --private - Prevents sending various client identification information. - --proposer-only - Sets this beacon node at be a block proposer only node. This will run - the beacon node in a minimal configuration that is sufficient for - block publishing only. This flag should be used for a beacon node - being referenced by validator client using the --proposer-node flag. - This configuration is for enabling more secure setups. - --purge-db - If present, the chain database will be deleted. Use with caution. - --reconstruct-historic-states - After a checkpoint sync, reconstruct historic states in the database. - This requires syncing all the way back to genesis. - --reset-payload-statuses - When present, Lighthouse will forget the payload statuses of any - already-imported blocks. This can assist in the recovery from a - consensus failure caused by the execution layer. - --self-limiter - Enables the outbound rate limiter (requests made by this node). Use - the self-limiter-protocol flag to set per protocol configurations. If - the self rate limiter is enabled and a protocol is not present in the - configuration, the quotas used for the inbound rate limiter will be - used. - --shutdown-after-sync - Shutdown beacon node as soon as sync is completed. Backfill sync will - not be performed before shutdown. - --slasher - Run a slasher alongside the beacon node. It is currently only - recommended for expert users because of the immaturity of the slasher - UX and the extra resources required. - --staking - Standard option for a staking beacon node. This will enable the HTTP - server on localhost:5052 and import deposit logs from the execution - node. This is equivalent to `--http` on merge-ready networks, or - `--http --eth1` pre-merge - --subscribe-all-subnets - Subscribe to all subnets regardless of validator count. This will also - advertise the beacon node as being long-lived subscribed to all - subnets. - --validator-monitor-auto - Enables the automatic detection and monitoring of validators connected - to the HTTP API and using the subnet subscription endpoint. This - generally has the effect of providing additional logging and metrics - for locally controlled validators. - -z, --zero-ports - Sets all listening TCP/UDP ports to 0, allowing the OS to choose some - arbitrary free ports. -``` \ No newline at end of file diff --git a/help_general.md-e b/help_general.md-e deleted file mode 100644 index f5e3b857e15..00000000000 --- a/help_general.md-e +++ /dev/null @@ -1,139 +0,0 @@ -# Lighthouse General Commands - -``` -Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a -validator client and utilities for managing validator accounts. - -Usage: lighthouse [OPTIONS] [COMMAND] - -Commands: - account_manager - Utilities for generating and managing Ethereum 2.0 accounts. [aliases: - a, am, account, account_manager] - beacon_node - The primary component which connects to the Ethereum 2.0 P2P network - and downloads, verifies and stores blocks. Provides a HTTP API for - querying the beacon chain and publishing messages to the network. - [aliases: b, bn, beacon] - boot_node - Start a special Lighthouse process that only serves as a discv5 - boot-node. This process will *not* import blocks or perform most - typical beacon node functions. Instead, it will simply run the discv5 - service and assist nodes on the network to discover each other. This - is the recommended way to provide a network boot-node since it has a - reduced attack surface compared to a full beacon node. - database_manager - Manage a beacon node database [aliases: db] - validator_client - When connected to a beacon node, performs the duties of a staked - validator (e.g., proposing blocks and attestations). [aliases: v, vc, - validator] - validator_manager - Utilities for managing a Lighthouse validator client via the HTTP API. - [aliases: vm, validator-manager, validator_manager] - help - Print this message or the help of the given subcommand(s) - -Options: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -V, --version - Print version - -Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - -h, --help - Prints help information - -l - DEPRECATED Enables environment logging giving access to sub-protocol - logs such as discv5 and libp2p - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file diff --git a/help_vc.md-e b/help_vc.md-e deleted file mode 100644 index d373a9a6c4c..00000000000 --- a/help_vc.md-e +++ /dev/null @@ -1,279 +0,0 @@ -# Validator Client - -``` -When connected to a beacon node, performs the duties of a staked validator -(e.g., proposing blocks and attestations). - -Usage: lighthouse validator_client [OPTIONS] - -Options: - --beacon-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. - Default is http://localhost:5052. - --beacon-nodes-tls-certs - Comma-separated paths to custom TLS certificates to use when - connecting to a beacon node (and/or proposer node). These certificates - must be in PEM format and are used in addition to the OS trust store. - Commas must only be used as a delimiter, and must not be part of the - certificate path. - --broadcast - Comma-separated list of beacon API topics to broadcast to all beacon - nodes. Possible values are: none, attestations, blocks, subscriptions, - sync-committee. Default (when flag is omitted) is to broadcast - subscriptions only. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the - builder's payload value when choosing between a builder payload header - and payload from the local execution node. - --builder-registration-timestamp-override - This flag takes a unix timestamp value that will be used to override - the timestamp used in the builder api registration - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --gas-limit - The gas limit to be used in all builder proposals for all validators - managed by this validator client. Note this will not necessarily be - used if the gas limit set here moves too far from the previous block's - gas limit. [default: 30,000,000] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --graffiti - Specify your custom graffiti to be included in blocks. - --graffiti-file - Specify a graffiti file to load validator graffitis from. - --http-address
- Set the address for the HTTP address. The HTTP server is not encrypted - and therefore it is unsafe to publish on a public network. When this - flag is used, it additionally requires the explicit use of the - `--unencrypted-http-transport` flag to ensure the user is aware of the - risks involved. For access via the Internet, users should apply - transport-layer security like a HTTPS reverse-proxy or SSH tunnelling. - --http-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. - Use * to allow any origin (not recommended in production). If no value - is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5062). - --http-port - Set the listen TCP port for the RESTful HTTP API server. - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --metrics-address
- Set the listen address for the Prometheus metrics HTTP server. - --metrics-allow-origin - Set the value of the Access-Control-Allow-Origin response HTTP header. - Use * to allow any origin (not recommended in production). If no value - is supplied, the CORS allowed origin is set to the listen address of - this server (e.g., http://localhost:5064). - --metrics-port - Set the listen TCP port for the Prometheus metrics HTTP server. - --monitoring-endpoint
- Enables the monitoring service for sending system metrics to a remote - endpoint. This can be used to monitor your setup on certain services - (e.g. beaconcha.in). This flag sets the endpoint where the beacon node - metrics will be sent. Note: This will send information to a remote - sever which may identify and associate your validators, IP address and - other personal information. Always use a HTTPS connection and never - provide an untrusted URL. - --monitoring-endpoint-period - Defines how many seconds to wait between each message sent to the - monitoring-endpoint. Default: 60s - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --proposer-nodes - Comma-separated addresses to one or more beacon node HTTP APIs. These - specify nodes that are used to send beacon block proposals. A failure - will revert back to the standard beacon nodes specified in - --beacon-nodes. - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - --secrets-dir - The directory which contains the password to unlock the validator - voting keypairs. Each password should be contained in a file where the - name is the 0x-prefixed hex representation of the validators voting - public key. Defaults to ~/.lighthouse/{network}/secrets. - --suggested-fee-recipient - Once the merge has happened, this address will receive transaction - fees from blocks proposed by this validator client. If a fee recipient - is configured in the validator definitions it takes priority over this - value. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validator-registration-batch-size - Defines the number of validators per validator/register_validator - request sent to the BN. This value can be reduced to avoid timeouts - from builders. [default: 500] - --validators-dir - The directory which contains the validator keystores, deposit data for - each validator along with the common slashing protection database and - the validator_definitions.yml - --web3-signer-keep-alive-timeout - Keep-alive timeout for each web3signer connection. Set to 'null' to - never timeout [default: 20000] - --web3-signer-max-idle-connections - Maximum number of idle connections to maintain per web3signer host. - Default is unlimited. - -Flags: - --builder-proposals - If this flag is set, Lighthouse will query the Beacon Node for only - block headers during proposals and will sign over headers. Useful for - outsourcing execution payload construction during proposals. - --disable-auto-discover - If present, do not attempt to discover new validators in the - validators-dir. Validators will need to be manually added to the - validator_definitions.yml file. - --disable-latency-measurement-service - Disables the service that periodically attempts to measure latency to - BNs. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --disable-run-on-all - DEPRECATED. Use --broadcast. By default, Lighthouse publishes - attestation, sync committee subscriptions and proposer preparation - messages to all beacon nodes provided in the `--beacon-nodes flag`. - This option changes that behaviour such that these api calls only go - out to the first available and synced beacon node - --disable-slashing-protection-web3signer - Disable Lighthouse's slashing protection for all web3signer keys. This - can reduce the I/O burden on the VC but is only safe if slashing - protection is enabled on the remote signer and is implemented - correctly. DO NOT ENABLE THIS FLAG UNLESS YOU ARE CERTAIN THAT - SLASHING PROTECTION IS ENABLED ON THE REMOTE SIGNER. YOU WILL GET - SLASHED IF YOU USE THIS FLAG WITHOUT ENABLING WEB3SIGNER'S SLASHING - PROTECTION. - --distributed - Enables functionality required for running the validator in a - distributed validator cluster. - --enable-doppelganger-protection - If this flag is set, Lighthouse will delay startup for three epochs - and monitor for messages on the network by any of the validators - managed by this client. This will result in three (possibly four) - epochs worth of missed attestations. If an attestation is detected - during this period, it means it is very likely that you are running a - second validator client with the same keys. This validator client will - immediately shutdown if this is detected in order to avoid potentially - committing a slashable offense. Use this flag in order to ENABLE this - functionality, without this flag Lighthouse will begin attesting - immediately. - --enable-high-validator-count-metrics - Enable per validator metrics for > 64 validators. Note: This flag is - automatically enabled for <= 64 validators. Enabling this metric for - higher validator counts will lead to higher volume of prometheus - metrics being collected. - -h, --help - Prints help information - --http - Enable the RESTful HTTP API server. Disabled by default. - --http-allow-keystore-export - If present, allow access to the DELETE /lighthouse/keystores HTTP API - method, which allows exporting keystores and passwords to HTTP API - consumers who have access to the API token. This method is useful for - exporting validators, however it should be used with caution since it - exposes private key data to authorized users. - --http-store-passwords-in-secrets-dir - If present, any validators created via the HTTP will have keystore - passwords stored in the secrets-dir rather than the validator - definitions file. - --init-slashing-protection - If present, do not require the slashing protection database to exist - before running. You SHOULD NOT use this flag unless you're certain - that a new slashing protection database is required. Usually, your - database will have been initialized when you imported your validator - keys. If you misplace your database and then run with this flag you - risk being slashed. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --metrics - Enable the Prometheus metrics HTTP server. Disabled by default. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed - by builders, regardless of payload value. - --produce-block-v3 - Enable block production via the block v3 endpoint for this validator - client. This should only be enabled when paired with a beacon node - that has this endpoint implemented. This flag will be enabled by - default in future. - --unencrypted-http-transport - This is a safety flag to ensure that the user is aware that the http - transport is unencrypted and using a custom HTTP address is unsafe. - --use-long-timeouts - If present, the validator client will use longer timeouts for requests - made to the beacon node. This flag is generally not recommended, - longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file diff --git a/help_vm.md-e b/help_vm.md-e deleted file mode 100644 index 7a61e197f2c..00000000000 --- a/help_vm.md-e +++ /dev/null @@ -1,126 +0,0 @@ -# Validator Manager - -``` -Utilities for managing a Lighthouse validator client via the HTTP API. - -Usage: lighthouse validator_manager [OPTIONS] [COMMAND] - -Commands: - create - Creates new validators from BIP-39 mnemonic. A JSON file will be - created which contains all the validator keystores and other validator - data. This file can then be imported to a validator client using the - "import-validators" command. Another, optional JSON file is created - which contains a list of validator deposits in the same format as the - "ethereum/staking-deposit-cli" tool. - import - Uploads validators to a validator client using the HTTP API. The - validators are defined in a JSON file which can be generated using the - "create-validators" command. - move - Uploads validators to a validator client using the HTTP API. The - validators are defined in a JSON file which can be generated using the - "create-validators" command. This command only supports validators - signing via a keystore on the local file system (i.e., not Web3Signer - validators). - help - Print this message or the help of the given subcommand(s) - -Options: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - -h, --help - Prints help information - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file diff --git a/help_vm_create.md-e b/help_vm_create.md-e deleted file mode 100644 index 67631f19a40..00000000000 --- a/help_vm_create.md-e +++ /dev/null @@ -1,167 +0,0 @@ -# Validator Manager Create - -``` -Creates new validators from BIP-39 mnemonic. A JSON file will be created which -contains all the validator keystores and other validator data. This file can -then be imported to a validator client using the "import-validators" command. -Another, optional JSON file is created which contains a list of validator -deposits in the same format as the "ethereum/staking-deposit-cli" tool. - -Usage: lighthouse validator_manager create [OPTIONS] --output-path - -Options: - --beacon-node - A HTTP(S) address of a beacon node using the beacon-API. If this value - is provided, an error will be raised if any validator key here is - already known as a validator by that beacon node. This helps prevent - the same validator being created twice and therefore slashable - conditions. - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the - builder's payload value when choosing between a builder payload header - and payload from the local execution node. - --builder-proposals - When provided, all created validators will attempt to create blocks - via builder rather than the local EL. [possible values: true, false] - --count - The number of validators to create, regardless of how many already - exist - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --deposit-gwei - The GWEI value of the deposit amount. Defaults to the minimum amount - required for an active validator (MAX_EFFECTIVE_BALANCE) - --eth1-withdrawal-address - If this field is set, the given eth1 address will be used to create - the withdrawal credentials. Otherwise, it will generate withdrawal - credentials with the mnemonic-derived withdrawal public key in - EIP-2334 format. - --first-index - The first of consecutive key indexes you wish to create. [default: 0] - --gas-limit - All created validators will use this gas limit. It is recommended to - leave this as the default value by not specifying this flag. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --mnemonic-path - If present, the mnemonic will be read in from this file. - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --output-path - The path to a directory where the validator and (optionally) deposits - files will be created. The directory will be created if it does not - exist. - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed - by builders, regardless of payload value. [possible values: true, - false] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - --suggested-fee-recipient - All created validators will use this value for the suggested fee - recipient. Omit this flag to use the default value from the VC. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - -Flags: - --disable-deposits - When provided don't generate the deposits JSON file that is commonly - used for submitting validator deposits via a web UI. Using this flag - will save several seconds per validator if the user has an alternate - strategy for submitting deposits. - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - --force-bls-withdrawal-credentials - If present, allows BLS withdrawal credentials rather than an execution - address. This is not recommended. - -h, --help - Prints help information - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. - --specify-voting-keystore-password - If present, the user will be prompted to enter the voting keystore - password that will be used to encrypt the voting keystores. If this - flag is not provided, a random password will be used. It is not - necessary to keep backups of voting keystore passwords if the mnemonic - is safely backed up. - --stdin-inputs - If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file diff --git a/help_vm_import.md-e b/help_vm_import.md-e deleted file mode 100644 index d55f074c901..00000000000 --- a/help_vm_import.md-e +++ /dev/null @@ -1,124 +0,0 @@ -# Validator Manager Import - -``` -Uploads validators to a validator client using the HTTP API. The validators are -defined in a JSON file which can be generated using the "create-validators" -command. - -Usage: lighthouse validator_manager import [OPTIONS] --validators-file - -Options: - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validators-file - The path to a JSON file containing a list of validators to be imported - to the validator client. This file is usually named "validators.json". - --vc-token - The file containing a token required by the validator client. - --vc-url - A HTTP(S) address of a validator client using the keymanager-API. If - this value is not supplied then a 'dry run' will be conducted where no - changes are made to the validator client. [default: - http://localhost:5062] - -Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - -h, --help - Prints help information - --ignore-duplicates - If present, ignore any validators which already exist on the VC. - Without this flag, the process will terminate without making any - changes. This flag should be used with caution, whilst it does not - directly cause slashable conditions, it might be an indicator that - something is amiss. Users should also be careful to avoid submitting - duplicate deposits for validators that already exist on the VC. - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file diff --git a/help_vm_move.md-e b/help_vm_move.md-e deleted file mode 100644 index 4b11b51a9af..00000000000 --- a/help_vm_move.md-e +++ /dev/null @@ -1,145 +0,0 @@ -# Validator Manager Move - -``` -Uploads validators to a validator client using the HTTP API. The validators are -defined in a JSON file which can be generated using the "create-validators" -command. This command only supports validators signing via a keystore on the -local file system (i.e., not Web3Signer validators). - -Usage: lighthouse validator_manager move [OPTIONS] --src-vc-token --src-vc-url --dest-vc-token --dest-vc-url - -Options: - --builder-boost-factor - Defines the boost factor, a percentage multiplier to apply to the - builder's payload value when choosing between a builder payload header - and payload from the local execution node. - --builder-proposals - When provided, all created validators will attempt to create blocks - via builder rather than the local EL. [possible values: true, false] - --count - The number of validators to move. - -d, --datadir - Used to specify a custom root data directory for lighthouse keys and - databases. Defaults to $HOME/.lighthouse/{network} where network is - the value of the `network` flag Note: Users should specify separate - custom datadirs for different networks. - --debug-level - Specifies the verbosity level used when emitting logs to the terminal. - [default: info] [possible values: info, debug, trace, warn, error, - crit] - --dest-vc-token - The file containing a token required by the destination validator - client. - --dest-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This - validator client is the "destination" and will have new validators - added as they are removed from the "source" validator client. - --gas-limit - All created validators will use this gas limit. It is recommended to - leave this as the default value by not specifying this flag. - --genesis-state-url - A URL of a beacon-API compatible server from which to download the - genesis state. Checkpoint sync server URLs can generally be used with - this flag. If not supplied, a default URL or the --checkpoint-sync-url - may be used. If the genesis state is already included in this binary - then this value will be ignored. - --genesis-state-url-timeout - The timeout in seconds for the request to --genesis-state-url. - [default: 180] - --log-format - Specifies the log format used when emitting logs to the terminal. - [possible values: JSON] - --logfile - File path where the log file will be stored. Once it grows to the - value specified in `--logfile-max-size` a new log file is generated - where future logs are stored. Once the number of log files exceeds the - value specified in `--logfile-max-number` the oldest log file will be - overwritten. - --logfile-debug-level - The verbosity level used when emitting logs to the log file. [default: - debug] [possible values: info, debug, trace, warn, error, crit] - --logfile-format - Specifies the log format used when emitting logs to the logfile. - [possible values: DEFAULT, JSON] - --logfile-max-number - The maximum number of log files that will be stored. If set to 0, - background file logging is disabled. [default: 5] - --logfile-max-size - The maximum size (in MB) each log file can grow to before rotating. If - set to 0, background file logging is disabled. [default: 200] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] - --prefer-builder-proposals - If this flag is set, Lighthouse will always prefer blocks constructed - by builders, regardless of payload value. [possible values: true, - false] - --safe-slots-to-import-optimistically - Used to coordinate manual overrides of the - SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override this parameter in the event of an - attack at the PoS transition block. Incorrect use of this flag can - cause your node to possibly accept an invalid chain or sync more - slowly. Be extremely careful with this flag. - --src-vc-token - The file containing a token required by the source validator client. - --src-vc-url - A HTTP(S) address of a validator client using the keymanager-API. This - validator client is the "source" and contains the validators that are - to be moved. - --stdin-inputs - If present, read all user inputs from stdin instead of tty. - --suggested-fee-recipient - All created validators will use this value for the suggested fee - recipient. Omit this flag to use the default value from the VC. - -t, --testnet-dir - Path to directory containing eth2_testnet specs. Defaults to a - hard-coded Lighthouse testnet. Only effective if there is no existing - database. - --terminal-block-hash-epoch-override - Used to coordinate manual overrides to the - TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH parameter. This flag should only - be used if the user has a clear understanding that the broad Ethereum - community has elected to override the terminal PoW block. Incorrect - use of this flag will cause your node to experience a consensus - failure. Be extremely careful with this flag. - --terminal-block-hash-override - Used to coordinate manual overrides to the TERMINAL_BLOCK_HASH - parameter. This flag should only be used if the user has a clear - understanding that the broad Ethereum community has elected to - override the terminal PoW block. Incorrect use of this flag will cause - your node to experience a consensus failure. Be extremely careful with - this flag. - --terminal-total-difficulty-override - Used to coordinate manual overrides to the TERMINAL_TOTAL_DIFFICULTY - parameter. Accepts a 256-bit decimal integer (not a hex value). This - flag should only be used if the user has a clear understanding that - the broad Ethereum community has elected to override the terminal - difficulty. Incorrect use of this flag will cause your node to - experience a consensus failure. Be extremely careful with this flag. - --validators - The validators to be moved. Either a list of 0x-prefixed validator - pubkeys or the keyword "all". - -Flags: - --disable-log-timestamp - If present, do not include timestamps in logging output. - --disable-malloc-tuning - If present, do not configure the system allocator. Providing this flag - will generally increase memory usage, it should only be provided when - debugging specific memory allocation issues. - -h, --help - Prints help information - --log-color - Force outputting colors when emitting logs to the terminal. - --logfile-compress - If present, compress old log files. This can help reduce the space - needed to store old logs. - --logfile-no-restricted-perms - If present, log files will be generated as world-readable meaning they - can be read by any user on the machine. Note that logs can often - contain sensitive information about your validator and so this flag - should be used with caution. For Windows users, the log file - permissions will be inherited from the parent folder. -``` \ No newline at end of file From 3c26b9a560ac8b5db796dc6758acd4506400d804 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 14 May 2024 12:24:39 +0300 Subject: [PATCH 42/46] retry cli check --- boot_node/src/cli.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index 440a9d27e2d..e7ab4f55c6a 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -129,3 +129,5 @@ pub fn cli_app() -> Command { .display_order(0) ) } + + From 81808395772193b2b8798a6f3b1df10c717a0473 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Tue, 14 May 2024 12:24:53 +0300 Subject: [PATCH 43/46] retry cli check --- boot_node/src/cli.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/boot_node/src/cli.rs b/boot_node/src/cli.rs index e7ab4f55c6a..440a9d27e2d 100644 --- a/boot_node/src/cli.rs +++ b/boot_node/src/cli.rs @@ -129,5 +129,3 @@ pub fn cli_app() -> Command { .display_order(0) ) } - - From 9a394675dce0a94304c571cf4162c9b474a25fd0 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Mon, 20 May 2024 07:24:00 +0100 Subject: [PATCH 44/46] cli --- book/src/help_bn.md | 3 ++- book/src/help_general.md | 3 ++- book/src/help_vc.md | 3 ++- book/src/help_vm.md | 3 ++- book/src/help_vm_create.md | 3 ++- book/src/help_vm_import.md | 3 ++- book/src/help_vm_move.md | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 3b51cbd3f61..aaaa576402e 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -602,4 +602,5 @@ Flags: -z, --zero-ports Sets all listening TCP/UDP ports to 0, allowing the OS to choose some arbitrary free ports. -``` \ No newline at end of file +``` + diff --git a/book/src/help_general.md b/book/src/help_general.md index f31345f3dc0..9498b01853d 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -136,4 +136,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 73640da90d6..680d1e7de05 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -276,4 +276,5 @@ Flags: If present, the validator client will use longer timeouts for requests made to the beacon node. This flag is generally not recommended, longer timeouts can cause missed duties when fallbacks are used. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 1b9324f4199..25860abadad 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -123,4 +123,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 7a01cf16374..6d7e42d29fd 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -164,4 +164,5 @@ Flags: is safely backed up. --stdin-inputs If present, read all user inputs from stdin instead of tty. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 02f5747d69f..e0acec28616 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -121,4 +121,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 2bca6652319..348fd3dc819 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -142,4 +142,5 @@ Flags: contain sensitive information about your validator and so this flag should be used with caution. For Windows users, the log file permissions will be inherited from the parent folder. -``` \ No newline at end of file +``` + From 5e0f2df66011b1802490436b7db304688bb32666 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Tue, 28 May 2024 11:40:40 +1000 Subject: [PATCH 45/46] Update CLI docs for Goerli removal --- book/src/help_bn.md | 2 +- book/src/help_general.md | 2 +- book/src/help_vc.md | 2 +- book/src/help_vm.md | 2 +- book/src/help_vm_create.md | 2 +- book/src/help_vm_import.md | 2 +- book/src/help_vm_move.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 24898f215ec..63374027e60 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -269,7 +269,7 @@ Options: monitoring-endpoint. Default: 60s --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --network-dir Data directory for network keys. Defaults to network/ inside the beacon node dir. diff --git a/book/src/help_general.md b/book/src/help_general.md index 18d26e257e3..42bff04d1af 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -76,7 +76,7 @@ Options: set to 0, background file logging is disabled. [default: 200] --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only diff --git a/book/src/help_vc.md b/book/src/help_vc.md index fb2ef8fa088..1dba75e5214 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -112,7 +112,7 @@ Options: monitoring-endpoint. Default: 60s --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --proposer-nodes Comma-separated addresses to one or more beacon node HTTP APIs. These specify nodes that are used to send beacon block proposals. A failure diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 5d54f4d169e..6f9cc405e76 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -68,7 +68,7 @@ Options: set to 0, background file logging is disabled. [default: 200] --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 34f0ab7afb6..4ddb360e483 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -82,7 +82,7 @@ Options: If present, the mnemonic will be read in from this file. --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --output-path The path to a directory where the validator and (optionally) deposits files will be created. The directory will be created if it does not diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 17053c64e25..799a1db82b5 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -49,7 +49,7 @@ Options: set to 0, background file logging is disabled. [default: 200] --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --safe-slots-to-import-optimistically Used to coordinate manual overrides of the SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY parameter. This flag should only diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index c270ec8b402..9b92e21bc26 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -69,7 +69,7 @@ Options: set to 0, background file logging is disabled. [default: 200] --network Name of the Eth2 chain Lighthouse will sync and follow. [possible - values: mainnet, prater, goerli, gnosis, chiado, sepolia, holesky] + values: mainnet, gnosis, chiado, sepolia, holesky] --prefer-builder-proposals If this flag is set, Lighthouse will always prefer blocks constructed by builders, regardless of payload value. [possible values: true, From 23b0c7022d1bc954a456836a48aedaa1fdfe94da Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Tue, 28 May 2024 12:01:36 +1000 Subject: [PATCH 46/46] Fix cargo lock --- Cargo.lock | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 750103c4679..22ed5178715 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9090,7 +9090,7 @@ name = "validator_manager" version = "0.1.0" dependencies = [ "account_utils", - "clap", + "clap 4.5.4", "clap_utils", "environment", "eth2", @@ -9329,7 +9329,8 @@ dependencies = [ "beacon_chain", "beacon_node", "bls", - "clap", + "clap 4.5.4", + "clap_utils", "diesel", "diesel_migrations", "env_logger 0.9.3",