feat(cli): make db stats non-detailed by default (#8056)

This commit is contained in:
Alexey Shekhirin
2024-05-02 20:31:48 +01:00
committed by GitHub
parent 1a1c24ba24
commit 232e7bf19b
14 changed files with 343 additions and 142 deletions

View File

@ -25,11 +25,11 @@ use tracing::info;
pub struct Command {
/// Show only the total size for static files.
#[arg(long, default_value_t = false)]
only_total_size: bool,
detailed_sizes: bool,
/// Show only the summary per static file segment.
/// Show detailed information per static file segment.
#[arg(long, default_value_t = false)]
summary: bool,
detailed_segments: bool,
/// Show a checksum of each table in the database.
///
@ -152,7 +152,7 @@ impl Command {
let mut table = ComfyTable::new();
table.load_preset(comfy_table::presets::ASCII_MARKDOWN);
if !self.only_total_size {
if self.detailed_sizes {
table.set_header([
"Segment",
"Block Range",
@ -216,7 +216,25 @@ impl Command {
.map(|metadata| metadata.len())
.unwrap_or_default();
if self.summary {
if self.detailed_segments {
let mut row = Row::new();
row.add_cell(Cell::new(segment))
.add_cell(Cell::new(format!("{block_range}")))
.add_cell(Cell::new(
tx_range.map_or("N/A".to_string(), |tx_range| format!("{tx_range}")),
))
.add_cell(Cell::new(format!("{columns} x {rows}")));
if self.detailed_sizes {
row.add_cell(Cell::new(human_bytes(data_size as f64)))
.add_cell(Cell::new(human_bytes(index_size as f64)))
.add_cell(Cell::new(human_bytes(offsets_size as f64)))
.add_cell(Cell::new(human_bytes(config_size as f64)));
}
row.add_cell(Cell::new(human_bytes(
(data_size + index_size + offsets_size + config_size) as f64,
)));
table.add_row(row);
} else {
if segment_columns > 0 {
assert_eq!(segment_columns, columns);
} else {
@ -227,24 +245,6 @@ impl Command {
segment_index_size += index_size;
segment_offsets_size += offsets_size;
segment_config_size += config_size;
} else {
let mut row = Row::new();
row.add_cell(Cell::new(segment))
.add_cell(Cell::new(format!("{block_range}")))
.add_cell(Cell::new(
tx_range.map_or("N/A".to_string(), |tx_range| format!("{tx_range}")),
))
.add_cell(Cell::new(format!("{columns} x {rows}")));
if !self.only_total_size {
row.add_cell(Cell::new(human_bytes(data_size as f64)))
.add_cell(Cell::new(human_bytes(index_size as f64)))
.add_cell(Cell::new(human_bytes(offsets_size as f64)))
.add_cell(Cell::new(human_bytes(config_size as f64)));
}
row.add_cell(Cell::new(human_bytes(
(data_size + index_size + offsets_size + config_size) as f64,
)));
table.add_row(row);
}
total_data_size += data_size;
@ -253,7 +253,7 @@ impl Command {
total_config_size += config_size;
}
if self.summary {
if !self.detailed_segments {
let first_ranges = ranges.first().expect("not empty list of ranges");
let last_ranges = ranges.last().expect("not empty list of ranges");
@ -271,7 +271,7 @@ impl Command {
tx_range.map_or("N/A".to_string(), |tx_range| format!("{tx_range}")),
))
.add_cell(Cell::new(format!("{segment_columns} x {segment_rows}")));
if !self.only_total_size {
if self.detailed_sizes {
row.add_cell(Cell::new(human_bytes(segment_data_size as f64)))
.add_cell(Cell::new(human_bytes(segment_index_size as f64)))
.add_cell(Cell::new(human_bytes(segment_offsets_size as f64)))
@ -299,7 +299,7 @@ impl Command {
.add_cell(Cell::new(""))
.add_cell(Cell::new(""))
.add_cell(Cell::new(""));
if !self.only_total_size {
if self.detailed_sizes {
row.add_cell(Cell::new(human_bytes(total_data_size as f64)))
.add_cell(Cell::new(human_bytes(total_index_size as f64)))
.add_cell(Cell::new(human_bytes(total_offsets_size as f64)))

View File

@ -30,11 +30,13 @@
- [`reth`](./cli/reth.md)
- [`reth node`](./cli/reth/node.md)
- [`reth init`](./cli/reth/init.md)
- [`reth init-state`](./cli/reth/init-state.md)
- [`reth import`](./cli/reth/import.md)
- [`reth dump-genesis`](./cli/reth/dump-genesis.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 checksum`](./cli/reth/db/checksum.md)
- [`reth db diff`](./cli/reth/db/diff.md)
- [`reth db get`](./cli/reth/db/get.md)
- [`reth db get mdbx`](./cli/reth/db/get/mdbx.md)

2
book/cli/SUMMARY.md vendored
View File

@ -1,11 +1,13 @@
- [`reth`](./reth.md)
- [`reth node`](./reth/node.md)
- [`reth init`](./reth/init.md)
- [`reth init-state`](./reth/init-state.md)
- [`reth import`](./reth/import.md)
- [`reth dump-genesis`](./reth/dump-genesis.md)
- [`reth db`](./reth/db.md)
- [`reth db stats`](./reth/db/stats.md)
- [`reth db list`](./reth/db/list.md)
- [`reth db checksum`](./reth/db/checksum.md)
- [`reth db diff`](./reth/db/diff.md)
- [`reth db get`](./reth/db/get.md)
- [`reth db get mdbx`](./reth/db/get/mdbx.md)

1
book/cli/reth.md vendored
View File

@ -9,6 +9,7 @@ Usage: reth [OPTIONS] <COMMAND>
Commands:
node Start the node
init Initialize the database from a genesis file
init-state Initialize the database from a state dump file
import This syncs RLP encoded blocks from a file
dump-genesis Dumps genesis block JSON configuration to stdout
db Database debugging utilities

1
book/cli/reth/db.md vendored
View File

@ -9,6 +9,7 @@ Usage: reth db [OPTIONS] <COMMAND>
Commands:
stats Lists all the tables, their entry count and their size
list Lists the contents of a table
checksum Calculates the content checksum 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

View File

@ -18,7 +18,7 @@ Options:
[default: default]
--only-total-size
--detailed-sizes
Show only the total size for static files
--chain <CHAIN_OR_PATH>
@ -30,8 +30,15 @@ Options:
[default: mainnet]
--summary
Show only the summary per static file segment
--detailed-segments
Show detailed information per static file segment
--checksum
Show a checksum of each table in the database.
WARNING: this option will take a long time to run, as it needs to traverse and hash the entire database.
For individual table checksums, use the `reth db checksum` command.
--instance <INSTANCE>
Add a new instance of a node.

View File

@ -30,6 +30,12 @@ Options:
[default: mainnet]
--no-state
Disables stages that require state.
--chunk-len <CHUNK_LEN>
Chunk byte length.
--instance <INSTANCE>
Add a new instance of a node.

203
book/cli/reth/node.md vendored
View File

@ -4,21 +4,18 @@ Start the node
```bash
$ reth node --help
Start the node
Usage: reth node [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]
--config <FILE>
@ -27,26 +24,26 @@ 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]
--with-unused-ports
Sets all ports to unused, allowing the OS to choose random unused ports when sockets are bound.
Mutually exclusive with `--instance`.
-h, --help
@ -55,7 +52,7 @@ Options:
Metrics:
--metrics <SOCKET>
Enable Prometheus metrics.
The metrics will be served at the given interface and port.
Networking:
@ -73,27 +70,42 @@ Networking:
--discovery.addr <DISCOVERY_ADDR>
The UDP address to use for devp2p peer discovery version 4
[default: 0.0.0.0]
--discovery.port <DISCOVERY_PORT>
The UDP port to use for devp2p peer discovery version 4
[default: 30303]
--discovery.v5.addr <DISCOVERY_V5_ADDR>
The UDP address to use for devp2p peer discovery version 5
[default: 0.0.0.0]
--discovery.v5.port <DISCOVERY_V5_PORT>
The UDP port to use for devp2p peer discovery version 5
[default: 9000]
--discovery.v5.lookup-interval <DISCOVERY_V5_LOOKUP_INTERVAL>
The interval in seconds at which to carry out periodic lookup queries, for the whole run of the program
[default: 60]
--discovery.v5.bootstrap.lookup-interval <DISCOVERY_V5_bootstrap_lookup_interval>
The interval in seconds at which to carry out boost lookup queries, for a fixed number of times, at bootstrap
[default: 5]
--discovery.v5.bootstrap.lookup-countdown <DISCOVERY_V5_bootstrap_lookup_countdown>
The number of times to carry out boost lookup queries at bootstrap
[default: 100]
--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
@ -101,7 +113,7 @@ Networking:
--bootnodes <BOOTNODES>
Comma separated enode URLs for P2P discovery bootstrap.
Will fall back to a network-specific default if not specified.
--peers-file <FILE>
@ -110,12 +122,12 @@ Networking:
--identity <IDENTITY>
Custom node identity
[default: reth/<VERSION>-<SHA>/<ARCH>-gnu]
[default: reth/<VERSION>-<SHA>/<ARCH>]
--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
@ -123,17 +135,17 @@ Networking:
--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>
@ -144,14 +156,14 @@ Networking:
--pooled-tx-response-soft-limit <BYTES>
Soft limit for the byte size of a `PooledTransactions` response on assembling a `GetPooledTransactions` request. Spec'd at 2 MiB.
<https://github.com/ethereum/devp2p/blob/master/caps/eth.md#protocol-messages>.
[default: 2097152]
--pooled-tx-pack-soft-limit <BYTES>
Default soft limit for the byte size of a `PooledTransactions` response on assembling a `GetPooledTransactions` request. This defaults to less than the [`SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE`], at 2 MiB, used when assembling a `PooledTransactions` response. Default is 128 KiB
[default: 131072]
RPC:
@ -160,17 +172,17 @@ RPC:
--http.addr <HTTP_ADDR>
Http server address to listen on
[default: 127.0.0.1]
--http.port <HTTP_PORT>
Http server port to listen on
[default: 8545]
--http.api <HTTP_API>
Rpc Modules to be configured for the HTTP server
[possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, eth-call-bundle]
--http.corsdomain <HTTP_CORSDOMAIN>
@ -181,12 +193,12 @@ RPC:
--ws.addr <WS_ADDR>
Ws server address to listen on
[default: 127.0.0.1]
--ws.port <WS_PORT>
Ws server port to listen on
[default: 8546]
--ws.origins <ws.origins>
@ -194,7 +206,7 @@ RPC:
--ws.api <WS_API>
Rpc Modules to be configured for the WS server
[possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, eth-call-bundle]
--ipcdisable
@ -202,176 +214,176 @@ 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
[default: 127.0.0.1]
--authrpc.port <AUTH_PORT>
Auth server port to listen on
[default: 8551]
--authrpc.jwtsecret <PATH>
Path to a JWT secret to use for the authenticated engine-API RPC server.
This will enforce JWT authentication for all requests coming from the consensus layer.
If no path is provided, a secret will be generated and stored in the datadir under `<DIR>/<CHAIN_ID>/jwt.hex`. For mainnet this would be `~/.reth/mainnet/jwt.hex` by default.
--auth-ipc
Enable auth engine api over IPC
Enable auth engine API over IPC
--auth-ipc.path <AUTH_IPC_PATH>
Filename for auth IPC socket/pipe within the datadir
[default: /tmp/reth_engine_api.ipc]
[default: <CACHE_DIR>_engine_api.ipc]
--rpc.jwtsecret <HEX>
Hex encoded JWT secret to authenticate the regular RPC server(s), see `--http.api` and `--ws.api`.
This is __not__ used for the authenticated engine-API RPC server, see `--authrpc.jwtsecret`.
--rpc.max-request-size <RPC_MAX_REQUEST_SIZE>
Set the maximum RPC request payload size for both HTTP and WS in megabytes
[default: 15]
--rpc.max-response-size <RPC_MAX_RESPONSE_SIZE>
Set the maximum RPC response payload size for both HTTP and WS in megabytes
[default: 160]
[aliases: rpc.returndata.limit]
--rpc.max-subscriptions-per-connection <RPC_MAX_SUBSCRIPTIONS_PER_CONNECTION>
Set the maximum concurrent subscriptions per connection
[default: 1024]
--rpc.max-connections <COUNT>
Maximum number of RPC server connections
[default: 500]
--rpc.max-tracing-requests <COUNT>
Maximum number of concurrent tracing requests
[default: 14]
[default: 8]
--rpc.max-blocks-per-filter <COUNT>
Maximum number of blocks that could be scanned per filter request. (0 = entire chain)
[default: 100000]
--rpc.max-logs-per-response <COUNT>
Maximum number of logs that can be returned in a single response. (0 = no limit)
[default: 20000]
--rpc.gascap <GAS_CAP>
Maximum gas limit for `eth_call` and call tracing RPC methods
[default: 50000000]
RPC State Cache:
--rpc-cache.max-blocks <MAX_BLOCKS>
Max number of blocks in cache
[default: 5000]
--rpc-cache.max-receipts <MAX_RECEIPTS>
Max number receipts in cache
[default: 2000]
--rpc-cache.max-envs <MAX_ENVS>
Max number of bytes for cached env data
[default: 1000]
--rpc-cache.max-concurrent-db-requests <MAX_CONCURRENT_DB_REQUESTS>
Max number of concurrent database requests
[default: 512]
Gas Price Oracle:
--gpo.blocks <BLOCKS>
Number of recent blocks to check for gas price
[default: 20]
--gpo.ignoreprice <IGNORE_PRICE>
Gas Price below which gpo will ignore transactions
[default: 2]
--gpo.maxprice <MAX_PRICE>
Maximum transaction priority fee(or gasprice before London Fork) to be recommended by gpo
[default: 500000000000]
--gpo.percentile <PERCENTILE>
The percentile of gas prices to use for the estimate
[default: 60]
TxPool:
--txpool.pending-max-count <PENDING_MAX_COUNT>
Max number of transaction in the pending sub-pool
[default: 10000]
--txpool.pending-max-size <PENDING_MAX_SIZE>
Max size of the pending sub-pool in megabytes
[default: 20]
--txpool.basefee-max-count <BASEFEE_MAX_COUNT>
Max number of transaction in the basefee sub-pool
[default: 10000]
--txpool.basefee-max-size <BASEFEE_MAX_SIZE>
Max size of the basefee sub-pool in megabytes
[default: 20]
--txpool.queued-max-count <QUEUED_MAX_COUNT>
Max number of transaction in the queued sub-pool
[default: 10000]
--txpool.queued-max-size <QUEUED_MAX_SIZE>
Max size of the queued sub-pool in megabytes
[default: 20]
--txpool.max-account-slots <MAX_ACCOUNT_SLOTS>
Max number of executable transaction slots guaranteed per account
[default: 16]
--txpool.pricebump <PRICE_BUMP>
Price bump (in %) for the transaction pool underpriced check
[default: 10]
--blobpool.pricebump <BLOB_TRANSACTION_PRICE_BUMP>
Price bump percentage to replace an already existing blob transaction
[default: 100]
--txpool.max-tx-input-bytes <MAX_TX_INPUT_BYTES>
Max size in bytes of a single transaction allowed to enter the pool
[default: 131072]
--txpool.max-cached-entries <MAX_CACHED_ENTRIES>
The maximum number of blobs to keep in the in memory blob cache
[default: 100]
--txpool.nolocals
@ -386,33 +398,33 @@ TxPool:
Builder:
--builder.extradata <EXTRADATA>
Block extra data set by the payload builder
[default: reth/<VERSION>/<OS>]
--builder.gaslimit <GAS_LIMIT>
Target gas ceiling for built blocks
[default: 30000000]
--builder.interval <SECONDS>
The interval at which the job should build a new payload after the last (in seconds)
[default: 1]
--builder.deadline <SECONDS>
The deadline for when the payload builder job should resolve
[default: 12]
--builder.max-tasks <MAX_PAYLOAD_TASKS>
Maximum number of tasks to spawn for building a payload
[default: 3]
Debug:
--debug.continuous
Prompt the downloader to download blocks one at a time.
NOTE: This is for testing purposes only.
--debug.terminate
@ -420,7 +432,7 @@ Debug:
--debug.tip <TIP>
Set the chain tip manually for testing purposes.
NOTE: This is a temporary flag
--debug.max-block <MAX_BLOCK>
@ -438,6 +450,9 @@ Debug:
--debug.hook-all
Hook on every transaction in a block
--debug.skip-fcu <SKIP_FCU>
If provided, the engine will skip `n` consecutive FCUs
--debug.engine-api-store <PATH>
The path to store engine API messages at. If specified, all of the intercepted engine API messages will be written to specified location
@ -457,13 +472,13 @@ Database:
--db.exclusive <EXCLUSIVE>
Open environment in exclusive/monopolistic mode. Makes it possible to open a database on an NFS volume
[possible values: true, false]
Dev testnet:
--dev
Start the node in dev mode
This mode uses a local proof-of-authority consensus engine with either fixed block times
or automatically mined blocks.
Disables network discovery and enables local http server.
@ -475,7 +490,7 @@ Dev testnet:
--dev.block-time <BLOCK_TIME>
Interval between blocks.
Parses strings using [humantime::parse_duration]
--dev.block-time 12s
@ -486,7 +501,7 @@ Pruning:
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout
[default: terminal]
Possible values:
@ -496,12 +511,12 @@ Logging:
--log.stdout.filter <FILTER>
The filter to use for logs written to stdout
[default: ]
--log.file.format <FORMAT>
The format to use for logs written to the log file
[default: terminal]
Possible values:
@ -511,22 +526,22 @@ Logging:
--log.file.filter <FILTER>
The filter to use for logs written to the log file
[default: debug]
--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.journald
@ -534,12 +549,12 @@ Logging:
--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:
@ -550,7 +565,7 @@ Logging:
Display:
-v, --verbosity...
Set the minimum log level.
-v Errors
-vv Warnings
-vvv Info
@ -559,4 +574,4 @@ Display:
-q, --quiet
Silence all log output
```
```

44
book/cli/reth/p2p.md vendored
View File

@ -49,24 +49,36 @@ Options:
--disable-discv4-discovery
Disable Discv4 discovery
--enable-discv5-discovery
Enable Discv5 discovery
--discovery.addr <DISCOVERY_ADDR>
The UDP address to use for P2P discovery/networking
The UDP address to use for devp2p peer discovery version 4
[default: 0.0.0.0]
--discovery.port <DISCOVERY_PORT>
The UDP port to use for P2P discovery/networking
The UDP port to use for devp2p peer discovery version 4
[default: 30303]
--trusted-peer <TRUSTED_PEER>
Target trusted peer
--discovery.v5.addr <DISCOVERY_V5_ADDR>
The UDP address to use for devp2p peer discovery version 5
[default: 0.0.0.0]
--trusted-only
Connect only to trusted peers
--discovery.v5.port <DISCOVERY_V5_PORT>
The UDP port to use for devp2p peer discovery version 5
[default: 9000]
--retries <RETRIES>
The number of retries per request
--discovery.v5.lookup-interval <DISCOVERY_V5_LOOKUP_INTERVAL>
The interval in seconds at which to carry out periodic lookup queries, for the whole run of the program
[default: 60]
--discovery.v5.bootstrap.lookup-interval <DISCOVERY_V5_bootstrap_lookup_interval>
The interval in seconds at which to carry out boost lookup queries, for a fixed number of times, at bootstrap
[default: 5]
@ -81,6 +93,22 @@ Options:
[default: 1]
--discovery.v5.bootstrap.lookup-countdown <DISCOVERY_V5_bootstrap_lookup_countdown>
The number of times to carry out boost lookup queries at bootstrap
[default: 100]
--trusted-peer <TRUSTED_PEER>
Target trusted peer
--trusted-only
Connect only to trusted peers
--retries <RETRIES>
The number of retries per request
[default: 5]
--nat <NAT>
[default: any]

View File

@ -68,8 +68,8 @@ Database:
- execution: The execution stage within the pipeline
- account-hashing: The account hashing stage within the pipeline
- storage-hashing: The storage hashing stage within the pipeline
- hashing: The hashing stage within the pipeline
- merkle: The Merkle stage within the pipeline
- hashing: The account and storage hashing stages within the pipeline
- merkle: The merkle stage within the pipeline
- tx-lookup: The transaction lookup stage within the pipeline
- account-history: The account history stage within the pipeline
- storage-history: The storage history stage within the pipeline

View File

@ -17,8 +17,8 @@ Arguments:
- execution: The execution stage within the pipeline
- account-hashing: The account hashing stage within the pipeline
- storage-hashing: The storage hashing stage within the pipeline
- hashing: The hashing stage within the pipeline
- merkle: The Merkle stage within the pipeline
- hashing: The account and storage hashing stages within the pipeline
- merkle: The merkle stage within the pipeline
- tx-lookup: The transaction lookup stage within the pipeline
- account-history: The account history stage within the pipeline
- storage-history: The storage history stage within the pipeline
@ -96,16 +96,44 @@ Networking:
--disable-discv4-discovery
Disable Discv4 discovery
--enable-discv5-discovery
Enable Discv5 discovery
--discovery.addr <DISCOVERY_ADDR>
The UDP address to use for P2P discovery/networking
The UDP address to use for devp2p peer discovery version 4
[default: 0.0.0.0]
--discovery.port <DISCOVERY_PORT>
The UDP port to use for P2P discovery/networking
The UDP port to use for devp2p peer discovery version 4
[default: 30303]
--discovery.v5.addr <DISCOVERY_V5_ADDR>
The UDP address to use for devp2p peer discovery version 5
[default: 0.0.0.0]
--discovery.v5.port <DISCOVERY_V5_PORT>
The UDP port to use for devp2p peer discovery version 5
[default: 9000]
--discovery.v5.lookup-interval <DISCOVERY_V5_LOOKUP_INTERVAL>
The interval in seconds at which to carry out periodic lookup queries, for the whole run of the program
[default: 60]
--discovery.v5.bootstrap.lookup-interval <DISCOVERY_V5_bootstrap_lookup_interval>
The interval in seconds at which to carry out boost lookup queries, for a fixed number of times, at bootstrap
[default: 5]
--discovery.v5.bootstrap.lookup-countdown <DISCOVERY_V5_bootstrap_lookup_countdown>
The number of times to carry out boost lookup queries at bootstrap
[default: 100]
--trusted-peers <TRUSTED_PEERS>
Comma separated enode URLs of trusted peers for P2P connections.
@ -126,7 +154,7 @@ Networking:
--identity <IDENTITY>
Custom node identity
[default: reth/<VERSION>-<SHA>/<ARCH>-gnu]
[default: reth/<VERSION>-<SHA>/<ARCH>]
--p2p-secret-key <PATH>
Secret key to use for this node.

View File

@ -7,8 +7,8 @@ $ 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
to-block Unwinds the database from the latest block, until the given block number or hash has been reached, that block is not included
num-blocks Unwinds the database from the latest block, until the given number of blocks have been reached
help Print this message or the help of the given subcommand(s)
Options:
@ -65,6 +65,117 @@ Database:
[possible values: true, false]
Networking:
-d, --disable-discovery
Disable the discovery service
--disable-dns-discovery
Disable the DNS discovery
--disable-discv4-discovery
Disable Discv4 discovery
--enable-discv5-discovery
Enable Discv5 discovery
--discovery.addr <DISCOVERY_ADDR>
The UDP address to use for devp2p peer discovery version 4
[default: 0.0.0.0]
--discovery.port <DISCOVERY_PORT>
The UDP port to use for devp2p peer discovery version 4
[default: 30303]
--discovery.v5.addr <DISCOVERY_V5_ADDR>
The UDP address to use for devp2p peer discovery version 5
[default: 0.0.0.0]
--discovery.v5.port <DISCOVERY_V5_PORT>
The UDP port to use for devp2p peer discovery version 5
[default: 9000]
--discovery.v5.lookup-interval <DISCOVERY_V5_LOOKUP_INTERVAL>
The interval in seconds at which to carry out periodic lookup queries, for the whole run of the program
[default: 60]
--discovery.v5.bootstrap.lookup-interval <DISCOVERY_V5_bootstrap_lookup_interval>
The interval in seconds at which to carry out boost lookup queries, for a fixed number of times, at bootstrap
[default: 5]
--discovery.v5.bootstrap.lookup-countdown <DISCOVERY_V5_bootstrap_lookup_countdown>
The number of times to carry out boost lookup queries at bootstrap
[default: 100]
--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/<VERSION>-<SHA>/<ARCH>]
--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
--pooled-tx-response-soft-limit <BYTES>
Soft limit for the byte size of a `PooledTransactions` response on assembling a `GetPooledTransactions` request. Spec'd at 2 MiB.
<https://github.com/ethereum/devp2p/blob/master/caps/eth.md#protocol-messages>.
[default: 2097152]
--pooled-tx-pack-soft-limit <BYTES>
Default soft limit for the byte size of a `PooledTransactions` response on assembling a `GetPooledTransactions` request. This defaults to less than the [`SOFT_LIMIT_BYTE_SIZE_POOLED_TRANSACTIONS_RESPONSE`], at 2 MiB, used when assembling a `PooledTransactions` response. Default is 128 KiB
[default: 131072]
Logging:
--log.stdout.format <FORMAT>
The format to use for logs written to stdout

View File

@ -1,6 +1,6 @@
# reth stage unwind num-blocks
Unwinds the given number of blocks from the database
Unwinds the database from the latest block, until the given number of blocks have been reached
```bash
$ reth stage unwind num-blocks --help

View File

@ -1,6 +1,6 @@
# reth stage unwind to-block
Unwinds the database until the given block number (range is inclusive)
Unwinds the database from the latest block, until the given block number or hash has been reached, that block is not included
```bash
$ reth stage unwind to-block --help