mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(node): unify the format of command args (#7656)
Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Oliver Nordbjerg <onbjerg@users.noreply.github.com>
This commit is contained in:
68
book/cli/reth/node.md
vendored
68
book/cli/reth/node.md
vendored
@ -4,6 +4,9 @@ Start the node
|
||||
|
||||
```bash
|
||||
$ reth node --help
|
||||
|
||||
Start the node
|
||||
|
||||
Usage: reth node [OPTIONS]
|
||||
|
||||
Options:
|
||||
@ -65,16 +68,29 @@ 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]
|
||||
|
||||
--trusted-peers <TRUSTED_PEERS>
|
||||
Comma separated enode URLs of trusted peers for P2P connections.
|
||||
|
||||
@ -187,7 +203,7 @@ RPC:
|
||||
--ipcpath <IPCPATH>
|
||||
Filename for IPC socket/pipe within the datadir
|
||||
|
||||
[default: <CACHE_DIR>.ipc]
|
||||
[default: /tmp/reth.ipc]
|
||||
|
||||
--authrpc.addr <AUTH_ADDR>
|
||||
Auth server address to listen on
|
||||
@ -206,48 +222,56 @@ RPC:
|
||||
|
||||
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
|
||||
|
||||
--auth-ipc.path <AUTH_IPC_PATH>
|
||||
Filename for auth IPC socket/pipe within the datadir
|
||||
|
||||
[default: /tmp/reth_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>
|
||||
--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>
|
||||
--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]
|
||||
[aliases: rpc.returndata.limit]
|
||||
|
||||
--rpc-max-subscriptions-per-connection <RPC_MAX_SUBSCRIPTIONS_PER_CONNECTION>
|
||||
--rpc.max-subscriptions-per-connection <RPC_MAX_SUBSCRIPTIONS_PER_CONNECTION>
|
||||
Set the maximum concurrent subscriptions per connection
|
||||
|
||||
[default: 1024]
|
||||
|
||||
--rpc-max-connections <COUNT>
|
||||
--rpc.max-connections <COUNT>
|
||||
Maximum number of RPC server connections
|
||||
|
||||
[default: 500]
|
||||
|
||||
--rpc-max-tracing-requests <COUNT>
|
||||
--rpc.max-tracing-requests <COUNT>
|
||||
Maximum number of concurrent tracing requests
|
||||
|
||||
[default: 14]
|
||||
|
||||
--rpc-max-blocks-per-filter <COUNT>
|
||||
--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>
|
||||
--rpc.max-logs-per-response <COUNT>
|
||||
Maximum number of logs that can be returned in a single response. (0 = no limit)
|
||||
|
||||
[default: 20000]
|
||||
|
||||
--rpc-gas-cap <GAS_CAP>
|
||||
--rpc.gascap <GAS_CAP>
|
||||
Maximum gas limit for `eth_call` and call tracing RPC methods
|
||||
|
||||
[default: 50000000]
|
||||
@ -295,32 +319,32 @@ Gas Price Oracle:
|
||||
[default: 60]
|
||||
|
||||
TxPool:
|
||||
--txpool.pending_max_count <PENDING_MAX_COUNT>
|
||||
--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>
|
||||
--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>
|
||||
--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>
|
||||
--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>
|
||||
--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>
|
||||
--txpool.queued-max-size <QUEUED_MAX_SIZE>
|
||||
Max size of the queued sub-pool in megabytes
|
||||
|
||||
[default: 20]
|
||||
@ -340,12 +364,12 @@ TxPool:
|
||||
|
||||
[default: 100]
|
||||
|
||||
--txpool.max_tx_input_bytes <MAX_TX_INPUT_BYTES>
|
||||
--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>
|
||||
--txpool.max-cached-entries <MAX_CACHED_ENTRIES>
|
||||
The maximum number of blobs to keep in the in memory blob cache
|
||||
|
||||
[default: 100]
|
||||
@ -363,7 +387,7 @@ Builder:
|
||||
--builder.extradata <EXTRADATA>
|
||||
Block extra data set by the payload builder
|
||||
|
||||
[default: reth/<VERSION>/<OS>]
|
||||
[default: reth/v0.2.0-beta.5/linux]
|
||||
|
||||
--builder.gaslimit <GAS_LIMIT>
|
||||
Target gas ceiling for built blocks
|
||||
@ -493,7 +517,7 @@ Logging:
|
||||
--log.file.directory <PATH>
|
||||
The path to put log files in
|
||||
|
||||
[default: <CACHE_DIR>/logs]
|
||||
[default: /root/.cache/reth/logs]
|
||||
|
||||
--log.file.max-size <SIZE>
|
||||
The maximum size (in MB) of one log file
|
||||
|
||||
@ -124,6 +124,14 @@ pub struct RpcServerArgs {
|
||||
#[arg(long = "authrpc.jwtsecret", value_name = "PATH", global = true, required = false)]
|
||||
pub auth_jwtsecret: Option<PathBuf>,
|
||||
|
||||
/// Enable auth engine API over IPC
|
||||
#[arg(long)]
|
||||
pub auth_ipc: bool,
|
||||
|
||||
/// Filename for auth IPC socket/pipe within the datadir
|
||||
#[arg(long = "auth-ipc.path", default_value_t = constants::DEFAULT_ENGINE_API_IPC_ENDPOINT.to_string())]
|
||||
pub auth_ipc_path: String,
|
||||
|
||||
/// Hex encoded JWT secret to authenticate the regular RPC server(s), see `--http.api` and
|
||||
/// `--ws.api`.
|
||||
///
|
||||
@ -133,37 +141,37 @@ pub struct RpcServerArgs {
|
||||
pub rpc_jwtsecret: Option<JwtSecret>,
|
||||
|
||||
/// Set the maximum RPC request payload size for both HTTP and WS in megabytes.
|
||||
#[arg(long, default_value_t = RPC_DEFAULT_MAX_REQUEST_SIZE_MB.into())]
|
||||
#[arg(long = "rpc.max-request-size", alias = "rpc-max-request-size", default_value_t = RPC_DEFAULT_MAX_REQUEST_SIZE_MB.into())]
|
||||
pub rpc_max_request_size: MaxU32,
|
||||
|
||||
/// Set the maximum RPC response payload size for both HTTP and WS in megabytes.
|
||||
#[arg(long, visible_alias = "--rpc.returndata.limit", default_value_t = RPC_DEFAULT_MAX_RESPONSE_SIZE_MB.into())]
|
||||
#[arg(long = "rpc.max-response-size", alias = "rpc-max-response-size", visible_alias = "rpc.returndata.limit", default_value_t = RPC_DEFAULT_MAX_RESPONSE_SIZE_MB.into())]
|
||||
pub rpc_max_response_size: MaxU32,
|
||||
|
||||
/// Set the maximum concurrent subscriptions per connection.
|
||||
#[arg(long, default_value_t = RPC_DEFAULT_MAX_SUBS_PER_CONN.into())]
|
||||
#[arg(long = "rpc.max-subscriptions-per-connection", alias = "rpc-max-subscriptions-per-connection", default_value_t = RPC_DEFAULT_MAX_SUBS_PER_CONN.into())]
|
||||
pub rpc_max_subscriptions_per_connection: MaxU32,
|
||||
|
||||
/// Maximum number of RPC server connections.
|
||||
#[arg(long, value_name = "COUNT", default_value_t = RPC_DEFAULT_MAX_CONNECTIONS.into())]
|
||||
#[arg(long = "rpc.max-connections", alias = "rpc-max-connections", value_name = "COUNT", default_value_t = RPC_DEFAULT_MAX_CONNECTIONS.into())]
|
||||
pub rpc_max_connections: MaxU32,
|
||||
|
||||
/// Maximum number of concurrent tracing requests.
|
||||
#[arg(long, value_name = "COUNT", default_value_t = constants::default_max_tracing_requests())]
|
||||
#[arg(long = "rpc.max-tracing-requests", alias = "rpc-max-tracing-requests", value_name = "COUNT", default_value_t = constants::default_max_tracing_requests())]
|
||||
pub rpc_max_tracing_requests: usize,
|
||||
|
||||
/// Maximum number of blocks that could be scanned per filter request. (0 = entire chain)
|
||||
#[arg(long, value_name = "COUNT", default_value_t = ZeroAsNoneU64::new(constants::DEFAULT_MAX_BLOCKS_PER_FILTER))]
|
||||
#[arg(long = "rpc.max-blocks-per-filter", alias = "rpc-max-blocks-per-filter", value_name = "COUNT", default_value_t = ZeroAsNoneU64::new(constants::DEFAULT_MAX_BLOCKS_PER_FILTER))]
|
||||
pub rpc_max_blocks_per_filter: ZeroAsNoneU64,
|
||||
|
||||
/// Maximum number of logs that can be returned in a single response. (0 = no limit)
|
||||
#[arg(long, value_name = "COUNT", default_value_t = ZeroAsNoneU64::new(constants::DEFAULT_MAX_LOGS_PER_RESPONSE as u64))]
|
||||
#[arg(long = "rpc.max-logs-per-response", alias = "rpc-max-logs-per-response", value_name = "COUNT", default_value_t = ZeroAsNoneU64::new(constants::DEFAULT_MAX_LOGS_PER_RESPONSE as u64))]
|
||||
pub rpc_max_logs_per_response: ZeroAsNoneU64,
|
||||
|
||||
/// Maximum gas limit for `eth_call` and call tracing RPC methods.
|
||||
#[arg(
|
||||
long,
|
||||
alias = "rpc.gascap",
|
||||
long = "rpc.gascap",
|
||||
alias = "rpc-gascap",
|
||||
value_name = "GAS_CAP",
|
||||
value_parser = RangedU64ValueParser::<u64>::new().range(1..),
|
||||
default_value_t = RPC_DEFAULT_GAS_CAP.into()
|
||||
@ -177,14 +185,6 @@ pub struct RpcServerArgs {
|
||||
/// Gas price oracle configuration.
|
||||
#[command(flatten)]
|
||||
pub gas_price_oracle: GasPriceOracleArgs,
|
||||
|
||||
/// Enable auth engine api over IPC
|
||||
#[arg(long)]
|
||||
pub auth_ipc: bool,
|
||||
|
||||
/// Filename for auth IPC socket/pipe within the datadir
|
||||
#[arg(long = "auth-ipc.path", default_value_t = constants::DEFAULT_ENGINE_API_IPC_ENDPOINT.to_string())]
|
||||
pub auth_ipc_path: String,
|
||||
}
|
||||
|
||||
impl RpcServerArgs {
|
||||
|
||||
@ -14,28 +14,28 @@ use reth_transaction_pool::{
|
||||
#[command(next_help_heading = "TxPool")]
|
||||
pub struct TxPoolArgs {
|
||||
/// Max number of transaction in the pending sub-pool.
|
||||
#[arg(long = "txpool.pending_max_count", default_value_t = TXPOOL_SUBPOOL_MAX_TXS_DEFAULT)]
|
||||
#[arg(long = "txpool.pending-max-count", alias = "txpool.pending_max_count", default_value_t = TXPOOL_SUBPOOL_MAX_TXS_DEFAULT)]
|
||||
pub pending_max_count: usize,
|
||||
/// Max size of the pending sub-pool in megabytes.
|
||||
#[arg(long = "txpool.pending_max_size", default_value_t = TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT)]
|
||||
#[arg(long = "txpool.pending-max-size", alias = "txpool.pending_max_size", default_value_t = TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT)]
|
||||
pub pending_max_size: usize,
|
||||
|
||||
/// Max number of transaction in the basefee sub-pool
|
||||
#[arg(long = "txpool.basefee_max_count", default_value_t = TXPOOL_SUBPOOL_MAX_TXS_DEFAULT)]
|
||||
#[arg(long = "txpool.basefee-max-count", alias = "txpool.basefee_max_count", default_value_t = TXPOOL_SUBPOOL_MAX_TXS_DEFAULT)]
|
||||
pub basefee_max_count: usize,
|
||||
/// Max size of the basefee sub-pool in megabytes.
|
||||
#[arg(long = "txpool.basefee_max_size", default_value_t = TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT)]
|
||||
#[arg(long = "txpool.basefee-max-size", alias = "txpool.basefee_max_size", default_value_t = TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT)]
|
||||
pub basefee_max_size: usize,
|
||||
|
||||
/// Max number of transaction in the queued sub-pool
|
||||
#[arg(long = "txpool.queued_max_count", default_value_t = TXPOOL_SUBPOOL_MAX_TXS_DEFAULT)]
|
||||
#[arg(long = "txpool.queued-max-count", alias = "txpool.queued_max_count", default_value_t = TXPOOL_SUBPOOL_MAX_TXS_DEFAULT)]
|
||||
pub queued_max_count: usize,
|
||||
/// Max size of the queued sub-pool in megabytes.
|
||||
#[arg(long = "txpool.queued_max_size", default_value_t = TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT)]
|
||||
#[arg(long = "txpool.queued-max-size", alias = "txpool.queued_max_size", default_value_t = TXPOOL_SUBPOOL_MAX_SIZE_MB_DEFAULT)]
|
||||
pub queued_max_size: usize,
|
||||
|
||||
/// Max number of executable transaction slots guaranteed per account
|
||||
#[arg(long = "txpool.max_account_slots", default_value_t = TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER)]
|
||||
#[arg(long = "txpool.max-account-slots", long = "txpool.max_account_slots", default_value_t = TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER)]
|
||||
pub max_account_slots: usize,
|
||||
|
||||
/// Price bump (in %) for the transaction pool underpriced check.
|
||||
@ -47,11 +47,11 @@ pub struct TxPoolArgs {
|
||||
pub blob_transaction_price_bump: u128,
|
||||
|
||||
/// Max size in bytes of a single transaction allowed to enter the pool
|
||||
#[arg(long = "txpool.max_tx_input_bytes", default_value_t = DEFAULT_MAX_TX_INPUT_BYTES)]
|
||||
#[arg(long = "txpool.max-tx-input-bytes", alias = "txpool.max_tx_input_bytes", default_value_t = DEFAULT_MAX_TX_INPUT_BYTES)]
|
||||
pub max_tx_input_bytes: usize,
|
||||
|
||||
/// The maximum number of blobs to keep in the in memory blob cache.
|
||||
#[arg(long = "txpool.max_cached_entries", default_value_t = DEFAULT_MAX_CACHED_BLOBS)]
|
||||
#[arg(long = "txpool.max-cached-entries", alias = "txpool.max_cached_entries", default_value_t = DEFAULT_MAX_CACHED_BLOBS)]
|
||||
pub max_cached_entries: u32,
|
||||
|
||||
/// Flag to disable local transaction exemptions.
|
||||
|
||||
Reference in New Issue
Block a user