-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add validation API endpoints (#5816)
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//! API for block submission validation. | ||
use jsonrpsee::proc_macros::rpc; | ||
use reth_rpc_types::relay::{BuilderBlockValidationRequest, BuilderBlockValidationRequestV2}; | ||
|
||
/// Block validation rpc interface. | ||
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "flashbots"))] | ||
#[cfg_attr(feature = "client", rpc(server, client, namespace = "flashbots"))] | ||
#[async_trait::async_trait] | ||
pub trait BlockSubmissionValidationApi { | ||
/// A Request to validate a block submission. | ||
#[method(name = "validateBuilderSubmissionV1")] | ||
async fn validate_builder_submission_v1( | ||
&self, | ||
request: BuilderBlockValidationRequest, | ||
) -> jsonrpsee::core::RpcResult<()>; | ||
|
||
/// A Request to validate a block submission. | ||
#[method(name = "validateBuilderSubmissionV2")] | ||
async fn validate_builder_submission_v2( | ||
&self, | ||
request: BuilderBlockValidationRequestV2, | ||
) -> jsonrpsee::core::RpcResult<()>; | ||
} |