RpcServerArgs in reth_node_core::args - Rust

Struct RpcServerArgs 

Source

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
Source

Change rpc port numbers based on the instance number, if provided.

  • The auth_port is scaled by a factor of instance * 100
  • The http_port is scaled by a factor of -instance
  • The ws_port is scaled by a factor of instance * 2
  • The ipcpath is 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:

  • instance is greater than 655 (scaling would overflow u16)
  • self.auth_port / 100 + (instance - 1) would overflow u16

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.

Source§
Source§

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments

Source§

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more

Source§

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more

Source§
Source§
Source§
Source§
Source§

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more

Source§

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more

Source§

Assign values from ArgMatches to self.

Source§

Assign values from ArgMatches to self.

Source§
Source§

Tests for self and other values to be equal, and is used by ==.

1.0.0 · Source§

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Source§
Source§

§
§
§
§
§
§
§

Source§
Source§
Source§
Source§
Source§

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)

Performs copy-assignment from self to dest. Read more

§
Source§

Source§

§
§

Compare self to key and return true if they are equal.

§
§

Checks if this value is equivalent to the given key. Read more

§
§

Checks if this value is equivalent to the given key. Read more

§
§

Checks if this value is equivalent to the given key. Read more

§
§

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.

§

Formats each item in a sequence. Read more

Source§
Source§

Returns the argument unchanged.

§
§

Builds a [TxEnv] from a transaction and a sender address.

§
§

Builds a [TxEnv] from a transaction, its sender, and encoded transaction bytes.

§
§

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

§

Attaches the current Context to this type, returning a WithContext wrapper. Read more

§
§

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more

§

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Source§
Source§

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Source§

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Source§
Source§

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§
§
§

Wrap the input message T in a tonic::Request

§
§

Applies the layer to a service and wraps it in [Layered].

§
§

Pipes by value. This is generally the method you want to use. Read more

§

Borrows self and passes that borrow into the pipe function. Read more

§

Mutably borrows self and passes that borrow into the pipe function. Read more

§

Borrows self, then passes self.borrow() into the pipe function. Read more

§

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

§

Borrows self, then passes self.as_ref() into the pipe function.

§

Mutably borrows self, then passes self.as_mut() into the pipe function.

§

Borrows self, then passes self.deref() into the pipe function.

§

Mutably borrows self, then passes self.deref_mut() into the pipe function.

§
§

The alignment of pointer.

§

The type for initializers.

§

Initializes a with the given initializer. Read more

§

Dereferences the given pointer. Read more

§

Mutably dereferences the given pointer. Read more

§

Drops the object pointed to by the given pointer. Read more

§
§

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more

§

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more

Source§
§

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. Read more

Available on crate feature set-header only.

Append a header into the request. Read more

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. Read more

Available on crate feature set-header only.

Append a header into the response. 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. 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

§

Available on crate feature limit only.

Intercept requests with over-sized payloads and convert them into 413 Payload Too Large responses. Read more

§

Available on crate feature normalize-path only.

Remove trailing slashes from paths. Read more

§

Available on crate feature normalize-path only.

Append trailing slash to paths. Read more

§
§

Immutable access to a value. Read more

§
§

Immutable access to the Borrow<B> of a value. Read more

§

Mutable access to the BorrowMut<B> of a value. Read more

§

Immutable access to the AsRef<R> view of a value. Read more

§

Mutable access to the AsMut<R> view of a value. Read more

§

Immutable access to the Deref::Target of a value. Read more

§

Mutable access to the Deref::Target of a value. 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.

Source§
Source§

The resulting type after obtaining ownership.

Source§

Creates owned data from borrowed data, usually by cloning. Read more

Source§

Uses borrowed data to replace owned data, usually by cloning. Read more

§
§

Clones self, possibly returning an error.

§
§

Attempts to convert self into T using TryInto<T>. Read more

Source§
Source§

The type returned in the event of a conversion error.

Source§

Performs the conversion.

Source§
Source§

The type returned in the event of a conversion error.

Source§

Performs the conversion.

§

§

§
Source§
§
§
§

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