pub trait RethRpcServerConfig {
Show 15 methods
// Required methods
fn is_ipc_enabled(&self) -> bool;
fn ipc_path(&self) -> &str;
fn eth_config(&self) -> EthConfig;
fn flashbots_config(&self) -> ValidationApiConfig;
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§
Sourcefn is_ipc_enabled(&self) -> bool
fn is_ipc_enabled(&self) -> bool
Returns whether ipc is enabled.
Sourcefn eth_config(&self) -> EthConfig
fn eth_config(&self) -> EthConfig
The configured ethereum RPC settings.
Sourcefn flashbots_config(&self) -> ValidationApiConfig
fn flashbots_config(&self) -> ValidationApiConfig
The configured ethereum RPC settings.
Sourcefn state_cache_config(&self) -> EthStateCacheConfig
fn state_cache_config(&self) -> EthStateCacheConfig
Returns state cache configuration.
Sourcefn rpc_max_request_size_bytes(&self) -> u32
fn rpc_max_request_size_bytes(&self) -> u32
Returns the max request size in bytes.
Sourcefn rpc_max_response_size_bytes(&self) -> u32
fn rpc_max_response_size_bytes(&self) -> u32
Returns the max response size in bytes.
Sourcefn gas_price_oracle_config(&self) -> GasPriceOracleConfig
fn gas_price_oracle_config(&self) -> GasPriceOracleConfig
Extracts the gas price oracle config from the args.
Sourcefn transport_rpc_module_config(&self) -> TransportRpcModuleConfig
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
.
Sourcefn http_ws_server_builder(&self) -> ServerBuilder<Identity, Identity>
fn http_ws_server_builder(&self) -> ServerBuilder<Identity, Identity>
Returns the default server builder for http/ws
Sourcefn ipc_server_builder(&self) -> IpcServerBuilder<Identity, Identity>
fn ipc_server_builder(&self) -> IpcServerBuilder<Identity, Identity>
Returns the default ipc server builder
Sourcefn rpc_server_config(&self) -> RpcServerConfig
fn rpc_server_config(&self) -> RpcServerConfig
Creates the RpcServerConfig
from cli args.
Sourcefn auth_server_config(
&self,
jwt_secret: JwtSecret,
) -> Result<AuthServerConfig, RpcError>
fn auth_server_config( &self, jwt_secret: JwtSecret, ) -> Result<AuthServerConfig, RpcError>
Creates the AuthServerConfig
from cli args.
Sourcefn auth_jwt_secret(
&self,
default_jwt_path: PathBuf,
) -> Result<JwtSecret, JwtError>
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.
Sourcefn rpc_secret_key(&self) -> Option<JwtSecret>
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).