mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: flashbots_validateBuilderSubmissionV3 (#12168)
This commit is contained in:
@ -36,6 +36,8 @@ alloy-rpc-types-engine.workspace = true
|
||||
|
||||
# misc
|
||||
jsonrpsee = { workspace = true, features = ["server", "macros"] }
|
||||
serde.workspace = true
|
||||
serde_with.workspace = true
|
||||
|
||||
[features]
|
||||
client = [
|
||||
|
||||
@ -46,7 +46,7 @@ pub mod servers {
|
||||
rpc::RpcApiServer,
|
||||
trace::TraceApiServer,
|
||||
txpool::TxPoolApiServer,
|
||||
validation::BlockSubmissionValidationApiServer,
|
||||
validation::{BlockSubmissionValidationApiServer, BuilderBlockValidationRequestV3},
|
||||
web3::Web3ApiServer,
|
||||
};
|
||||
pub use reth_rpc_eth_api::{
|
||||
|
||||
@ -1,9 +1,28 @@
|
||||
//! API for block submission validation.
|
||||
|
||||
use alloy_primitives::B256;
|
||||
use alloy_rpc_types_beacon::relay::{
|
||||
BuilderBlockValidationRequest, BuilderBlockValidationRequestV2, BuilderBlockValidationRequestV3,
|
||||
BuilderBlockValidationRequest, BuilderBlockValidationRequestV2, SignedBidSubmissionV3,
|
||||
};
|
||||
use jsonrpsee::proc_macros::rpc;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::{serde_as, DisplayFromStr};
|
||||
|
||||
/// A Request to validate a [`SignedBidSubmissionV3`]
|
||||
///
|
||||
/// <https://github.com/flashbots/builder/blob/7577ac81da21e760ec6693637ce2a81fe58ac9f8/eth/block-validation/api.go#L198-L202>
|
||||
#[serde_as]
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct BuilderBlockValidationRequestV3 {
|
||||
/// The request to be validated.
|
||||
#[serde(flatten)]
|
||||
pub request: SignedBidSubmissionV3,
|
||||
/// The registered gas limit for the validation request.
|
||||
#[serde_as(as = "DisplayFromStr")]
|
||||
pub registered_gas_limit: u64,
|
||||
/// The parent beacon block root for the validation request.
|
||||
pub parent_beacon_block_root: B256,
|
||||
}
|
||||
|
||||
/// Block validation rpc interface.
|
||||
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "flashbots"))]
|
||||
|
||||
Reference in New Issue
Block a user