Skip to content

Commit

Permalink
feat(book): update CLI section
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Sep 20, 2023
1 parent 6016da7 commit 1a58519
Show file tree
Hide file tree
Showing 13 changed files with 621 additions and 1,441 deletions.
1 change: 1 addition & 0 deletions book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
1. [reth test-vectors](./cli/test-vectors.md)
1. [reth config](./cli/config.md)
1. [reth debug](./cli/debug.md)
1. [reth recover](./cli/recover.md)
1. [Developers](./developers/developers.md)
1. [Contribute](./developers/contribute.md)
77 changes: 54 additions & 23 deletions book/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,43 +30,64 @@ 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
help
Print this message or the help of the given subcommand(s)
node Start the node
init Initialize the database from a genesis file
import This syncs RLP encoded blocks from a file
db Database debugging utilities
stage Manipulate individual stages
p2p P2P Debugging utilities
test-vectors Generate Test Vectors
config Write config to stdout
debug Various debug routines
recover Scripts for node recovery
help Print this message or the help of the given subcommand(s)

Options:
--chain <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
- goerli
- sepolia

[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.persistent
The flag to enable persistent logs

--log.directory <PATH>
The path to put log files in
[default: /reth/logs]
--log.max-size <SIZE>
The maximum size (in MB) of log files
[default: 200]
--log.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.journald
Log events to journald
Expand All @@ -75,6 +96,16 @@ Logging:
[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.
Expand Down
8 changes: 7 additions & 1 deletion book/cli/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
"db": {
"stats": [],
"list": [],
"diff": [],
"get": [],
"drop": [],
"clear": [],
"version": [],
"path": []
},
"debug": {
"execution": [],
"merkle": []
"merkle": [],
"in-memory-merkle": []
},
"import": [],
"init": [],
Expand All @@ -20,6 +23,9 @@
"header": [],
"body": []
},
"recover": {
"storage-tries": []
},
"stage": {
"run": [],
"drop": [],
Expand Down
46 changes: 43 additions & 3 deletions book/cli/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,48 @@ Options:
--default
Show the default config

--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
- goerli
- sepolia

[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.persistent
The flag to enable persistent logs

--log.directory <PATH>
The path to put log files in
[default: /reth/logs]
--log.max-size <SIZE>
The maximum size (in MB) of log files
[default: 200]
--log.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.journald
Log events to journald
Expand All @@ -34,6 +64,16 @@ Logging:
[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.
Expand Down
Loading

0 comments on commit 1a58519

Please sign in to comment.