diff --git a/book/SUMMARY.md b/book/SUMMARY.md index c75636428d65..d207b9a817ac 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -35,5 +35,6 @@ 1. [reth test-vectors](./cli/test-vectors.md) 1. [reth config](./cli/config.md) 1. [reth debug](./cli/debug.md) + 1. [reth recover](./cli/recover.md) 1. [Developers](./developers/developers.md) 1. [Contribute](./developers/contribute.md) diff --git a/book/cli/cli.md b/book/cli/cli.md index 22bd8e3096e5..72db4543863b 100644 --- a/book/cli/cli.md +++ b/book/cli/cli.md @@ -30,28 +30,42 @@ Reth Usage: reth [OPTIONS] Commands: - node - Start the node - init - Initialize the database from a genesis file - import - This syncs RLP encoded blocks from a file - db - Database debugging utilities - stage - Manipulate individual stages - p2p - P2P Debugging utilities - test-vectors - Generate Test Vectors - config - Write config to stdout - debug - Various debug routines - help - Print this message or the help of the given subcommand(s) + node Start the node + init Initialize the database from a genesis file + import This syncs RLP encoded blocks from a file + db Database debugging utilities + stage Manipulate individual stages + p2p P2P Debugging utilities + test-vectors Generate Test Vectors + config Write config to stdout + debug Various debug routines + recover Scripts for node recovery + help Print this message or the help of the given subcommand(s) Options: + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] + + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') @@ -59,14 +73,21 @@ Options: Print version Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -75,6 +96,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. diff --git a/book/cli/config.json b/book/cli/config.json index 355e5c37dae6..406575eebea4 100644 --- a/book/cli/config.json +++ b/book/cli/config.json @@ -4,14 +4,17 @@ "db": { "stats": [], "list": [], + "diff": [], "get": [], "drop": [], + "clear": [], "version": [], "path": [] }, "debug": { "execution": [], - "merkle": [] + "merkle": [], + "in-memory-merkle": [] }, "import": [], "init": [], @@ -20,6 +23,9 @@ "header": [], "body": [] }, + "recover": { + "storage-tries": [] + }, "stage": { "run": [], "drop": [], diff --git a/book/cli/config.md b/book/cli/config.md index 9f0d2f6578bc..e9610f7b0411 100644 --- a/book/cli/config.md +++ b/book/cli/config.md @@ -14,18 +14,48 @@ Options: --default Show the default config + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] + + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -34,6 +64,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. diff --git a/book/cli/db.md b/book/cli/db.md index 5772fe612cf1..5b4de6a57d0b 100644 --- a/book/cli/db.md +++ b/book/cli/db.md @@ -8,22 +8,15 @@ $ reth db --help Usage: reth db [OPTIONS] Commands: - stats - Lists all the tables, their entry count and their size - list - Lists the contents of a table - get - Gets the content of a table for the given key - drop - Deletes all database entries - clear - Deletes all table entries - version - Lists current and local database versions - path - Returns the full database path - help - Print this message or the help of the given subcommand(s) + stats Lists all the tables, their entry count and their size + list Lists the contents of a table + diff Create a diff between two database tables or two entire databases + get Gets the content of a table for the given key + drop Deletes all database entries + clear Deletes all table entries + version Lists current and local database versions + path Returns the full database path + help Print this message or the help of the given subcommand(s) Options: --datadir @@ -49,6 +42,17 @@ Options: [default: mainnet] + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') @@ -67,80 +71,20 @@ Database: - extra: Enables logging for extra debug-level messages Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output -``` - -## `reth db stats` - -Lists all the tables, their entry count and their size - -```bash -$ reth db stats --help - -Usage: reth db stats [OPTIONS] - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia + --log.max-size + The maximum size (in MB) of log files - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') + [default: 200] -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled - [default: /reth/logs] + [default: 5] --log.journald Log events to journald @@ -150,6 +94,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. @@ -164,167 +118,32 @@ Display: Silence all log output ``` -## `reth db list` +## `reth db clear` -Lists the contents of a table +Deletes all table entries ```bash -$ reth db list --help +$ reth db clear --help -Usage: reth db list [OPTIONS] +Usage: reth db clear [OPTIONS]
Arguments:
- The table name - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - -s, --skip - Skip first N entries - - [default: 0] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -r, --reverse - Reverse the order of the entries. If enabled last table entries are read - - -l, --len - How many items to take from the walker - - [default: 5] - - -j, --json - Dump as JSON instead of using TUI - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output + Table name ``` -## `reth db get` +## `reth db diff` -Gets the content of a table for the given key +Create a diff between two database tables or two entire databases ```bash -$ reth db get --help +$ reth db diff --help -Usage: reth db get [OPTIONS]
- -Arguments: -
- The table name - - NOTE: The dupsort tables are not supported now. - - - The key to get content for +Usage: reth db diff [OPTIONS] --secondary-datadir --output Options: - --datadir + --secondary-datadir The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ## `reth db drop` @@ -337,199 +156,66 @@ $ reth db drop --help Usage: reth db drop [OPTIONS] Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output + -f, --force + Bypasses the interactive confirmation and drops the database directly ``` -## `reth db clear` +## `reth db get` -Deletes all table entries +Gets the content of a table for the given key ```bash -$ reth db clear --help +$ reth db get --help -Usage: reth db clear [OPTIONS]
+Usage: reth db get [OPTIONS]
Arguments:
- Table name - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. + The table name - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) + NOTE: The dupsort tables are not supported now. - -q, --quiet - Silence all log output + + The key to get content for ``` -## `reth db version` +## `reth db list` -Lists current and local database versions +Lists the contents of a table ```bash -$ reth db version --help +$ reth db list --help -Usage: reth db version [OPTIONS] +Usage: reth db list [OPTIONS]
-Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] +Arguments: +
+ The table name - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia +Options: + -s, --skip + Skip first N entries - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') + [default: 0] -Logging: - --log.persistent - The flag to enable persistent logs + -r, --reverse + Reverse the order of the entries. If enabled last table entries are read - --log.directory - The path to put log files in + -l, --len + How many items to take from the walker - [default: /reth/logs] - - --log.journald - Log events to journald + [default: 5] - --log.filter - The filter to use for logs written to the log file + --search + Search parameter for both keys and values. Prefix it with `0x` to search for binary data, and text otherwise. - [default: error] + ATTENTION! For compressed tables (`Transactions` and `Receipts`), there might be missing results since the search uses the raw uncompressed value from the database. -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) + -c, --count + Returns the number of rows found - -q, --quiet - Silence all log output + -j, --json + Dump as JSON instead of using TUI ``` ## `reth db path` @@ -540,61 +226,24 @@ Returns the full database path $ reth db path --help Usage: reth db path [OPTIONS] +``` -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] +## `reth db stats` - -h, --help - Print help (see a summary with '-h') +Lists all the tables, their entry count and their size -Logging: - --log.persistent - The flag to enable persistent logs +```bash +$ reth db stats --help - --log.directory - The path to put log files in - - [default: /reth/logs] +Usage: reth db stats [OPTIONS] +``` - --log.journald - Log events to journald +## `reth db version` - --log.filter - The filter to use for logs written to the log file - - [default: error] +Lists current and local database versions -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) +```bash +$ reth db version --help - -q, --quiet - Silence all log output +Usage: reth db version [OPTIONS] ``` diff --git a/book/cli/debug.md b/book/cli/debug.md index 5139c860e748..3824bcea77d7 100644 --- a/book/cli/debug.md +++ b/book/cli/debug.md @@ -8,56 +8,10 @@ $ reth debug --help Usage: reth debug [OPTIONS] Commands: - execution - Debug the roundtrip execution of blocks as well as the generated data - merkle - Debug the clean & incremental state root calculations - help - Print this message or the help of the given subcommand(s) - -Options: - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output -``` - -## `reth debug execution` - -Debug the roundtrip execution of blocks as well as the generated data - -```bash -$ reth debug execution --help - -Usage: reth debug execution [OPTIONS] --to + execution Debug the roundtrip execution of blocks as well as the generated data + merkle Debug the clean & incremental state root calculations + in-memory-merkle Debug in-memory state root calculation + help Print this message or the help of the given subcommand(s) Options: --datadir @@ -83,95 +37,36 @@ Options: [default: mainnet] - -h, --help - Print help (see a summary with '-h') - -Networking: - -d, --disable-discovery - Disable the discovery service - - --disable-dns-discovery - Disable the DNS discovery - - --disable-discv4-discovery - Disable Discv4 discovery - - --discovery.port - The UDP port to use for P2P discovery/networking. default: 30303 - - --trusted-peers - Target trusted peer enodes --trusted-peers enode://abcd@192.168.0.1:30303 - - --trusted-only - Connect only to trusted peers - - --bootnodes - Bootnodes to connect to initially. - - Will fall back to a network-specific default if not specified. - - --peers-file - The path to the known peers file. Connected peers are dumped to this file on nodes - shutdown, and read on startup. Cannot be used with `--no-persist-peers`. - - --identity - Custom node identity + --instance + Add a new instance of a node. - [default: reth/v0.1.0-alpha.1/aarch64-apple-darwin] - - --p2p-secret-key - Secret key to use for this node. + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. - This will also deterministically set the peer ID. If not specified, it will be set in the data dir for the chain being used. - - --no-persist-peers - Do not persist peers. - - --nat - NAT resolution method (any|none|upnp|publicip|extip:) + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. - [default: any] - - --port - Network listening port. default: 30303 - -Database: - --db.log-level - Database logging level. Levels higher than "notice" require a debug build - - Possible values: - - fatal: Enables logging for critical conditions, i.e. assertion failures - - error: Enables logging for error conditions - - warn: Enables logging for warning conditions - - notice: Enables logging for normal but significant condition - - verbose: Enables logging for verbose informational - - debug: Enables logging for debug-level messages - - trace: Enables logging for trace debug-level messages - - extra: Enables logging for extra debug-level messages - - --to - The maximum block height - - --interval - The block interval for sync and unwind. Defaults to `1000` + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 - [default: 1000] + [default: 1] -Debug: - --debug.tip - Set the chain tip manually for testing purposes. - - NOTE: This is a temporary flag + -h, --help + Print help (see a summary with '-h') Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -180,6 +75,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. @@ -194,89 +99,32 @@ Display: Silence all log output ``` -## `reth debug merkle` +## `reth debug execution` -Debug the clean & incremental state root calculations +Debug the roundtrip execution of blocks as well as the generated data ```bash -$ reth debug merkle --help - -Usage: reth debug merkle [OPTIONS] --to - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Database: - --db.log-level - Database logging level. Levels higher than "notice" require a debug build +$ reth debug execution --help - Possible values: - - fatal: Enables logging for critical conditions, i.e. assertion failures - - error: Enables logging for error conditions - - warn: Enables logging for warning conditions - - notice: Enables logging for normal but significant condition - - verbose: Enables logging for verbose informational - - debug: Enables logging for debug-level messages - - trace: Enables logging for trace debug-level messages - - extra: Enables logging for extra debug-level messages +Usage: reth debug execution [OPTIONS] --to +``` - --to - The height to finish at +## `reth debug merkle` - --skip-node-depth - The depth after which we should start comparing branch nodes +Debug the clean & incremental state root calculations -Logging: - --log.persistent - The flag to enable persistent logs +```bash +$ reth debug merkle --help - --log.directory - The path to put log files in - - [default: /reth/logs] +Usage: reth debug merkle [OPTIONS] --to +``` - --log.journald - Log events to journald +## `reth debug in-memory-merkle` - --log.filter - The filter to use for logs written to the log file - - [default: error] +Debug in-memory state root calculation -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) +```bash +$ reth debug in-memory-merkle --help - -q, --quiet - Silence all log output -``` +Usage: reth debug in-memory-merkle [OPTIONS] +``` \ No newline at end of file diff --git a/book/cli/import.md b/book/cli/import.md index 7bc08d6437a0..d295e42f8596 100644 --- a/book/cli/import.md +++ b/book/cli/import.md @@ -34,6 +34,17 @@ Options: [default: mainnet] + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') @@ -58,14 +69,21 @@ Database: remaining stages are executed. Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -74,6 +92,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. diff --git a/book/cli/init.md b/book/cli/init.md index a144b0085298..1c6d962a754c 100644 --- a/book/cli/init.md +++ b/book/cli/init.md @@ -31,6 +31,17 @@ Options: [default: mainnet] + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') @@ -49,14 +60,21 @@ Database: - extra: Enables logging for extra debug-level messages Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -65,6 +83,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. diff --git a/book/cli/node.md b/book/cli/node.md index c97a9e34a8f4..1ddc6b2ab06a 100644 --- a/book/cli/node.md +++ b/book/cli/node.md @@ -31,9 +31,24 @@ Options: - mainnet - goerli - sepolia + - dev [default: mainnet] + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + + --trusted-setup-file + Overrides the KZG trusted setup by reading from the supplied file + -h, --help Print help (see a summary with '-h') @@ -57,7 +72,7 @@ Networking: The UDP port to use for P2P discovery/networking. default: 30303 --trusted-peers - Target trusted peer enodes --trusted-peers enode://abcd@192.168.0.1:30303,enode://cdef@192.168.0.2:30303 + Target trusted peer enodes --trusted-peers enode://abcd@192.168.0.1:30303 --trusted-only Connect only to trusted peers @@ -74,7 +89,7 @@ Networking: --identity Custom node identity - [default: reth/v0.1.0-alpha.1/aarch64-apple-darwin] + [default: reth/v0.1.0-alpha.8-6016da7a1/aarch64-apple-darwin] --p2p-secret-key Secret key to use for this node. @@ -92,20 +107,30 @@ Networking: --port Network listening port. default: 30303 + --max-outbound-peers + Maximum number of outbound requests. default: 100 + + --max-inbound-peers + Maximum number of inbound requests. default: 30 + RPC: --http Enable the HTTP-RPC server --http.addr Http server address to listen on + + [default: 127.0.0.1] --http.port Http server port to listen on + + [default: 8545] --http.api Rpc Modules to be configured for the HTTP server - [possible values: admin, debug, eth, net, trace, txpool, web3, rpc] + [possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots] --http.corsdomain Http Corsdomain to allow request from @@ -115,9 +140,13 @@ RPC: --ws.addr Ws server address to listen on + + [default: 127.0.0.1] --ws.port Ws server port to listen on + + [default: 8546] --ws.origins Origins from which to accept WebSocket requests @@ -125,19 +154,25 @@ RPC: --ws.api Rpc Modules to be configured for the WS server - [possible values: admin, debug, eth, net, trace, txpool, web3, rpc] + [possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots] --ipcdisable Disable the IPC-RPC server --ipcpath Filename for IPC socket/pipe within the datadir + + [default: /tmp/reth.ipc] --authrpc.addr Auth server address to listen on + + [default: 127.0.0.1] --authrpc.port Auth server port to listen on + + [default: 8551] --authrpc.jwtsecret Path to a JWT secret to use for authenticated RPC endpoints @@ -150,10 +185,11 @@ RPC: --rpc-max-response-size Set the maximum RPC response payload size for both HTTP and WS in megabytes - [default: 100] + [default: 115] + [aliases: --rpc.returndata.limit] --rpc-max-subscriptions-per-connection - Set the maximum concurrent subscriptions per connection + Set the the maximum concurrent subscriptions per connection [default: 1024] @@ -167,6 +203,16 @@ RPC: [default: 25] + --rpc-max-logs-per-response + Maximum number of logs that can be returned in a single response + + [default: 20000] + + --rpc-gas-cap + Maximum gas limit for `eth_call` and call tracing RPC methods + + [default: 50000000] + Gas Price Oracle: --gpo.blocks Number of recent blocks to check for gas price @@ -187,9 +233,6 @@ Gas Price Oracle: The percentile of gas prices to use for the estimate [default: 60] - - --rpc.gascap - Maximum gas limit for `eth_call` and call tracing RPC methods --block-cache-len Maximum number of block cache entries @@ -242,11 +285,21 @@ TxPool: [default: 16] + --txpool.pricebump + Price bump (in %) for the transaction pool underpriced check + + [default: 10] + + --blobpool.pricebump + Price bump percentage to replace an already existing blob transaction + + [default: 100] + Builder: --builder.extradata Block extra data set by the payload builder - [default: reth/v0.1.0-alpha.1/macos] + [default: reth/v0.1.0-alpha.8/macos] --builder.gaslimit Target gas ceiling for built blocks @@ -311,13 +364,10 @@ Database: - trace: Enables logging for trace debug-level messages - extra: Enables logging for extra debug-level messages - --auto-mine - Automatically mine blocks for new transactions - Dev testnet: --dev Start the node in dev mode - + This mode uses a local proof-of-authority consensus engine with either fixed block times or automatically mined blocks. Disables network discovery and enables local http server. @@ -331,21 +381,28 @@ Dev testnet: Interval between blocks. Parses strings using [humantime::parse_duration] - --dev.block-time 12s - + --dev.block_time 12s + Pruning: --full Run full node. Only the most recent 128 block states are stored. This flag takes priority over pruning configuration in reth.toml Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -354,6 +411,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. diff --git a/book/cli/p2p.md b/book/cli/p2p.md index 3c9536ef51cf..fc833042285c 100644 --- a/book/cli/p2p.md +++ b/book/cli/p2p.md @@ -8,12 +8,9 @@ $ reth p2p --help Usage: reth p2p [OPTIONS] Commands: - header - Download block header - body - Download block body - help - Print this message or the help of the given subcommand(s) + header Download block header + body Download block body + help Print this message or the help of the given subcommand(s) Options: --config @@ -70,6 +67,17 @@ Options: [default: 5] + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + --nat [default: any] @@ -91,14 +99,21 @@ Database: - extra: Enables logging for extra debug-level messages Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -107,6 +122,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. @@ -133,40 +158,6 @@ Usage: reth p2p body [OPTIONS] Arguments: The block number or hash - -Options: - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ## `reth p2p header` @@ -181,38 +172,4 @@ Usage: reth p2p header [OPTIONS] Arguments: The header number or hash - -Options: - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` diff --git a/book/cli/recover.md b/book/cli/recover.md new file mode 100644 index 000000000000..019b85f428ad --- /dev/null +++ b/book/cli/recover.md @@ -0,0 +1,97 @@ +# `reth recover` + +Scripts for node recovery + +```bash +$ reth recover --help + +Usage: reth recover [OPTIONS] + +Commands: + storage-tries Recover the node by deleting dangling storage tries + help Print this message or the help of the given subcommand(s) + +Options: + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] + + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + + -h, --help + Print help (see a summary with '-h') + +Logging: + --log.directory + The path to put log files in + + [default: /reth/logs] + + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + + --log.journald + Log events to journald + + --log.filter + The filter to use for logs written to the log file + + [default: error] + + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + +Display: + -v, --verbosity... + Set the minimum log level. + + -v Errors + -vv Warnings + -vvv Info + -vvvv Debug + -vvvvv Traces (warning: very verbose!) + + -q, --quiet + Silence all log output +``` + +## `reth recover storage-tries` + +Recover the node by deleting dangling storage tries + +```bash +$ reth recover storage-tries --help + +Usage: reth recover storage-tries [OPTIONS] +``` diff --git a/book/cli/stage.md b/book/cli/stage.md index ea2981490e82..665eec059369 100644 --- a/book/cli/stage.md +++ b/book/cli/stage.md @@ -8,73 +8,13 @@ $ reth stage --help Usage: reth stage [OPTIONS] Commands: - run - Run a single stage - drop - Drop a stage's tables from the database - dump - Dumps a stage from a range into a new database - unwind - Unwinds a certain block range, deleting it from the database - help - Print this message or the help of the given subcommand(s) + run Run a single stage + drop Drop a stage's tables from the database + dump Dumps a stage from a range into a new database + unwind Unwinds a certain block range, deleting it from the database + help Print this message or the help of the given subcommand(s) Options: - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output -``` - -## `reth stage drop` - -Drop a stage's tables from the database - -```bash -$ reth stage drop --help - -Usage: reth stage drop [OPTIONS] - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - --chain The chain this node is running. @@ -87,35 +27,36 @@ Options: [default: mainnet] + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') -Database: - --db.log-level - Database logging level. Levels higher than "notice" require a debug build - - Possible values: - - fatal: Enables logging for critical conditions, i.e. assertion failures - - error: Enables logging for error conditions - - warn: Enables logging for warning conditions - - notice: Enables logging for normal but significant condition - - verbose: Enables logging for verbose informational - - debug: Enables logging for debug-level messages - - trace: Enables logging for trace debug-level messages - - extra: Enables logging for extra debug-level messages - - - [possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, history, account-history, storage-history, total-difficulty] - Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -124,6 +65,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. @@ -138,6 +89,16 @@ Display: Silence all log output ``` +## `reth stage drop` + +Drop a stage's tables from the database + +```bash +$ reth stage drop --help + +Usage: reth stage drop [OPTIONS] +``` + ## `reth stage dump` Dumps a stage from a range into a new database @@ -148,87 +109,11 @@ $ reth stage dump --help Usage: reth stage dump [OPTIONS] Commands: - execution - Execution stage - storage-hashing - StorageHashing stage - account-hashing - AccountHashing stage - merkle - Merkle stage - help - Print this message or the help of the given subcommand(s) - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Database: - --db.log-level - Database logging level. Levels higher than "notice" require a debug build - - Possible values: - - fatal: Enables logging for critical conditions, i.e. assertion failures - - error: Enables logging for error conditions - - warn: Enables logging for warning conditions - - notice: Enables logging for normal but significant condition - - verbose: Enables logging for verbose informational - - debug: Enables logging for debug-level messages - - trace: Enables logging for trace debug-level messages - - extra: Enables logging for extra debug-level messages - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output + execution Execution stage + storage-hashing StorageHashing stage + account-hashing AccountHashing stage + merkle Merkle stage + help Print this message or the help of the given subcommand(s) ``` ### `reth stage dump execution` @@ -252,39 +137,6 @@ Options: -d, --dry-run If passed, it will dry-run a stage execution from the newly created database right after dumping - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ### `reth stage dump storage-hashing` @@ -308,39 +160,6 @@ Options: -d, --dry-run If passed, it will dry-run a stage execution from the newly created database right after dumping - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ### `reth stage dump account-hashing` @@ -364,39 +183,6 @@ Options: -d, --dry-run If passed, it will dry-run a stage execution from the newly created database right after dumping - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ### `reth stage dump merkle` @@ -420,39 +206,6 @@ Options: -d, --dry-run If passed, it will dry-run a stage execution from the newly created database right after dumping - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ## `reth stage run` @@ -470,35 +223,12 @@ Arguments: The name of the stage to run - [possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, history, account-history, storage-history, total-difficulty] + [possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, account-history, storage-history, total-difficulty] Options: --config The path to the configuration file to use. - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - --metrics Enable Prometheus metrics. @@ -517,196 +247,6 @@ Options: Normally, running the stage requires unwinding for stages that already have been run, in order to not rewrite to the same database slots. You can optionally skip the unwinding phase if you're syncing a block range that has not been synced before. - - -h, --help - Print help (see a summary with '-h') - -Networking: - -d, --disable-discovery - Disable the discovery service - - --disable-dns-discovery - Disable the DNS discovery - - --disable-discv4-discovery - Disable Discv4 discovery - - --discovery.port - The UDP port to use for P2P discovery/networking. default: 30303 - - --trusted-peers - Target trusted peer enodes --trusted-peers enode://abcd@192.168.0.1:30303 - - --trusted-only - Connect only to trusted peers - - --bootnodes - Bootnodes to connect to initially. - - Will fall back to a network-specific default if not specified. - - --peers-file - The path to the known peers file. Connected peers are dumped to this file on nodes - shutdown, and read on startup. Cannot be used with `--no-persist-peers`. - - --identity - Custom node identity - - [default: reth/v0.1.0-alpha.1/aarch64-apple-darwin] - - --p2p-secret-key - Secret key to use for this node. - - This will also deterministically set the peer ID. If not specified, it will be set in the data dir for the chain being used. - - --no-persist-peers - Do not persist peers. - - --nat - NAT resolution method (any|none|upnp|publicip|extip:) - - [default: any] - - --port - Network listening port. default: 30303 - -Database: - --db.log-level - Database logging level. Levels higher than "notice" require a debug build - - Possible values: - - fatal: Enables logging for critical conditions, i.e. assertion failures - - error: Enables logging for error conditions - - warn: Enables logging for warning conditions - - notice: Enables logging for normal but significant condition - - verbose: Enables logging for verbose informational - - debug: Enables logging for debug-level messages - - trace: Enables logging for trace debug-level messages - - extra: Enables logging for extra debug-level messages - - -c, --commit - Commits the changes in the database. WARNING: potentially destructive. - - Useful when you want to run diagnostics on the database. - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output -``` - -## `reth stage unwind` - -Unwinds a certain block range, deleting it from the database - -```bash -$ reth stage unwind --help - -Usage: reth stage unwind [OPTIONS] - -Commands: - to-block - Unwinds the database until the given block number (range is inclusive) - num-blocks - Unwinds the given number of blocks from the database - help - Print this message or the help of the given subcommand(s) - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Database: - --db.log-level - Database logging level. Levels higher than "notice" require a debug build - - Possible values: - - fatal: Enables logging for critical conditions, i.e. assertion failures - - error: Enables logging for error conditions - - warn: Enables logging for warning conditions - - notice: Enables logging for normal but significant condition - - verbose: Enables logging for verbose informational - - debug: Enables logging for debug-level messages - - trace: Enables logging for trace debug-level messages - - extra: Enables logging for extra debug-level messages - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ### `reth stage unwind to-block` @@ -720,64 +260,6 @@ Usage: reth stage unwind to-block [OPTIONS] Arguments: - - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` ### `reth stage unwind num-blocks` @@ -791,62 +273,4 @@ Usage: reth stage unwind num-blocks [OPTIONS] Arguments: - - -Options: - --datadir - The path to the data dir for all reth files and subdirectories. - - Defaults to the OS-specific data directory: - - - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - - Windows: `{FOLDERID_RoamingAppData}/reth/` - - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --chain - The chain this node is running. - - Possible values are either a built-in chain or the path to a chain specification file. - - Built-in chains: - - mainnet - - goerli - - sepolia - - [default: mainnet] - - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ``` diff --git a/book/cli/test-vectors.md b/book/cli/test-vectors.md index 68ada830f32f..87fced2d8e32 100644 --- a/book/cli/test-vectors.md +++ b/book/cli/test-vectors.md @@ -8,24 +8,52 @@ $ reth test-vectors --help Usage: reth test-vectors [OPTIONS] Commands: - tables - Generates test vectors for specified tables. If no table is specified, generate for all - help - Print this message or the help of the given subcommand(s) + tables Generates test vectors for specified tables. If no table is specified, generate for all + help Print this message or the help of the given subcommand(s) Options: + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] + + --instance + Add a new instance of a node. + + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. + + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. + + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 + + [default: 1] + -h, --help Print help (see a summary with '-h') Logging: - --log.persistent - The flag to enable persistent logs - --log.directory The path to put log files in [default: /reth/logs] + --log.max-size + The maximum size (in MB) of log files + + [default: 200] + + --log.max-files + The maximum amount of log files that will be stored. If set to 0, background file logging is disabled + + [default: 5] + --log.journald Log events to journald @@ -34,6 +62,16 @@ Logging: [default: error] + --color + Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting + + [default: always] + + Possible values: + - always: Colors on + - auto: Colors on + - never: Colors off + Display: -v, --verbosity... Set the minimum log level. @@ -60,38 +98,4 @@ Usage: reth test-vectors tables [OPTIONS] [NAMES]... Arguments: [NAMES]... List of table names. Case-sensitive - -Options: - -h, --help - Print help (see a summary with '-h') - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: error] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output ```