From c51a222b26ef5175ea40fd6b8e90d6358a1f5a14 Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Mon, 12 Jun 2023 18:06:58 +0200 Subject: [PATCH] docs: update CLI reference in book (#3105) --- book/cli/cli.md | 31 +-- book/cli/config.md | 46 ++++ book/cli/db.md | 52 +++- book/cli/debug.md | 173 +++++++++++++ book/cli/{drop-stage.md => import.md} | 43 ++-- book/cli/{dump-stage.md => init.md} | 45 +--- book/cli/node.md | 88 +++++-- book/cli/p2p.md | 44 +--- book/cli/stage.md | 355 ++++++++++++++++++++++---- book/cli/test-vectors.md | 16 ++ 10 files changed, 702 insertions(+), 191 deletions(-) create mode 100644 book/cli/config.md create mode 100644 book/cli/debug.md rename book/cli/{drop-stage.md => import.md} (69%) rename book/cli/{dump-stage.md => init.md} (64%) create mode 100644 book/cli/test-vectors.md diff --git a/book/cli/cli.md b/book/cli/cli.md index 3e17dd3e3..300b5361a 100644 --- a/book/cli/cli.md +++ b/book/cli/cli.md @@ -9,12 +9,15 @@ 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 db`](./db.md): Administrative TUI to the key-value store -* [`reth p2p`](./p2p.md): P2P-related utilities +* [`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 drop-stage`](./drop-stage.md): Drops all the tables associated with a stage. Useful for resetting state. -* [`reth dump-stage`](./dump-stage.md): Dumps all the tables associated with a stage to a new database. Useful for creating snapshots +* [`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. @@ -36,21 +39,15 @@ Commands: db Database debugging utilities stage - Run a single stage - dump-stage - Dumps a stage from a range into a new database - drop-stage - Drops a stage's tables from the database + Manipulate individual stages. p2p P2P Debugging utilities - test-chain - Run Ethereum blockchain tests test-vectors Generate Test Vectors config Write config to stdout - merkle-debug - Debug state root calculation + debug + Various debug routines help Print this message or the help of the given subcommand(s) @@ -67,7 +64,7 @@ Logging: --log.directory The path to put log files in - + [default: /Users/georgios/Library/Caches/reth/logs] --log.journald @@ -75,13 +72,13 @@ Logging: --log.filter The filter to use for logs written to the log file - + [default: debug] Display: -v, --verbosity... Set the minimum log level. - + -v Errors -vv Warnings -vvv Info diff --git a/book/cli/config.md b/book/cli/config.md new file mode 100644 index 000000000..39cb09462 --- /dev/null +++ b/book/cli/config.md @@ -0,0 +1,46 @@ +# `reth config` + +Write config to stdout + +```bash +$ reth config --help + +Usage: reth config [OPTIONS] + +Options: + --config + The path to the configuration file to use. + + --default + Show the default config + +Logging: + --log.persistent + The flag to enable persistent logs + + --log.directory + The path to put log files in + + [default: /Users/georgios/Library/Caches/reth/logs] + + --log.journald + Log events to journald + + --log.filter + The filter to use for logs written to the log file + + [default: debug] + +Display: + -v, --verbosity... + Set the minimum log level. + + -v Errors + -vv Warnings + -vvv Info + -vvvv Debug + -vvvvv Traces (warning: very verbose!) + + -q, --quiet + Silence all log output +``` diff --git a/book/cli/db.md b/book/cli/db.md index 32f867653..f20aa6130 100644 --- a/book/cli/db.md +++ b/book/cli/db.md @@ -12,6 +12,8 @@ Commands: Lists all the tables, their entry count and their size list Lists the contents of a table + get + Gets the content of a table for the given key drop Deletes all database entries help @@ -20,25 +22,25 @@ Commands: Options: --datadir The path to the data dir for all reth files and subdirectories. - + Defaults to the OS-specific data directory: - + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - Windows: `{FOLDERID_RoamingAppData}/reth/` - macOS: `$HOME/Library/Application Support/reth/` - + [default: default] --chain The chain this node is running. - + Possible values are either a built-in chain or the path to a chain specification file. - + Built-in chains: - mainnet - goerli - sepolia - + [default: mainnet] -h, --help @@ -47,7 +49,7 @@ Options: Display: -v, --verbosity... Set the minimum log level. - + -v Errors -vv Warnings -vvv Info @@ -80,16 +82,44 @@ Arguments: The table name Options: - -s, --start - Where to start iterating - + -s, --skip + Skip first N entries + [default: 0] + -r, --reverse + Reverse the order of the entries. If enabled last table entries are read. + + [default: false] + -l, --len How many items to take from the walker - + [default: 5] + -j, --json + Dump as JSON instead of using TUI. + + -h, --help + Print help (see a summary with '-h') +``` + +## `reth db get` + +```bash +$ reth db get --help +Gets the content of a table for the given key + +Usage: reth db get [OPTIONS] + +Arguments: +
+ The table name + +Options: + --key + The key to get content for + -h, --help Print help (see a summary with '-h') ``` diff --git a/book/cli/debug.md b/book/cli/debug.md new file mode 100644 index 000000000..fe152136b --- /dev/null +++ b/book/cli/debug.md @@ -0,0 +1,173 @@ +# `reth debug` + +```bash +$ reth debug --help +Various debug routines + +Usage: reth debug + +Commands: + execution + Debug the roundtrip execution of blocks as well as the generated data. + merkle + Debug the clean & incremental state root calculations. + help + Print this message or the help of the given subcommand(s) + +Logging: + --log.persistent + The flag to enable persistent logs + + --log.directory + The path to put log files in + + [default: /Users/georgios/Library/Caches/reth/logs] + + --log.journald + Log events to journald + + --log.filter + The filter to use for logs written to the log file + + [default: debug] + +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` + +```bash +$ reth debug execution --help +Debug the roundtrip execution of blocks as well as the generated data. + +Usage: reth debug execution [OPTIONS] + +Options: + --datadir + The path to the data dir for all reth files and subdirectories. + + Defaults to the OS-specific data directory: + + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` + - Windows: `{FOLDERID_RoamingAppData}/reth/` + - macOS: `$HOME/Library/Application Support/reth/` + + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] + + --debug.tip + Set the chain tip manually for testing purposes. + + --to + The maximum block height. + + --interval + The block interval for sync and unwind. + + [default: 1000] + +Networking: + -d, --disable-discovery + Disable the discovery service + + --disable-dns-discovery + Disable the DNS discovery + + --disable-discv4-discovery + Disable Discv4 discovery + + --discovery.port + The UDP port to use for P2P discovery/networking. default: 30303 + + --trusted-peers + Target trusted peer enodes --trusted-peers enode://abcd@192.168.0.1:30303 + + --trusted-only + Connect only to trusted peers + + --bootnodes + Bootnodes to connect to initially. + + Will fall back to a network-specific default if not specified. + + --peers-file + The path to the known peers file. Connected peers are dumped to this file on nodes + shutdown, and read on startup. Cannot be used with `--no-persist-peers`. + + --identity + Custom node identity + + --p2p-secret-key + Secret key to use for this node. + + This will also deterministically set the peer ID. If not specified, it will be set in the data dir for the chain being used. + + --no-persist-peers + Do not persist peers. + + --nat + NAT resolution method + + [default: any] + + --port + Network listening port. default: 30303 + +``` + +## `reth debug merkle` + +```bash +$ reth debug merkle --help +Debug the clean & incremental state root calculations. + +Usage: reth debug merkle [OPTIONS] + +Options: + --datadir + The path to the data dir for all reth files and subdirectories. + + Defaults to the OS-specific data directory: + + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` + - Windows: `{FOLDERID_RoamingAppData}/reth/` + - macOS: `$HOME/Library/Application Support/reth/` + + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] + + --to + The height to finish at + + --skip-node-depth + The depth after which we should start comparing branch nodes +``` diff --git a/book/cli/drop-stage.md b/book/cli/import.md similarity index 69% rename from book/cli/drop-stage.md rename to book/cli/import.md index 59a224db7..55e9012a8 100644 --- a/book/cli/drop-stage.md +++ b/book/cli/import.md @@ -1,45 +1,40 @@ -# reth drop-stage +# `reth import` ```bash -$ reth drop-stage --help -Drops a stage's tables from the database +$ reth import --help -Usage: reth drop-stage [OPTIONS] - -Arguments: - - [possible values: headers, bodies, senders, execution, hashing, merkle, tx-lookup, history] +Usage: reth import [OPTIONS] Options: + --config + The path to the configuration file to use. + --datadir The path to the data dir for all reth files and subdirectories. - + Defaults to the OS-specific data directory: - + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - Windows: `{FOLDERID_RoamingAppData}/reth/` - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --db - The path to the database folder. If not specified, it will be set in the data dir for the - chain being used. --chain The chain this node is running. - + Possible values are either a built-in chain or the path to a chain specification file. - + Built-in chains: - mainnet - goerli - sepolia - + [default: mainnet] - -h, --help - Print help (see a summary with '-h') + --path + The path to a block file for import. + + The online stages (headers and bodies) are replaced by a file import, after which the + remaining stages are executed. Logging: --log.persistent @@ -47,7 +42,7 @@ Logging: --log.directory The path to put log files in - + [default: /Users/georgios/Library/Caches/reth/logs] --log.journald @@ -55,13 +50,13 @@ Logging: --log.filter The filter to use for logs written to the log file - + [default: debug] Display: -v, --verbosity... Set the minimum log level. - + -v Errors -vv Warnings -vvv Info diff --git a/book/cli/dump-stage.md b/book/cli/init.md similarity index 64% rename from book/cli/dump-stage.md rename to book/cli/init.md index d7355557e..e4684ca56 100644 --- a/book/cli/dump-stage.md +++ b/book/cli/init.md @@ -1,53 +1,31 @@ -# `reth dump-stage` +# `reth init` ```bash -$ reth dump-stage --help -Dumps a stage from a range into a new database +$ reth init --help -Usage: reth dump-stage [OPTIONS] - -Commands: - execution - Execution stage - storage-hashing - StorageHashing stage - account-hashing - AccountHashing stage - merkle - Merkle stage - help - Print this message or the help of the given subcommand(s) +Usage: reth init [OPTIONS] Options: --datadir The path to the data dir for all reth files and subdirectories. - + Defaults to the OS-specific data directory: - + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - Windows: `{FOLDERID_RoamingAppData}/reth/` - macOS: `$HOME/Library/Application Support/reth/` - - [default: default] - - --db - The path to the database folder. If not specified, it will be set in the data dir for the - chain being used. --chain The chain this node is running. - + Possible values are either a built-in chain or the path to a chain specification file. - + Built-in chains: - mainnet - goerli - sepolia - - [default: mainnet] - -h, --help - Print help (see a summary with '-h') + [default: mainnet] Logging: --log.persistent @@ -55,7 +33,7 @@ Logging: --log.directory The path to put log files in - + [default: /Users/georgios/Library/Caches/reth/logs] --log.journald @@ -63,13 +41,13 @@ Logging: --log.filter The filter to use for logs written to the log file - + [default: debug] Display: -v, --verbosity... Set the minimum log level. - + -v Errors -vv Warnings -vvv Info @@ -78,5 +56,4 @@ Display: -q, --quiet Silence all log output - ``` diff --git a/book/cli/node.md b/book/cli/node.md index 0a63971b9..f68b16b5d 100644 --- a/book/cli/node.md +++ b/book/cli/node.md @@ -12,42 +12,40 @@ Usage: reth node [OPTIONS] Options: --datadir The path to the data dir for all reth files and subdirectories. - + Defaults to the OS-specific data directory: - + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - Windows: `{FOLDERID_RoamingAppData}/reth/` - macOS: `$HOME/Library/Application Support/reth/` - + [default: default] --config The path to the configuration file to use. - --p2p-secret-key - Secret key to use for this node. - - This will also deterministically set the peer ID. If not specified, it will be set in the data dir for the chain being used. - --chain The chain this node is running. - + Possible values are either a built-in chain or the path to a chain specification file. - + Built-in chains: - mainnet - goerli - sepolia - + [default: mainnet] + --auto-mine + Automatically mine blocks for new transactions + -h, --help Print help (see a summary with '-h') Metrics: --metrics Enable Prometheus metrics. - + The metrics will be served at the given interface and port. Networking: @@ -71,19 +69,27 @@ Networking: --bootnodes Bootnodes to connect to initially. - + Will fall back to a network-specific default if not specified. --peers-file The path to the known peers file. Connected peers are dumped to this file on nodes shutdown, and read on startup. Cannot be used with `--no-persist-peers`. + --identity + Custom node identity + + --p2p-secret-key + Secret key to use for this node. + + This will also deterministically set the peer ID. If not specified, it will be set in the data dir for the chain being used. + --no-persist-peers Do not persist peers. --nat NAT resolution method - + [default: any] --port @@ -135,13 +141,53 @@ Rpc: --authrpc.jwtsecret Path to a JWT secret to use for authenticated RPC endpoints - --auto-mine - Automatically mine blocks for new transactions + --rpc-max-request-size + Set the maximum RPC request payload size for both HTTP and WS in megabytes. + + --rpc-max-response-size + Set the maximum RPC response payload size for both HTTP and WS in megabytes. + + --rpc-max-subscriptions-per-connection + Set the the maximum concurrent subscriptions per connection. + + --rpc-max-connections + Maximum number of RPC server connections. + + --rpc-max-tracing-requests + Maximum number of concurrent tracing requests. + + --gas-price-oracle + Gas price oracle configuration. + + --block-cache-size + Max size for cached block data in megabytes. + + --receipt-cache-size + Max size for cached receipt data in megabytes. + + --env-cache-size + Max size for cached evm env data in megabytes. + +Builder: + --builder.extradata + Block extra data set by the payload builder. + + --builder.gaslimit + Target gas ceiling for built blocks. + + --builder.interval + The interval at which the job should build a new payload after the last (in seconds). + + --builder.deadline + The deadline for when the payload builder job should resolve. + + --builder.max-tasks + Maximum number of tasks to spawn for building a payload. Debug: --debug.continuous Prompt the downloader to download blocks one at a time. - + NOTE: This is for testing purposes only. --debug.terminate @@ -149,7 +195,7 @@ Debug: --debug.tip Set the chain tip manually for testing purposes. - + NOTE: This is a temporary flag --debug.max-block @@ -173,7 +219,7 @@ Logging: --log.directory The path to put log files in - + [default: /Users/georgios/Library/Caches/reth/logs] --log.journald @@ -181,13 +227,13 @@ Logging: --log.filter The filter to use for logs written to the log file - + [default: debug] Display: -v, --verbosity... Set the minimum log level. - + -v Errors -vv Warnings -vvv Info diff --git a/book/cli/p2p.md b/book/cli/p2p.md index 9d84a65bf..1796c858a 100644 --- a/book/cli/p2p.md +++ b/book/cli/p2p.md @@ -20,30 +20,30 @@ Options: --chain The chain this node is running. - + Possible values are either a built-in chain or the path to a chain specification file. - + Built-in chains: - mainnet - goerli - sepolia - + [default: mainnet] --datadir The path to the data dir for all reth files and subdirectories. - + Defaults to the OS-specific data directory: - + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - Windows: `{FOLDERID_RoamingAppData}/reth/` - macOS: `$HOME/Library/Application Support/reth/` - + [default: default] --p2p-secret-key Secret key to use for this node. - + This also will deterministically set the peer ID. -d, --disable-discovery @@ -66,7 +66,7 @@ Options: --retries The number of retries per request - + [default: 5] --nat @@ -81,7 +81,7 @@ Logging: --log.directory The path to put log files in - + [default: /Users/georgios/Library/Caches/reth/logs] --log.journald @@ -89,13 +89,13 @@ Logging: --log.filter The filter to use for logs written to the log file - + [default: debug] Display: -v, --verbosity... Set the minimum log level. - + -v Errors -vv Warnings -vvv Info @@ -112,20 +112,11 @@ Display: $ reth p2p header --help Download block header -Usage: reth p2p header [OPTIONS] +Usage: reth p2p header Arguments: The header number or hash - -Options: - --p2p-secret-key - Secret key to use for this node. - - This also will deterministically set the peer ID. - - -h, --help - Print help (see a summary with '-h') ``` @@ -136,18 +127,9 @@ Options: $ reth p2p body --help Download block body -Usage: reth p2p body [OPTIONS] +Usage: reth p2p body Arguments: The block number or hash - -Options: - --p2p-secret-key - Secret key to use for this node. - - This also will deterministically set the peer ID. - - -h, --help - Print help (see a summary with '-h') ``` diff --git a/book/cli/stage.md b/book/cli/stage.md index 51b219138..a89eb7b60 100644 --- a/book/cli/stage.md +++ b/book/cli/stage.md @@ -1,15 +1,68 @@ # `reth stage` ```bash -Run a single stage. +$ reth stage --help -Usage: reth stage [OPTIONS] --from --to +Usage: reth db -Arguments: - - The name of the stage to run - - [possible values: headers, bodies, senders, execution, hashing, merkle, tx-lookup, history] +Commands: + run + Run a single stage. + + Note that this won't use the Pipeline and as a result runs stages + assuming that all the data can be held in memory. It is not recommended + to run a stage for really large block ranges if your computer does not have + a lot of memory to store all the data. + 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) + +Logging: + --log.persistent + The flag to enable persistent logs + + --log.directory + The path to put log files in + + [default: /Users/georgios/Library/Caches/reth/logs] + + --log.journald + Log events to journald + + --log.filter + The filter to use for logs written to the log file + + [default: debug] + +Display: + -v, --verbosity... + Set the minimum log level. + + -v Errors + -vv Warnings + -vvv Info + -vvvv Debug + -vvvvv Traces (warning: very verbose!) + + -q, --quiet + Silence all log output +``` + +## `reth stage run` + +```bash +Usage: reth stage run [OPTIONS] --from --to --stage + Run a single stage. + + Note that this won't use the Pipeline and as a result runs stages + assuming that all the data can be held in memory. It is not recommended + to run a stage for really large block ranges if your computer does not have + a lot of memory to store all the data. Options: --config @@ -17,48 +70,56 @@ Options: --datadir The path to the data dir for all reth files and subdirectories. - + Defaults to the OS-specific data directory: - + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` - Windows: `{FOLDERID_RoamingAppData}/reth/` - macOS: `$HOME/Library/Application Support/reth/` - + [default: default] --chain The chain this node is running. - + Possible values are either a built-in chain or the path to a chain specification file. - + Built-in chains: - mainnet - goerli - sepolia - - [default: mainnet] - --p2p-secret-key - Secret key to use for this node. - - This also will deterministically set the peer ID. + [default: mainnet] --metrics Enable Prometheus metrics. - + The metrics will be served at the given interface and port. + --stage + The name of the stage to run + + [possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, history, account-history, storage-history, total-difficulty] + --from The height to start at -t, --to The end of the stage + --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. + --commit + Commits the changes in the database. WARNING: potentially destructive. + + Useful when you want to run diagnostics on the database. + -h, --help Print help (see a summary with '-h') @@ -83,52 +144,240 @@ Networking: --bootnodes Bootnodes to connect to initially. - + Will fall back to a network-specific default if not specified. --peers-file The path to the known peers file. Connected peers are dumped to this file on nodes shutdown, and read on startup. Cannot be used with `--no-persist-peers`. + --identity + Custom node identity + + --p2p-secret-key + Secret key to use for this node. + + This will also deterministically set the peer ID. If not specified, it will be set in the + data dir for the chain being used. + --no-persist-peers Do not persist peers. --nat NAT resolution method - + [default: any] --port Network listening port. default: 30303 - -Logging: - --log.persistent - The flag to enable persistent logs - - --log.directory - The path to put log files in - - [default: /Users/georgios/Library/Caches/reth/logs] - - --log.journald - Log events to journald - - --log.filter - The filter to use for logs written to the log file - - [default: debug] - -Display: - -v, --verbosity... - Set the minimum log level. - - -v Errors - -vv Warnings - -vvv Info - -vvvv Debug - -vvvvv Traces (warning: very verbose!) - - -q, --quiet - Silence all log output - +``` + +## `reth stage drop` + +```bash +Usage: reth stage drop [OPTIONS] + Drop a stage's tables from the database. + +Arguments: + + The name of the stage to drop + + [possible values: headers, bodies, senders, execution, account-hashing, storage-hashing, hashing, merkle, tx-lookup, history, account-history, storage-history, total-difficulty] + +Options: + --datadir + The path to the data dir for all reth files and subdirectories. + + Defaults to the OS-specific data directory: + + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` + - Windows: `{FOLDERID_RoamingAppData}/reth/` + - macOS: `$HOME/Library/Application Support/reth/` + + [default: default] + + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] +``` + +## `reth stage dump` + +```bash +Usage: reth stage dump [OPTIONS] + Dumps a stage from a range into a new database. + +Commands: + execution + Execution stage. + storage-hashing + StorageHashing stage. + account-hashing + AccountHashing stage. + merkle + Merkle stage. + help + Print this message or the help of the given subcommand(s) + +Options: + --datadir + The path to the data dir for all reth files and subdirectories. + + Defaults to the OS-specific data directory: + + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` + - Windows: `{FOLDERID_RoamingAppData}/reth/` + - macOS: `$HOME/Library/Application Support/reth/` + + [default: default] + + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] +``` + +### `reth stage dump execution` + +```bash +Usage: reth stage dump execution [OPTIONS] + Execution stage. + +Options: + --output_db + The path to the new database folder. + + -f, --from + From which block. + + -t, --to + To which block. + + -d, --dry-run + If passed, it will dry-run a stage execution from the newly created database right after + dumping. + + [default: false] +``` + +### `reth stage dump storage-hashing` + +```bash +Usage: reth stage dump storage-hashing [OPTIONS] + StorageHashing stage. + +Options: + --output_db + The path to the new database folder. + + -f, --from + From which block. + + -t, --to + To which block. + + -d, --dry-run + If passed, it will dry-run a stage execution from the newly created database right after + dumping. + + [default: false] +``` + +### `reth stage dump account-hashing` + +```bash +Usage: reth stage dump account-hashing [OPTIONS] + AccountHashing stage. + +Options: + --output_db + The path to the new database folder. + + -f, --from + From which block. + + -t, --to + To which block. + + -d, --dry-run + If passed, it will dry-run a stage execution from the newly created database right after + dumping. + + [default: false] +``` + +### `reth stage dump merkle` + +```bash +Usage: reth stage dump merkle [OPTIONS] + Merkle stage. + +Options: + --output_db + The path to the new database folder. + + -f, --from + From which block. + + -t, --to + To which block. + -d, --dry-run + If passed, it will dry-run a stage execution from the newly created database right after + dumping. + + [default: false] +``` + +## `reth stage unwind` + +```bash +Usage: reth stage unwind [OPTIONS] + Unwinds a certain block range, deleting it from the database. + +Commands: + to-block + Unwinds the database until the given block number (range is inclusive). + num-blocks + Unwinds the given number of blocks from the database. + help + Print this message or the help of the given subcommand(s) + +Options: + --datadir + The path to the data dir for all reth files and subdirectories. + + Defaults to the OS-specific data directory: + + - Linux: `$XDG_DATA_HOME/reth/` or `$HOME/.local/share/reth/` + - Windows: `{FOLDERID_RoamingAppData}/reth/` + - macOS: `$HOME/Library/Application Support/reth/` + + [default: default] + + --chain + The chain this node is running. + + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + - mainnet + - goerli + - sepolia + + [default: mainnet] ``` diff --git a/book/cli/test-vectors.md b/book/cli/test-vectors.md new file mode 100644 index 000000000..4e7f9c8e7 --- /dev/null +++ b/book/cli/test-vectors.md @@ -0,0 +1,16 @@ +# `reth test-vectors` + +```bash +$ reth test-vectors --help +Generate Test Vectors + +Usage: reth test-vectors + +Commands: + tables + Generates test vectors for specified tables. If no table is specified, generate for all. + +Arguments: + + List of table names. Case-sensitive. +```