Struct RpcServerArgs
pub struct RpcServerArgs {Show 45 fields
pub http: bool,
pub http_addr: IpAddr,
pub http_port: u16,
pub http_disable_compression: bool,
pub http_api: Option<RpcModuleSelection>,
pub http_corsdomain: Option<String>,
pub ws: bool,
pub ws_addr: IpAddr,
pub ws_port: u16,
pub ws_allowed_origins: Option<String>,
pub ws_api: Option<RpcModuleSelection>,
pub ipcdisable: bool,
pub ipcpath: String,
pub ipc_socket_permissions: Option<String>,
pub auth_addr: IpAddr,
pub auth_port: u16,
pub auth_jwtsecret: Option<PathBuf>,
pub auth_ipc: bool,
pub auth_ipc_path: String,
pub disable_auth_server: bool,
pub rpc_jwtsecret: Option<JwtSecret>,
pub rpc_max_request_size: MaxU32,
pub rpc_max_response_size: MaxU32,
pub rpc_max_subscriptions_per_connection: MaxU32,
pub rpc_max_connections: MaxU32,
pub rpc_max_tracing_requests: usize,
pub rpc_max_blocking_io_requests: usize,
pub rpc_max_trace_filter_blocks: u64,
pub rpc_max_blocks_per_filter: ZeroAsNoneU64,
pub rpc_max_logs_per_response: ZeroAsNoneU64,
pub rpc_gas_cap: u64,
pub rpc_evm_memory_limit: u64,
pub rpc_tx_fee_cap: u128,
pub rpc_max_simulate_blocks: u64,
pub rpc_eth_proof_window: u64,
pub rpc_proof_permits: usize,
pub rpc_pending_block: PendingBlockKind,
pub rpc_forwarder: Option<Url>,
pub builder_disallow: Option<AddressSet>,
pub rpc_state_cache: RpcStateCacheArgs,
pub gas_price_oracle: GasPriceOracleArgs,
pub rpc_send_raw_transaction_sync_timeout: Duration,
pub testing_skip_invalid_transactions: bool,
pub testing_gas_limit: Option<u64>,
pub rpc_force_blob_sidecar_upcasting: bool,
}Expand description
Parameters for configuring the rpc more granularity via CLI
Enable the HTTP-RPC server
Http server address to listen on
Http server port to listen on
Disable compression for HTTP responses
Rpc Modules to be configured for the HTTP server
§http_corsdomain: Option<String>Http Corsdomain to allow request from
Enable the WS-RPC server
Ws server address to listen on
Ws server port to listen on
Origins from which to accept WebSocket requests
Rpc Modules to be configured for the WS server
Disable the IPC-RPC server
Filename for IPC socket/pipe within the datadir
Set the permissions for the IPC socket file, in octal format.
If not specified, the permissions will be set by the system’s umask.
Auth server address to listen on
Auth server port to listen on
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 ~/.local/share/reth/mainnet/jwt.hex
by default.
Enable auth engine API over IPC
Filename for auth IPC socket/pipe within the datadir
Disable the auth/engine API server.
This will prevent the authenticated engine-API server from starting. Use this if you’re running a node that doesn’t need to serve engine API requests.
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.
Set the maximum RPC request payload size for both HTTP and WS in megabytes.
Set the maximum RPC response payload size for both HTTP and WS in megabytes.
Set the maximum concurrent subscriptions per connection.
Maximum number of RPC server connections.
Maximum number of concurrent tracing requests.
By default this chooses a sensible value based on the number of available cores. Tracing requests are generally CPU bound. Choosing a value that is higher than the available CPU cores can have a negative impact on the performance of the node and affect the node’s ability to maintain sync.
Maximum number of concurrent blocking IO requests.
Blocking IO requests include eth_call, eth_estimateGas, and similar methods that
require EVM execution. These are spawned as blocking tasks to avoid blocking the async
runtime.
Maximum number of blocks for trace_filter requests.
Maximum number of blocks that could be scanned per filter request. (0 = entire chain)
Maximum number of logs that can be returned in a single response. (0 = no limit)
Maximum gas limit for eth_call and call tracing RPC methods.
Maximum memory the EVM can allocate per RPC request.
Maximum eth transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)
Maximum number of blocks for eth_simulateV1 call.
The maximum proof window for historical proof generation.
This value allows for generating historical proofs up to
configured number of blocks from current tip (up to tip - window).
Maximum number of concurrent getproof requests.
Configures the pending block behavior for RPC responses.
Options: full (include all transactions), empty (header only), none (disable pending blocks).
Endpoint to forward transactions to.
Path to file containing disallowed addresses, json-encoded list of strings. Block validation API will reject blocks containing transactions from these addresses.
State cache configuration.
Gas price oracle configuration.
Timeout for send_raw_transaction_sync RPC method.
Skip invalid transactions in testing_buildBlockV1 instead of failing.
When enabled, transactions that fail execution will be skipped, and all subsequent transactions from the same sender will also be skipped.
Override the gas limit used by testing_buildBlockV1.
When set, testing_buildBlockV1 will use this value instead of inheriting
the parent block’s gas limit. Accepts short notation: K for thousand, M for
million, G for billion (e.g., 1G = 1 billion).
Force upcasting EIP-4844 blob sidecars to EIP-7594 format when Osaka is active.
When enabled, blob transactions submitted via eth_sendRawTransaction with EIP-4844
sidecars will be automatically converted to EIP-7594 format if the next block is Osaka.
By default this is disabled, meaning transactions are submitted as-is.
Source§
Source
Enables the HTTP-RPC server.
Source
Configures modules for the HTTP-RPC server.
Source
Enables the WS-RPC server.
Source
Configures modules for WS-RPC server.
Source
Enables the Auth IPC
Source
Change rpc port numbers based on the instance number, if provided.
- The
auth_portis scaled by a factor ofinstance * 100 - The
http_portis scaled by a factor of-instance - The
ws_portis scaled by a factor ofinstance * 2 - The
ipcpathis appended with the instance number:/tmp/reth.ipc-<instance>
§Panics
Warning: if instance is zero in debug mode, this will panic.
This will also panic in debug mode if either:
instanceis greater than655(scaling would overflowu16)self.auth_port / 100 + (instance - 1)would overflowu16
In release mode, this will silently wrap around.
Source
Set the http port to zero, to allow the OS to assign a random unused port when the rpc server binds to a socket.
Source
Set the ws port to zero, to allow the OS to assign a random unused port when the rpc server binds to a socket.
Source
Set the auth port to zero, to allow the OS to assign a random unused port when the rpc server binds to a socket.
Source
Append a random string to the ipc path, to prevent possible collisions when multiple nodes are being run on the same machine.
Source
Configure all ports to be set to a random unused port when bound, and set the IPC path to a random path.
Source
Apply a function to the args.
Source
Configures the timeout for send raw transaction sync.
Source
Returns true if the given RPC namespace is enabled on any transport.
Source
Enables forced blob sidecar upcasting from EIP-4844 to EIP-7594 format.
§
§
Causes self to use its Binary implementation when Debug-formatted.
§
Causes self to use its Display implementation when
Debug-formatted.
§
Causes self to use its LowerExp implementation when
Debug-formatted.
§
Causes self to use its LowerHex implementation when
Debug-formatted.
§
Causes self to use its Octal implementation when Debug-formatted.
§
Causes self to use its Pointer implementation when
Debug-formatted.
§
Causes self to use its UpperExp implementation when
Debug-formatted.
§
Causes self to use its UpperHex implementation when
Debug-formatted.
§
§
Available on crate feature propagate-header only.
Propagate a header from the request to the response. Read more
§
Available on crate feature add-extension only.
§
Available on crate feature map-request-body only.
Apply a transformation to the request body. Read more
§
Available on crate feature map-response-body only.
Apply a transformation to the response body. Read more
§
Available on crate features compression-br or compression-deflate or compression-gzip or compression-zstd only.
Compresses response bodies. Read more
§
Available on crate features decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.
Decompress response bodies. Read more
§
Available on crate feature trace only.
High level tracing that classifies responses using HTTP status codes. Read more
§
Available on crate feature trace only.
High level tracing that classifies responses using gRPC headers. Read more
§
Available on crate feature follow-redirect only.
Available on crate feature sensitive-headers only.
Available on crate feature sensitive-headers only.
Available on crate feature sensitive-headers only.
Available on crate feature set-header only.
Insert a header into the request, if the header is not already present. Read more
Available on crate feature set-header only.
Insert a header into the response, if the header is not already present. Read more
§
Available on crate feature request-id only.
Add request id header and extension, using x-request-id as the header name. Read more
§
Available on crate feature request-id only.
Propgate request ids from requests to responses. Read more
§
Available on crate feature request-id only.
Propgate request ids from requests to responses, using x-request-id as the header name. Read more
§
Available on crate feature catch-panic only.
Catch panics and convert them into 500 Internal Server responses. Read more
§
§
Calls .tap() only in debug builds, and is erased in release builds.
§
Calls .tap_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow() only in debug builds, and is erased in release
builds.
§
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref() only in debug builds, and is erased in release
builds.
§
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref() only in debug builds, and is erased in release
builds.
§
Calls .tap_deref_mut() only in debug builds, and is erased in release
builds.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 736 bytes