feat: flashbots_validateBuilderSubmissionV3 (#12168)

This commit is contained in:
Arsenii Kulikov
2024-10-31 23:22:42 +04:00
committed by GitHub
parent 998b3b3d3a
commit d020b41f6a
24 changed files with 812 additions and 127 deletions

View File

@ -198,6 +198,7 @@ pub struct RpcRegistry<Node: FullNodeComponents, EthApi: EthApiTypes> {
Node::Provider,
EthApi,
Node::Executor,
Node::Consensus,
>,
}
@ -214,6 +215,7 @@ where
Node::Provider,
EthApi,
Node::Executor,
Node::Consensus,
>;
fn deref(&self) -> &Self::Target {
@ -442,6 +444,7 @@ where
.with_executor(node.task_executor().clone())
.with_evm_config(node.evm_config().clone())
.with_block_executor(node.block_executor().clone())
.with_consensus(node.consensus().clone())
.build_with_auth_server(module_config, engine_api, eth_api_builder);
// in dev mode we generate 20 random dev-signer accounts

View File

@ -1,11 +1,13 @@
//! clap [Args](clap::Args) for RPC related arguments.
use std::{
collections::HashSet,
ffi::OsStr,
net::{IpAddr, Ipv4Addr},
path::PathBuf,
};
use alloy_primitives::Address;
use alloy_rpc_types_engine::JwtSecret;
use clap::{
builder::{PossibleValue, RangedU64ValueParser, TypedValueParser},
@ -183,6 +185,11 @@ pub struct RpcServerArgs {
#[arg(long = "rpc.proof-permits", alias = "rpc-proof-permits", value_name = "COUNT", default_value_t = constants::DEFAULT_PROOF_PERMITS)]
pub rpc_proof_permits: usize,
/// Path to file containing disallowed addresses, json-encoded list of strings. Block
/// validation API will reject blocks containing transactions from these addresses.
#[arg(long = "builder.disallow", value_name = "PATH", value_parser = reth_cli_util::parsers::read_json_from_file::<HashSet<Address>>)]
pub builder_disallow: Option<HashSet<Address>>,
/// State cache configuration.
#[command(flatten)]
pub rpc_state_cache: RpcStateCacheArgs,
@ -199,6 +206,12 @@ impl RpcServerArgs {
self
}
/// Configures modules for the HTTP-RPC server.
pub fn with_http_api(mut self, http_api: RpcModuleSelection) -> Self {
self.http_api = Some(http_api);
self
}
/// Enables the WS-RPC server.
pub const fn with_ws(mut self) -> Self {
self.ws = true;
@ -318,6 +331,7 @@ impl Default for RpcServerArgs {
gas_price_oracle: GasPriceOracleArgs::default(),
rpc_state_cache: RpcStateCacheArgs::default(),
rpc_proof_permits: constants::DEFAULT_PROOF_PERMITS,
builder_disallow: Default::default(),
}
}
}