From a31901f1694ca5dbd537f99380a8011aede8a7d6 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 16 Jun 2023 10:26:26 +0800 Subject: [PATCH 01/80] Add cli.sh file --- scripts/cli.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 scripts/cli.sh diff --git a/scripts/cli.sh b/scripts/cli.sh new file mode 100644 index 0000000000..589d2b2844 --- /dev/null +++ b/scripts/cli.sh @@ -0,0 +1,40 @@ +#! /bin/bash + +#echo "Enter the latest lighthouse version:" +#read version +version=4.2.0 + +#download lighthouse binary +binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" + +#download the binary to the present working directory +$binary + +#extract +tar xvf lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz + +#remove +rm lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz + +#outputs help text. the "&& echo >> cli.txt is to create a line space between the next output" +lighthouse --help | tee cli.txt && echo >> cli.txt + +# account manager, the -a option means append, i.e., append the output so that all outputs are in a single file +lighthouse a --help | tee -a cli.txt && echo >> cli.txt +# subcommand under account +lighthouse a validator --help | tee -a cli.txt && echo >> cli.txt +lighthouse a validator modify --help | tee -a cli.txt && echo >> cli.txt +lighthouse a validator slashing-protection --help | tee -a cli.txt && echo >> cli.txt + +lighthouse a wallet --help | tee -a cli.txt && echo >> cli.txt + +# beacon node +lighthouse bn --help | tee -a cli.txt && echo >> cli.txt +# boot-node +lighthouse boot_node --help | tee -a cli.txt && echo >> cli.txt + +# database manager +lighthouse db --help | tee -a cli.txt && echo >> cli.txt + +# validator client +lighthouse vc --help | tee -a cli.txt && echo >> cli.txt From 5400b6e0d05c95eb386e37404e7afb64700ec361 Mon Sep 17 00:00:00 2001 From: chonghe Date: Sat, 15 Jul 2023 15:51:03 +0800 Subject: [PATCH 02/80] update bash script --- scripts/cli.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 589d2b2844..95f4421484 100644 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,8 +1,8 @@ #! /bin/bash -#echo "Enter the latest lighthouse version:" + #read version -version=4.2.0 +read -p "Enter Lighthouse version: " version #download lighthouse binary binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" @@ -17,24 +17,27 @@ tar xvf lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz rm lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz #outputs help text. the "&& echo >> cli.txt is to create a line space between the next output" -lighthouse --help | tee cli.txt && echo >> cli.txt +./lighthouse --help | tee cli.txt && echo >> cli.txt # account manager, the -a option means append, i.e., append the output so that all outputs are in a single file -lighthouse a --help | tee -a cli.txt && echo >> cli.txt +./lighthouse a --help | tee -a cli.txt && echo >> cli.txt # subcommand under account -lighthouse a validator --help | tee -a cli.txt && echo >> cli.txt -lighthouse a validator modify --help | tee -a cli.txt && echo >> cli.txt -lighthouse a validator slashing-protection --help | tee -a cli.txt && echo >> cli.txt +./lighthouse a validator --help | tee -a cli.txt && echo >> cli.txt +./lighthouse a validator modify --help | tee -a cli.txt && echo >> cli.txt +./lighthouse a validator slashing-protection --help | tee -a cli.txt && echo >> cli.txt -lighthouse a wallet --help | tee -a cli.txt && echo >> cli.txt +./lighthouse a wallet --help | tee -a cli.txt && echo >> cli.txt # beacon node -lighthouse bn --help | tee -a cli.txt && echo >> cli.txt +./lighthouse bn --help | tee -a cli.txt && echo >> cli.txt # boot-node -lighthouse boot_node --help | tee -a cli.txt && echo >> cli.txt +./lighthouse boot_node --help | tee -a cli.txt && echo >> cli.txt # database manager -lighthouse db --help | tee -a cli.txt && echo >> cli.txt +./lighthouse db --help | tee -a cli.txt && echo >> cli.txt # validator client -lighthouse vc --help | tee -a cli.txt && echo >> cli.txt +./lighthouse vc --help | tee -a cli.txt && echo >> cli.txt + +# remove binary file +rm lighthouse From 542afe139c2f204b0ac16c3d49025ecfd29520ef Mon Sep 17 00:00:00 2001 From: chonghe Date: Mon, 17 Jul 2023 09:20:23 +0800 Subject: [PATCH 03/80] update Makefile --- Makefile | 6 +++++- scripts/cli.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8e7f3fc326..165ee708f7 100644 --- a/Makefile +++ b/Makefile @@ -164,8 +164,12 @@ test-exec-engine: # test vectors. test: test-release +# Run bash script to output cli.txt +cli: + /home/hi/cli/lighthouse/scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. -test-full: cargo-fmt test-release test-debug test-ef test-exec-engine +test-full: cargo-fmt test-release test-debug test-ef test-exec-engine cli + # Lints the code for bad style and potentially unsafe arithmetic using Clippy. # Clippy lints are opt-in per-crate for now. By default, everything is allowed except for performance and correctness lints. diff --git a/scripts/cli.sh b/scripts/cli.sh index 95f4421484..b7b001c3b5 100644 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -8,6 +8,7 @@ read -p "Enter Lighthouse version: " version binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" #download the binary to the present working directory +cd /home/hi/cli/lighthouse/scripts $binary #extract From 0374cf6068db012ca1c0f263a026e41cff72bf27 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 1 Aug 2023 10:12:27 +0800 Subject: [PATCH 04/80] update --- Makefile | 2 +- scripts/cli.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 165ee708f7..9dffa652a7 100644 --- a/Makefile +++ b/Makefile @@ -166,7 +166,7 @@ test: test-release # Run bash script to output cli.txt cli: - /home/hi/cli/lighthouse/scripts/cli.sh + ./lighthouse/scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine cli diff --git a/scripts/cli.sh b/scripts/cli.sh index b7b001c3b5..5b46f38d11 100644 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -8,7 +8,7 @@ read -p "Enter Lighthouse version: " version binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" #download the binary to the present working directory -cd /home/hi/cli/lighthouse/scripts +cd ./lighthouse/scripts $binary #extract From 090d20bb8ca6c9f5b84299b1d7d22c0bd5c9208d Mon Sep 17 00:00:00 2001 From: chonghe Date: Mon, 7 Aug 2023 09:01:47 +0800 Subject: [PATCH 05/80] modified test-suite --- .github/workflows/test-suite.yml | 8 +++++ Makefile | 2 +- scripts/cli.sh | 61 ++++++++++++-------------------- 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index e6b75ea7b1..da22176d20 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -402,3 +402,11 @@ jobs: run: rustup override set beta - name: Run make run: make + cli-check: + name: cli-check + runs-on: ubuntu-latest + needs: cargo-fmt + steps: + - uses: actions/checkout@v3 + - name: Run Makefile to trigger the bash script + run: make cli diff --git a/Makefile b/Makefile index 9dffa652a7..7d62c097d4 100644 --- a/Makefile +++ b/Makefile @@ -168,7 +168,7 @@ test: test-release cli: ./lighthouse/scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. -test-full: cargo-fmt test-release test-debug test-ef test-exec-engine cli +test-full: cargo-fmt test-release test-debug test-ef test-exec-engine # Lints the code for bad style and potentially unsafe arithmetic using Clippy. diff --git a/scripts/cli.sh b/scripts/cli.sh index 5b46f38d11..9eb5a24f0c 100644 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,44 +1,29 @@ #! /bin/bash +# Check if a lighthouse binary exists in the current branch. +maxperf=./target/maxperf/lighthouse +release=./target/release/lighthouse +debug=./target/debug/lighthouse -#read version -read -p "Enter Lighthouse version: " version +if [[ -f "$maxperf" ]]; then + CMD="$maxperf" +elif [[ -f "$release" ]]; then + CMD="$release" +elif [[ -f "$debug" ]]; then + CMD="$debug" +else + # No binary exists, build it. + cargo build --locked + CMD="$debug" +fi -#download lighthouse binary -binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" +# Remove the existing help text file if it exists. +rm -f -- cli.txt -#download the binary to the present working directory -cd ./lighthouse/scripts -$binary +# Store all help strings in variables. +bn=$($CMD bn --help) +vc=$($CMD vc --help) +wallet=$($CMD a wallet --help) -#extract -tar xvf lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz - -#remove -rm lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz - -#outputs help text. the "&& echo >> cli.txt is to create a line space between the next output" -./lighthouse --help | tee cli.txt && echo >> cli.txt - -# account manager, the -a option means append, i.e., append the output so that all outputs are in a single file -./lighthouse a --help | tee -a cli.txt && echo >> cli.txt -# subcommand under account -./lighthouse a validator --help | tee -a cli.txt && echo >> cli.txt -./lighthouse a validator modify --help | tee -a cli.txt && echo >> cli.txt -./lighthouse a validator slashing-protection --help | tee -a cli.txt && echo >> cli.txt - -./lighthouse a wallet --help | tee -a cli.txt && echo >> cli.txt - -# beacon node -./lighthouse bn --help | tee -a cli.txt && echo >> cli.txt -# boot-node -./lighthouse boot_node --help | tee -a cli.txt && echo >> cli.txt - -# database manager -./lighthouse db --help | tee -a cli.txt && echo >> cli.txt - -# validator client -./lighthouse vc --help | tee -a cli.txt && echo >> cli.txt - -# remove binary file -rm lighthouse +# Print all help strings to the cli.txt file. +printf "%s\n\n" "$bn" "$vc" "$wallet" >> cli.txt \ No newline at end of file From ed641b0713de76350efc98de63b8a452a94bf13d Mon Sep 17 00:00:00 2001 From: chonghe Date: Mon, 7 Aug 2023 09:38:04 +0800 Subject: [PATCH 06/80] fix path --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d62c097d4..4ecd203264 100644 --- a/Makefile +++ b/Makefile @@ -166,7 +166,7 @@ test: test-release # Run bash script to output cli.txt cli: - ./lighthouse/scripts/cli.sh + ./scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine From d4170c56984340c339762a976cda86620aa4ca63 Mon Sep 17 00:00:00 2001 From: Mac L Date: Mon, 7 Aug 2023 11:59:38 +1000 Subject: [PATCH 07/80] Fix cli.sh permissions --- scripts/cli.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/cli.sh diff --git a/scripts/cli.sh b/scripts/cli.sh old mode 100644 new mode 100755 From 1c1d50d219c304324f6e90c25b33d9cb8170e5c5 Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 9 Aug 2023 21:18:46 +0800 Subject: [PATCH 08/80] update cmd --- scripts/cli.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 9eb5a24f0c..785fd09cb7 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,6 +1,7 @@ #! /bin/bash # Check if a lighthouse binary exists in the current branch. +# -f means check if the file exists, to see all options, type "bash test" in a terminal maxperf=./target/maxperf/lighthouse release=./target/release/lighthouse debug=./target/debug/lighthouse @@ -21,9 +22,29 @@ fi rm -f -- cli.txt # Store all help strings in variables. +general=$($CMD --help) + +# accoun manager +a=$($CMD a --help) + +a_validator=$($CMD a validator --help) +a_validator_m=$($CMD a validator modify --help) +a_validator_s=$($CMD a validator slashing-protection --help) + +a_wallet=$($CMD a wallet --help) + +# beacon node + bn=$($CMD bn --help) + +# boot-node +boot=$($CMD boot_node --help) + +# data manager +dm=$($CMD db --help) + +# validator client vc=$($CMD vc --help) -wallet=$($CMD a wallet --help) # Print all help strings to the cli.txt file. -printf "%s\n\n" "$bn" "$vc" "$wallet" >> cli.txt \ No newline at end of file +printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" "$a_wallet" "$bn" "$boot" "$dm" "$vc" "$wallet" >> cli.txt From 3c7002811ead5a943402bd87e8bd8148c3aafbe4 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 18 Aug 2023 08:18:02 +0800 Subject: [PATCH 09/80] cli_manual --- scripts/cli.sh | 9 + scripts/cli_manual.sh | 51 ++ scripts/cli_manual.txt | 1393 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1453 insertions(+) create mode 100644 scripts/cli_manual.sh create mode 100644 scripts/cli_manual.txt diff --git a/scripts/cli.sh b/scripts/cli.sh index 785fd09cb7..6214da7f00 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -48,3 +48,12 @@ vc=$($CMD vc --help) # Print all help strings to the cli.txt file. printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" "$a_wallet" "$bn" "$boot" "$dm" "$vc" "$wallet" >> cli.txt + +# Run the bash script to generate cli_manual.txt +#./cli_manual.sh + +# find the difference and create a patch file: https://www.techtarget.com/searchdatacenter/tip/An-introduction-to-using-diff-and-patch-together +diff -u cli_manual.txt cli.txt > patchfile.patch + +# update cli_manual.sh +patch cli_manual.txt patchfile.patch \ No newline at end of file diff --git a/scripts/cli_manual.sh b/scripts/cli_manual.sh new file mode 100644 index 0000000000..ce4f19c9ae --- /dev/null +++ b/scripts/cli_manual.sh @@ -0,0 +1,51 @@ +#! /bin/bash + + +#read version +#read -p "Enter Lighthouse version: " version + +version=4.3.0 +#download lighthouse binary +binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" + +#download the binary to the present working directory +cd ./lighthouse/scripts +$binary + +#extract +tar xvf lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz + +#remove +rm lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz + +#outputs help text +general=$(./lighthouse --help) + + +# account manager +a=$(./lighthouse a --help) +# subcommand under account +a_validator=$(./lighthouse a validator --help) +a_validator_m=$(./lighthouse a validator modify --help) +a_validator_s=$(./lighthouse a validator slashing-protection --help) + +a_wallet=$(./lighthouse a wallet --help) + + +# beacon node +bn=$(./lighthouse bn --help) + +# boot-node +boot=$(./lighthouse boot_node --help) + +# database manager +dm=$(./lighthouse db --help) + +# validator client +vc=$(./lighthouse vc --help) + +# remove binary file +rm lighthouse + +# Print all help strings to the cli.txt file. +printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" "$a_wallet" "$bn" "$boot" "$dm" "$vc" "$wallet" >> cli_manual.txt diff --git a/scripts/cli_manual.txt b/scripts/cli_manual.txt new file mode 100644 index 0000000000..b18eb0e250 --- /dev/null +++ b/scripts/cli_manual.txt @@ -0,0 +1,1393 @@ +Lighthouse v4.3.0-dfcb336 +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 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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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] + +lighthouse-account_manager +Utilities for generating and managing Ethereum 2.0 accounts. + +USAGE: + lighthouse account_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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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: + help Prints this message or the help of the given subcommand(s) + validator Provides commands for managing Eth2 validators. + wallet Manage wallets, from which validator keys can be derived. + +lighthouse-account_manager-validator +Provides commands for managing Eth2 validators. + +USAGE: + lighthouse account_manager validator [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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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-dir + The path to search for validator directories. Defaults to ~/.lighthouse/{network}/validators + + +SUBCOMMANDS: + create Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key + derivation scheme. + exit Submits a VoluntaryExit to the beacon chain for a given validator keystore. + help Prints this message or the help of the given subcommand(s) + import Imports one or more EIP-2335 passwords into a Lighthouse VC directory, requesting + passwords interactively. The directory flag provides a convenient method for importing a + directory of keys generated by the eth2-deposit-cli Python utility. + list Lists the public keys of all validators. + modify Modify validator status in validator_definitions.yml. + recover 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. + slashing-protection Import or export slashing protection data to or from another client + +lighthouse-account_manager-validator-modify +Modify validator status in validator_definitions.yml. + +USAGE: + lighthouse account_manager validator modify [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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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: + disable Disable validator(s) in validator_definitions.yml. + enable Enable validator(s) in validator_definitions.yml. + help Prints this message or the help of the given subcommand(s) + +lighthouse-account_manager-validator-slashing-protection +Import or export slashing protection data to or from another client + +USAGE: + lighthouse account_manager validator slashing-protection [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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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: + export Export an interchange file + help Prints this message or the help of the given subcommand(s) + import Import an interchange file + +lighthouse-account_manager-wallet +Manage wallets, from which validator keys can be derived. + +USAGE: + lighthouse account_manager wallet [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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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. + --wallets-dir + A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets + + +SUBCOMMANDS: + create Creates a new HD (hierarchical-deterministic) EIP-2386 wallet. + help Prints this message or the help of the given subcommand(s) + list Lists the names of all wallets. + recover Recovers an EIP-2386 wallet from a given a BIP-39 mnemonic phrase. + +lighthouse-beacon_node 4.3.0 +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: + --always-prefer-builder-payload If set, the beacon node always uses the payload from the builder instead + of the local payload. + --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 Explictly 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-discovery Disables the discv5 discovery protocol. The node will not search for new + peers or participate in the discovery protocol. + -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-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. + -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] + + --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 + The minimum reward in wei provided to the proposer by a block builder for an external payload to be + considered for inclusion in a proposal. If this threshold is not met, the local EE's payload will be used. + This is currently *NOT* in comparison to the value of the local EE's payload. It simply checks whether the + total proposer reward from an external payload is equal to or greater than this value. In the future, a + comparison to a local payload is likely to be added. Example: Use 250000000000000000 to set the threshold to + 0.25 ETH. [default: 0] + --builder-user-agent + The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version + string. + --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: 60] + + -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-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. + --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. + --eth1-endpoint + Deprecated. Use --eth1-endpoints. + + --eth1-endpoints + One http endpoint for a web3 connection to an execution node. Note: This flag is now only useful for + testing, use `--execution-endpoint` flag to connect to an execution node on mainnet and testnets. + Defaults to http://127.0.0.1:8545. + --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. + + --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. [default: 127.0.0.1] + + --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-port + Set the listen TCP port for the RESTful HTTP API server. [default: 5052] + + --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-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. [default: 127.0.0.1] + + --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. [default: 5054] + + --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, + sepolia] + --network-dir + Data directory for network keys. Defaults to network/ inside the beacon node dir. + + --port + The TCP/UDP port to listen on. The UDP port can be modified by the --discovery-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 port to listen on over IpV6 when listening over both Ipv4 and Ipv6. Defaults to 9090 when + required. [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 + Options to enable or disable the progressive balances cache for unrealized FFG progression calculation. The + default `checked` mode compares the progressive balances from the cache against results from the existing + method. If there is a mismatch, it falls back to the existing method. The optimized mode (`fast`) is faster + but is still experimental, and is not recommended for mainnet usage at this time. [possible values: + disabled, checked, strict, fast] + --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-threshold + Percentage of vote weight below which to attempt a proposer reorg. Default: 20% + + --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] + --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: mdbx, 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)] + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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. + --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. + +lighthouse-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. + +USAGE: + lighthouse boot_node [FLAGS] [OPTIONS] --enr-address
... + +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-packet-filter Disables discv5 packet filter. Useful for testing in smaller networks + -x, --enable-enr-auto-update 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. + -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: + --boot-nodes + One or more comma-delimited base64-encoded ENR's or multiaddr strings of peers to initially add to the local + routing table + -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] + --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-port + 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. + --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. + --listen-address
... + The address the bootnode will listen for UDP communications. 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] + --network + Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, + sepolia] + --network-dir + The directory which contains the enr and it's associated private key + + --port The UDP port to listen on. [default: 9000] + --port6 + The UDP port to listen on over IpV6 when listening over both Ipv4 and Ipv6. Defaults to 9090 when required. + [default: 9090] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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. + +lighthouse-database_manager +Manage a beacon node database + +USAGE: + lighthouse database_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] + --freezer-dir Data directory for the freezer database. + --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, + sepolia] + --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. + --slots-per-restore-point + Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. + [default: 2048 (mainnet) or 64 (minimal)] + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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: + help Prints this message or the help of the given subcommand(s) + inspect Inspect raw database values + migrate Migrate the database to a specific schema version + prune_payloads Prune finalized execution payloads + version Display database schema version [aliases: v] + +lighthouse-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 [FLAGS] [OPTIONS] + +FLAGS: + --allow-unsynced DEPRECATED: this flag does nothing + --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. + --delete-lockfiles + DEPRECATED. This flag does nothing and will be removed in a future release. + + --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 + 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 + --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. + --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. + --strict-fee-recipient + [DEPRECATED] If this flag is set, Lighthouse will refuse to sign any block whose `fee_recipient` does not + match the `suggested_fee_recipient` sent by this validator. This applies to both the normal block proposal + flow, as well as block proposals through the builder API. Proposals through the builder API are more likely + to have a discrepancy in `fee_recipient` so you should be aware of how your connected relay sends proposer + payments before using this flag. If this flag is used, a fee recipient mismatch in the builder API flow will + result in a fallback to the local execution engine for payload construction, where a strict fee recipient + check will still be applied. + --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-node + Deprecated. Use --beacon-nodes. + + --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. + --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] + --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. [default: 5062] + + --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. [default: 127.0.0.1] + + --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. [default: 5064] + + --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, + sepolia] + --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. + --server + Deprecated. Use --beacon-nodes. + + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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 + + + From e332bee66f97f2c0e30b6f47086acade78d62e31 Mon Sep 17 00:00:00 2001 From: chonghe Date: Sun, 27 Aug 2023 17:26:11 +0800 Subject: [PATCH 10/80] Revise to update --- scripts/cli.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 6214da7f00..66c0bda7db 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -52,8 +52,32 @@ printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" # Run the bash script to generate cli_manual.txt #./cli_manual.sh -# find the difference and create a patch file: https://www.techtarget.com/searchdatacenter/tip/An-introduction-to-using-diff-and-patch-together -diff -u cli_manual.txt cli.txt > patchfile.patch +if [[ -f cli_manual.txt ]]; +then +changes=$(diff -u cli_manual.txt cli.txt | tee update ) +else +echo "cli_manual.txt is not found" +exit 1 +fi + +# compare two files to see if there are any differences: https://www.geeksforgeeks.org/cmp-command-in-linux-with-examples/ +# compare=$(cmp cli_manual.txt cli.txt) + +# to display the changes, commented for now +# echo $changes + +# -z checks if a file is null: https://www.cyberciti.biz/faq/bash-shell-find-out-if-a-variable-has-null-value-or-not/ +if [[ -z $changes ]]; +then + no_change=true +echo "cli_manual.txt is up to date" +exit 1 +# if the difference is empty, use true to execute nothing: https://stackoverflow.com/questions/17583578/what-command-means-do-nothing-in-a-conditional-in-bash +else +patch cli_manual.txt update +echo "cli_manual.txt has been updated" +fi # update cli_manual.sh -patch cli_manual.txt patchfile.patch \ No newline at end of file +#patch cli_manual.txt patchfile.patch + From 17786611a0531ea90461d7a60ae9013851cf51d4 Mon Sep 17 00:00:00 2001 From: chonghe Date: Sun, 27 Aug 2023 19:07:35 +0800 Subject: [PATCH 11/80] Update directory in Github --- scripts/cli.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 66c0bda7db..d596c56e46 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -52,9 +52,9 @@ printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" # Run the bash script to generate cli_manual.txt #./cli_manual.sh -if [[ -f cli_manual.txt ]]; +if [[ -f ./scripts/cli_manual.txt ]]; then -changes=$(diff -u cli_manual.txt cli.txt | tee update ) +changes=$(diff -u ./scripts/cli_manual.txt ./scripts/cli.txt | tee update ) else echo "cli_manual.txt is not found" exit 1 @@ -74,7 +74,7 @@ echo "cli_manual.txt is up to date" exit 1 # if the difference is empty, use true to execute nothing: https://stackoverflow.com/questions/17583578/what-command-means-do-nothing-in-a-conditional-in-bash else -patch cli_manual.txt update +patch ./scripts/cli_manual.txt update echo "cli_manual.txt has been updated" fi From 1e31d33f7d682417fe12aaf74b2c95340e9b039f Mon Sep 17 00:00:00 2001 From: chonghe Date: Sun, 27 Aug 2023 20:25:11 +0800 Subject: [PATCH 12/80] Correct cli.txt directory --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index d596c56e46..304ef32bfe 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -54,7 +54,7 @@ printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" if [[ -f ./scripts/cli_manual.txt ]]; then -changes=$(diff -u ./scripts/cli_manual.txt ./scripts/cli.txt | tee update ) +changes=$(diff -u ./scripts/cli_manual.txt cli.txt | tee update ) else echo "cli_manual.txt is not found" exit 1 From 07b9a8fd86787841853d2d68f737e98783abbc4a Mon Sep 17 00:00:00 2001 From: chonghe Date: Sun, 27 Aug 2023 22:09:12 +0800 Subject: [PATCH 13/80] test old cli_manual --- scripts/cli_manual.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cli_manual.txt b/scripts/cli_manual.txt index b18eb0e250..e3f7f4d233 100644 --- a/scripts/cli_manual.txt +++ b/scripts/cli_manual.txt @@ -1,4 +1,4 @@ -Lighthouse v4.3.0-dfcb336 +Lighthouse v4.3.0-9a5626d Sigma Prime Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a validator client and utilities for managing validator accounts. @@ -905,7 +905,7 @@ OPTIONS: 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: mdbx, 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] From 2d1325c6a1db44035c6f8e93bcd54c5d4ee89760 Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 30 Aug 2023 21:52:35 +0800 Subject: [PATCH 14/80] change exit 1 --- scripts/cli.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 304ef32bfe..c705194662 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -71,11 +71,11 @@ if [[ -z $changes ]]; then no_change=true echo "cli_manual.txt is up to date" -exit 1 # if the difference is empty, use true to execute nothing: https://stackoverflow.com/questions/17583578/what-command-means-do-nothing-in-a-conditional-in-bash else -patch ./scripts/cli_manual.txt update -echo "cli_manual.txt has been updated" +exit 1 +#patch ./scripts/cli_manual.txt update +#echo "cli_manual.txt has been updated" fi # update cli_manual.sh From 4f111a2e51958f6bdb5baa17d1e56e8bbd4e8267 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 5 Sep 2023 21:01:05 +0800 Subject: [PATCH 15/80] Update cli and makefile --- Makefile | 2 +- scripts/cli.sh | 119 ++++++++++++++++++++++++++++--------------------- 2 files changed, 68 insertions(+), 53 deletions(-) diff --git a/Makefile b/Makefile index 440fabf1d8..136fb2c792 100644 --- a/Makefile +++ b/Makefile @@ -166,7 +166,7 @@ test: test-release # Run bash script to output cli.txt cli: - ./scripts/cli.sh + ./cli.sh # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine diff --git a/scripts/cli.sh b/scripts/cli.sh index c705194662..94af0df5fb 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,5 +1,17 @@ #! /bin/bash +write_to_file() { + local cmd="$1" + 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" +} + # Check if a lighthouse binary exists in the current branch. # -f means check if the file exists, to see all options, type "bash test" in a terminal maxperf=./target/maxperf/lighthouse @@ -18,66 +30,69 @@ else CMD="$debug" fi -# Remove the existing help text file if it exists. -rm -f -- cli.txt - # Store all help strings in variables. -general=$($CMD --help) +general_cli=$($CMD --help) +bn_cli=$($CMD bn --help) +vc_cli=$($CMD vc --help) +am_cli=$($CMD am --help) -# accoun manager -a=$($CMD a --help) +general=./general_help.md +bn=./bn_help.md +vc=./vc_help.md +am=./am_help.md -a_validator=$($CMD a validator --help) -a_validator_m=$($CMD a validator modify --help) -a_validator_s=$($CMD a validator slashing-protection --help) +# create .md files +write_to_file "$general_cli" "$general" "Lighthouse General Commands" +write_to_file "$bn_cli" "$bn" "Beacon Node" +write_to_file "$vc_cli" "$vc" "Validator Client" +write_to_file "$am_cli" "$am" "Account Manager" -a_wallet=$($CMD a wallet --help) - -# beacon node - -bn=$($CMD bn --help) - -# boot-node -boot=$($CMD boot_node --help) - -# data manager -dm=$($CMD db --help) - -# validator client -vc=$($CMD vc --help) - -# Print all help strings to the cli.txt file. -printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" "$a_wallet" "$bn" "$boot" "$dm" "$vc" "$wallet" >> cli.txt - -# Run the bash script to generate cli_manual.txt -#./cli_manual.sh - -if [[ -f ./scripts/cli_manual.txt ]]; -then -changes=$(diff -u ./scripts/cli_manual.txt cli.txt | tee update ) +# create empty array to store variables for exit condition later +exist=() +update=() +for i in general_help bn_help vc_help am_help +do +if [[ -f ./book/src/cli/$i.md ]]; then # first check if .md exists +echo "$i.md exists, continue to check for any changes" +difference=$(diff ./book/src/cli/$i.md $i.md) +case1=false +exist+=($case1) + if [[ -z $difference ]]; then # then check if any changes required + case2=false + update+=($case2) +echo "$i.md is up to date" else -echo "cli_manual.txt is not found" -exit 1 +cp $i.md ./book/src/cli/$i.md +echo "$i has been updated" + case2=true + update+=($case2) +fi +else +echo "$i.md is not found, it will be created now" +cp $i.md ./book/src/cli/$i.md +case1=true +exist+=($case1) +# echo $case1 +#exit 1 fi -# compare two files to see if there are any differences: https://www.geeksforgeeks.org/cmp-command-in-linux-with-examples/ -# compare=$(cmp cli_manual.txt cli.txt) +# use during testing to show exit conditions +#echo "${exist[@]}" +#echo "${update[@]}" -# to display the changes, commented for now -# echo $changes - -# -z checks if a file is null: https://www.cyberciti.biz/faq/bash-shell-find-out-if-a-variable-has-null-value-or-not/ -if [[ -z $changes ]]; -then - no_change=true -echo "cli_manual.txt is up to date" -# if the difference is empty, use true to execute nothing: https://stackoverflow.com/questions/17583578/what-command-means-do-nothing-in-a-conditional-in-bash -else +# exit condition, exit when .md does not exist or changes requried +if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; then +echo "exit 1 due to one or more .md file does not exist and changes updated" exit 1 -#patch ./scripts/cli_manual.txt update -#echo "cli_manual.txt has been updated" +elif [[ ${exist[@]} == *"true"* ]]; then +echo "exit 1 due to one or more .md file does not exist" +exit 1 +elif [[ ${update[@]} == *"true"* ]]; then +echo "exit 1 due to changes updated" +exit 1 +else +echo "Task completed, no changes in CLI parameters" fi -# update cli_manual.sh -#patch cli_manual.txt patchfile.patch - +# remove .md files in current directory +rm -f general_help.md bn_help.md vc_help.md am_help.md From c3d1bf37198494c37271ef7d86cbaeecfbce3490 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 5 Sep 2023 21:11:31 +0800 Subject: [PATCH 16/80] Move cli.sh --- scripts/cli.sh => cli.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/cli.sh => cli.sh (100%) mode change 100755 => 100644 diff --git a/scripts/cli.sh b/cli.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/cli.sh rename to cli.sh From cb22bd3c5f379c8fd73c503bb4e7d957d17c4386 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 5 Sep 2023 22:46:09 +0800 Subject: [PATCH 17/80] remove files --- scripts/cli_manual.sh | 51 -- scripts/cli_manual.txt | 1393 ---------------------------------------- 2 files changed, 1444 deletions(-) delete mode 100644 scripts/cli_manual.sh delete mode 100644 scripts/cli_manual.txt diff --git a/scripts/cli_manual.sh b/scripts/cli_manual.sh deleted file mode 100644 index ce4f19c9ae..0000000000 --- a/scripts/cli_manual.sh +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/bash - - -#read version -#read -p "Enter Lighthouse version: " version - -version=4.3.0 -#download lighthouse binary -binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz" - -#download the binary to the present working directory -cd ./lighthouse/scripts -$binary - -#extract -tar xvf lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz - -#remove -rm lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz - -#outputs help text -general=$(./lighthouse --help) - - -# account manager -a=$(./lighthouse a --help) -# subcommand under account -a_validator=$(./lighthouse a validator --help) -a_validator_m=$(./lighthouse a validator modify --help) -a_validator_s=$(./lighthouse a validator slashing-protection --help) - -a_wallet=$(./lighthouse a wallet --help) - - -# beacon node -bn=$(./lighthouse bn --help) - -# boot-node -boot=$(./lighthouse boot_node --help) - -# database manager -dm=$(./lighthouse db --help) - -# validator client -vc=$(./lighthouse vc --help) - -# remove binary file -rm lighthouse - -# Print all help strings to the cli.txt file. -printf "%s\n\n" "$general" "$a" "$a_validator" "$a_validator_m" "$a_validator_s" "$a_wallet" "$bn" "$boot" "$dm" "$vc" "$wallet" >> cli_manual.txt diff --git a/scripts/cli_manual.txt b/scripts/cli_manual.txt deleted file mode 100644 index e3f7f4d233..0000000000 --- a/scripts/cli_manual.txt +++ /dev/null @@ -1,1393 +0,0 @@ -Lighthouse v4.3.0-9a5626d -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 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] - --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, - sepolia] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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] - -lighthouse-account_manager -Utilities for generating and managing Ethereum 2.0 accounts. - -USAGE: - lighthouse account_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] - --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, - sepolia] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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: - help Prints this message or the help of the given subcommand(s) - validator Provides commands for managing Eth2 validators. - wallet Manage wallets, from which validator keys can be derived. - -lighthouse-account_manager-validator -Provides commands for managing Eth2 validators. - -USAGE: - lighthouse account_manager validator [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] - --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, - sepolia] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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-dir - The path to search for validator directories. Defaults to ~/.lighthouse/{network}/validators - - -SUBCOMMANDS: - create Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key - derivation scheme. - exit Submits a VoluntaryExit to the beacon chain for a given validator keystore. - help Prints this message or the help of the given subcommand(s) - import Imports one or more EIP-2335 passwords into a Lighthouse VC directory, requesting - passwords interactively. The directory flag provides a convenient method for importing a - directory of keys generated by the eth2-deposit-cli Python utility. - list Lists the public keys of all validators. - modify Modify validator status in validator_definitions.yml. - recover 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. - slashing-protection Import or export slashing protection data to or from another client - -lighthouse-account_manager-validator-modify -Modify validator status in validator_definitions.yml. - -USAGE: - lighthouse account_manager validator modify [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] - --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, - sepolia] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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: - disable Disable validator(s) in validator_definitions.yml. - enable Enable validator(s) in validator_definitions.yml. - help Prints this message or the help of the given subcommand(s) - -lighthouse-account_manager-validator-slashing-protection -Import or export slashing protection data to or from another client - -USAGE: - lighthouse account_manager validator slashing-protection [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] - --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, - sepolia] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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: - export Export an interchange file - help Prints this message or the help of the given subcommand(s) - import Import an interchange file - -lighthouse-account_manager-wallet -Manage wallets, from which validator keys can be derived. - -USAGE: - lighthouse account_manager wallet [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] - --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, - sepolia] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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. - --wallets-dir - A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets - - -SUBCOMMANDS: - create Creates a new HD (hierarchical-deterministic) EIP-2386 wallet. - help Prints this message or the help of the given subcommand(s) - list Lists the names of all wallets. - recover Recovers an EIP-2386 wallet from a given a BIP-39 mnemonic phrase. - -lighthouse-beacon_node 4.3.0 -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: - --always-prefer-builder-payload If set, the beacon node always uses the payload from the builder instead - of the local payload. - --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 Explictly 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-discovery Disables the discv5 discovery protocol. The node will not search for new - peers or participate in the discovery protocol. - -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-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. - -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] - - --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 - The minimum reward in wei provided to the proposer by a block builder for an external payload to be - considered for inclusion in a proposal. If this threshold is not met, the local EE's payload will be used. - This is currently *NOT* in comparison to the value of the local EE's payload. It simply checks whether the - total proposer reward from an external payload is equal to or greater than this value. In the future, a - comparison to a local payload is likely to be added. Example: Use 250000000000000000 to set the threshold to - 0.25 ETH. [default: 0] - --builder-user-agent - The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version - string. - --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: 60] - - -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-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. - --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. - --eth1-endpoint - Deprecated. Use --eth1-endpoints. - - --eth1-endpoints - One http endpoint for a web3 connection to an execution node. Note: This flag is now only useful for - testing, use `--execution-endpoint` flag to connect to an execution node on mainnet and testnets. - Defaults to http://127.0.0.1:8545. - --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. - - --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. [default: 127.0.0.1] - - --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-port - Set the listen TCP port for the RESTful HTTP API server. [default: 5052] - - --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-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. [default: 127.0.0.1] - - --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. [default: 5054] - - --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, - sepolia] - --network-dir - Data directory for network keys. Defaults to network/ inside the beacon node dir. - - --port - The TCP/UDP port to listen on. The UDP port can be modified by the --discovery-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 port to listen on over IpV6 when listening over both Ipv4 and Ipv6. Defaults to 9090 when - required. [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 - Options to enable or disable the progressive balances cache for unrealized FFG progression calculation. The - default `checked` mode compares the progressive balances from the cache against results from the existing - method. If there is a mismatch, it falls back to the existing method. The optimized mode (`fast`) is faster - but is still experimental, and is not recommended for mainnet usage at this time. [possible values: - disabled, checked, strict, fast] - --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-threshold - Percentage of vote weight below which to attempt a proposer reorg. Default: 20% - - --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] - --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)] - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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. - --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. - -lighthouse-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. - -USAGE: - lighthouse boot_node [FLAGS] [OPTIONS] --enr-address
... - -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-packet-filter Disables discv5 packet filter. Useful for testing in smaller networks - -x, --enable-enr-auto-update 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. - -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: - --boot-nodes - One or more comma-delimited base64-encoded ENR's or multiaddr strings of peers to initially add to the local - routing table - -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] - --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-port - 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. - --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. - --listen-address
... - The address the bootnode will listen for UDP communications. 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] - --network - Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - sepolia] - --network-dir - The directory which contains the enr and it's associated private key - - --port The UDP port to listen on. [default: 9000] - --port6 - The UDP port to listen on over IpV6 when listening over both Ipv4 and Ipv6. Defaults to 9090 when required. - [default: 9090] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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. - -lighthouse-database_manager -Manage a beacon node database - -USAGE: - lighthouse database_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] - --freezer-dir Data directory for the freezer database. - --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, - sepolia] - --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. - --slots-per-restore-point - Specifies how often a freezer DB restore point should be stored. Cannot be changed after initialization. - [default: 2048 (mainnet) or 64 (minimal)] - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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: - help Prints this message or the help of the given subcommand(s) - inspect Inspect raw database values - migrate Migrate the database to a specific schema version - prune_payloads Prune finalized execution payloads - version Display database schema version [aliases: v] - -lighthouse-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 [FLAGS] [OPTIONS] - -FLAGS: - --allow-unsynced DEPRECATED: this flag does nothing - --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. - --delete-lockfiles - DEPRECATED. This flag does nothing and will be removed in a future release. - - --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 - 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 - --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. - --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. - --strict-fee-recipient - [DEPRECATED] If this flag is set, Lighthouse will refuse to sign any block whose `fee_recipient` does not - match the `suggested_fee_recipient` sent by this validator. This applies to both the normal block proposal - flow, as well as block proposals through the builder API. Proposals through the builder API are more likely - to have a discrepancy in `fee_recipient` so you should be aware of how your connected relay sends proposer - payments before using this flag. If this flag is used, a fee recipient mismatch in the builder API flow will - result in a fallback to the local execution engine for payload construction, where a strict fee recipient - check will still be applied. - --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-node - Deprecated. Use --beacon-nodes. - - --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. - --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] - --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. [default: 5062] - - --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. [default: 127.0.0.1] - - --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. [default: 5064] - - --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, - sepolia] - --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. - --server - Deprecated. Use --beacon-nodes. - - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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 - - - From 99c0049ca5beeb0a8409c2fec95de61215148de4 Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 11:04:39 +0800 Subject: [PATCH 18/80] fix permission --- cli.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 cli.sh diff --git a/cli.sh b/cli.sh old mode 100644 new mode 100755 From fb6f3537bb8f39bc88f367636cf4a9a9e637a19b Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 11:28:59 +0800 Subject: [PATCH 19/80] Indentation and revision --- Makefile | 2 +- cli.sh => scripts/cli.sh | 71 +++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 34 deletions(-) rename cli.sh => scripts/cli.sh (58%) mode change 100755 => 100644 diff --git a/Makefile b/Makefile index 136fb2c792..440fabf1d8 100644 --- a/Makefile +++ b/Makefile @@ -166,7 +166,7 @@ test: test-release # Run bash script to output cli.txt cli: - ./cli.sh + ./scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine diff --git a/cli.sh b/scripts/cli.sh old mode 100755 new mode 100644 similarity index 58% rename from cli.sh rename to scripts/cli.sh index 94af0df5fb..7f4b5d4819 --- a/cli.sh +++ b/scripts/cli.sh @@ -1,5 +1,6 @@ #! /bin/bash +# A function to generate formatted .md files write_to_file() { local cmd="$1" local file="$2" @@ -52,46 +53,50 @@ exist=() update=() for i in general_help bn_help vc_help am_help do -if [[ -f ./book/src/cli/$i.md ]]; then # first check if .md exists -echo "$i.md exists, continue to check for any changes" -difference=$(diff ./book/src/cli/$i.md $i.md) -case1=false -exist+=($case1) - if [[ -z $difference ]]; then # then check if any changes required - case2=false - update+=($case2) -echo "$i.md is up to date" -else -cp $i.md ./book/src/cli/$i.md -echo "$i has been updated" - case2=true - update+=($case2) -fi -else -echo "$i.md is not found, it will be created now" -cp $i.md ./book/src/cli/$i.md -case1=true -exist+=($case1) -# echo $case1 -#exit 1 -fi + if [[ -f ./book/src/cli/$i.md ]]; # first check if .md exists + then + echo "$i.md exists, continue to check for any changes" + difference=$(diff ./book/src/cli/$i.md $i.md) + case1=false + exist+=($case1) + if [[ -z $difference ]]; # then check if any changes required + then + case2=false + update+=($case2) + echo "$i.md is up to date" + else + cp $i.md ./book/src/cli/$i.md + echo "$i has been updated" + case2=true + update+=($case2) + fi + else + echo "$i.md is not found, it will be created now" + cp $i.md ./book/src/cli/$i.md + case1=true + exist+=($case1) + fi +done # use during testing to show exit conditions #echo "${exist[@]}" #echo "${update[@]}" # exit condition, exit when .md does not exist or changes requried -if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; then -echo "exit 1 due to one or more .md file does not exist and changes updated" -exit 1 -elif [[ ${exist[@]} == *"true"* ]]; then -echo "exit 1 due to one or more .md file does not exist" -exit 1 -elif [[ ${update[@]} == *"true"* ]]; then -echo "exit 1 due to changes updated" -exit 1 +if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; +then + echo "exit 1 due to one or more .md file does not exist and changes updated" + exit 1 +elif [[ ${exist[@]} == *"true"* ]]; +then + echo "exit 1 due to one or more .md file does not exist" + exit 1 +elif [[ ${update[@]} == *"true"* ]]; +then + echo "exit 1 due to changes updated" + exit 1 else -echo "Task completed, no changes in CLI parameters" + echo "Task completed, no changes in CLI parameters" fi # remove .md files in current directory From 51b7de47172aaeb447f98b58c5886f054d54d43f Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 11:33:07 +0800 Subject: [PATCH 20/80] Fixed permission --- scripts/cli.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/cli.sh diff --git a/scripts/cli.sh b/scripts/cli.sh old mode 100644 new mode 100755 From 0f7e77aaaa328ace9ccc70f7042aba1f3c51fd03 Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 12:13:15 +0800 Subject: [PATCH 21/80] Create new cli folder --- book/src/cli/dummy.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 book/src/cli/dummy.txt diff --git a/book/src/cli/dummy.txt b/book/src/cli/dummy.txt new file mode 100644 index 0000000000..e69de29bb2 From db4dc09448755a0e47a4a7a4d0d558441188ff66 Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 12:13:56 +0800 Subject: [PATCH 22/80] remove dummy --- book/src/cli/dummy.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 book/src/cli/dummy.txt diff --git a/book/src/cli/dummy.txt b/book/src/cli/dummy.txt deleted file mode 100644 index e69de29bb2..0000000000 From 996571362b951fae2c730895aadb5c37729d24be Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 12:15:24 +0800 Subject: [PATCH 23/80] put a dummy file --- book/src/cli/dummy.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 book/src/cli/dummy.txt diff --git a/book/src/cli/dummy.txt b/book/src/cli/dummy.txt new file mode 100644 index 0000000000..e69de29bb2 From a180809238a88656b81f30555bd3dfd50b1aad97 Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 16:39:03 +0800 Subject: [PATCH 24/80] Revise cli.sh --- book/src/cli/dummy.txt | 0 scripts/cli.sh | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 book/src/cli/dummy.txt diff --git a/book/src/cli/dummy.txt b/book/src/cli/dummy.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/scripts/cli.sh b/scripts/cli.sh index 7f4b5d4819..10cbdc4197 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -37,10 +37,10 @@ bn_cli=$($CMD bn --help) vc_cli=$($CMD vc --help) am_cli=$($CMD am --help) -general=./general_help.md -bn=./bn_help.md -vc=./vc_help.md -am=./am_help.md +general=./help_general.md +bn=./help_bn.md +vc=./help_vc.md +am=./help_am.md # create .md files write_to_file "$general_cli" "$general" "Lighthouse General Commands" @@ -51,12 +51,12 @@ write_to_file "$am_cli" "$am" "Account Manager" # create empty array to store variables for exit condition later exist=() update=() -for i in general_help bn_help vc_help am_help +for i in help_general help_bn help_vc help_am do - if [[ -f ./book/src/cli/$i.md ]]; # first check if .md exists + if [[ -f ./book/src/$i.md ]]; # first check if .md exists then echo "$i.md exists, continue to check for any changes" - difference=$(diff ./book/src/cli/$i.md $i.md) + difference=$(diff ./book/src/$i.md $i.md) case1=false exist+=($case1) if [[ -z $difference ]]; # then check if any changes required @@ -65,27 +65,27 @@ do update+=($case2) echo "$i.md is up to date" else - cp $i.md ./book/src/cli/$i.md + cp $i.md ./book/src/$i.md echo "$i has been updated" case2=true update+=($case2) fi else echo "$i.md is not found, it will be created now" - cp $i.md ./book/src/cli/$i.md + cp $i.md ./book/src/$i.md case1=true exist+=($case1) fi done # use during testing to show exit conditions -#echo "${exist[@]}" -#echo "${update[@]}" +echo "${exist[@]}" +echo "${update[@]}" # exit condition, exit when .md does not exist or changes requried if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; then - echo "exit 1 due to one or more .md file does not exist and changes updated" + echo "exit 1 due to one or more .md file does not exist and changes updated." exit 1 elif [[ ${exist[@]} == *"true"* ]]; then @@ -100,4 +100,4 @@ else fi # remove .md files in current directory -rm -f general_help.md bn_help.md vc_help.md am_help.md +rm -f help_general.md help_bn.md help_vc.md help_am.md \ No newline at end of file From ed31b6b0772f265bead137787ff3d7e0c37a33bd Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 6 Sep 2023 16:39:52 +0800 Subject: [PATCH 25/80] comment --- scripts/cli.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 10cbdc4197..9d9097552f 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -79,8 +79,8 @@ do done # use during testing to show exit conditions -echo "${exist[@]}" -echo "${update[@]}" +#echo "${exist[@]}" +#echo "${update[@]}" # exit condition, exit when .md does not exist or changes requried if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; From 7f2f9d134504cab821d3c1356f268ebf7c951a8a Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 09:38:10 +0800 Subject: [PATCH 26/80] function --- scripts/cli.sh | 90 +++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 49 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 9d9097552f..87e24d9356 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -36,68 +36,60 @@ general_cli=$($CMD --help) bn_cli=$($CMD bn --help) vc_cli=$($CMD vc --help) am_cli=$($CMD am --help) +vm_cli=$($CMD vm --help) general=./help_general.md bn=./help_bn.md vc=./help_vc.md am=./help_am.md +vm=./help_vm.md # create .md files write_to_file "$general_cli" "$general" "Lighthouse General Commands" write_to_file "$bn_cli" "$bn" "Beacon Node" write_to_file "$vc_cli" "$vc" "Validator Client" write_to_file "$am_cli" "$am" "Account Manager" +write_to_file "$vm_cli" "$vm" "Validator Manager" -# create empty array to store variables for exit condition later -exist=() -update=() -for i in help_general help_bn help_vc help_am -do - if [[ -f ./book/src/$i.md ]]; # first check if .md exists - then - echo "$i.md exists, continue to check for any changes" - difference=$(diff ./book/src/$i.md $i.md) - case1=false - exist+=($case1) - if [[ -z $difference ]]; # then check if any changes required - then - case2=false - update+=($case2) - echo "$i.md is up to date" - else - cp $i.md ./book/src/$i.md - echo "$i has been updated" - case2=true - update+=($case2) - fi - else - echo "$i.md is not found, it will be created now" - cp $i.md ./book/src/$i.md - case1=true - exist+=($case1) - fi -done +#input 1 = $1 = old files; input 2 = $2 = new files +old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) +new_files=($general $bn $vc $am $vm) -# use during testing to show exit conditions -#echo "${exist[@]}" -#echo "${update[@]}" - -# exit condition, exit when .md does not exist or changes requried -if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; -then - echo "exit 1 due to one or more .md file does not exist and changes updated." - exit 1 -elif [[ ${exist[@]} == *"true"* ]]; -then - echo "exit 1 due to one or more .md file does not exist" - exit 1 -elif [[ ${update[@]} == *"true"* ]]; -then - echo "exit 1 due to changes updated" - exit 1 +check() { +if [[ -f $1 ]]; # check for existence of file +then + diff=$(diff $1 $2) else - echo "Task completed, no changes in CLI parameters" + cp $2 ./book/src + changes=true fi -# remove .md files in current directory -rm -f help_general.md help_bn.md help_vc.md help_am.md \ No newline at end of file +if [[ -z $diff ]]; # check for difference +then + return 1 # exit a function (i.e., do nothing) +else + cp $2 ./book/src + changes=true +fi +} + +# define changes as false +changes=false +# call check function to check for each help file +check ${old_files[0]} ${new_files[0]} +check ${old_files[1]} ${new_files[1]} +check ${old_files[2]} ${new_files[2]} +check ${old_files[3]} ${new_files[3]} +check ${old_files[4]} ${new_files[4]} + +# remove help files +rm -f help_general.md help_bn.md help_vc.md help_am.md + +# only exit at the very end +if [[ $changes == true ]]; then + echo "CLI parameters are not up to date. Run \"make cli\" to update, then commit the changes" + exit 1 +else + echo "CLI parameters are up to date." + exit 0 +fi \ No newline at end of file From 971bee38d10eabe48458212f82b767634e9f2838 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 09:39:32 +0800 Subject: [PATCH 27/80] remove vm.md --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 87e24d9356..7d378e8533 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -83,7 +83,7 @@ check ${old_files[3]} ${new_files[3]} check ${old_files[4]} ${new_files[4]} # remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md +rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md # only exit at the very end if [[ $changes == true ]]; then From a16c586c09936fecdbbf9008a35eb8fc3050a59f Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 15:56:56 +0800 Subject: [PATCH 28/80] test make cli --- book/src/help_am.md | 86 ++++++++ book/src/help_bn.md | 448 +++++++++++++++++++++++++++++++++++++++ book/src/help_general.md | 101 +++++++++ book/src/help_vc.md | 204 ++++++++++++++++++ scripts/cli.sh | 14 +- 5 files changed, 846 insertions(+), 7 deletions(-) create mode 100644 book/src/help_am.md create mode 100644 book/src/help_bn.md create mode 100644 book/src/help_general.md create mode 100644 book/src/help_vc.md diff --git a/book/src/help_am.md b/book/src/help_am.md new file mode 100644 index 0000000000..8bc4b1b252 --- /dev/null +++ b/book/src/help_am.md @@ -0,0 +1,86 @@ +#Account Manager + +``` +Utilities for generating and managing Ethereum 2.0 accounts. + +USAGE: + lighthouse.exe account_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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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: + help Prints this message or the help of the given subcommand(s) + validator Provides commands for managing Eth2 validators. + wallet Manage wallets, from which validator keys can be derived. +``` \ No newline at end of file diff --git a/book/src/help_bn.md b/book/src/help_bn.md new file mode 100644 index 0000000000..9f051309bb --- /dev/null +++ b/book/src/help_bn.md @@ -0,0 +1,448 @@ +#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.exe beacon_node [FLAGS] [OPTIONS] + +FLAGS: + --always-prefer-builder-payload If set, the beacon node always uses the payload from the builder instead + of the local payload. + --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 Explictly 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-discovery Disables the discv5 discovery protocol. The node will not search for new + peers or participate in the discovery protocol. + -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-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. + -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] + + --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 + The minimum reward in wei provided to the proposer by a block builder for an external payload to be + considered for inclusion in a proposal. If this threshold is not met, the local EE's payload will be used. + This is currently *NOT* in comparison to the value of the local EE's payload. It simply checks whether the + total proposer reward from an external payload is equal to or greater than this value. In the future, a + comparison to a local payload is likely to be added. Example: Use 250000000000000000 to set the threshold to + 0.25 ETH. [default: 0] + --builder-user-agent + The HTTP user agent to send alongside requests to the builder URL. The default is Lighthouse's version + string. + --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: 60] + + -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-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. + --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. + --eth1-endpoint + Deprecated. Use --eth1-endpoints. + + --eth1-endpoints + One http endpoint for a web3 connection to an execution node. Note: This flag is now only useful for + testing, use `--execution-endpoint` flag to connect to an execution node on mainnet and testnets. + Defaults to http://127.0.0.1:8545. + --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. + + --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. [default: 127.0.0.1] + + --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-port + Set the listen TCP port for the RESTful HTTP API server. [default: 5052] + + --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-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. [default: 127.0.0.1] + + --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. [default: 5054] + + --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, + sepolia] + --network-dir + Data directory for network keys. Defaults to network/ inside the beacon node dir. + + --port + The TCP/UDP port to listen on. The UDP port can be modified by the --discovery-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 port to listen on over IpV6 when listening over both Ipv4 and Ipv6. Defaults to 9090 when + required. [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 + Options to enable or disable the progressive balances cache for unrealized FFG progression calculation. The + default `checked` mode compares the progressive balances from the cache against results from the existing + method. If there is a mismatch, it falls back to the existing method. The optimized mode (`fast`) is faster + but is still experimental, and is not recommended for mainnet usage at this time. [possible values: + disabled, checked, strict, fast] + --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-threshold + Percentage of vote weight below which to attempt a proposer reorg. Default: 20% + + --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] + --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)] + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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. + --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. +``` \ No newline at end of file diff --git a/book/src/help_general.md b/book/src/help_general.md new file mode 100644 index 0000000000..5b02a02aa6 --- /dev/null +++ b/book/src/help_general.md @@ -0,0 +1,101 @@ +#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.exe [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 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] + --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, + sepolia] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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] +``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md new file mode 100644 index 0000000000..f879af6434 --- /dev/null +++ b/book/src/help_vc.md @@ -0,0 +1,204 @@ +#Validator Client + +``` +When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). + +USAGE: + lighthouse.exe validator_client [FLAGS] [OPTIONS] + +FLAGS: + --allow-unsynced DEPRECATED: this flag does nothing + --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. + --delete-lockfiles + DEPRECATED. This flag does nothing and will be removed in a future release. + + --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 + 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 + --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. + --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. + --strict-fee-recipient + [DEPRECATED] If this flag is set, Lighthouse will refuse to sign any block whose `fee_recipient` does not + match the `suggested_fee_recipient` sent by this validator. This applies to both the normal block proposal + flow, as well as block proposals through the builder API. Proposals through the builder API are more likely + to have a discrepancy in `fee_recipient` so you should be aware of how your connected relay sends proposer + payments before using this flag. If this flag is used, a fee recipient mismatch in the builder API flow will + result in a fallback to the local execution engine for payload construction, where a strict fee recipient + check will still be applied. + --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-node + Deprecated. Use --beacon-nodes. + + --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. + --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] + --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. [default: 5062] + + --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. [default: 127.0.0.1] + + --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. [default: 5064] + + --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, + sepolia] + --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. + --server + Deprecated. Use --beacon-nodes. + + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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 +``` \ No newline at end of file diff --git a/scripts/cli.sh b/scripts/cli.sh index 7d378e8533..b0ba7b96a3 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -36,24 +36,24 @@ general_cli=$($CMD --help) bn_cli=$($CMD bn --help) vc_cli=$($CMD vc --help) am_cli=$($CMD am --help) -vm_cli=$($CMD vm --help) +#vm_cli=$($CMD vm --help) general=./help_general.md bn=./help_bn.md vc=./help_vc.md am=./help_am.md -vm=./help_vm.md +#vm=./help_vm.md # create .md files write_to_file "$general_cli" "$general" "Lighthouse General Commands" write_to_file "$bn_cli" "$bn" "Beacon Node" write_to_file "$vc_cli" "$vc" "Validator Client" write_to_file "$am_cli" "$am" "Account Manager" -write_to_file "$vm_cli" "$vm" "Validator Manager" +#write_to_file "$vm_cli" "$vm" "Validator Manager" #input 1 = $1 = old files; input 2 = $2 = new files -old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) -new_files=($general $bn $vc $am $vm) +old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md) +new_files=($general $bn $vc $am) check() { if [[ -f $1 ]]; # check for existence of file @@ -80,10 +80,10 @@ check ${old_files[0]} ${new_files[0]} check ${old_files[1]} ${new_files[1]} check ${old_files[2]} ${new_files[2]} check ${old_files[3]} ${new_files[3]} -check ${old_files[4]} ${new_files[4]} +#check ${old_files[4]} ${new_files[4]} # remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md +rm -f help_general.md help_bn.md help_vc.md help_am.md # only exit at the very end if [[ $changes == true ]]; then From f1c2b542fc10d3ea2f9d2528cc6dba4c0e4731c0 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 16:20:11 +0800 Subject: [PATCH 29/80] test --- book/src/help_am.md | 2 +- book/src/help_bn.md | 2 +- book/src/help_general.md | 2 +- book/src/help_vc.md | 2 +- scripts/cli.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/book/src/help_am.md b/book/src/help_am.md index 8bc4b1b252..586b4bda99 100644 --- a/book/src/help_am.md +++ b/book/src/help_am.md @@ -1,4 +1,4 @@ -#Account Manager +# Account Manager ``` Utilities for generating and managing Ethereum 2.0 accounts. diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 9f051309bb..9350befc9b 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -1,4 +1,4 @@ -#Beacon Node +# Beacon Node ``` Sigma Prime diff --git a/book/src/help_general.md b/book/src/help_general.md index 5b02a02aa6..59db3531e3 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -1,4 +1,4 @@ -#Lighthouse General Commands +# Lighthouse General Commands ``` Sigma Prime diff --git a/book/src/help_vc.md b/book/src/help_vc.md index f879af6434..f1f1e2d2c2 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -1,4 +1,4 @@ -#Validator Client +# Validator Client ``` When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). diff --git a/scripts/cli.sh b/scripts/cli.sh index b0ba7b96a3..0ac66a4ff2 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -10,7 +10,7 @@ write_to_file() { 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" + printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" } # Check if a lighthouse binary exists in the current branch. From 09f81a4dd2216cb3f48140dc394a7e52a73a6774 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 17:12:21 +0800 Subject: [PATCH 30/80] testing --- scripts/cli.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 0ac66a4ff2..69ed074d23 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -55,6 +55,60 @@ write_to_file "$am_cli" "$am" "Account Manager" old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md) new_files=($general $bn $vc $am) +exist=() +changes=() +check() { +if [[ -f $1 ]]; # check for existence of file +then + diff=$(diff $1 $2) + exist+=(false) +else + cp $2 ./book/src + exist+=(true) +fi + +if [[ -z $diff ]]; # check for difference +then + changes+=(false) + return 1 # exit a function (i.e., do nothing) +else + cp $2 ./book/src + changes+=(true) +fi +} + +# define changes as false +# changes=false +# call check function to check for each help file +check ${old_files[0]} ${new_files[0]} +check ${old_files[1]} ${new_files[1]} +check ${old_files[2]} ${new_files[2]} +check ${old_files[3]} ${new_files[3]} +#check ${old_files[4]} ${new_files[4]} + +# remove help files +rm -f help_general.md help_bn.md help_vc.md help_am.md + +echo "${exist[@]}" +echo "${changes[@]}" + +if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; +then + echo "exit 1 due to one or more .md file does not exist and changes updated." + exit 1 +elif [[ ${exist[@]} == *"true"* ]]; +then + echo "exit 1 due to one or more .md file does not exist" + exit 1 +elif [[ ${update[@]} == *"true"* ]]; +then + echo "exit 1 due to changes updated" + exit 1 +else + echo "Task completed, no changes in CLI parameters" +fi + +: ' check() { if [[ -f $1 ]]; # check for existence of file then @@ -92,4 +146,5 @@ if [[ $changes == true ]]; then else echo "CLI parameters are up to date." exit 0 -fi \ No newline at end of file +fi +' \ No newline at end of file From 1aaca5b46c2414b2617cab9bc6c44b909d741386 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 17:39:52 +0800 Subject: [PATCH 31/80] testing --- scripts/cli.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 69ed074d23..244244e80e 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -89,8 +89,9 @@ check ${old_files[3]} ${new_files[3]} # remove help files rm -f help_general.md help_bn.md help_vc.md help_am.md -echo "${exist[@]}" -echo "${changes[@]}" +echo "exist = ${exist[@]}" +echo "changes = ${changes[@]}" +echo "$diff" if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; then @@ -100,7 +101,7 @@ elif [[ ${exist[@]} == *"true"* ]]; then echo "exit 1 due to one or more .md file does not exist" exit 1 -elif [[ ${update[@]} == *"true"* ]]; +elif [[ ${changes[@]} == *"true"* ]]; then echo "exit 1 due to changes updated" exit 1 From 08eb5705054758c0c63474273b78be909dffaf8c Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 18:35:17 +0800 Subject: [PATCH 32/80] update --- book/src/help_am.md | 9 +++++++- book/src/help_bn.md | 45 ++++++++++++++++++++++++++++++++++++++-- book/src/help_general.md | 39 ++++++++++++++++++++-------------- book/src/help_vc.md | 17 ++++++++++++++- 4 files changed, 91 insertions(+), 19 deletions(-) diff --git a/book/src/help_am.md b/book/src/help_am.md index 586b4bda99..e2063b853f 100644 --- a/book/src/help_am.md +++ b/book/src/help_am.md @@ -30,6 +30,13 @@ OPTIONS: --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] @@ -51,7 +58,7 @@ OPTIONS: disabled. [default: 200] --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - sepolia] + 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 diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 9350befc9b..d9c454be1a 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -62,6 +62,8 @@ FLAGS: --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 @@ -119,6 +121,25 @@ OPTIONS: --auto-compact-db Enable or disable automatic compaction of the database on finalization. [default: true] + --beacon-processor-aggregate-batch-size + Specifies the number of gossip aggregate attestations in a signature verification batch. Higher values may + reduce CPU usage in a healthy network while lower values may increase CPU usage in an unhealthy or hostile + network. [default: 64] + --beacon-processor-attestation-batch-size + 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: 64] + --beacon-processor-max-workers + 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. + --beacon-processor-reprocess-queue-len + 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: 12288] + --beacon-processor-work-queue-len + 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: 16384] --block-cache-size Specifies how many blocks the database should cache in memory [default: 5] @@ -162,7 +183,7 @@ OPTIONS: 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: 60] + 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 @@ -195,6 +216,9 @@ OPTIONS: --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-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] @@ -234,6 +258,13 @@ OPTIONS: --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. @@ -247,12 +278,22 @@ OPTIONS: 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. [default: 202] + + --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. [default: true] --http-port Set the listen TCP port for the RESTful HTTP API server. [default: 5052] --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. [default: 1] --http-tls-cert The path of the certificate to be used when serving the HTTP API server over TLS. @@ -319,7 +360,7 @@ OPTIONS: --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - sepolia] + 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 59db3531e3..4906ea82f2 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -34,6 +34,13 @@ OPTIONS: --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] @@ -55,7 +62,7 @@ OPTIONS: disabled. [default: 200] --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - sepolia] + 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 @@ -84,18 +91,20 @@ OPTIONS: 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] + 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] ``` \ No newline at end of file diff --git a/book/src/help_vc.md b/book/src/help_vc.md index f1f1e2d2c2..e031a6ecce 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -38,6 +38,14 @@ FLAGS: 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 @@ -93,6 +101,13 @@ OPTIONS: 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. @@ -154,7 +169,7 @@ OPTIONS: --network Name of the Eth2 chain Lighthouse will sync and follow. [possible values: mainnet, prater, goerli, gnosis, - sepolia] + 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. From 0c1ad4008df8585b931689162e9e679f9a71fa2c Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 19:41:06 +0800 Subject: [PATCH 33/80] update --- book/src/help_am.md | 2 +- book/src/help_bn.md | 2 +- book/src/help_general.md | 2 +- book/src/help_vc.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/book/src/help_am.md b/book/src/help_am.md index e2063b853f..8c1ee4d019 100644 --- a/book/src/help_am.md +++ b/book/src/help_am.md @@ -4,7 +4,7 @@ Utilities for generating and managing Ethereum 2.0 accounts. USAGE: - lighthouse.exe account_manager [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse account_manager [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_bn.md b/book/src/help_bn.md index d9c454be1a..520f9f81bd 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -6,7 +6,7 @@ The primary component which connects to the Ethereum 2.0 P2P network and downloa a HTTP API for querying the beacon chain and publishing messages to the network. USAGE: - lighthouse.exe beacon_node [FLAGS] [OPTIONS] + lighthouse beacon_node [FLAGS] [OPTIONS] FLAGS: --always-prefer-builder-payload If set, the beacon node always uses the payload from the builder instead diff --git a/book/src/help_general.md b/book/src/help_general.md index 4906ea82f2..b337c30d72 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -6,7 +6,7 @@ Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a vali validator accounts. USAGE: - lighthouse.exe [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vc.md b/book/src/help_vc.md index e031a6ecce..794bd0a65d 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -4,7 +4,7 @@ When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). USAGE: - lighthouse.exe validator_client [FLAGS] [OPTIONS] + lighthouse validator_client [FLAGS] [OPTIONS] FLAGS: --allow-unsynced DEPRECATED: this flag does nothing From 9091ebdd4c48d041305874e34724579cebee6813 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 20:02:05 +0800 Subject: [PATCH 34/80] test --- scripts/cli.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 244244e80e..5946871783 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -57,10 +57,12 @@ new_files=($general $bn $vc $am) exist=() changes=() +diff=() check() { if [[ -f $1 ]]; # check for existence of file then diff=$(diff $1 $2) + diff+=($diff) exist+=(false) else cp $2 ./book/src @@ -91,7 +93,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md echo "exist = ${exist[@]}" echo "changes = ${changes[@]}" -echo "$diff" +echo "difference = ${diff[@]}" if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; then From d8623cb69602a062623ae46886cf580a6c10e978 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 20:57:49 +0800 Subject: [PATCH 35/80] test --- book/src/help_bn.md | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 520f9f81bd..152ed4cf45 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -29,8 +29,6 @@ FLAGS: --disable-deposit-contract-sync Explictly 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-discovery Disables the discv5 discovery protocol. The node will not search for new - peers or participate in the discovery protocol. -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. @@ -47,6 +45,8 @@ FLAGS: --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 @@ -196,7 +196,7 @@ OPTIONS: 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 + 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 @@ -204,18 +204,24 @@ OPTIONS: 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. + 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. + 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. + 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. + this port over IPv6. --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] @@ -311,10 +317,10 @@ OPTIONS: 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. + - --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] @@ -365,12 +371,13 @@ OPTIONS: Data directory for network keys. Defaults to network/ inside the beacon node dir. --port - The TCP/UDP port to listen on. The UDP port can be modified by the --discovery-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 port to listen on over IpV6 when listening over both Ipv4 and Ipv6. Defaults to 9090 when - required. [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 @@ -399,6 +406,12 @@ OPTIONS: --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 From 314745a09449fefee2c6e1d2ffcef2373f645afc Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 21:18:31 +0800 Subject: [PATCH 36/80] add vm --- book/src/help_vm.md | 100 ++++++++++++++++++++++++++++++++++++++++++++ scripts/cli.sh | 14 +++---- 2 files changed, 107 insertions(+), 7 deletions(-) create mode 100644 book/src/help_vm.md diff --git a/book/src/help_vm.md b/book/src/help_vm.md new file mode 100644 index 0000000000..be62e3549c --- /dev/null +++ b/book/src/help_vm.md @@ -0,0 +1,100 @@ +# Validator Manager + +``` +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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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). +``` \ No newline at end of file diff --git a/scripts/cli.sh b/scripts/cli.sh index 5946871783..c0d8d131fd 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -36,24 +36,24 @@ general_cli=$($CMD --help) bn_cli=$($CMD bn --help) vc_cli=$($CMD vc --help) am_cli=$($CMD am --help) -#vm_cli=$($CMD vm --help) +vm_cli=$($CMD vm --help) general=./help_general.md bn=./help_bn.md vc=./help_vc.md am=./help_am.md -#vm=./help_vm.md +vm=./help_vm.md # create .md files write_to_file "$general_cli" "$general" "Lighthouse General Commands" write_to_file "$bn_cli" "$bn" "Beacon Node" write_to_file "$vc_cli" "$vc" "Validator Client" write_to_file "$am_cli" "$am" "Account Manager" -#write_to_file "$vm_cli" "$vm" "Validator Manager" +write_to_file "$vm_cli" "$vm" "Validator Manager" #input 1 = $1 = old files; input 2 = $2 = new files -old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md) -new_files=($general $bn $vc $am) +old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) +new_files=($general $bn $vc $am $vm) exist=() changes=() @@ -86,10 +86,10 @@ check ${old_files[0]} ${new_files[0]} check ${old_files[1]} ${new_files[1]} check ${old_files[2]} ${new_files[2]} check ${old_files[3]} ${new_files[3]} -#check ${old_files[4]} ${new_files[4]} +check ${old_files[4]} ${new_files[4]} # remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md +rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md echo "exist = ${exist[@]}" echo "changes = ${changes[@]}" From ab2574ccdfe1e6f72db0f1d02bb85676e03d7d50 Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 21:41:25 +0800 Subject: [PATCH 37/80] change back non-debug mode --- scripts/cli.sh | 82 ++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index c0d8d131fd..05de765636 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -55,6 +55,47 @@ write_to_file "$vm_cli" "$vm" "Validator Manager" old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) new_files=($general $bn $vc $am $vm) +check() { +if [[ -f $1 ]]; # check for existence of file +then + diff=$(diff $1 $2) +else + cp $2 ./book/src + changes=true +fi + +if [[ -z $diff ]]; # check for difference +then + return 1 # exit a function (i.e., do nothing) +else + cp $2 ./book/src + changes=true +fi +} + +# define changes as false +changes=false +# call check function to check for each help file +check ${old_files[0]} ${new_files[0]} +check ${old_files[1]} ${new_files[1]} +check ${old_files[2]} ${new_files[2]} +check ${old_files[3]} ${new_files[3]} +check ${old_files[4]} ${new_files[4]} + +# remove help files +rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md + +# only exit at the very end +if [[ $changes == true ]]; then + echo "CLI parameters are not up to date. Run \"make cli\" to update, then commit the changes" + exit 1 +else + echo "CLI parameters are up to date." + exit 0 +fi + + +: ' exist=() changes=() diff=() @@ -95,6 +136,7 @@ echo "exist = ${exist[@]}" echo "changes = ${changes[@]}" echo "difference = ${diff[@]}" + if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; then echo "exit 1 due to one or more .md file does not exist and changes updated." @@ -110,44 +152,6 @@ then else echo "Task completed, no changes in CLI parameters" fi +' -: ' -check() { -if [[ -f $1 ]]; # check for existence of file -then - diff=$(diff $1 $2) -else - cp $2 ./book/src - changes=true -fi -if [[ -z $diff ]]; # check for difference -then - return 1 # exit a function (i.e., do nothing) -else - cp $2 ./book/src - changes=true -fi -} - -# define changes as false -changes=false -# call check function to check for each help file -check ${old_files[0]} ${new_files[0]} -check ${old_files[1]} ${new_files[1]} -check ${old_files[2]} ${new_files[2]} -check ${old_files[3]} ${new_files[3]} -#check ${old_files[4]} ${new_files[4]} - -# remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md - -# only exit at the very end -if [[ $changes == true ]]; then - echo "CLI parameters are not up to date. Run \"make cli\" to update, then commit the changes" - exit 1 -else - echo "CLI parameters are up to date." - exit 0 -fi -' \ No newline at end of file From cb71c7580acb05b76e60defbbc8eca45323c09dc Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 22:03:36 +0800 Subject: [PATCH 38/80] add exist and update for future debug --- scripts/cli.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 05de765636..441523425d 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -55,21 +55,29 @@ write_to_file "$vm_cli" "$vm" "Validator Manager" old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) new_files=($general $bn $vc $am $vm) +exist=() +update=() +diff=() check() { if [[ -f $1 ]]; # check for existence of file then diff=$(diff $1 $2) + diff+=($diff) + exist+=(false) else cp $2 ./book/src - changes=true + changes=true + exist+=(true) fi if [[ -z $diff ]]; # check for difference then + update+=(false) return 1 # exit a function (i.e., do nothing) else cp $2 ./book/src changes=true + update+=(true) fi } @@ -85,6 +93,11 @@ check ${old_files[4]} ${new_files[4]} # remove help files rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md +# used for debug to show status +echo "exist = ${exist[@]}" +echo "changes = ${changes[@]}" +echo "difference = ${diff[@]}" + # only exit at the very end if [[ $changes == true ]]; then echo "CLI parameters are not up to date. Run \"make cli\" to update, then commit the changes" From 27d1fb034df62a5cd218a4ed197d0c1d85de7b7a Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 22:03:53 +0800 Subject: [PATCH 39/80] revise --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 441523425d..2b7e2a1da1 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -95,7 +95,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md # used for debug to show status echo "exist = ${exist[@]}" -echo "changes = ${changes[@]}" +echo "changes = ${update[@]}" echo "difference = ${diff[@]}" # only exit at the very end From 4e4ec7e71b30c2eca8a535c4a09db384e9b84dfd Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 23:16:57 +0800 Subject: [PATCH 40/80] remove troubleshooting part --- scripts/cli.sh | 66 +++----------------------------------------------- 1 file changed, 4 insertions(+), 62 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 2b7e2a1da1..ad5c9109f7 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -55,9 +55,12 @@ write_to_file "$vm_cli" "$vm" "Validator Manager" old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) new_files=($general $bn $vc $am $vm) +# store for troubleshooting purpose exist=() update=() diff=() + +# function to check check() { if [[ -f $1 ]]; # check for existence of file then @@ -93,7 +96,7 @@ check ${old_files[4]} ${new_files[4]} # remove help files rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md -# used for debug to show status +# used for troubleshooting to show status echo "exist = ${exist[@]}" echo "changes = ${update[@]}" echo "difference = ${diff[@]}" @@ -107,64 +110,3 @@ else exit 0 fi - -: ' -exist=() -changes=() -diff=() -check() { -if [[ -f $1 ]]; # check for existence of file -then - diff=$(diff $1 $2) - diff+=($diff) - exist+=(false) -else - cp $2 ./book/src - exist+=(true) -fi - -if [[ -z $diff ]]; # check for difference -then - changes+=(false) - return 1 # exit a function (i.e., do nothing) -else - cp $2 ./book/src - changes+=(true) -fi -} - -# define changes as false -# changes=false -# call check function to check for each help file -check ${old_files[0]} ${new_files[0]} -check ${old_files[1]} ${new_files[1]} -check ${old_files[2]} ${new_files[2]} -check ${old_files[3]} ${new_files[3]} -check ${old_files[4]} ${new_files[4]} - -# remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md - -echo "exist = ${exist[@]}" -echo "changes = ${changes[@]}" -echo "difference = ${diff[@]}" - - -if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; -then - echo "exit 1 due to one or more .md file does not exist and changes updated." - exit 1 -elif [[ ${exist[@]} == *"true"* ]]; -then - echo "exit 1 due to one or more .md file does not exist" - exit 1 -elif [[ ${changes[@]} == *"true"* ]]; -then - echo "exit 1 due to changes updated" - exit 1 -else - echo "Task completed, no changes in CLI parameters" -fi -' - - From 7cd6a18ae958d6ee04b65ff649b2b72cf6efca2c Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 23:20:02 +0800 Subject: [PATCH 41/80] update --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index ad5c9109f7..dbb66e203b 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -98,7 +98,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md # used for troubleshooting to show status echo "exist = ${exist[@]}" -echo "changes = ${update[@]}" +echo "update = ${update[@]}" echo "difference = ${diff[@]}" # only exit at the very end From c2ed1c4dc36bf4c5bf6132829ca6cd8327946d1e Mon Sep 17 00:00:00 2001 From: chonghe Date: Fri, 15 Sep 2023 23:28:07 +0800 Subject: [PATCH 42/80] add summary.md --- book/src/SUMMARY.md | 6 ++++++ book/src/help-cli.md | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 book/src/help-cli.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 3f58d8aa45..4218a654b0 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -53,6 +53,12 @@ * [MEV](./builders.md) * [Merge Migration](./merge-migration.md) * [Late Block Re-orgs](./late-block-re-orgs.md) +* [CLI Reference](./help-cli.md) + * [General](./help_general.md) + * [Beacon node](./help_bn.md) + * [Validator client](./help_vc.md) + * [Validator manager](./help_vm.md) + * [Account manager](./help_am.md) * [Contributing](./contributing.md) * [Development Environment](./setup.md) * [FAQs](./faq.md) diff --git a/book/src/help-cli.md b/book/src/help-cli.md new file mode 100644 index 0000000000..2219d4c54a --- /dev/null +++ b/book/src/help-cli.md @@ -0,0 +1,3 @@ +# CLI reference + +This section provides lists of CLI reference for general help commands, beacon node, validator client, account manager and validator manager. The CLI reference are generated from the latest Lighthouse unstable branch. From 07ce759bcf6bccd79d97d2c103ff075205a234b1 Mon Sep 17 00:00:00 2001 From: chonghe Date: Sat, 16 Sep 2023 11:03:59 +0800 Subject: [PATCH 43/80] test --- .github/workflows/test-suite.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 1f22d7780b..5a13ce2f68 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -363,7 +363,6 @@ jobs: cli-check: name: cli-check runs-on: ubuntu-latest - needs: cargo-fmt steps: - uses: actions/checkout@v3 - name: Run Makefile to trigger the bash script From 5b57696b1775c4097eaf8b01d09e3640fae2f97f Mon Sep 17 00:00:00 2001 From: chonghe Date: Sat, 16 Sep 2023 11:31:49 +0800 Subject: [PATCH 44/80] test --- .github/workflows/test-suite.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 5a13ce2f68..1f22d7780b 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -363,6 +363,7 @@ jobs: cli-check: name: cli-check runs-on: ubuntu-latest + needs: cargo-fmt steps: - uses: actions/checkout@v3 - name: Run Makefile to trigger the bash script From 081405abd14867d58c8480759210496435cb2fe0 Mon Sep 17 00:00:00 2001 From: chonghe <44791194+chong-he@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:33:49 +0800 Subject: [PATCH 45/80] Update Makefile Co-authored-by: Mac L --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b5b64a91f0..fb3b602911 100644 --- a/Makefile +++ b/Makefile @@ -164,7 +164,7 @@ test-exec-engine: # test vectors. test: test-release -# Run bash script to output cli.txt +# Updates the CLI help text pages in the Lighthouse book. cli: ./scripts/cli.sh # Runs the entire test suite, downloading test vectors if required. From bc19fc32cc19307375859f0c68bb5c670d67b0f6 Mon Sep 17 00:00:00 2001 From: chonghe <44791194+chong-he@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:38:27 +0800 Subject: [PATCH 46/80] Update Makefile Co-authored-by: Mac L --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index fb3b602911..0b6eacf924 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,6 @@ cli: # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine - # Lints the code for bad style and potentially unsafe arithmetic using Clippy. # Clippy lints are opt-in per-crate for now. By default, everything is allowed except for performance and correctness lints. lint: From 3905329ae5346cb31e4a45fc2e610b81f4de60ae Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 18:46:55 +0800 Subject: [PATCH 47/80] Remove help-cli.md and rearrange --- book/src/SUMMARY.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 4218a654b0..c9fcfe2dc7 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -53,8 +53,7 @@ * [MEV](./builders.md) * [Merge Migration](./merge-migration.md) * [Late Block Re-orgs](./late-block-re-orgs.md) -* [CLI Reference](./help-cli.md) - * [General](./help_general.md) +* [CLI Reference](./help-general.md) * [Beacon node](./help_bn.md) * [Validator client](./help_vc.md) * [Validator manager](./help_vm.md) From 89eae2de43b20fe18a3cb51799d745aca9fe6bc5 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 18:47:25 +0800 Subject: [PATCH 48/80] Remove help-cli.md --- book/src/help-cli.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 book/src/help-cli.md diff --git a/book/src/help-cli.md b/book/src/help-cli.md deleted file mode 100644 index 2219d4c54a..0000000000 --- a/book/src/help-cli.md +++ /dev/null @@ -1,3 +0,0 @@ -# CLI reference - -This section provides lists of CLI reference for general help commands, beacon node, validator client, account manager and validator manager. The CLI reference are generated from the latest Lighthouse unstable branch. From 535933ea16e4da1a7830aa74feb17d8d318e8983 Mon Sep 17 00:00:00 2001 From: chonghe <44791194+chong-he@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:52:02 +0800 Subject: [PATCH 49/80] Update scripts/cli.sh Co-authored-by: Mac L --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index dbb66e203b..9efa70f4dd 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # A function to generate formatted .md files write_to_file() { From f34792abb355012a52f9145913e8cf45a0e76d7b Mon Sep 17 00:00:00 2001 From: chonghe <44791194+chong-he@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:52:39 +0800 Subject: [PATCH 50/80] Update scripts/cli.sh Co-authored-by: Mac L --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 9efa70f4dd..8f4e201a03 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -10,7 +10,7 @@ write_to_file() { 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" + printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" } # Check if a lighthouse binary exists in the current branch. From ff229b455faf59fb8f19f6ac81e48816613959fb Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 19:00:28 +0800 Subject: [PATCH 51/80] remove maxperf --- scripts/cli.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 8f4e201a03..118f907297 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -15,13 +15,10 @@ write_to_file() { # Check if a lighthouse binary exists in the current branch. # -f means check if the file exists, to see all options, type "bash test" in a terminal -maxperf=./target/maxperf/lighthouse release=./target/release/lighthouse debug=./target/debug/lighthouse -if [[ -f "$maxperf" ]]; then - CMD="$maxperf" -elif [[ -f "$release" ]]; then +if [[ -f "$release" ]]; then CMD="$release" elif [[ -f "$debug" ]]; then CMD="$debug" From 2c798e277733dd735f76f77293e77b65a39d969c Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 19:04:21 +0800 Subject: [PATCH 52/80] move then to same line as if --- scripts/cli.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 118f907297..3d703ae153 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -59,8 +59,7 @@ diff=() # function to check check() { -if [[ -f $1 ]]; # check for existence of file -then +if [[ -f $1 ]]; then # check for existence of file diff=$(diff $1 $2) diff+=($diff) exist+=(false) @@ -70,8 +69,7 @@ else exist+=(true) fi -if [[ -z $diff ]]; # check for difference -then +if [[ -z $diff ]]; then # check for difference update+=(false) return 1 # exit a function (i.e., do nothing) else From 5e64c26d8c902be3aa9fbf1e0ba1eaa9d260927a Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 20:40:13 +0800 Subject: [PATCH 53/80] Fix indent and echo file not found --- scripts/cli.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 3d703ae153..5dee050235 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -10,7 +10,7 @@ write_to_file() { 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" + printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" } # Check if a lighthouse binary exists in the current branch. @@ -66,7 +66,8 @@ if [[ -f $1 ]]; then # check for existence of file else cp $2 ./book/src changes=true - exist+=(true) + exist+=(true) + echo "$1 is not found, it has just been created" fi if [[ -z $diff ]]; then # check for difference From 57217aa4fa29b60d6fa04086ce8bcfd33a32ab88 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 20:43:55 +0800 Subject: [PATCH 54/80] To be explicit in replacing the old file --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 5dee050235..b7c19d7f47 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -74,7 +74,7 @@ if [[ -z $diff ]]; then # check for difference update+=(false) return 1 # exit a function (i.e., do nothing) else - cp $2 ./book/src + cp $2 $1 changes=true update+=(true) fi From 4ef39b0908abc243bf7dc6f1cbd7af7e17c17011 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 20:49:10 +0800 Subject: [PATCH 55/80] Add logging when there are changes --- scripts/cli.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cli.sh b/scripts/cli.sh index b7c19d7f47..fa01c34e40 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -77,6 +77,7 @@ else cp $2 $1 changes=true update+=(true) + echo "$1 has been updated" fi } From 0688991f8761c0a81a7d4fed956e22d8a0c24ee7 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 22:02:23 +0800 Subject: [PATCH 56/80] Add local variables --- scripts/cli.sh | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index fa01c34e40..b636c3ff2a 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -48,62 +48,49 @@ write_to_file "$vc_cli" "$vc" "Validator Client" write_to_file "$am_cli" "$am" "Account Manager" write_to_file "$vm_cli" "$vm" "Validator Manager" -#input 1 = $1 = old files; input 2 = $2 = new files -old_files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) +#input 1 = $1 = files; input 2 = $2 = new files +files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) new_files=($general $bn $vc $am $vm) -# store for troubleshooting purpose -exist=() -update=() -diff=() - # function to check check() { -if [[ -f $1 ]]; then # check for existence of file - diff=$(diff $1 $2) - diff+=($diff) - exist+=(false) + local file="$1" + local new_file="$2" + +if [[ -f $file ]]; then # check for existence of file + diff=$(diff $file $new_file) else - cp $2 ./book/src + cp $new_file $file changes=true - exist+=(true) - echo "$1 is not found, it has just been created" + echo "$file is not found, it has just been created" fi if [[ -z $diff ]]; then # check for difference - update+=(false) return 1 # exit a function (i.e., do nothing) else - cp $2 $1 + cp $new_file $file changes=true - update+=(true) - echo "$1 has been updated" + echo "$file has been updated" fi } # define changes as false changes=false # call check function to check for each help file -check ${old_files[0]} ${new_files[0]} -check ${old_files[1]} ${new_files[1]} -check ${old_files[2]} ${new_files[2]} -check ${old_files[3]} ${new_files[3]} -check ${old_files[4]} ${new_files[4]} +check ${files[0]} ${new_files[0]} +check ${files[1]} ${new_files[1]} +check ${files[2]} ${new_files[2]} +check ${files[3]} ${new_files[3]} +check ${files[4]} ${new_files[4]} # remove help files rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md -# used for troubleshooting to show status -echo "exist = ${exist[@]}" -echo "update = ${update[@]}" -echo "difference = ${diff[@]}" - # only exit at the very end if [[ $changes == true ]]; then - echo "CLI parameters are not up to date. Run \"make cli\" to update, then commit the changes" + echo "CLI parameters were not up to date. Run \"make cli\" to update, then commit the changes" exit 1 else echo "CLI parameters are up to date." exit 0 fi - From 2a447e2c02f35a17e95e0591975259c21210ee5a Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 22:16:33 +0800 Subject: [PATCH 57/80] spacing --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a40440b3c6..91e3256d15 100644 --- a/Makefile +++ b/Makefile @@ -188,6 +188,7 @@ test: test-release # Updates the CLI help text pages in the Lighthouse book. cli: ./scripts/cli.sh + # Runs the entire test suite, downloading test vectors if required. test-full: cargo-fmt test-release test-debug test-ef test-exec-engine From 07d74c96ba595261e60ccaa6d540efda573dc872 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 22:18:31 +0800 Subject: [PATCH 58/80] remove cargo fmt --- .github/workflows/test-suite.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index c6836f26a5..8d941e31d4 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -390,7 +390,6 @@ jobs: cli-check: name: cli-check runs-on: ubuntu-latest - needs: cargo-fmt steps: - uses: actions/checkout@v3 - name: Run Makefile to trigger the bash script From 09eee77e8611611d201568c7c76687e19075260f Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 3 Oct 2023 23:30:36 +0800 Subject: [PATCH 59/80] update .md files --- book/src/help_bn.md | 14 +++++++------- book/src/help_vc.md | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 152ed4cf45..633e82649a 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -278,28 +278,28 @@ OPTIONS: 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. [default: 127.0.0.1] + 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. [default: 202] + 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. [default: true] + responses will be executed immediately. --http-port - Set the listen TCP port for the RESTful HTTP API server. [default: 5052] + 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. [default: 1] + prevent messages from being dropped. --http-tls-cert The path of the certificate to be used when serving the HTTP API server over TLS. @@ -346,14 +346,14 @@ OPTIONS: 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. [default: 127.0.0.1] + 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. [default: 5054] + 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 diff --git a/book/src/help_vc.md b/book/src/help_vc.md index 794bd0a65d..b6434e8758 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -124,7 +124,7 @@ OPTIONS: 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. [default: 5062] + 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 @@ -149,14 +149,14 @@ OPTIONS: 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. [default: 127.0.0.1] + 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. [default: 5064] + 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 From fb1e1e789081d7ef4ee11fc4415a1e112de77e88 Mon Sep 17 00:00:00 2001 From: chonghe Date: Thu, 5 Oct 2023 21:37:34 +0800 Subject: [PATCH 60/80] Edit exit message to avoid confusion --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index b636c3ff2a..24b6b9da2d 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -88,7 +88,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md # only exit at the very end if [[ $changes == true ]]; then - echo "CLI parameters were not up to date. Run \"make cli\" to update, then commit the changes" + echo "Exiting with error to indicate changes occurred..." exit 1 else echo "CLI parameters are up to date." From 7495a1486162512a36077e2a11d74bd589679853 Mon Sep 17 00:00:00 2001 From: chonghe Date: Thu, 5 Oct 2023 21:58:26 +0800 Subject: [PATCH 61/80] Remove am and add vm subcommands --- book/src/help_vm_create.md | 132 +++++++++++++++++++++ book/src/{help_am.md => help_vm_import.md} | 25 ++-- book/src/{help_vm.md => help_vm_move.md} | 45 ++++--- scripts/cli.sh | 21 ++-- 4 files changed, 193 insertions(+), 30 deletions(-) create mode 100644 book/src/help_vm_create.md rename book/src/{help_am.md => help_vm_import.md} (80%) rename book/src/{help_vm.md => help_vm_move.md} (74%) diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md new file mode 100644 index 0000000000..684a3c04d2 --- /dev/null +++ b/book/src/help_vm_create.md @@ -0,0 +1,132 @@ +# 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 [FLAGS] [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-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. + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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. +``` \ No newline at end of file diff --git a/book/src/help_am.md b/book/src/help_vm_import.md similarity index 80% rename from book/src/help_am.md rename to book/src/help_vm_import.md index 8c1ee4d019..ca619b51a3 100644 --- a/book/src/help_am.md +++ b/book/src/help_vm_import.md @@ -1,10 +1,11 @@ -# Account Manager +# Validator Manager Import ``` -Utilities for generating and managing Ethereum 2.0 accounts. +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 account_manager [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse validator_manager import [FLAGS] [OPTIONS] --validators-file FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. @@ -12,6 +13,12 @@ FLAGS: 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. @@ -85,9 +92,13 @@ OPTIONS: -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. -SUBCOMMANDS: - help Prints this message or the help of the given subcommand(s) - validator Provides commands for managing Eth2 validators. - wallet Manage wallets, from which validator keys can be derived. + --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] ``` \ No newline at end of file diff --git a/book/src/help_vm.md b/book/src/help_vm_move.md similarity index 74% rename from book/src/help_vm.md rename to book/src/help_vm_move.md index be62e3549c..5b9a8e9f6d 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm_move.md @@ -1,10 +1,12 @@ -# Validator Manager +# Validator Manager Move ``` -Utilities for managing a Lighthouse validator client via the HTTP API. +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 [FLAGS] [OPTIONS] [SUBCOMMAND] + 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. @@ -20,9 +22,14 @@ FLAGS: 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-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 @@ -30,6 +37,15 @@ OPTIONS: --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 @@ -67,6 +83,15 @@ OPTIONS: -s, --spec This flag is deprecated, it will be disallowed in a future release. This value is now derived from the --network or --testnet-dir flags. + --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 @@ -85,16 +110,6 @@ OPTIONS: -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). + --validators + The validators to be moved. Either a list of 0x-prefixed validator pubkeys or the keyword "all". ``` \ No newline at end of file diff --git a/scripts/cli.sh b/scripts/cli.sh index 24b6b9da2d..ed6da53430 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -32,25 +32,29 @@ fi general_cli=$($CMD --help) bn_cli=$($CMD bn --help) vc_cli=$($CMD vc --help) -am_cli=$($CMD am --help) -vm_cli=$($CMD vm --help) +vm_cli_create=$($CMD vm create --help) +vm_cli_import=$($CMD vm import --help) +vm_cli_move=$($CMD vm move --help) general=./help_general.md bn=./help_bn.md vc=./help_vc.md am=./help_am.md -vm=./help_vm.md +vm_create=./help_vm_create.md +vm_import=./help_vm_import.md +vm_move=./help_vm_move.md # create .md files write_to_file "$general_cli" "$general" "Lighthouse General Commands" write_to_file "$bn_cli" "$bn" "Beacon Node" write_to_file "$vc_cli" "$vc" "Validator Client" -write_to_file "$am_cli" "$am" "Account Manager" -write_to_file "$vm_cli" "$vm" "Validator Manager" +write_to_file "$vm_cli_create" "$vm_create" "Validator Manager Create" +write_to_file "$vm_cli_import" "$vm_import" "Validator Manager Import" +write_to_file "$vm_cli_move" "$vm_move" "Validator Manager Move" #input 1 = $1 = files; input 2 = $2 = new files -files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_am.md ./book/src/help_vm.md) -new_files=($general $bn $vc $am $vm) +files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_vm_create.md ./book/src/help_vm_import.md ./book/src/help_vm_move.md) +new_files=($general $bn $vc $vm_create $vm_import $vm_move) # function to check check() { @@ -82,9 +86,10 @@ check ${files[1]} ${new_files[1]} check ${files[2]} ${new_files[2]} check ${files[3]} ${new_files[3]} check ${files[4]} ${new_files[4]} +check ${files[5]} ${new_files[5]} # remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md +rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm_create.md help_vm_import.md help_mv_move.md # only exit at the very end if [[ $changes == true ]]; then From 39bd86ae5ddf08cffe4eb61f97fec7cd9fddedec Mon Sep 17 00:00:00 2001 From: chonghe Date: Thu, 5 Oct 2023 22:30:46 +0800 Subject: [PATCH 62/80] Add cargo-fmt --- .github/workflows/test-suite.yml | 1 + book/src/SUMMARY.md | 2 +- scripts/cli.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 8d941e31d4..c6836f26a5 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -390,6 +390,7 @@ jobs: cli-check: name: cli-check runs-on: ubuntu-latest + needs: cargo-fmt steps: - uses: actions/checkout@v3 - name: Run Makefile to trigger the bash script diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index c9fcfe2dc7..6d0b691b81 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -53,7 +53,7 @@ * [MEV](./builders.md) * [Merge Migration](./merge-migration.md) * [Late Block Re-orgs](./late-block-re-orgs.md) -* [CLI Reference](./help-general.md) +* [Built-In Documentation](./help-general.md) * [Beacon node](./help_bn.md) * [Validator client](./help_vc.md) * [Validator manager](./help_vm.md) diff --git a/scripts/cli.sh b/scripts/cli.sh index ed6da53430..e9899d0164 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -96,6 +96,6 @@ if [[ $changes == true ]]; then echo "Exiting with error to indicate changes occurred..." exit 1 else - echo "CLI parameters are up to date." + echo "CLI help texts are up to date." exit 0 fi From bf7b9488b6f2416df98b31148d265de51b83e12b Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Thu, 5 Oct 2023 23:20:50 +0800 Subject: [PATCH 63/80] Revise test-suite.yml --- .github/workflows/test-suite.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index c6836f26a5..da3a665a37 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -390,8 +390,12 @@ jobs: cli-check: name: cli-check runs-on: ubuntu-latest - needs: cargo-fmt steps: - uses: actions/checkout@v3 + - name: Get latest version of stable Rust + uses: moonrepo/setup-rust@v1 + with: + channel: stable + cache-target: release - name: Run Makefile to trigger the bash script run: make cli From 37f8a2a80786b3c3e1b0dba04fd78ee68b32000c Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Fri, 6 Oct 2023 13:15:44 +0800 Subject: [PATCH 64/80] Update SUMMARY.md --- book/src/SUMMARY.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 6d0b691b81..86d230b5c4 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -53,11 +53,12 @@ * [MEV](./builders.md) * [Merge Migration](./merge-migration.md) * [Late Block Re-orgs](./late-block-re-orgs.md) -* [Built-In Documentation](./help-general.md) +* [Built-In Documentation](./help_general.md) * [Beacon node](./help_bn.md) * [Validator client](./help_vc.md) - * [Validator manager](./help_vm.md) - * [Account manager](./help_am.md) + * [Validator manager create](./help_vm_create.md) + * [Validator manager import](./help_vm_import.md) + * [Validator manager move](./help_vm_move.md) * [Contributing](./contributing.md) * [Development Environment](./setup.md) * [FAQs](./faq.md) From a0bab5a5ca3191165506c768f1520e2f6c79a5e0 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Mon, 9 Oct 2023 16:46:00 +0800 Subject: [PATCH 65/80] Add set -e --- scripts/cli.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cli.sh b/scripts/cli.sh index e9899d0164..5e6251e10f 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,5 +1,7 @@ #! /usr/bin/env bash +set -e + # A function to generate formatted .md files write_to_file() { local cmd="$1" From 918f7ac72dc10400dc4593c82a23ef506f9b49da Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Mon, 9 Oct 2023 16:50:16 +0800 Subject: [PATCH 66/80] Add vm --- book/src/SUMMARY.md | 7 ++++--- scripts/cli.sh | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 86d230b5c4..4321f6a4a2 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -56,9 +56,10 @@ * [Built-In Documentation](./help_general.md) * [Beacon node](./help_bn.md) * [Validator client](./help_vc.md) - * [Validator manager create](./help_vm_create.md) - * [Validator manager import](./help_vm_import.md) - * [Validator manager move](./help_vm_move.md) + * [Validator Manager](./help_vm.md) + * [Validator Manager Create](./help_vm_create.md) + * [Validator Manager Import](./help_vm_import.md) + * [Validator Manager Move](./help_vm_move.md) * [Contributing](./contributing.md) * [Development Environment](./setup.md) * [FAQs](./faq.md) diff --git a/scripts/cli.sh b/scripts/cli.sh index 5e6251e10f..f4b8191f6f 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -34,6 +34,7 @@ fi general_cli=$($CMD --help) bn_cli=$($CMD bn --help) vc_cli=$($CMD vc --help) +vm_cli=$($CMD vm --help) vm_cli_create=$($CMD vm create --help) vm_cli_import=$($CMD vm import --help) vm_cli_move=$($CMD vm move --help) @@ -42,6 +43,7 @@ general=./help_general.md bn=./help_bn.md vc=./help_vc.md am=./help_am.md +vm=./help_vm.md vm_create=./help_vm_create.md vm_import=./help_vm_import.md vm_move=./help_vm_move.md @@ -50,13 +52,14 @@ vm_move=./help_vm_move.md write_to_file "$general_cli" "$general" "Lighthouse General Commands" write_to_file "$bn_cli" "$bn" "Beacon Node" write_to_file "$vc_cli" "$vc" "Validator Client" +write_to_file "$vm" "vm" "Validator Manager" write_to_file "$vm_cli_create" "$vm_create" "Validator Manager Create" write_to_file "$vm_cli_import" "$vm_import" "Validator Manager Import" write_to_file "$vm_cli_move" "$vm_move" "Validator Manager Move" #input 1 = $1 = files; input 2 = $2 = new files -files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_vm_create.md ./book/src/help_vm_import.md ./book/src/help_vm_move.md) -new_files=($general $bn $vc $vm_create $vm_import $vm_move) +files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_vm.md ./book/src/help_vm_create.md ./book/src/help_vm_import.md ./book/src/help_vm_move.md) +new_files=($general $bn $vc $vm $vm_create $vm_import $vm_move) # function to check check() { @@ -89,9 +92,10 @@ check ${files[2]} ${new_files[2]} check ${files[3]} ${new_files[3]} check ${files[4]} ${new_files[4]} check ${files[5]} ${new_files[5]} +check ${files[6]} ${new_files[6]} # remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm_create.md help_vm_import.md help_mv_move.md +rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md help_vm_create.md help_vm_import.md help_mv_move.md # only exit at the very end if [[ $changes == true ]]; then From 80d423ff230b5657a911567d60f5a6564106930c Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Mon, 9 Oct 2023 16:53:05 +0800 Subject: [PATCH 67/80] Fix --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index f4b8191f6f..5c6c85ad47 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -52,7 +52,7 @@ vm_move=./help_vm_move.md write_to_file "$general_cli" "$general" "Lighthouse General Commands" write_to_file "$bn_cli" "$bn" "Beacon Node" write_to_file "$vc_cli" "$vc" "Validator Client" -write_to_file "$vm" "vm" "Validator Manager" +write_to_file "$vm_cli" "$vm" "Validator Manager" write_to_file "$vm_cli_create" "$vm_create" "Validator Manager Create" write_to_file "$vm_cli_import" "$vm_import" "Validator Manager Import" write_to_file "$vm_cli_move" "$vm_move" "Validator Manager Move" From 7075ddf5e07f96e5294637be7ce71a3246e7ca6d Mon Sep 17 00:00:00 2001 From: chonghe Date: Mon, 9 Oct 2023 16:56:15 +0800 Subject: [PATCH 68/80] Add vm --- book/src/help_vm.md | 100 ++++++++++++++++++++++++++++++++++++++ help_vm_move.md | 115 ++++++++++++++++++++++++++++++++++++++++++++ scripts/cli.sh | 2 +- 3 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 book/src/help_vm.md create mode 100644 help_vm_move.md diff --git a/book/src/help_vm.md b/book/src/help_vm.md new file mode 100644 index 0000000000..be62e3549c --- /dev/null +++ b/book/src/help_vm.md @@ -0,0 +1,100 @@ +# Validator Manager + +``` +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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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). +``` \ No newline at end of file diff --git a/help_vm_move.md b/help_vm_move.md new file mode 100644 index 0000000000..5b9a8e9f6d --- /dev/null +++ b/help_vm_move.md @@ -0,0 +1,115 @@ +# 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-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] + --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. + -s, --spec + This flag is deprecated, it will be disallowed in a future release. This value is now derived from the + --network or --testnet-dir flags. + --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". +``` \ No newline at end of file diff --git a/scripts/cli.sh b/scripts/cli.sh index 5c6c85ad47..b7c2c19309 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -set -e +#set -e # A function to generate formatted .md files write_to_file() { From 53397956af398f6f1aab5e0a8dff15b03ac49010 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Mon, 9 Oct 2023 17:15:03 +0800 Subject: [PATCH 69/80] set -e --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index b7c2c19309..5c6c85ad47 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -#set -e +set -e # A function to generate formatted .md files write_to_file() { From 62738e53416ee813d6c6edeae68478fe5016a0ac Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Mon, 9 Oct 2023 19:31:24 +0800 Subject: [PATCH 70/80] Remove return 1 and add : --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 5c6c85ad47..61a958bb88 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -75,7 +75,7 @@ else fi if [[ -z $diff ]]; then # check for difference - return 1 # exit a function (i.e., do nothing) + : # do nothing else cp $new_file $file changes=true From 8a4bb6f6669474daaa628252bd678e0f0d6281bb Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Tue, 10 Oct 2023 08:18:50 +0800 Subject: [PATCH 71/80] Small revision --- book/src/SUMMARY.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 4321f6a4a2..e323659109 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -54,12 +54,12 @@ * [Merge Migration](./merge-migration.md) * [Late Block Re-orgs](./late-block-re-orgs.md) * [Built-In Documentation](./help_general.md) - * [Beacon node](./help_bn.md) - * [Validator client](./help_vc.md) + * [Beacon Node](./help_bn.md) + * [Validator Client](./help_vc.md) * [Validator Manager](./help_vm.md) - * [Validator Manager Create](./help_vm_create.md) - * [Validator Manager Import](./help_vm_import.md) - * [Validator Manager Move](./help_vm_move.md) + * [Create](./help_vm_create.md) + * [Import](./help_vm_import.md) + * [Move](./help_vm_move.md) * [Contributing](./contributing.md) * [Development Environment](./setup.md) * [FAQs](./faq.md) From c7ef2fc1497c75210be5850cf6ce8dc63a568a90 Mon Sep 17 00:00:00 2001 From: chonghe Date: Tue, 10 Oct 2023 08:51:41 +0800 Subject: [PATCH 72/80] Fix typo --- help_vm_move.md | 115 ------------------------------------------------ scripts/cli.sh | 2 +- 2 files changed, 1 insertion(+), 116 deletions(-) delete mode 100644 help_vm_move.md diff --git a/help_vm_move.md b/help_vm_move.md deleted file mode 100644 index 5b9a8e9f6d..0000000000 --- a/help_vm_move.md +++ /dev/null @@ -1,115 +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 [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-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] - --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. - -s, --spec - This flag is deprecated, it will be disallowed in a future release. This value is now derived from the - --network or --testnet-dir flags. - --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". -``` \ No newline at end of file diff --git a/scripts/cli.sh b/scripts/cli.sh index 61a958bb88..03dbb9285c 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -95,7 +95,7 @@ check ${files[5]} ${new_files[5]} check ${files[6]} ${new_files[6]} # remove help files -rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md help_vm_create.md help_vm_import.md help_mv_move.md +rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md help_vm_create.md help_vm_import.md help_vm_move.md # only exit at the very end if [[ $changes == true ]]; then From 2508e34236ccef7ef3e915c38a6b6049570e9036 Mon Sep 17 00:00:00 2001 From: chonghe <44791194+chong-he@users.noreply.github.com> Date: Tue, 10 Oct 2023 20:57:01 +0800 Subject: [PATCH 73/80] Update scripts/cli.sh Co-authored-by: Mac L --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 03dbb9285c..3e342cb95b 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -67,7 +67,7 @@ check() { local new_file="$2" if [[ -f $file ]]; then # check for existence of file - diff=$(diff $file $new_file) + diff=$(diff $file $new_file || :) else cp $new_file $file changes=true From 13f3bb8bf5f9f7c64da8f1c9d1d532378c7c87ac Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Tue, 10 Oct 2023 20:59:32 +0800 Subject: [PATCH 74/80] Indent --- scripts/cli.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index 3e342cb95b..55b56bde5d 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -66,21 +66,21 @@ check() { local file="$1" local new_file="$2" -if [[ -f $file ]]; then # check for existence of file - diff=$(diff $file $new_file || :) -else - cp $new_file $file - changes=true - echo "$file is not found, it has just been created" -fi + if [[ -f $file ]]; then # check for existence of file + diff=$(diff $file $new_file || :) + else + cp $new_file $file + changes=true + echo "$file is not found, it has just been created" + fi -if [[ -z $diff ]]; then # check for difference - : # do nothing -else - cp $new_file $file - changes=true - echo "$file has been updated" -fi + if [[ -z $diff ]]; then # check for difference + : # do nothing + else + cp $new_file $file + changes=true + echo "$file has been updated" + fi } # define changes as false From da980383ff46d155a9f5b0adcd315bb4e68b5efa Mon Sep 17 00:00:00 2001 From: chonghe <44791194+chong-he@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:28:56 +0800 Subject: [PATCH 75/80] Update scripts/cli.sh Co-authored-by: Mac L --- scripts/cli.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/cli.sh b/scripts/cli.sh index 55b56bde5d..810fb37e54 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -1,5 +1,9 @@ #! /usr/bin/env bash +# IMPORTANT +# This script should NOT be run directly. +# Run `make cli` from the root of the repository instead. + set -e # A function to generate formatted .md files From 387777dd5f7af340e4b08dce8a220a56eb650220 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 18 Oct 2023 19:42:11 +0800 Subject: [PATCH 76/80] Remove .exe in Windows --- 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 | 3 +-- book/src/help_vm_import.md | 2 +- book/src/help_vm_move.md | 3 +-- scripts/cli.sh | 3 +++ 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index 633e82649a..a6a4b7f4be 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -6,7 +6,7 @@ The primary component which connects to the Ethereum 2.0 P2P network and downloa a HTTP API for querying the beacon chain and publishing messages to the network. USAGE: - lighthouse beacon_node [FLAGS] [OPTIONS] + lighthouse.exe beacon_node [FLAGS] [OPTIONS] FLAGS: --always-prefer-builder-payload If set, the beacon node always uses the payload from the builder instead diff --git a/book/src/help_general.md b/book/src/help_general.md index b337c30d72..4906ea82f2 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -6,7 +6,7 @@ Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a vali validator accounts. USAGE: - lighthouse [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse.exe [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vc.md b/book/src/help_vc.md index b6434e8758..f9dfd74e0a 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -4,7 +4,7 @@ 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] + lighthouse.exe validator_client [FLAGS] [OPTIONS] FLAGS: --allow-unsynced DEPRECATED: this flag does nothing diff --git a/book/src/help_vm.md b/book/src/help_vm.md index be62e3549c..905df1857c 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -4,7 +4,7 @@ Utilities for managing a Lighthouse validator client via the HTTP API. USAGE: - lighthouse validator_manager [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse.exe validator_manager [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 684a3c04d2..1fb2756f7e 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -7,7 +7,7 @@ Another, optional JSON file is created which contains a list of validator deposi "ethereum/staking-deposit-cli" tool. USAGE: - lighthouse validator_manager create [FLAGS] [OPTIONS] --output-path + lighthouse.exe validator_manager create [FLAGS] [OPTIONS] --output-path FLAGS: --disable-deposits When provided don't generate the deposits JSON file that is commonly used @@ -34,7 +34,6 @@ FLAGS: 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: diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index ca619b51a3..9acd9969df 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -5,7 +5,7 @@ Uploads validators to a validator client using the HTTP API. The validators are generated using the "create-validators" command. USAGE: - lighthouse validator_manager import [FLAGS] [OPTIONS] --validators-file + lighthouse.exe validator_manager import [FLAGS] [OPTIONS] --validators-file FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 5b9a8e9f6d..1120ac4fb5 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -6,7 +6,7 @@ generated using the "create-validators" command. This command only supports vali 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 + lighthouse.exe 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. @@ -22,7 +22,6 @@ FLAGS: 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: diff --git a/scripts/cli.sh b/scripts/cli.sh index 810fb37e54..e2bd12ba8e 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -17,6 +17,9 @@ write_to_file() { # We need to add the header and the backticks to create the code block. printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" + + # remove .exe when using Windows + sed -i -e 's/".exe"//g' "$file" } # Check if a lighthouse binary exists in the current branch. From c3d84db69268816fd3d93489510b0ea5594b21e2 Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 18 Oct 2023 19:45:12 +0800 Subject: [PATCH 77/80] Fix period with \. --- 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 +- scripts/cli.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/book/src/help_bn.md b/book/src/help_bn.md index a6a4b7f4be..633e82649a 100644 --- a/book/src/help_bn.md +++ b/book/src/help_bn.md @@ -6,7 +6,7 @@ The primary component which connects to the Ethereum 2.0 P2P network and downloa a HTTP API for querying the beacon chain and publishing messages to the network. USAGE: - lighthouse.exe beacon_node [FLAGS] [OPTIONS] + lighthouse beacon_node [FLAGS] [OPTIONS] FLAGS: --always-prefer-builder-payload If set, the beacon node always uses the payload from the builder instead diff --git a/book/src/help_general.md b/book/src/help_general.md index 4906ea82f2..b337c30d72 100644 --- a/book/src/help_general.md +++ b/book/src/help_general.md @@ -6,7 +6,7 @@ Ethereum 2.0 client by Sigma Prime. Provides a full-featured beacon node, a vali validator accounts. USAGE: - lighthouse.exe [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vc.md b/book/src/help_vc.md index f9dfd74e0a..b6434e8758 100644 --- a/book/src/help_vc.md +++ b/book/src/help_vc.md @@ -4,7 +4,7 @@ When connected to a beacon node, performs the duties of a staked validator (e.g., proposing blocks and attestations). USAGE: - lighthouse.exe validator_client [FLAGS] [OPTIONS] + lighthouse validator_client [FLAGS] [OPTIONS] FLAGS: --allow-unsynced DEPRECATED: this flag does nothing diff --git a/book/src/help_vm.md b/book/src/help_vm.md index 905df1857c..be62e3549c 100644 --- a/book/src/help_vm.md +++ b/book/src/help_vm.md @@ -4,7 +4,7 @@ Utilities for managing a Lighthouse validator client via the HTTP API. USAGE: - lighthouse.exe validator_manager [FLAGS] [OPTIONS] [SUBCOMMAND] + lighthouse validator_manager [FLAGS] [OPTIONS] [SUBCOMMAND] FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 1fb2756f7e..0d33371150 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -7,7 +7,7 @@ Another, optional JSON file is created which contains a list of validator deposi "ethereum/staking-deposit-cli" tool. USAGE: - lighthouse.exe validator_manager create [FLAGS] [OPTIONS] --output-path + lighthouse validator_manager create [FLAGS] [OPTIONS] --output-path FLAGS: --disable-deposits When provided don't generate the deposits JSON file that is commonly used diff --git a/book/src/help_vm_import.md b/book/src/help_vm_import.md index 9acd9969df..ca619b51a3 100644 --- a/book/src/help_vm_import.md +++ b/book/src/help_vm_import.md @@ -5,7 +5,7 @@ Uploads validators to a validator client using the HTTP API. The validators are generated using the "create-validators" command. USAGE: - lighthouse.exe validator_manager import [FLAGS] [OPTIONS] --validators-file + lighthouse validator_manager import [FLAGS] [OPTIONS] --validators-file FLAGS: --disable-log-timestamp If present, do not include timestamps in logging output. diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 1120ac4fb5..2670353cd7 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -6,7 +6,7 @@ generated using the "create-validators" command. This command only supports vali local file system (i.e., not Web3Signer validators). USAGE: - lighthouse.exe validator_manager move [FLAGS] [OPTIONS] --dest-vc-token --dest-vc-url --src-vc-token --src-vc-url + 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. diff --git a/scripts/cli.sh b/scripts/cli.sh index e2bd12ba8e..b58746de09 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -19,7 +19,7 @@ write_to_file() { printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" # remove .exe when using Windows - sed -i -e 's/".exe"//g' "$file" + sed -i -e 's/\.exe//g' "$file" } # Check if a lighthouse binary exists in the current branch. From 91116154c7a332cdf662b2a2d63f9b988d6522cc Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 18 Oct 2023 20:01:53 +0800 Subject: [PATCH 78/80] test --- scripts/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index b58746de09..bfb91ee047 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -19,7 +19,7 @@ write_to_file() { printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" # remove .exe when using Windows - sed -i -e 's/\.exe//g' "$file" + sed -i -e 's/\.exe//g' "$file" } # Check if a lighthouse binary exists in the current branch. From ba9fb7219c2e5a7872ca1b3f2bf6105df91741de Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Wed, 18 Oct 2023 20:35:49 +0800 Subject: [PATCH 79/80] check diff --- scripts/cli.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cli.sh b/scripts/cli.sh index bfb91ee047..a6456e7a3b 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -19,7 +19,7 @@ write_to_file() { printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" # remove .exe when using Windows - sed -i -e 's/\.exe//g' "$file" + sed -i -e 's/\.exe//g' "$file" } # Check if a lighthouse binary exists in the current branch. @@ -68,6 +68,7 @@ write_to_file "$vm_cli_move" "$vm_move" "Validator Manager Move" files=(./book/src/help_general.md ./book/src/help_bn.md ./book/src/help_vc.md ./book/src/help_vm.md ./book/src/help_vm_create.md ./book/src/help_vm_import.md ./book/src/help_vm_move.md) new_files=($general $bn $vc $vm $vm_create $vm_import $vm_move) +diff=() # function to check check() { local file="$1" @@ -75,6 +76,7 @@ check() { if [[ -f $file ]]; then # check for existence of file diff=$(diff $file $new_file || :) + diff+=($diff) else cp $new_file $file changes=true @@ -103,7 +105,7 @@ check ${files[6]} ${new_files[6]} # remove help files rm -f help_general.md help_bn.md help_vc.md help_am.md help_vm.md help_vm_create.md help_vm_import.md help_vm_move.md - +echo "difference = ${diff[@]}" # only exit at the very end if [[ $changes == true ]]; then echo "Exiting with error to indicate changes occurred..." From 8527df3a604d94d28cfe6e507216fc922983478d Mon Sep 17 00:00:00 2001 From: chonghe Date: Wed, 18 Oct 2023 21:02:20 +0800 Subject: [PATCH 80/80] linux commit --- book/src/help_vm_create.md | 1 + book/src/help_vm_move.md | 1 + scripts/cli.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/book/src/help_vm_create.md b/book/src/help_vm_create.md index 0d33371150..684a3c04d2 100644 --- a/book/src/help_vm_create.md +++ b/book/src/help_vm_create.md @@ -34,6 +34,7 @@ FLAGS: 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: diff --git a/book/src/help_vm_move.md b/book/src/help_vm_move.md index 2670353cd7..5b9a8e9f6d 100644 --- a/book/src/help_vm_move.md +++ b/book/src/help_vm_move.md @@ -22,6 +22,7 @@ FLAGS: 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: diff --git a/scripts/cli.sh b/scripts/cli.sh index a6456e7a3b..b37f25392d 100755 --- a/scripts/cli.sh +++ b/scripts/cli.sh @@ -19,7 +19,7 @@ write_to_file() { printf "# %s\n\n\`\`\`\n%s\n\`\`\`" "$program" "$cmd" > "$file" # remove .exe when using Windows - sed -i -e 's/\.exe//g' "$file" + #sed -i -e 's/\.exe//g' "$file" } # Check if a lighthouse binary exists in the current branch.