feat(mev): Enable mev_ namespace. (#14457)

This commit is contained in:
Ryan Schneider
2025-02-12 13:01:00 -08:00
committed by GitHub
parent 1e965caf5f
commit 15dff0f6a6
3 changed files with 11 additions and 2 deletions

View File

@ -245,7 +245,7 @@ RPC:
--http.api <HTTP_API> --http.api <HTTP_API>
Rpc Modules to be configured for the HTTP server Rpc Modules to be configured for the HTTP server
[possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, flashbots, miner] [possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, flashbots, miner, mev]
--http.corsdomain <HTTP_CORSDOMAIN> --http.corsdomain <HTTP_CORSDOMAIN>
Http Corsdomain to allow request from Http Corsdomain to allow request from
@ -269,7 +269,7 @@ RPC:
--ws.api <WS_API> --ws.api <WS_API>
Rpc Modules to be configured for the WS server Rpc Modules to be configured for the WS server
[possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, flashbots, miner] [possible values: admin, debug, eth, net, trace, txpool, web3, rpc, reth, ots, flashbots, miner, mev]
--ipcdisable --ipcdisable
Disable the IPC-RPC server Disable the IPC-RPC server

View File

@ -247,6 +247,7 @@ pub use eth::EthHandlers;
// Rpc server metrics // Rpc server metrics
mod metrics; mod metrics;
pub use metrics::{MeteredRequestFuture, RpcRequestMetricsService}; pub use metrics::{MeteredRequestFuture, RpcRequestMetricsService};
use reth_rpc::eth::sim_bundle::EthSimBundle;
// Rpc rate limiter // Rpc rate limiter
pub mod rate_limiter; pub mod rate_limiter;
@ -1338,6 +1339,11 @@ where
// TODO: can we get rid of this here? // TODO: can we get rid of this here?
RethRpcModule::Flashbots => Default::default(), RethRpcModule::Flashbots => Default::default(),
RethRpcModule::Miner => MinerApi::default().into_rpc().into(), RethRpcModule::Miner => MinerApi::default().into_rpc().into(),
RethRpcModule::Mev => {
EthSimBundle::new(eth_api.clone(), self.blocking_pool_guard.clone())
.into_rpc()
.into()
}
}) })
.clone() .clone()
}) })

View File

@ -271,6 +271,8 @@ pub enum RethRpcModule {
Flashbots, Flashbots,
/// `miner_` module /// `miner_` module
Miner, Miner,
/// `mev_` module
Mev,
} }
// === impl RethRpcModule === // === impl RethRpcModule ===
@ -321,6 +323,7 @@ impl FromStr for RethRpcModule {
"ots" => Self::Ots, "ots" => Self::Ots,
"flashbots" => Self::Flashbots, "flashbots" => Self::Flashbots,
"miner" => Self::Miner, "miner" => Self::Miner,
"mev" => Self::Mev,
_ => return Err(ParseError::VariantNotFound), _ => return Err(ParseError::VariantNotFound),
}) })
} }