mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
docs: improve CLI reference generator (#5740)
This commit is contained in:
106
book/SUMMARY.md
106
book/SUMMARY.md
@ -1,41 +1,69 @@
|
||||
# Reth Book
|
||||
|
||||
1. [Introduction](./intro.md)
|
||||
1. [Installation](./installation/installation.md)
|
||||
1. [Pre-Built Binaries](./installation/binaries.md)
|
||||
1. [Docker](./installation/docker.md)
|
||||
1. [Build from Source](./installation/source.md)
|
||||
1. [Build for ARM devices](./installation/build-for-arm-devices.md)
|
||||
1. [Update Priorities](./installation/priorities.md)
|
||||
1. [Run a Node](./run/run-a-node.md)
|
||||
1. [Mainnet or official testnets](./run/mainnet.md)
|
||||
1. [OP Stack](./run/optimism.md)
|
||||
1. [Private testnet](./run/private-testnet.md)
|
||||
1. [Metrics](./run/observability.md)
|
||||
1. [Configuring Reth](./run/config.md)
|
||||
1. [Transaction types](./run/transactions.md)
|
||||
1. [Pruning & Full Node](./run/pruning.md)
|
||||
1. [Ports](./run/ports.md)
|
||||
1. [Troubleshooting](./run/troubleshooting.md)
|
||||
1. [Interacting with Reth over JSON-RPC](./jsonrpc/intro.md)
|
||||
1. [eth](./jsonrpc/eth.md)
|
||||
1. [web3](./jsonrpc/web3.md)
|
||||
1. [net](./jsonrpc/net.md)
|
||||
1. [txpool](./jsonrpc/txpool.md)
|
||||
1. [debug](./jsonrpc/debug.md)
|
||||
1. [trace](./jsonrpc/trace.md)
|
||||
1. [admin](./jsonrpc/admin.md)
|
||||
1. [rpc](./jsonrpc/rpc.md)
|
||||
1. [CLI Reference](./cli/cli.md)
|
||||
1. [reth node](./cli/node.md)
|
||||
1. [reth init](./cli/init.md)
|
||||
1. [reth import](./cli/import.md)
|
||||
1. [reth db](./cli/db.md)
|
||||
1. [reth stage](./cli/stage.md)
|
||||
1. [reth p2p](./cli/p2p.md)
|
||||
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)
|
||||
- [Introduction](./intro.md)
|
||||
- [Installation](./installation/installation.md)
|
||||
- [Pre-Built Binaries](./installation/binaries.md)
|
||||
- [Docker](./installation/docker.md)
|
||||
- [Build from Source](./installation/source.md)
|
||||
- [Build for ARM devices](./installation/build-for-arm-devices.md)
|
||||
- [Update Priorities](./installation/priorities.md)
|
||||
- [Run a Node](./run/run-a-node.md)
|
||||
- [Mainnet or official testnets](./run/mainnet.md)
|
||||
- [OP Stack](./run/optimism.md)
|
||||
- [Private testnet](./run/private-testnet.md)
|
||||
- [Metrics](./run/observability.md)
|
||||
- [Configuring Reth](./run/config.md)
|
||||
- [Transaction types](./run/transactions.md)
|
||||
- [Pruning & Full Node](./run/pruning.md)
|
||||
- [Ports](./run/ports.md)
|
||||
- [Troubleshooting](./run/troubleshooting.md)
|
||||
- [Interacting with Reth over JSON-RPC](./jsonrpc/intro.md)
|
||||
- [eth](./jsonrpc/eth.md)
|
||||
- [web3](./jsonrpc/web3.md)
|
||||
- [net](./jsonrpc/net.md)
|
||||
- [txpool](./jsonrpc/txpool.md)
|
||||
- [debug](./jsonrpc/debug.md)
|
||||
- [trace](./jsonrpc/trace.md)
|
||||
- [admin](./jsonrpc/admin.md)
|
||||
- [rpc](./jsonrpc/rpc.md)
|
||||
- [CLI Reference](./cli/cli.md) <!-- CLI_REFERENCE START -->
|
||||
- [`reth`](./cli/reth.md)
|
||||
- [`reth node`](./cli/reth/node.md)
|
||||
- [`reth init`](./cli/reth/init.md)
|
||||
- [`reth import`](./cli/reth/import.md)
|
||||
- [`reth db`](./cli/reth/db.md)
|
||||
- [`reth db stats`](./cli/reth/db/stats.md)
|
||||
- [`reth db list`](./cli/reth/db/list.md)
|
||||
- [`reth db diff`](./cli/reth/db/diff.md)
|
||||
- [`reth db get`](./cli/reth/db/get.md)
|
||||
- [`reth db drop`](./cli/reth/db/drop.md)
|
||||
- [`reth db clear`](./cli/reth/db/clear.md)
|
||||
- [`reth db snapshot`](./cli/reth/db/snapshot.md)
|
||||
- [`reth db version`](./cli/reth/db/version.md)
|
||||
- [`reth db path`](./cli/reth/db/path.md)
|
||||
- [`reth stage`](./cli/reth/stage.md)
|
||||
- [`reth stage run`](./cli/reth/stage/run.md)
|
||||
- [`reth stage drop`](./cli/reth/stage/drop.md)
|
||||
- [`reth stage dump`](./cli/reth/stage/dump.md)
|
||||
- [`reth stage dump execution`](./cli/reth/stage/dump/execution.md)
|
||||
- [`reth stage dump storage-hashing`](./cli/reth/stage/dump/storage-hashing.md)
|
||||
- [`reth stage dump account-hashing`](./cli/reth/stage/dump/account-hashing.md)
|
||||
- [`reth stage dump merkle`](./cli/reth/stage/dump/merkle.md)
|
||||
- [`reth stage unwind`](./cli/reth/stage/unwind.md)
|
||||
- [`reth stage unwind to-block`](./cli/reth/stage/unwind/to-block.md)
|
||||
- [`reth stage unwind num-blocks`](./cli/reth/stage/unwind/num-blocks.md)
|
||||
- [`reth p2p`](./cli/reth/p2p.md)
|
||||
- [`reth p2p header`](./cli/reth/p2p/header.md)
|
||||
- [`reth p2p body`](./cli/reth/p2p/body.md)
|
||||
- [`reth test-vectors`](./cli/reth/test-vectors.md)
|
||||
- [`reth test-vectors tables`](./cli/reth/test-vectors/tables.md)
|
||||
- [`reth config`](./cli/reth/config.md)
|
||||
- [`reth debug`](./cli/reth/debug.md)
|
||||
- [`reth debug execution`](./cli/reth/debug/execution.md)
|
||||
- [`reth debug merkle`](./cli/reth/debug/merkle.md)
|
||||
- [`reth debug in-memory-merkle`](./cli/reth/debug/in-memory-merkle.md)
|
||||
- [`reth debug build-block`](./cli/reth/debug/build-block.md)
|
||||
- [`reth recover`](./cli/reth/recover.md)
|
||||
- [`reth recover storage-tries`](./cli/reth/recover/storage-tries.md)
|
||||
- [Developers](./developers/developers.md) <!-- CLI_REFERENCE END -->
|
||||
- [Contribute](./developers/contribute.md)
|
||||
|
||||
39
book/cli/SUMMARY.md
vendored
Normal file
39
book/cli/SUMMARY.md
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
- [`reth`](./reth.md)
|
||||
- [`reth node`](./reth/node.md)
|
||||
- [`reth init`](./reth/init.md)
|
||||
- [`reth import`](./reth/import.md)
|
||||
- [`reth db`](./reth/db.md)
|
||||
- [`reth db stats`](./reth/db/stats.md)
|
||||
- [`reth db list`](./reth/db/list.md)
|
||||
- [`reth db diff`](./reth/db/diff.md)
|
||||
- [`reth db get`](./reth/db/get.md)
|
||||
- [`reth db drop`](./reth/db/drop.md)
|
||||
- [`reth db clear`](./reth/db/clear.md)
|
||||
- [`reth db snapshot`](./reth/db/snapshot.md)
|
||||
- [`reth db version`](./reth/db/version.md)
|
||||
- [`reth db path`](./reth/db/path.md)
|
||||
- [`reth stage`](./reth/stage.md)
|
||||
- [`reth stage run`](./reth/stage/run.md)
|
||||
- [`reth stage drop`](./reth/stage/drop.md)
|
||||
- [`reth stage dump`](./reth/stage/dump.md)
|
||||
- [`reth stage dump execution`](./reth/stage/dump/execution.md)
|
||||
- [`reth stage dump storage-hashing`](./reth/stage/dump/storage-hashing.md)
|
||||
- [`reth stage dump account-hashing`](./reth/stage/dump/account-hashing.md)
|
||||
- [`reth stage dump merkle`](./reth/stage/dump/merkle.md)
|
||||
- [`reth stage unwind`](./reth/stage/unwind.md)
|
||||
- [`reth stage unwind to-block`](./reth/stage/unwind/to-block.md)
|
||||
- [`reth stage unwind num-blocks`](./reth/stage/unwind/num-blocks.md)
|
||||
- [`reth p2p`](./reth/p2p.md)
|
||||
- [`reth p2p header`](./reth/p2p/header.md)
|
||||
- [`reth p2p body`](./reth/p2p/body.md)
|
||||
- [`reth test-vectors`](./reth/test-vectors.md)
|
||||
- [`reth test-vectors tables`](./reth/test-vectors/tables.md)
|
||||
- [`reth config`](./reth/config.md)
|
||||
- [`reth debug`](./reth/debug.md)
|
||||
- [`reth debug execution`](./reth/debug/execution.md)
|
||||
- [`reth debug merkle`](./reth/debug/merkle.md)
|
||||
- [`reth debug in-memory-merkle`](./reth/debug/in-memory-merkle.md)
|
||||
- [`reth debug build-block`](./reth/debug/build-block.md)
|
||||
- [`reth recover`](./reth/recover.md)
|
||||
- [`reth recover storage-tries`](./reth/recover/storage-tries.md)
|
||||
|
||||
120
book/cli/cli.md
120
book/cli/cli.md
@ -2,122 +2,6 @@
|
||||
|
||||
The Reth node is operated via the CLI by running the `reth node` command. To stop it, press `ctrl-c`. You may need to wait a bit as Reth tears down existing p2p connections or other cleanup tasks.
|
||||
|
||||
However, Reth has more commands than that:
|
||||
However, Reth has more commands:
|
||||
|
||||
```bash
|
||||
reth --help
|
||||
```
|
||||
|
||||
Some of the most useful commands as a node developer are:
|
||||
* [`reth node`](./node.md): Starts the Reth node's components, including the JSON-RPC.
|
||||
* [`reth init`](./init.md): Initialize the database from a genesis file.
|
||||
* [`reth import`](./import.md): This syncs RLP encoded blocks from a file.
|
||||
* [`reth db`](./db.md): Administrative TUI to the key-value store.
|
||||
* [`reth stage`](./stage.md): Runs a stage in isolation. Useful for testing and benchmarking.
|
||||
* [`reth p2p`](./p2p.md): P2P-related utilities
|
||||
* [`reth test-vectors`](./test-vectors.md): Generate Test Vectors
|
||||
* [`reth config`](./config.md): Write config to stdout
|
||||
* [`reth debug`](./debug.md): Various debug routines
|
||||
|
||||
See below for the full list of commands.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
$ reth --help
|
||||
Reth
|
||||
|
||||
Usage: reth [OPTIONS] <COMMAND>
|
||||
|
||||
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
|
||||
recover Scripts for node recovery
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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')
|
||||
|
||||
-V, --version
|
||||
Print version
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
{{#include ./SUMMARY.md}}
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
{
|
||||
"commands": {
|
||||
"config": [],
|
||||
"db": {
|
||||
"stats": [],
|
||||
"list": [],
|
||||
"diff": [],
|
||||
"get": [],
|
||||
"drop": [],
|
||||
"clear": [],
|
||||
"version": [],
|
||||
"path": []
|
||||
},
|
||||
"debug": {
|
||||
"execution": [],
|
||||
"merkle": [],
|
||||
"in-memory-merkle": []
|
||||
},
|
||||
"import": [],
|
||||
"init": [],
|
||||
"node": [],
|
||||
"p2p": {
|
||||
"header": [],
|
||||
"body": []
|
||||
},
|
||||
"recover": {
|
||||
"storage-tries": []
|
||||
},
|
||||
"stage": {
|
||||
"run": [],
|
||||
"drop": [],
|
||||
"dump": ["execution", "storage-hashing", "account-hashing", "merkle"],
|
||||
"unwind": ["to-block", "num-blocks"]
|
||||
},
|
||||
"test-vectors": {
|
||||
"tables": []
|
||||
}
|
||||
}
|
||||
}
|
||||
986
book/cli/db.md
vendored
986
book/cli/db.md
vendored
@ -1,986 +0,0 @@
|
||||
# `reth db`
|
||||
|
||||
Database debugging utilities
|
||||
|
||||
```bash
|
||||
$ reth db --help
|
||||
|
||||
Usage: reth db [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
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
|
||||
snapshot Snapshots tables from database
|
||||
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 <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db clear`
|
||||
|
||||
Deletes all table entries
|
||||
|
||||
```bash
|
||||
$ reth db clear --help
|
||||
|
||||
Usage: reth db clear [OPTIONS] <TABLE>
|
||||
|
||||
Arguments:
|
||||
<TABLE>
|
||||
Table name
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db diff`
|
||||
|
||||
Create a diff between two database tables or two entire databases
|
||||
|
||||
```bash
|
||||
$ reth db diff --help
|
||||
|
||||
Usage: reth db diff [OPTIONS] --secondary-datadir <SECONDARY_DATADIR> --output <OUTPUT>
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
--secondary-datadir <SECONDARY_DATADIR>
|
||||
The path to the data dir for all reth files and subdirectories.
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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
|
||||
|
||||
--table <TABLE>
|
||||
The table name to diff. If not specified, all tables are diffed.
|
||||
|
||||
--output <OUTPUT>
|
||||
The output directory for the diff report.
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db drop`
|
||||
|
||||
Deletes all database entries
|
||||
|
||||
```bash
|
||||
$ reth db drop --help
|
||||
|
||||
Usage: reth db drop [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
-f, --force
|
||||
Bypasses the interactive confirmation and drops the database directly
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db get`
|
||||
|
||||
Gets the content of a table for the given key
|
||||
|
||||
```bash
|
||||
$ reth db get --help
|
||||
|
||||
Usage: reth db get [OPTIONS] <TABLE> <KEY>
|
||||
|
||||
Arguments:
|
||||
<TABLE>
|
||||
The table name
|
||||
|
||||
NOTE: The dupsort tables are not supported now.
|
||||
|
||||
<KEY>
|
||||
The key to get content for
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
--raw
|
||||
Output bytes instead of human-readable decoded value
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db list`
|
||||
|
||||
Lists the contents of a table
|
||||
|
||||
```bash
|
||||
$ reth db list --help
|
||||
|
||||
Usage: reth db list [OPTIONS] <TABLE>
|
||||
|
||||
Arguments:
|
||||
<TABLE>
|
||||
The table name
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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>
|
||||
Skip first N entries
|
||||
|
||||
[default: 0]
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
-r, --reverse
|
||||
Reverse the order of the entries. If enabled last table entries are read
|
||||
|
||||
-l, --len <LEN>
|
||||
How many items to take from the walker
|
||||
|
||||
[default: 5]
|
||||
|
||||
--search <SEARCH>
|
||||
Search parameter for both keys and values. Prefix it with `0x` to search for binary data, and text otherwise.
|
||||
|
||||
ATTENTION! For compressed tables (`Transactions` and `Receipts`), there might be missing results since the search uses the raw uncompressed value from the database.
|
||||
|
||||
--min-row-size <MIN_ROW_SIZE>
|
||||
Minimum size of row in bytes
|
||||
|
||||
[default: 0]
|
||||
|
||||
--min-key-size <MIN_KEY_SIZE>
|
||||
Minimum size of key in bytes
|
||||
|
||||
[default: 0]
|
||||
|
||||
--min-value-size <MIN_VALUE_SIZE>
|
||||
Minimum size of value in bytes
|
||||
|
||||
[default: 0]
|
||||
|
||||
-c, --count
|
||||
Returns the number of rows found
|
||||
|
||||
-j, --json
|
||||
Dump as JSON instead of using TUI
|
||||
|
||||
--raw
|
||||
Output bytes instead of human-readable decoded value
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db path`
|
||||
|
||||
Returns the full database path
|
||||
|
||||
```bash
|
||||
$ reth db path --help
|
||||
|
||||
Usage: reth db path [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db stats`
|
||||
|
||||
Lists all the tables, their entry count and their size
|
||||
|
||||
```bash
|
||||
$ reth db stats --help
|
||||
|
||||
Usage: reth db stats [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 db version`
|
||||
|
||||
Lists current and local database versions
|
||||
|
||||
```bash
|
||||
$ reth db version --help
|
||||
|
||||
Usage: reth db version [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
665
book/cli/debug.md
vendored
665
book/cli/debug.md
vendored
@ -1,665 +0,0 @@
|
||||
# `reth debug`
|
||||
|
||||
Various debug routines
|
||||
|
||||
```bash
|
||||
$ reth debug --help
|
||||
|
||||
Usage: reth debug [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
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
|
||||
build-block Debug block building
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 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 <TO>
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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')
|
||||
|
||||
Networking:
|
||||
-d, --disable-discovery
|
||||
Disable the discovery service
|
||||
|
||||
--disable-dns-discovery
|
||||
Disable the DNS discovery
|
||||
|
||||
--disable-discv4-discovery
|
||||
Disable Discv4 discovery
|
||||
|
||||
--discovery.addr <DISCOVERY_ADDR>
|
||||
The UDP address to use for P2P discovery/networking
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--discovery.port <DISCOVERY_PORT>
|
||||
The UDP port to use for P2P discovery/networking
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--trusted-peers <TRUSTED_PEERS>
|
||||
Comma separated enode URLs of trusted peers for P2P connections.
|
||||
|
||||
--trusted-peers enode://abcd@192.168.0.1:30303
|
||||
|
||||
--trusted-only
|
||||
Connect only to trusted peers
|
||||
|
||||
--bootnodes <BOOTNODES>
|
||||
Comma separated enode URLs for P2P discovery bootstrap.
|
||||
|
||||
Will fall back to a network-specific default if not specified.
|
||||
|
||||
--peers-file <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 <IDENTITY>
|
||||
Custom node identity
|
||||
|
||||
[default: reth/v0.1.0-alpha.13-10a83e594/aarch64-apple-darwin]
|
||||
|
||||
--p2p-secret-key <PATH>
|
||||
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>
|
||||
NAT resolution method (any|none|upnp|publicip|extip:<IP>)
|
||||
|
||||
[default: any]
|
||||
|
||||
--addr <ADDR>
|
||||
Network listening address
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--port <PORT>
|
||||
Network listening port
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--max-outbound-peers <MAX_OUTBOUND_PEERS>
|
||||
Maximum number of outbound requests. default: 100
|
||||
|
||||
--max-inbound-peers <MAX_INBOUND_PEERS>
|
||||
Maximum number of inbound requests. default: 30
|
||||
|
||||
Database:
|
||||
--db.log-level <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 <TO>
|
||||
The maximum block height
|
||||
|
||||
--interval <INTERVAL>
|
||||
The block interval for sync and unwind. Defaults to `1000`
|
||||
|
||||
[default: 1000]
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 debug in-memory-merkle`
|
||||
|
||||
Debug in-memory state root calculation
|
||||
|
||||
```bash
|
||||
$ reth debug in-memory-merkle --help
|
||||
|
||||
Usage: reth debug in-memory-merkle [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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
|
||||
|
||||
Networking:
|
||||
-d, --disable-discovery
|
||||
Disable the discovery service
|
||||
|
||||
--disable-dns-discovery
|
||||
Disable the DNS discovery
|
||||
|
||||
--disable-discv4-discovery
|
||||
Disable Discv4 discovery
|
||||
|
||||
--discovery.addr <DISCOVERY_ADDR>
|
||||
The UDP address to use for P2P discovery/networking
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--discovery.port <DISCOVERY_PORT>
|
||||
The UDP port to use for P2P discovery/networking
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--trusted-peers <TRUSTED_PEERS>
|
||||
Comma separated enode URLs of trusted peers for P2P connections.
|
||||
|
||||
--trusted-peers enode://abcd@192.168.0.1:30303
|
||||
|
||||
--trusted-only
|
||||
Connect only to trusted peers
|
||||
|
||||
--bootnodes <BOOTNODES>
|
||||
Comma separated enode URLs for P2P discovery bootstrap.
|
||||
|
||||
Will fall back to a network-specific default if not specified.
|
||||
|
||||
--peers-file <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 <IDENTITY>
|
||||
Custom node identity
|
||||
|
||||
[default: reth/v0.1.0-alpha.13-10a83e594/aarch64-apple-darwin]
|
||||
|
||||
--p2p-secret-key <PATH>
|
||||
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>
|
||||
NAT resolution method (any|none|upnp|publicip|extip:<IP>)
|
||||
|
||||
[default: any]
|
||||
|
||||
--addr <ADDR>
|
||||
Network listening address
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--port <PORT>
|
||||
Network listening port
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--max-outbound-peers <MAX_OUTBOUND_PEERS>
|
||||
Maximum number of outbound requests. default: 100
|
||||
|
||||
--max-inbound-peers <MAX_INBOUND_PEERS>
|
||||
Maximum number of inbound requests. default: 30
|
||||
|
||||
--retries <RETRIES>
|
||||
The number of retries per request
|
||||
|
||||
[default: 5]
|
||||
|
||||
--skip-node-depth <SKIP_NODE_DEPTH>
|
||||
The depth after which we should start comparing branch nodes
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 debug merkle`
|
||||
|
||||
Debug the clean & incremental state root calculations
|
||||
|
||||
```bash
|
||||
$ reth debug merkle --help
|
||||
|
||||
Usage: reth debug merkle [OPTIONS] --to <TO>
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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
|
||||
|
||||
Networking:
|
||||
-d, --disable-discovery
|
||||
Disable the discovery service
|
||||
|
||||
--disable-dns-discovery
|
||||
Disable the DNS discovery
|
||||
|
||||
--disable-discv4-discovery
|
||||
Disable Discv4 discovery
|
||||
|
||||
--discovery.addr <DISCOVERY_ADDR>
|
||||
The UDP address to use for P2P discovery/networking
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--discovery.port <DISCOVERY_PORT>
|
||||
The UDP port to use for P2P discovery/networking
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--trusted-peers <TRUSTED_PEERS>
|
||||
Comma separated enode URLs of trusted peers for P2P connections.
|
||||
|
||||
--trusted-peers enode://abcd@192.168.0.1:30303
|
||||
|
||||
--trusted-only
|
||||
Connect only to trusted peers
|
||||
|
||||
--bootnodes <BOOTNODES>
|
||||
Comma separated enode URLs for P2P discovery bootstrap.
|
||||
|
||||
Will fall back to a network-specific default if not specified.
|
||||
|
||||
--peers-file <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 <IDENTITY>
|
||||
Custom node identity
|
||||
|
||||
[default: reth/v0.1.0-alpha.13-10a83e594/aarch64-apple-darwin]
|
||||
|
||||
--p2p-secret-key <PATH>
|
||||
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>
|
||||
NAT resolution method (any|none|upnp|publicip|extip:<IP>)
|
||||
|
||||
[default: any]
|
||||
|
||||
--addr <ADDR>
|
||||
Network listening address
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--port <PORT>
|
||||
Network listening port
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--max-outbound-peers <MAX_OUTBOUND_PEERS>
|
||||
Maximum number of outbound requests. default: 100
|
||||
|
||||
--max-inbound-peers <MAX_INBOUND_PEERS>
|
||||
Maximum number of inbound requests. default: 30
|
||||
|
||||
--retries <RETRIES>
|
||||
The number of retries per request
|
||||
|
||||
[default: 5]
|
||||
|
||||
--to <TO>
|
||||
The height to finish at
|
||||
|
||||
--skip-node-depth <SKIP_NODE_DEPTH>
|
||||
The depth after which we should start comparing branch nodes
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
264
book/cli/help.py
Executable file
264
book/cli/help.py
Executable file
@ -0,0 +1,264 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from os import makedirs, path
|
||||
|
||||
HELP_KEY = "help"
|
||||
SECTION_START = "<!-- CLI_REFERENCE START -->"
|
||||
SECTION_END = "<!-- CLI_REFERENCE END -->"
|
||||
SECTION_RE = rf"\s*{SECTION_START}.*?{SECTION_END}"
|
||||
|
||||
README = """\
|
||||
# CLI Reference
|
||||
|
||||
<!-- Generated by scripts/gen_output/help.py -->
|
||||
|
||||
Automatically-generated CLI reference from `--help` output.
|
||||
|
||||
{{#include ./SUMMARY.md}}
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args(sys.argv[1:])
|
||||
for cmd in args.commands:
|
||||
if cmd.find(" ") >= 0:
|
||||
raise Exception(f"subcommands are not allowed: {cmd}")
|
||||
makedirs(args.out_dir, exist_ok=True)
|
||||
|
||||
output = {}
|
||||
|
||||
# Iterate over all commands and their subcommands.
|
||||
cmd_iter = [[cmd] for cmd in args.commands]
|
||||
for cmd in cmd_iter:
|
||||
subcmds, stdout = get_entry(cmd)
|
||||
if args.verbose and len(subcmds) > 0:
|
||||
eprint(f"Found subcommands for \"{' '.join(cmd)}\": {subcmds}")
|
||||
|
||||
# Add entry to output map, e.g. `output["cmd"]["subcmd"]["help"] = "..."`.
|
||||
e = output
|
||||
for arg in cmd:
|
||||
tmp = e.get(arg)
|
||||
if not tmp:
|
||||
e[arg] = {}
|
||||
tmp = e[arg]
|
||||
e = tmp
|
||||
e[HELP_KEY] = stdout
|
||||
|
||||
# Append subcommands.
|
||||
for subcmd in subcmds:
|
||||
cmd_iter.append(cmd + [subcmd])
|
||||
|
||||
# Generate markdown files.
|
||||
summary = ""
|
||||
root_summary = ""
|
||||
for cmd, obj in output.items():
|
||||
cmd_markdown(args.out_dir, cmd, obj)
|
||||
|
||||
root_path = path.relpath(args.out_dir, args.root_dir)
|
||||
summary += cmd_summary("", cmd, obj, 0)
|
||||
summary += "\n"
|
||||
|
||||
root_summary += cmd_summary(root_path, cmd, obj, args.root_indentation)
|
||||
root_summary += "\n"
|
||||
with open(path.join(args.out_dir, "SUMMARY.md"), "w") as f:
|
||||
f.write(summary)
|
||||
|
||||
# Generate README.md.
|
||||
if args.readme:
|
||||
with open(path.join(args.out_dir, "README.md"), "w") as f:
|
||||
f.write(README)
|
||||
|
||||
if args.root_summary:
|
||||
update_root_summary(args.root_dir, root_summary)
|
||||
|
||||
|
||||
def parse_args(args: list[str]):
|
||||
"""Parses command line arguments."""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Generate markdown files from help output of commands"
|
||||
)
|
||||
parser.add_argument("--root-dir", default=".", help="Root directory")
|
||||
parser.add_argument(
|
||||
"--root-indentation",
|
||||
default=0,
|
||||
type=int,
|
||||
help="Indentation for the root SUMMARY.md file",
|
||||
)
|
||||
parser.add_argument("--out-dir", help="Output directory")
|
||||
parser.add_argument(
|
||||
"--readme",
|
||||
action="store_true",
|
||||
help="Whether to add a README.md file",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--root-summary",
|
||||
action="store_true",
|
||||
help="Whether to update the root SUMMARY.md file",
|
||||
)
|
||||
parser.add_argument(
|
||||
"commands",
|
||||
nargs="+",
|
||||
help="Command to generate markdown for. Can be a subcommand.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--verbose", "-v", action="store_true", help="Print verbose output"
|
||||
)
|
||||
return parser.parse_known_args(args)[0]
|
||||
|
||||
|
||||
def get_entry(cmd: list[str]):
|
||||
"""Returns the subcommands and help output for a command."""
|
||||
env = os.environ.copy()
|
||||
env["NO_COLOR"] = "1"
|
||||
env["COLUMNS"] = "100"
|
||||
env["LINES"] = "10000"
|
||||
output = subprocess.run(cmd + ["--help"], capture_output=True, env=env)
|
||||
if output.returncode != 0:
|
||||
stderr = output.stderr.decode("utf-8")
|
||||
raise Exception(f"Command \"{' '.join(cmd)}\" failed:\n{stderr}")
|
||||
stdout = output.stdout.decode("utf-8")
|
||||
subcmds = parse_sub_commands(stdout)
|
||||
return subcmds, stdout
|
||||
|
||||
|
||||
def parse_sub_commands(s: str):
|
||||
"""Returns a list of subcommands from the help output of a command."""
|
||||
idx = s.find("Commands:")
|
||||
if idx < 0:
|
||||
return []
|
||||
s = s[idx:]
|
||||
|
||||
idx = s.find("Options:")
|
||||
if idx < 0:
|
||||
return []
|
||||
s = s[:idx]
|
||||
|
||||
idx = s.find("Arguments:")
|
||||
if idx >= 0:
|
||||
s = s[:idx]
|
||||
|
||||
subcmds = s.splitlines()[1:]
|
||||
subcmds = filter(
|
||||
lambda x: x.strip() != "" and x.startswith(" ") and x[2] != " ", subcmds
|
||||
)
|
||||
subcmds = map(lambda x: x.strip().split(" ")[0], subcmds)
|
||||
subcmds = filter(lambda x: x != "help", subcmds)
|
||||
return list(subcmds)
|
||||
|
||||
|
||||
def cmd_markdown(out_dir: str, cmd: str, obj: object):
|
||||
"""Writes the markdown for a command and its subcommands to out_dir."""
|
||||
|
||||
def rec(cmd: list[str], obj: object):
|
||||
out = ""
|
||||
out += f"# {' '.join(cmd)}\n\n"
|
||||
out += help_markdown(cmd, obj[HELP_KEY])
|
||||
out_path = out_dir
|
||||
for arg in cmd:
|
||||
out_path = path.join(out_path, arg)
|
||||
makedirs(path.dirname(out_path), exist_ok=True)
|
||||
with open(f"{out_path}.md", "w") as f:
|
||||
f.write(out)
|
||||
|
||||
for k, v in obj.items():
|
||||
if k == HELP_KEY:
|
||||
continue
|
||||
rec(cmd + [k], v)
|
||||
|
||||
rec([command_name(cmd)], obj)
|
||||
|
||||
|
||||
def help_markdown(cmd: list[str], s: str):
|
||||
"""Returns the markdown for a command's help output."""
|
||||
cmd[0] = command_name(cmd[0])
|
||||
description, s = parse_description(s)
|
||||
return f"""\
|
||||
{description}
|
||||
|
||||
```bash
|
||||
$ {' '.join(cmd)} --help
|
||||
{preprocess_help(s.strip())}
|
||||
```"""
|
||||
|
||||
|
||||
def parse_description(s: str):
|
||||
"""Splits the help output into a description and the rest."""
|
||||
idx = s.find("Usage:")
|
||||
if idx < 0:
|
||||
return "", s
|
||||
return s[:idx].strip().splitlines()[0].strip(), s[idx:]
|
||||
|
||||
|
||||
def cmd_summary(md_root: str, cmd: str, obj: object, indent: int):
|
||||
"""Returns the summary for a command and its subcommands."""
|
||||
|
||||
def rec(cmd: list[str], obj: object, indent: int):
|
||||
nonlocal out
|
||||
cmd_s = " ".join(cmd)
|
||||
cmd_path = cmd_s.replace(" ", "/")
|
||||
if md_root != "":
|
||||
cmd_path = f"{md_root}/{cmd_path}"
|
||||
out += f"{' ' * indent}- [`{cmd_s}`](./{cmd_path}.md)\n"
|
||||
|
||||
for k, v in obj.items():
|
||||
if k == HELP_KEY:
|
||||
continue
|
||||
rec(cmd + [k], v, indent + 2)
|
||||
|
||||
out = ""
|
||||
rec([command_name(cmd)], obj, indent)
|
||||
return out
|
||||
|
||||
|
||||
def update_root_summary(root_dir: str, root_summary: str):
|
||||
"""Replaces the CLI_REFERENCE section in the root SUMMARY.md file."""
|
||||
summary_file = path.join(root_dir, "SUMMARY.md")
|
||||
|
||||
with open(summary_file, "r") as f:
|
||||
real_root_summary = f.read()
|
||||
|
||||
if not re.search(SECTION_RE, real_root_summary, flags=re.DOTALL):
|
||||
raise Exception(
|
||||
f"Could not find CLI_REFERENCE section in {summary_file}. "
|
||||
"Please add the following section to the file:\n"
|
||||
f"{SECTION_START}\n{SECTION_END}"
|
||||
)
|
||||
|
||||
last_line = re.findall(f".*{SECTION_END}", real_root_summary)[0]
|
||||
root_summary_s = root_summary.rstrip().replace("\n\n", "\n")
|
||||
replace_with = f" {SECTION_START}\n{root_summary_s}\n{last_line}"
|
||||
|
||||
real_root_summary = re.sub(
|
||||
SECTION_RE, replace_with, real_root_summary, flags=re.DOTALL
|
||||
)
|
||||
root_summary_file = path.join(root_dir, "SUMMARY.md")
|
||||
with open(root_summary_file, "w") as f:
|
||||
f.write(real_root_summary)
|
||||
|
||||
|
||||
def eprint(*args, **kwargs):
|
||||
"""Prints to stderr."""
|
||||
print(*args, file=sys.stderr, **kwargs)
|
||||
|
||||
|
||||
def command_name(cmd: str):
|
||||
"""Returns the name of a command."""
|
||||
return cmd.split("/")[-1]
|
||||
|
||||
def preprocess_help(s: str):
|
||||
"""Preprocesses the help output of a command."""
|
||||
# Remove the user-specific paths.
|
||||
s = re.sub(r"default: /.*/reth", "default: <CACHE_DIR>", s)
|
||||
# Remove the commit SHA.
|
||||
s = re.sub(r"-[0-9A-Fa-f]{6,10}/", "-<SHA>/", s)
|
||||
|
||||
return s
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
318
book/cli/p2p.md
vendored
318
book/cli/p2p.md
vendored
@ -1,318 +0,0 @@
|
||||
# `reth p2p`
|
||||
|
||||
P2P Debugging utilities
|
||||
|
||||
```bash
|
||||
$ reth p2p --help
|
||||
|
||||
Usage: reth p2p [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
header Download block header
|
||||
body Download block body
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
--config <FILE>
|
||||
The path to the configuration file to use.
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
--p2p-secret-key <PATH>
|
||||
Secret key to use for this node.
|
||||
|
||||
This also will deterministically set the peer ID.
|
||||
|
||||
-d, --disable-discovery
|
||||
Disable the discovery service
|
||||
|
||||
--disable-dns-discovery
|
||||
Disable the DNS discovery
|
||||
|
||||
--disable-discv4-discovery
|
||||
Disable Discv4 discovery
|
||||
|
||||
--discovery.addr <DISCOVERY_ADDR>
|
||||
The UDP address to use for P2P discovery/networking
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--discovery.port <DISCOVERY_PORT>
|
||||
The UDP port to use for P2P discovery/networking
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--trusted-peer <TRUSTED_PEER>
|
||||
Target trusted peer
|
||||
|
||||
--trusted-only
|
||||
Connect only to trusted peers
|
||||
|
||||
--instance <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]
|
||||
|
||||
--retries <RETRIES>
|
||||
The number of retries per request
|
||||
|
||||
[default: 5]
|
||||
|
||||
--nat <NAT>
|
||||
[default: any]
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
Database:
|
||||
--db.log-level <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 p2p body`
|
||||
|
||||
Download block body
|
||||
|
||||
```bash
|
||||
$ reth p2p body --help
|
||||
|
||||
Usage: reth p2p body [OPTIONS] <ID>
|
||||
|
||||
Arguments:
|
||||
<ID>
|
||||
The block number or hash
|
||||
|
||||
Options:
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 p2p header`
|
||||
|
||||
Download block header
|
||||
|
||||
```bash
|
||||
$ reth p2p header --help
|
||||
|
||||
Usage: reth p2p header [OPTIONS] <ID>
|
||||
|
||||
Arguments:
|
||||
<ID>
|
||||
The header number or hash
|
||||
|
||||
Options:
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
100
book/cli/reth.md
vendored
Normal file
100
book/cli/reth.md
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
# reth
|
||||
|
||||
Reth
|
||||
|
||||
```bash
|
||||
$ reth --help
|
||||
Usage: reth [OPTIONS] <COMMAND>
|
||||
|
||||
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
|
||||
recover Scripts for node recovery
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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')
|
||||
|
||||
-V, --version
|
||||
Print version
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
7
book/cli/config.md → book/cli/reth/config.md
vendored
7
book/cli/config.md → book/cli/reth/config.md
vendored
@ -1,10 +1,9 @@
|
||||
# `reth config`
|
||||
# reth config
|
||||
|
||||
Write config to stdout
|
||||
|
||||
```bash
|
||||
$ reth config --help
|
||||
|
||||
Usage: reth config [OPTIONS]
|
||||
|
||||
Options:
|
||||
@ -41,7 +40,7 @@ Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
@ -88,4 +87,4 @@ Display:
|
||||
|
||||
-q, --quiet
|
||||
Silence all log output
|
||||
```
|
||||
```
|
||||
121
book/cli/reth/db.md
vendored
Normal file
121
book/cli/reth/db.md
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
# reth db
|
||||
|
||||
Database debugging utilities
|
||||
|
||||
```bash
|
||||
$ reth db --help
|
||||
Usage: reth db [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
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
|
||||
snapshot Snapshots tables from database
|
||||
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 <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
99
book/cli/reth/db/clear.md
vendored
Normal file
99
book/cli/reth/db/clear.md
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
# reth db clear
|
||||
|
||||
Deletes all table entries
|
||||
|
||||
```bash
|
||||
$ reth db clear --help
|
||||
Usage: reth db clear [OPTIONS] <TABLE>
|
||||
|
||||
Arguments:
|
||||
<TABLE>
|
||||
Table name
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
118
book/cli/reth/db/diff.md
vendored
Normal file
118
book/cli/reth/db/diff.md
vendored
Normal file
@ -0,0 +1,118 @@
|
||||
# reth db diff
|
||||
|
||||
Create a diff between two database tables or two entire databases
|
||||
|
||||
```bash
|
||||
$ reth db diff --help
|
||||
Usage: reth db diff [OPTIONS] --secondary-datadir <SECONDARY_DATADIR> --output <OUTPUT>
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
--secondary-datadir <SECONDARY_DATADIR>
|
||||
The path to the data dir for all reth files and subdirectories.
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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
|
||||
|
||||
--table <TABLE>
|
||||
The table name to diff. If not specified, all tables are diffed.
|
||||
|
||||
--output <OUTPUT>
|
||||
The output directory for the diff report.
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
98
book/cli/reth/db/drop.md
vendored
Normal file
98
book/cli/reth/db/drop.md
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
# reth db drop
|
||||
|
||||
Deletes all database entries
|
||||
|
||||
```bash
|
||||
$ reth db drop --help
|
||||
Usage: reth db drop [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
-f, --force
|
||||
Bypasses the interactive confirmation and drops the database directly
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
107
book/cli/reth/db/get.md
vendored
Normal file
107
book/cli/reth/db/get.md
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# reth db get
|
||||
|
||||
Gets the content of a table for the given key
|
||||
|
||||
```bash
|
||||
$ reth db get --help
|
||||
Usage: reth db get [OPTIONS] <TABLE> <KEY>
|
||||
|
||||
Arguments:
|
||||
<TABLE>
|
||||
The table name
|
||||
|
||||
NOTE: The dupsort tables are not supported now.
|
||||
|
||||
<KEY>
|
||||
The key to get content for
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
--raw
|
||||
Output bytes instead of human-readable decoded value
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
141
book/cli/reth/db/list.md
vendored
Normal file
141
book/cli/reth/db/list.md
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
# reth db list
|
||||
|
||||
Lists the contents of a table
|
||||
|
||||
```bash
|
||||
$ reth db list --help
|
||||
Usage: reth db list [OPTIONS] <TABLE>
|
||||
|
||||
Arguments:
|
||||
<TABLE>
|
||||
The table name
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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>
|
||||
Skip first N entries
|
||||
|
||||
[default: 0]
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
-r, --reverse
|
||||
Reverse the order of the entries. If enabled last table entries are read
|
||||
|
||||
-l, --len <LEN>
|
||||
How many items to take from the walker
|
||||
|
||||
[default: 5]
|
||||
|
||||
--search <SEARCH>
|
||||
Search parameter for both keys and values. Prefix it with `0x` to search for binary data, and text otherwise.
|
||||
|
||||
ATTENTION! For compressed tables (`Transactions` and `Receipts`), there might be missing results since the search uses the raw uncompressed value from the database.
|
||||
|
||||
--min-row-size <MIN_ROW_SIZE>
|
||||
Minimum size of row in bytes
|
||||
|
||||
[default: 0]
|
||||
|
||||
--min-key-size <MIN_KEY_SIZE>
|
||||
Minimum size of key in bytes
|
||||
|
||||
[default: 0]
|
||||
|
||||
--min-value-size <MIN_VALUE_SIZE>
|
||||
Minimum size of value in bytes
|
||||
|
||||
[default: 0]
|
||||
|
||||
-c, --count
|
||||
Returns the number of rows found
|
||||
|
||||
-j, --json
|
||||
Dump as JSON instead of using TUI
|
||||
|
||||
--raw
|
||||
Output bytes instead of human-readable decoded value
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
95
book/cli/reth/db/path.md
vendored
Normal file
95
book/cli/reth/db/path.md
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# reth db path
|
||||
|
||||
Returns the full database path
|
||||
|
||||
```bash
|
||||
$ reth db path --help
|
||||
Usage: reth db path [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
144
book/cli/reth/db/snapshot.md
vendored
Normal file
144
book/cli/reth/db/snapshot.md
vendored
Normal file
@ -0,0 +1,144 @@
|
||||
# reth db snapshot
|
||||
|
||||
Snapshots tables from database
|
||||
|
||||
```bash
|
||||
$ reth db snapshot --help
|
||||
Usage: reth db snapshot [OPTIONS] [SEGMENTS]...
|
||||
|
||||
Arguments:
|
||||
[SEGMENTS]...
|
||||
Snapshot segments to generate
|
||||
|
||||
Possible values:
|
||||
- headers: Snapshot segment responsible for the `CanonicalHeaders`, `Headers`, `HeaderTD` tables
|
||||
- transactions: Snapshot segment responsible for the `Transactions` table
|
||||
- receipts: Snapshot segment responsible for the `Receipts` table
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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]
|
||||
|
||||
-f, --from <FROM>
|
||||
Starting block for the snapshot
|
||||
|
||||
[default: 0]
|
||||
|
||||
-b, --block-interval <BLOCK_INTERVAL>
|
||||
Number of blocks in the snapshot
|
||||
|
||||
[default: 500000]
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
-p, --parallel <PARALLEL>
|
||||
Sets the number of snapshots built in parallel. Note: Each parallel build is memory-intensive
|
||||
|
||||
[default: 1]
|
||||
|
||||
--only-stats
|
||||
Flag to skip snapshot creation and print snapshot files stats
|
||||
|
||||
--bench
|
||||
Flag to enable database-to-snapshot benchmarking
|
||||
|
||||
--only-bench
|
||||
Flag to skip snapshot creation and only run benchmarks on existing snapshots
|
||||
|
||||
-c, --compression <COMPRESSION>
|
||||
Compression algorithms to use
|
||||
|
||||
[default: lz4]
|
||||
[possible values: lz4, zstd, zstd-with-dictionary, uncompressed]
|
||||
|
||||
--with-filters
|
||||
Flag to enable inclusion list filters and PHFs
|
||||
|
||||
--phf <PHF>
|
||||
Specifies the perfect hashing function to use
|
||||
|
||||
Possible values:
|
||||
- fmph: Fingerprint-Based Minimal Perfect Hash Function
|
||||
- go-fmph: Fingerprint-Based Minimal Perfect Hash Function with Group Optimization
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
95
book/cli/reth/db/stats.md
vendored
Normal file
95
book/cli/reth/db/stats.md
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# 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 <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
95
book/cli/reth/db/version.md
vendored
Normal file
95
book/cli/reth/db/version.md
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# reth db version
|
||||
|
||||
Lists current and local database versions
|
||||
|
||||
```bash
|
||||
$ reth db version --help
|
||||
Usage: reth db version [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
91
book/cli/reth/debug.md
vendored
Normal file
91
book/cli/reth/debug.md
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
# reth debug
|
||||
|
||||
Various debug routines
|
||||
|
||||
```bash
|
||||
$ reth debug --help
|
||||
Usage: reth debug [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
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
|
||||
build-block Debug block building
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
7
book/cli/import.md → book/cli/reth/import.md
vendored
7
book/cli/import.md → book/cli/reth/import.md
vendored
@ -1,10 +1,9 @@
|
||||
# `reth import`
|
||||
# reth import
|
||||
|
||||
This syncs RLP encoded blocks from a file
|
||||
|
||||
```bash
|
||||
$ reth import --help
|
||||
|
||||
Usage: reth import [OPTIONS] <IMPORT_PATH>
|
||||
|
||||
Options:
|
||||
@ -69,7 +68,7 @@ Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
@ -116,4 +115,4 @@ Display:
|
||||
|
||||
-q, --quiet
|
||||
Silence all log output
|
||||
```
|
||||
```
|
||||
7
book/cli/init.md → book/cli/reth/init.md
vendored
7
book/cli/init.md → book/cli/reth/init.md
vendored
@ -1,10 +1,9 @@
|
||||
# `reth init`
|
||||
# reth init
|
||||
|
||||
Initialize the database from a genesis file
|
||||
|
||||
```bash
|
||||
$ reth init --help
|
||||
|
||||
Usage: reth init [OPTIONS]
|
||||
|
||||
Options:
|
||||
@ -60,7 +59,7 @@ Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
@ -107,4 +106,4 @@ Display:
|
||||
|
||||
-q, --quiet
|
||||
Silence all log output
|
||||
```
|
||||
```
|
||||
11
book/cli/node.md → book/cli/reth/node.md
vendored
11
book/cli/node.md → book/cli/reth/node.md
vendored
@ -1,10 +1,9 @@
|
||||
# `reth node`
|
||||
# reth node
|
||||
|
||||
Start the node
|
||||
|
||||
```bash
|
||||
$ reth node --help
|
||||
|
||||
Usage: reth node [OPTIONS]
|
||||
|
||||
Options:
|
||||
@ -94,7 +93,7 @@ Networking:
|
||||
--identity <IDENTITY>
|
||||
Custom node identity
|
||||
|
||||
[default: reth/v0.1.0-alpha.13-10a83e594/aarch64-apple-darwin]
|
||||
[default: reth/v0.1.0-alpha.13-<SHA>/aarch64-apple-darwin]
|
||||
|
||||
--p2p-secret-key <PATH>
|
||||
Secret key to use for this node.
|
||||
@ -174,7 +173,7 @@ RPC:
|
||||
--ipcpath <IPCPATH>
|
||||
Filename for IPC socket/pipe within the datadir
|
||||
|
||||
[default: /tmp/reth.ipc]
|
||||
[default: <CACHE_DIR>.ipc]
|
||||
|
||||
--authrpc.addr <AUTH_ADDR>
|
||||
Auth server address to listen on
|
||||
@ -426,7 +425,7 @@ Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
@ -473,4 +472,4 @@ Display:
|
||||
|
||||
-q, --quiet
|
||||
Silence all log output
|
||||
```
|
||||
```
|
||||
153
book/cli/recover.md → book/cli/reth/p2p.md
vendored
153
book/cli/recover.md → book/cli/reth/p2p.md
vendored
@ -1,17 +1,20 @@
|
||||
# `reth recover`
|
||||
# reth p2p
|
||||
|
||||
Scripts for node recovery
|
||||
P2P Debugging utilities
|
||||
|
||||
```bash
|
||||
$ reth recover --help
|
||||
|
||||
Usage: reth recover [OPTIONS] <COMMAND>
|
||||
$ reth p2p --help
|
||||
Usage: reth p2p [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
storage-tries Recover the node by deleting dangling storage tries
|
||||
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 <FILE>
|
||||
The path to the configuration file to use.
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
The chain this node is running.
|
||||
Possible values are either a built-in chain or the path to a chain specification file.
|
||||
@ -21,83 +24,6 @@ Options:
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
The path to the data dir for all reth files and subdirectories.
|
||||
|
||||
@ -109,14 +35,35 @@ Options:
|
||||
|
||||
[default: default]
|
||||
|
||||
--chain <CHAIN_OR_PATH>
|
||||
The chain this node is running.
|
||||
Possible values are either a built-in chain or the path to a chain specification file.
|
||||
--p2p-secret-key <PATH>
|
||||
Secret key to use for this node.
|
||||
|
||||
Built-in chains:
|
||||
mainnet, sepolia, goerli, holesky, dev
|
||||
This also will deterministically set the peer ID.
|
||||
|
||||
-d, --disable-discovery
|
||||
Disable the discovery service
|
||||
|
||||
--disable-dns-discovery
|
||||
Disable the DNS discovery
|
||||
|
||||
--disable-discv4-discovery
|
||||
Disable Discv4 discovery
|
||||
|
||||
--discovery.addr <DISCOVERY_ADDR>
|
||||
The UDP address to use for P2P discovery/networking
|
||||
|
||||
[default: mainnet]
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--discovery.port <DISCOVERY_PORT>
|
||||
The UDP port to use for P2P discovery/networking
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--trusted-peer <TRUSTED_PEER>
|
||||
Target trusted peer
|
||||
|
||||
--trusted-only
|
||||
Connect only to trusted peers
|
||||
|
||||
--instance <INSTANCE>
|
||||
Add a new instance of a node.
|
||||
@ -129,14 +76,36 @@ Options:
|
||||
|
||||
[default: 1]
|
||||
|
||||
--retries <RETRIES>
|
||||
The number of retries per request
|
||||
|
||||
[default: 5]
|
||||
|
||||
--nat <NAT>
|
||||
[default: any]
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
||||
Database:
|
||||
--db.log-level <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
@ -183,4 +152,4 @@ Display:
|
||||
|
||||
-q, --quiet
|
||||
Silence all log output
|
||||
```
|
||||
```
|
||||
79
book/cli/reth/p2p/body.md
vendored
Normal file
79
book/cli/reth/p2p/body.md
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
# reth p2p body
|
||||
|
||||
Download block body
|
||||
|
||||
```bash
|
||||
$ reth p2p body --help
|
||||
Usage: reth p2p body [OPTIONS] <ID>
|
||||
|
||||
Arguments:
|
||||
<ID>
|
||||
The block number or hash
|
||||
|
||||
Options:
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
79
book/cli/reth/p2p/header.md
vendored
Normal file
79
book/cli/reth/p2p/header.md
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
# reth p2p header
|
||||
|
||||
Download block header
|
||||
|
||||
```bash
|
||||
$ reth p2p header --help
|
||||
Usage: reth p2p header [OPTIONS] <ID>
|
||||
|
||||
Arguments:
|
||||
<ID>
|
||||
The header number or hash
|
||||
|
||||
Options:
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
88
book/cli/reth/recover.md
vendored
Normal file
88
book/cli/reth/recover.md
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
# reth recover
|
||||
|
||||
Scripts for node recovery
|
||||
|
||||
```bash
|
||||
$ reth recover --help
|
||||
Usage: reth recover [OPTIONS] <COMMAND>
|
||||
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
95
book/cli/reth/recover/storage-tries.md
vendored
Normal file
95
book/cli/reth/recover/storage-tries.md
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# reth recover storage-tries
|
||||
|
||||
Recover the node by deleting dangling storage tries
|
||||
|
||||
```bash
|
||||
$ reth recover storage-tries --help
|
||||
Usage: reth recover storage-tries [OPTIONS]
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
91
book/cli/reth/stage.md
vendored
Normal file
91
book/cli/reth/stage.md
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
# reth stage
|
||||
|
||||
Manipulate individual stages
|
||||
|
||||
```bash
|
||||
$ reth stage --help
|
||||
Usage: reth stage [OPTIONS] <COMMAND>
|
||||
|
||||
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)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
112
book/cli/reth/stage/drop.md
vendored
Normal file
112
book/cli/reth/stage/drop.md
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
# reth stage drop
|
||||
|
||||
Drop a stage's tables from the database
|
||||
|
||||
```bash
|
||||
$ reth stage drop --help
|
||||
Usage: reth stage drop [OPTIONS] <STAGE>
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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
|
||||
|
||||
<STAGE>
|
||||
[possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, account-history, storage-history, total-difficulty]
|
||||
|
||||
Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
116
book/cli/reth/stage/dump.md
vendored
Normal file
116
book/cli/reth/stage/dump.md
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
# reth stage dump
|
||||
|
||||
Dumps a stage from a range into a new database
|
||||
|
||||
```bash
|
||||
$ reth stage dump --help
|
||||
Usage: reth stage dump [OPTIONS] <COMMAND>
|
||||
|
||||
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 <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
87
book/cli/reth/stage/dump/account-hashing.md
vendored
Normal file
87
book/cli/reth/stage/dump/account-hashing.md
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# reth stage dump account-hashing
|
||||
|
||||
AccountHashing stage
|
||||
|
||||
```bash
|
||||
$ reth stage dump account-hashing --help
|
||||
Usage: reth stage dump account-hashing [OPTIONS] --output-db <OUTPUT_PATH> --from <FROM> --to <TO>
|
||||
|
||||
Options:
|
||||
--output-db <OUTPUT_PATH>
|
||||
The path to the new database folder.
|
||||
|
||||
-f, --from <FROM>
|
||||
From which block
|
||||
|
||||
-t, --to <TO>
|
||||
To which block
|
||||
|
||||
-d, --dry-run
|
||||
If passed, it will dry-run a stage execution from the newly created database right after dumping
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
87
book/cli/reth/stage/dump/execution.md
vendored
Normal file
87
book/cli/reth/stage/dump/execution.md
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# reth stage dump execution
|
||||
|
||||
Execution stage
|
||||
|
||||
```bash
|
||||
$ reth stage dump execution --help
|
||||
Usage: reth stage dump execution [OPTIONS] --output-db <OUTPUT_PATH> --from <FROM> --to <TO>
|
||||
|
||||
Options:
|
||||
--output-db <OUTPUT_PATH>
|
||||
The path to the new database folder.
|
||||
|
||||
-f, --from <FROM>
|
||||
From which block
|
||||
|
||||
-t, --to <TO>
|
||||
To which block
|
||||
|
||||
-d, --dry-run
|
||||
If passed, it will dry-run a stage execution from the newly created database right after dumping
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
87
book/cli/reth/stage/dump/merkle.md
vendored
Normal file
87
book/cli/reth/stage/dump/merkle.md
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# reth stage dump merkle
|
||||
|
||||
Merkle stage
|
||||
|
||||
```bash
|
||||
$ reth stage dump merkle --help
|
||||
Usage: reth stage dump merkle [OPTIONS] --output-db <OUTPUT_PATH> --from <FROM> --to <TO>
|
||||
|
||||
Options:
|
||||
--output-db <OUTPUT_PATH>
|
||||
The path to the new database folder.
|
||||
|
||||
-f, --from <FROM>
|
||||
From which block
|
||||
|
||||
-t, --to <TO>
|
||||
To which block
|
||||
|
||||
-d, --dry-run
|
||||
If passed, it will dry-run a stage execution from the newly created database right after dumping
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
87
book/cli/reth/stage/dump/storage-hashing.md
vendored
Normal file
87
book/cli/reth/stage/dump/storage-hashing.md
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
# reth stage dump storage-hashing
|
||||
|
||||
StorageHashing stage
|
||||
|
||||
```bash
|
||||
$ reth stage dump storage-hashing --help
|
||||
Usage: reth stage dump storage-hashing [OPTIONS] --output-db <OUTPUT_PATH> --from <FROM> --to <TO>
|
||||
|
||||
Options:
|
||||
--output-db <OUTPUT_PATH>
|
||||
The path to the new database folder.
|
||||
|
||||
-f, --from <FROM>
|
||||
From which block
|
||||
|
||||
-t, --to <TO>
|
||||
To which block
|
||||
|
||||
-d, --dry-run
|
||||
If passed, it will dry-run a stage execution from the newly created database right after dumping
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
213
book/cli/reth/stage/run.md
vendored
Normal file
213
book/cli/reth/stage/run.md
vendored
Normal file
@ -0,0 +1,213 @@
|
||||
# reth stage run
|
||||
|
||||
Run a single stage.
|
||||
|
||||
```bash
|
||||
$ reth stage run --help
|
||||
Usage: reth stage run [OPTIONS] --from <FROM> --to <TO> <STAGE>
|
||||
|
||||
Arguments:
|
||||
<STAGE>
|
||||
The name of the stage to run
|
||||
|
||||
[possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, account-history, storage-history, total-difficulty]
|
||||
|
||||
Options:
|
||||
--config <FILE>
|
||||
The path to the configuration file to use.
|
||||
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--metrics <SOCKET>
|
||||
Enable Prometheus metrics.
|
||||
|
||||
The metrics will be served at the given interface and port.
|
||||
|
||||
--from <FROM>
|
||||
The height to start at
|
||||
|
||||
-t, --to <TO>
|
||||
The end of the stage
|
||||
|
||||
--batch-size <BATCH_SIZE>
|
||||
Batch size for stage execution and unwind
|
||||
|
||||
-s, --skip-unwind
|
||||
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.
|
||||
|
||||
--instance <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')
|
||||
|
||||
Networking:
|
||||
-d, --disable-discovery
|
||||
Disable the discovery service
|
||||
|
||||
--disable-dns-discovery
|
||||
Disable the DNS discovery
|
||||
|
||||
--disable-discv4-discovery
|
||||
Disable Discv4 discovery
|
||||
|
||||
--discovery.addr <DISCOVERY_ADDR>
|
||||
The UDP address to use for P2P discovery/networking
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--discovery.port <DISCOVERY_PORT>
|
||||
The UDP port to use for P2P discovery/networking
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--trusted-peers <TRUSTED_PEERS>
|
||||
Comma separated enode URLs of trusted peers for P2P connections.
|
||||
|
||||
--trusted-peers enode://abcd@192.168.0.1:30303
|
||||
|
||||
--trusted-only
|
||||
Connect only to trusted peers
|
||||
|
||||
--bootnodes <BOOTNODES>
|
||||
Comma separated enode URLs for P2P discovery bootstrap.
|
||||
|
||||
Will fall back to a network-specific default if not specified.
|
||||
|
||||
--peers-file <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 <IDENTITY>
|
||||
Custom node identity
|
||||
|
||||
[default: reth/v0.1.0-alpha.13-<SHA>/aarch64-apple-darwin]
|
||||
|
||||
--p2p-secret-key <PATH>
|
||||
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>
|
||||
NAT resolution method (any|none|upnp|publicip|extip:<IP>)
|
||||
|
||||
[default: any]
|
||||
|
||||
--addr <ADDR>
|
||||
Network listening address
|
||||
|
||||
[default: 0.0.0.0]
|
||||
|
||||
--port <PORT>
|
||||
Network listening port
|
||||
|
||||
[default: 30303]
|
||||
|
||||
--max-outbound-peers <MAX_OUTBOUND_PEERS>
|
||||
Maximum number of outbound requests. default: 100
|
||||
|
||||
--max-inbound-peers <MAX_INBOUND_PEERS>
|
||||
Maximum number of inbound requests. default: 30
|
||||
|
||||
Database:
|
||||
--db.log-level <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
114
book/cli/reth/stage/unwind.md
vendored
Normal file
114
book/cli/reth/stage/unwind.md
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
# reth stage unwind
|
||||
|
||||
Unwinds a certain block range, deleting it from the database
|
||||
|
||||
```bash
|
||||
$ reth stage unwind --help
|
||||
Usage: reth stage unwind [OPTIONS] <COMMAND>
|
||||
|
||||
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 <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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 <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
99
book/cli/reth/stage/unwind/num-blocks.md
vendored
Normal file
99
book/cli/reth/stage/unwind/num-blocks.md
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
# reth stage unwind num-blocks
|
||||
|
||||
Unwinds the given number of blocks from the database
|
||||
|
||||
```bash
|
||||
$ reth stage unwind num-blocks --help
|
||||
Usage: reth stage unwind num-blocks [OPTIONS] <AMOUNT>
|
||||
|
||||
Arguments:
|
||||
<AMOUNT>
|
||||
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
99
book/cli/reth/stage/unwind/to-block.md
vendored
Normal file
99
book/cli/reth/stage/unwind/to-block.md
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
# reth stage unwind to-block
|
||||
|
||||
Unwinds the database until the given block number (range is inclusive)
|
||||
|
||||
```bash
|
||||
$ reth stage unwind to-block --help
|
||||
Usage: reth stage unwind to-block [OPTIONS] <TARGET>
|
||||
|
||||
Arguments:
|
||||
<TARGET>
|
||||
|
||||
|
||||
Options:
|
||||
--datadir <DATA_DIR>
|
||||
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 <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
88
book/cli/reth/test-vectors.md
vendored
Normal file
88
book/cli/reth/test-vectors.md
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
# reth test-vectors
|
||||
|
||||
Generate Test Vectors
|
||||
|
||||
```bash
|
||||
$ reth test-vectors --help
|
||||
Usage: reth test-vectors [OPTIONS] <COMMAND>
|
||||
|
||||
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)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
88
book/cli/reth/test-vectors/tables.md
vendored
Normal file
88
book/cli/reth/test-vectors/tables.md
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
# reth test-vectors tables
|
||||
|
||||
Generates test vectors for specified tables. If no table is specified, generate for all
|
||||
|
||||
```bash
|
||||
$ reth test-vectors tables --help
|
||||
Usage: reth test-vectors tables [OPTIONS] [NAMES]...
|
||||
|
||||
Arguments:
|
||||
[NAMES]...
|
||||
List of table names. Case-sensitive
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
1215
book/cli/stage.md
vendored
1215
book/cli/stage.md
vendored
File diff suppressed because it is too large
Load Diff
179
book/cli/test-vectors.md
vendored
179
book/cli/test-vectors.md
vendored
@ -1,179 +0,0 @@
|
||||
# `reth test-vectors`
|
||||
|
||||
Generate Test Vectors
|
||||
|
||||
```bash
|
||||
$ reth test-vectors --help
|
||||
|
||||
Usage: reth test-vectors [OPTIONS] <COMMAND>
|
||||
|
||||
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)
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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 test-vectors tables`
|
||||
|
||||
Generates test vectors for specified tables. If no table is specified, generate for all
|
||||
|
||||
```bash
|
||||
$ reth test-vectors tables --help
|
||||
|
||||
Usage: reth test-vectors tables [OPTIONS] [NAMES]...
|
||||
|
||||
Arguments:
|
||||
[NAMES]...
|
||||
List of table names. Case-sensitive
|
||||
|
||||
Options:
|
||||
--chain <CHAIN_OR_PATH>
|
||||
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, sepolia, goerli, holesky, dev
|
||||
|
||||
[default: mainnet]
|
||||
|
||||
--instance <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.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: /reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
[default: 200]
|
||||
|
||||
--log.file.max-files <COUNT>
|
||||
The maximum amount of log files that will be stored. If set to 0, background file logging is disabled
|
||||
|
||||
[default: 5]
|
||||
|
||||
--log.file.filter <FILTER>
|
||||
The filter to use for logs written to the log file
|
||||
|
||||
[default: debug]
|
||||
|
||||
--log.journald
|
||||
Write logs to journald
|
||||
|
||||
--log.journald.filter <FILTER>
|
||||
The filter to use for logs written to journald
|
||||
|
||||
[default: error]
|
||||
|
||||
--color <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
|
||||
```
|
||||
@ -1,128 +1,16 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
# Define the build path.
|
||||
build_path=$1
|
||||
if [ -z "$build_path" ]; then
|
||||
echo "Build path variable is not defined. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
reth_path=./$build_path/debug/reth
|
||||
echo "Using reth path: $reth_path (build path: $build_path)"
|
||||
BOOK_ROOT="$(dirname "$(dirname "$0")")"
|
||||
RETH=${1:-"$(dirname "$BOOK_ROOT")/target/debug/reth"}
|
||||
|
||||
# Define the path to the JSON configuration file.
|
||||
json_file="./book/cli/config.json"
|
||||
echo "Using config file: $json_file"
|
||||
|
||||
# Read commands from JSON configuration file.
|
||||
read_cmds_from_json() {
|
||||
local json_file="$1"
|
||||
jq -r '.commands | keys[]' "$json_file"
|
||||
}
|
||||
|
||||
# Read subcommands for a given command from JSON configuration file.
|
||||
read_subcmds_from_json() {
|
||||
local json_file="$1"
|
||||
local cmd="$2"
|
||||
jq -r ".commands[\"$cmd\"] | if type == \"object\" then keys[] else .[] end" "$json_file"
|
||||
}
|
||||
|
||||
# Read subsubcommands for a given command and subcommand from JSON configuration file.
|
||||
read_subsubcmds_from_json() {
|
||||
local json_file="$1"
|
||||
local cmd="$2"
|
||||
local subcmd="$3"
|
||||
jq -r ".commands[\"$cmd\"][\"$subcmd\"][]" "$json_file"
|
||||
}
|
||||
|
||||
# Update the main documentation.
|
||||
update_main_doc() {
|
||||
local file_path="./book/cli/cli.md"
|
||||
local cmd_help_output=$($reth_path --help)
|
||||
sed -i -e '/## Commands/,$d' "$file_path"
|
||||
cat >> "$file_path" << EOF
|
||||
## Commands
|
||||
|
||||
\`\`\`bash
|
||||
$ reth --help
|
||||
$cmd_help_output
|
||||
\`\`\`
|
||||
EOF
|
||||
}
|
||||
|
||||
# Update any `reth` command documentation.
|
||||
update_cli_cmd() {
|
||||
local cmd="$1"
|
||||
local subcmds=("${@:2}")
|
||||
echo "reth $cmd"
|
||||
|
||||
local cmd_help_output=$($reth_path "$cmd" --help)
|
||||
local description=$(echo "$cmd_help_output" | head -n 1)
|
||||
cat > "./book/cli/$cmd.md" << EOF
|
||||
# \`reth $cmd\`
|
||||
|
||||
$(if [[ -n "$description" ]]; then echo "$description"; fi)
|
||||
|
||||
\`\`\`bash
|
||||
$ reth $cmd --help
|
||||
$(echo "$cmd_help_output" | sed '1d')
|
||||
\`\`\`
|
||||
EOF
|
||||
|
||||
for subcmd in "${subcmds[@]}"; do
|
||||
echo " ├── $subcmd"
|
||||
|
||||
local subcmd_help_output=$($reth_path "$cmd" "$subcmd" --help)
|
||||
local subcmd_description=$(echo "$subcmd_help_output" | head -n 1)
|
||||
cat >> "book/cli/$cmd.md" << EOF
|
||||
|
||||
## \`reth $cmd $subcmd\`
|
||||
|
||||
$(if [[ -n "$subcmd_description" ]]; then echo "$subcmd_description"; fi)
|
||||
|
||||
\`\`\`bash
|
||||
$ reth $cmd $subcmd --help
|
||||
$(echo "$subcmd_help_output" | sed '1d')
|
||||
\`\`\`
|
||||
EOF
|
||||
|
||||
# Read subsubcommands and update documentation
|
||||
subsubcmds=($(read_subsubcmds_from_json "$json_file" "$cmd" "$subcmd"))
|
||||
for subsubcmd in "${subsubcmds[@]}"; do
|
||||
echo " ├── $subsubcmd"
|
||||
|
||||
local subsubcmd_help_output=$($reth_path "$cmd" "$subcmd" "$subsubcmd" --help)
|
||||
local subsubcmd_description=$(echo "$subsubcmd_help_output" | head -n 1)
|
||||
cat >> "book/cli/$cmd.md" << EOF
|
||||
|
||||
### \`reth $cmd $subcmd $subsubcmd\`
|
||||
|
||||
$(if [[ -n "$subsubcmd_description" ]]; then echo "$subsubcmd_description"; fi)
|
||||
|
||||
\`\`\`bash
|
||||
$ reth $cmd $subcmd $subsubcmd --help
|
||||
$(echo "$subsubcmd_help_output" | sed '1d')
|
||||
\`\`\`
|
||||
EOF
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# Update the book CLI documentation.
|
||||
main() {
|
||||
update_main_doc
|
||||
|
||||
# Update commands doc.
|
||||
cmds=($(read_cmds_from_json "$json_file"))
|
||||
for cmd in "${cmds[@]}"; do
|
||||
subcmds=($(read_subcmds_from_json "$json_file" "$cmd"))
|
||||
update_cli_cmd "$cmd" "${subcmds[@]}"
|
||||
done
|
||||
|
||||
# Update default paths on both Linux and macOS to avoid triggering the CI.
|
||||
sed -i -e 's/default: \/.*\/reth\//default: \/reth\//g' ./book/cli/*.md
|
||||
rm ./book/cli/*.md-e
|
||||
|
||||
echo "Book updated successfully."
|
||||
}
|
||||
|
||||
main
|
||||
cmd=(
|
||||
"$(dirname "$0")/help.py"
|
||||
--root-dir "$BOOK_ROOT/"
|
||||
--root-indentation 2
|
||||
--root-summary
|
||||
--out-dir "$BOOK_ROOT/cli/"
|
||||
"$RETH"
|
||||
)
|
||||
echo "Running: $" "${cmd[*]}"
|
||||
"${cmd[@]}"
|
||||
|
||||
@ -30,7 +30,7 @@ RUST_LOG=info reth node --full
|
||||
|
||||
On differences between archive and full nodes, see [Pruning & Full Node](./pruning.md#basic-concepts) section.
|
||||
|
||||
> Note that these commands will not open any HTTP/WS ports by default. You can change this by adding the `--http`, `--ws` flags, respectively and using the `--http.api` and `--ws.api` flags to enable various [JSON-RPC APIs](../jsonrpc/intro.md). For more commands, see the [`reth node` CLI reference](../cli/node.md).
|
||||
> Note that these commands will not open any HTTP/WS ports by default. You can change this by adding the `--http`, `--ws` flags, respectively and using the `--http.api` and `--ws.api` flags to enable various [JSON-RPC APIs](../jsonrpc/intro.md). For more commands, see the [`reth node` CLI reference](../cli/reth/node.md).
|
||||
|
||||
The EL <> CL communication happens over the [Engine API](https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md), which is by default exposed at `http://localhost:8551`. The connection is authenticated over JWT using a JWT secret which is auto-generated by Reth and placed in a file called `jwt.hex` in the data directory, which on Linux by default is `$HOME/.local/share/reth/` (`/Users/<NAME>/Library/Application Support/reth/mainnet/jwt.hex` in Mac).
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ is less than 1 second.
|
||||
It will take the same time as initial sync.
|
||||
|
||||
1. Stop Reth
|
||||
2. Drop the database using [`reth db drop`](../cli/db.md#reth-db-drop)
|
||||
2. Drop the database using [`reth db drop`](../cli/reth/db/drop.md)
|
||||
3. Start reth
|
||||
|
||||
### Database write error
|
||||
@ -110,4 +110,4 @@ pthread_mutex_lock.c:438: __pthread_mutex_lock_full: Assertion `e != ESRCH || !r
|
||||
|
||||
If you are using Docker, a possible solution is to run all database-accessing containers with `--pid=host` flag.
|
||||
|
||||
For more information, check out the `Containers` section in the [libmdbx README](https://github.com/erthink/libmdbx#containers).
|
||||
For more information, check out the `Containers` section in the [libmdbx README](https://github.com/erthink/libmdbx#containers).
|
||||
|
||||
Reference in New Issue
Block a user