Trait reth_rpc_builder::config::RethRpcServerConfig

source ·
pub trait RethRpcServerConfig {
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) -> ServerBuilder<Identity, Identity>; fn ipc_server_builder(&self) -> IpcServerBuilder<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

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§

source

fn is_ipc_enabled(&self) -> bool

Returns whether ipc is enabled.

source

fn ipc_path(&self) -> &str

Returns the path to the target ipc socket if enabled.

source

fn eth_config(&self) -> EthConfig

The configured ethereum RPC settings.

source

fn state_cache_config(&self) -> EthStateCacheConfig

Returns state cache configuration.

source

fn rpc_max_request_size_bytes(&self) -> u32

Returns the max request size in bytes.

source

fn rpc_max_response_size_bytes(&self) -> u32

Returns the max response size in bytes.

source

fn gas_price_oracle_config(&self) -> GasPriceOracleConfig

Extracts the gas price oracle config from the args.

source

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.

source

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

Returns the default server builder for http/ws

source

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

Returns the default ipc server builder

source

fn rpc_server_config(&self) -> RpcServerConfig

Creates the RpcServerConfig from cli args.

source

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

Creates the AuthServerConfig from cli args.

source

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.

source

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).

Implementations on Foreign Types§

source§

impl RethRpcServerConfig for RpcServerArgs

Implementors§