diff --git a/bin/reth/src/commands/db/stats.rs b/bin/reth/src/commands/db/stats.rs index 474603c74..b47e7980b 100644 --- a/bin/reth/src/commands/db/stats.rs +++ b/bin/reth/src/commands/db/stats.rs @@ -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))) diff --git a/book/SUMMARY.md b/book/SUMMARY.md index ffd5f67e0..fc6deb282 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -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) diff --git a/book/cli/SUMMARY.md b/book/cli/SUMMARY.md index 07711434e..ee3d714b2 100644 --- a/book/cli/SUMMARY.md +++ b/book/cli/SUMMARY.md @@ -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) diff --git a/book/cli/reth.md b/book/cli/reth.md index f213a30f2..8b6f757c9 100644 --- a/book/cli/reth.md +++ b/book/cli/reth.md @@ -9,6 +9,7 @@ Usage: reth [OPTIONS] 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 diff --git a/book/cli/reth/db.md b/book/cli/reth/db.md index 77137dadb..bd5989d7f 100644 --- a/book/cli/reth/db.md +++ b/book/cli/reth/db.md @@ -9,6 +9,7 @@ Usage: reth db [OPTIONS] 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 diff --git a/book/cli/reth/db/stats.md b/book/cli/reth/db/stats.md index dea5e3d05..437c10bd0 100644 --- a/book/cli/reth/db/stats.md +++ b/book/cli/reth/db/stats.md @@ -18,7 +18,7 @@ Options: [default: default] - --only-total-size + --detailed-sizes Show only the total size for static files --chain @@ -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 Add a new instance of a node. diff --git a/book/cli/reth/import.md b/book/cli/reth/import.md index 382efb8ef..411527f9e 100644 --- a/book/cli/reth/import.md +++ b/book/cli/reth/import.md @@ -30,6 +30,12 @@ Options: [default: mainnet] + --no-state + Disables stages that require state. + + --chunk-len + Chunk byte length. + --instance Add a new instance of a node. diff --git a/book/cli/reth/node.md b/book/cli/reth/node.md index 450180c84..d1972a608 100644 --- a/book/cli/reth/node.md +++ b/book/cli/reth/node.md @@ -4,21 +4,18 @@ Start the node ```bash $ reth node --help - -Start the node - 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 @@ -27,26 +24,26 @@ 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, sepolia, goerli, holesky, dev - + [default: mainnet] --instance Add a new instance of a node. - + Configures the ports of the node to avoid conflicts with the defaults. This is useful for running multiple nodes on the same machine. - + Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. - + Changes to the following port numbers: - DISCOVERY_PORT: default + `instance` - 1 - AUTH_PORT: default + `instance` * 100 - 100 - HTTP_RPC_PORT: default - `instance` + 1 - WS_RPC_PORT: default + `instance` * 2 - 2 - + [default: 1] --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 Enable Prometheus metrics. - + The metrics will be served at the given interface and port. Networking: @@ -73,27 +70,42 @@ Networking: --discovery.addr The UDP address to use for devp2p peer discovery version 4 - + [default: 0.0.0.0] --discovery.port The UDP port to use for devp2p peer discovery version 4 - + [default: 30303] --discovery.v5.addr The UDP address to use for devp2p peer discovery version 5 - + [default: 0.0.0.0] --discovery.v5.port The UDP port to use for devp2p peer discovery version 5 - + [default: 9000] + --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 + 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 + The number of times to carry out boost lookup queries at bootstrap + + [default: 100] + --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 Comma separated enode URLs for P2P discovery bootstrap. - + Will fall back to a network-specific default if not specified. --peers-file @@ -110,12 +122,12 @@ Networking: --identity Custom node identity - - [default: reth/-/-gnu] + + [default: reth/-/] --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 @@ -123,17 +135,17 @@ Networking: --nat NAT resolution method (any|none|upnp|publicip|extip:\) - + [default: any] --addr Network listening address - + [default: 0.0.0.0] --port Network listening port - + [default: 30303] --max-outbound-peers @@ -144,14 +156,14 @@ Networking: --pooled-tx-response-soft-limit Soft limit for the byte size of a `PooledTransactions` response on assembling a `GetPooledTransactions` request. Spec'd at 2 MiB. - + . - + [default: 2097152] --pooled-tx-pack-soft-limit 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 server address to listen on - + [default: 127.0.0.1] --http.port Http server port to listen on - + [default: 8545] --http.api Rpc Modules to be configured for the HTTP server - + [possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, eth-call-bundle] --http.corsdomain @@ -181,12 +193,12 @@ RPC: --ws.addr Ws server address to listen on - + [default: 127.0.0.1] --ws.port Ws server port to listen on - + [default: 8546] --ws.origins @@ -194,7 +206,7 @@ RPC: --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 Filename for IPC socket/pipe within the datadir - - [default: /tmp/reth.ipc] + + [default: .ipc] --authrpc.addr Auth server address to listen on - + [default: 127.0.0.1] --authrpc.port Auth server port to listen on - + [default: 8551] --authrpc.jwtsecret Path to a JWT secret to use for 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 `//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 Filename for auth IPC socket/pipe within the datadir - - [default: /tmp/reth_engine_api.ipc] + + [default: _engine_api.ipc] --rpc.jwtsecret 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 Set the maximum RPC request payload size for both HTTP and WS in megabytes - + [default: 15] --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 Set the maximum concurrent subscriptions per connection - + [default: 1024] --rpc.max-connections Maximum number of RPC server connections - + [default: 500] --rpc.max-tracing-requests Maximum number of concurrent tracing requests - - [default: 14] + + [default: 8] --rpc.max-blocks-per-filter Maximum number of blocks that could be scanned per filter request. (0 = entire chain) - + [default: 100000] --rpc.max-logs-per-response Maximum number of logs that can be returned in a single response. (0 = no limit) - + [default: 20000] --rpc.gascap Maximum gas limit for `eth_call` and call tracing RPC methods - + [default: 50000000] RPC State Cache: --rpc-cache.max-blocks Max number of blocks in cache - + [default: 5000] --rpc-cache.max-receipts Max number receipts in cache - + [default: 2000] --rpc-cache.max-envs Max number of bytes for cached env data - + [default: 1000] --rpc-cache.max-concurrent-db-requests Max number of concurrent database requests - + [default: 512] Gas Price Oracle: --gpo.blocks Number of recent blocks to check for gas price - + [default: 20] --gpo.ignoreprice Gas Price below which gpo will ignore transactions - + [default: 2] --gpo.maxprice Maximum transaction priority fee(or gasprice before London Fork) to be recommended by gpo - + [default: 500000000000] --gpo.percentile The percentile of gas prices to use for the estimate - + [default: 60] TxPool: --txpool.pending-max-count Max number of transaction in the pending sub-pool - + [default: 10000] --txpool.pending-max-size Max size of the pending sub-pool in megabytes - + [default: 20] --txpool.basefee-max-count Max number of transaction in the basefee sub-pool - + [default: 10000] --txpool.basefee-max-size Max size of the basefee sub-pool in megabytes - + [default: 20] --txpool.queued-max-count Max number of transaction in the queued sub-pool - + [default: 10000] --txpool.queued-max-size Max size of the queued sub-pool in megabytes - + [default: 20] --txpool.max-account-slots Max number of executable transaction slots guaranteed per account - + [default: 16] --txpool.pricebump Price bump (in %) for the transaction pool underpriced check - + [default: 10] --blobpool.pricebump Price bump percentage to replace an already existing blob transaction - + [default: 100] --txpool.max-tx-input-bytes Max size in bytes of a single transaction allowed to enter the pool - + [default: 131072] --txpool.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 Block extra data set by the payload builder - + [default: reth//] --builder.gaslimit Target gas ceiling for built blocks - + [default: 30000000] --builder.interval The interval at which the job should build a new payload after the last (in seconds) - + [default: 1] --builder.deadline The deadline for when the payload builder job should resolve - + [default: 12] --builder.max-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 Set the chain tip manually for testing purposes. - + NOTE: This is a temporary flag --debug.max-block @@ -438,6 +450,9 @@ Debug: --debug.hook-all Hook on every transaction in a block + --debug.skip-fcu + If provided, the engine will skip `n` consecutive FCUs + --debug.engine-api-store 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 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 Interval between blocks. - + Parses strings using [humantime::parse_duration] --dev.block-time 12s @@ -486,7 +501,7 @@ Pruning: Logging: --log.stdout.format The format to use for logs written to stdout - + [default: terminal] Possible values: @@ -496,12 +511,12 @@ Logging: --log.stdout.filter The filter to use for logs written to stdout - + [default: ] --log.file.format The format to use for logs written to the log file - + [default: terminal] Possible values: @@ -511,22 +526,22 @@ Logging: --log.file.filter The filter to use for logs written to the log file - + [default: debug] --log.file.directory The path to put log files in - + [default: /logs] --log.file.max-size The maximum size (in MB) of one log file - + [default: 200] --log.file.max-files The maximum amount of log files that will be stored. If set to 0, background file logging is disabled - + [default: 5] --log.journald @@ -534,12 +549,12 @@ Logging: --log.journald.filter The filter to use for logs written to journald - + [default: error] --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 -``` +``` \ No newline at end of file diff --git a/book/cli/reth/p2p.md b/book/cli/reth/p2p.md index 17cd396cf..6f1c1d3e6 100644 --- a/book/cli/reth/p2p.md +++ b/book/cli/reth/p2p.md @@ -49,24 +49,36 @@ Options: --disable-discv4-discovery Disable Discv4 discovery + --enable-discv5-discovery + Enable Discv5 discovery + --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 - The UDP port to use for P2P discovery/networking + The UDP port to use for devp2p peer discovery version 4 [default: 30303] - --trusted-peer - Target trusted peer + --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 + The UDP port to use for devp2p peer discovery version 5 + + [default: 9000] - --retries - The number of retries per request + --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 + 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 + The number of times to carry out boost lookup queries at bootstrap + + [default: 100] + + --trusted-peer + Target trusted peer + + --trusted-only + Connect only to trusted peers + + --retries + The number of retries per request + + [default: 5] + --nat [default: any] diff --git a/book/cli/reth/stage/drop.md b/book/cli/reth/stage/drop.md index 2efe9ed78..2b647574c 100644 --- a/book/cli/reth/stage/drop.md +++ b/book/cli/reth/stage/drop.md @@ -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 diff --git a/book/cli/reth/stage/run.md b/book/cli/reth/stage/run.md index f20eb3f68..348f082c4 100644 --- a/book/cli/reth/stage/run.md +++ b/book/cli/reth/stage/run.md @@ -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 - 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 - 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 + The UDP address to use for devp2p peer discovery version 5 + + [default: 0.0.0.0] + + --discovery.v5.port + The UDP port to use for devp2p peer discovery version 5 + + [default: 9000] + + --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 + 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 + The number of times to carry out boost lookup queries at bootstrap + + [default: 100] + --trusted-peers Comma separated enode URLs of trusted peers for P2P connections. @@ -126,7 +154,7 @@ Networking: --identity Custom node identity - [default: reth/-/-gnu] + [default: reth/-/] --p2p-secret-key Secret key to use for this node. diff --git a/book/cli/reth/stage/unwind.md b/book/cli/reth/stage/unwind.md index 8479bca51..44968aede 100644 --- a/book/cli/reth/stage/unwind.md +++ b/book/cli/reth/stage/unwind.md @@ -7,8 +7,8 @@ $ reth stage unwind --help Usage: reth stage unwind [OPTIONS] Commands: - to-block Unwinds the database until the given block number (range is inclusive) - num-blocks Unwinds the given number of blocks from the database + 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 + The UDP address to use for devp2p peer discovery version 4 + + [default: 0.0.0.0] + + --discovery.port + The UDP port to use for devp2p peer discovery version 4 + + [default: 30303] + + --discovery.v5.addr + The UDP address to use for devp2p peer discovery version 5 + + [default: 0.0.0.0] + + --discovery.v5.port + The UDP port to use for devp2p peer discovery version 5 + + [default: 9000] + + --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 + 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 + The number of times to carry out boost lookup queries at bootstrap + + [default: 100] + + --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 + Comma separated enode URLs for P2P discovery bootstrap. + + Will fall back to a network-specific default if not specified. + + --peers-file + The path to the known peers file. Connected peers are dumped to this file on nodes + shutdown, and read on startup. Cannot be used with `--no-persist-peers`. + + --identity + Custom node identity + + [default: reth/-/] + + --p2p-secret-key + Secret key to use for this node. + + This will also deterministically set the peer ID. If not specified, it will be set in the data dir for the chain being used. + + --no-persist-peers + Do not persist peers. + + --nat + NAT resolution method (any|none|upnp|publicip|extip:\) + + [default: any] + + --addr + Network listening address + + [default: 0.0.0.0] + + --port + Network listening port + + [default: 30303] + + --max-outbound-peers + Maximum number of outbound requests. default: 100 + + --max-inbound-peers + Maximum number of inbound requests. default: 30 + + --pooled-tx-response-soft-limit + Soft limit for the byte size of a `PooledTransactions` response on assembling a `GetPooledTransactions` request. Spec'd at 2 MiB. + + . + + [default: 2097152] + + --pooled-tx-pack-soft-limit + 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 The format to use for logs written to stdout diff --git a/book/cli/reth/stage/unwind/num-blocks.md b/book/cli/reth/stage/unwind/num-blocks.md index 9737bd4fa..24d2bc516 100644 --- a/book/cli/reth/stage/unwind/num-blocks.md +++ b/book/cli/reth/stage/unwind/num-blocks.md @@ -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 diff --git a/book/cli/reth/stage/unwind/to-block.md b/book/cli/reth/stage/unwind/to-block.md index 74f8ec4b7..f8aa3bd6e 100644 --- a/book/cli/reth/stage/unwind/to-block.md +++ b/book/cli/reth/stage/unwind/to-block.md @@ -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