Trait reth_node_builder::RethRpcConfig

pub trait RethRpcConfig {
Show 14 methods // Required methods fn is_ipc_enabled(&self) -> bool; fn ipc_path(&self) -> &str; fn eth_config(&self) -> EthConfig; fn state_cache_config(&self) -> EthStateCacheConfig; fn rpc_max_request_size_bytes(&self) -> u32; fn rpc_max_response_size_bytes(&self) -> u32; fn gas_price_oracle_config(&self) -> GasPriceOracleConfig; fn transport_rpc_module_config(&self) -> TransportRpcModuleConfig; fn http_ws_server_builder(&self) -> Builder<Identity, Identity>; fn ipc_server_builder(&self) -> Builder<Identity, Identity>; fn rpc_server_config(&self) -> RpcServerConfig; fn auth_server_config( &self, jwt_secret: JwtSecret ) -> Result<AuthServerConfig, RpcError>; fn auth_jwt_secret( &self, default_jwt_path: PathBuf ) -> Result<JwtSecret, JwtError>; fn rpc_secret_key(&self) -> Option<JwtSecret>;
}
Expand description

Re-export the core configuration traits. A trait that provides a configured RPC server.

This provides all basic config values for the RPC server and is implemented by the RpcServerArgs type.

Required Methods§

fn is_ipc_enabled(&self) -> bool

Returns whether ipc is enabled.

fn ipc_path(&self) -> &str

Returns the path to the target ipc socket if enabled.

fn eth_config(&self) -> EthConfig

The configured ethereum RPC settings.

fn state_cache_config(&self) -> EthStateCacheConfig

Returns state cache configuration.

fn rpc_max_request_size_bytes(&self) -> u32

Returns the max request size in bytes.

fn rpc_max_response_size_bytes(&self) -> u32

Returns the max response size in bytes.

fn gas_price_oracle_config(&self) -> GasPriceOracleConfig

Extracts the gas price oracle config from the args.

fn transport_rpc_module_config(&self) -> TransportRpcModuleConfig

Creates the TransportRpcModuleConfig from cli args.

This sets all the api modules, and configures additional settings like gas price oracle settings in the TransportRpcModuleConfig.

fn http_ws_server_builder(&self) -> Builder<Identity, Identity>

Returns the default server builder for http/ws

fn ipc_server_builder(&self) -> Builder<Identity, Identity>

Returns the default ipc server builder

fn rpc_server_config(&self) -> RpcServerConfig

Creates the RpcServerConfig from cli args.

fn auth_server_config( &self, jwt_secret: JwtSecret ) -> Result<AuthServerConfig, RpcError>

Creates the AuthServerConfig from cli args.

fn auth_jwt_secret( &self, default_jwt_path: PathBuf ) -> Result<JwtSecret, JwtError>

The execution layer and consensus layer clients SHOULD accept a configuration parameter: jwt-secret, which designates a file containing the hex-encoded 256 bit secret key to be used for verifying/generating JWT tokens.

If such a parameter is given, but the file cannot be read, or does not contain a hex-encoded key of 256 bits, the client SHOULD treat this as an error.

If such a parameter is not given, the client SHOULD generate such a token, valid for the duration of the execution, and SHOULD store the hex-encoded secret as a jwt.hex file on the filesystem. This file can then be used to provision the counterpart client.

The default_jwt_path provided as an argument will be used as the default location for the jwt secret in case the auth_jwtsecret argument is not provided.

fn rpc_secret_key(&self) -> Option<JwtSecret>

Returns the configured jwt secret key for the regular rpc servers, if any.

Note: this is not used for the auth server (engine API).

Implementors§

§

impl RethRpcConfig for RpcServerArgs