-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: make submission impl non blocking (#24)
- Loading branch information
Showing
6 changed files
with
53 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,5 @@ | ||
use std::sync::Arc; | ||
|
||
pub mod cli_ext; | ||
pub use cli_ext::ValidationCliExt; | ||
|
||
pub mod cli_ext; | ||
pub mod rpc; | ||
use rpc::ValidationApiInner; | ||
|
||
/// The type that implements the `validation` rpc namespace trait | ||
pub struct ValidationApi<Provider> { | ||
inner: Arc<ValidationApiInner<Provider>>, | ||
} | ||
pub use rpc::ValidationApi; |
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,16 @@ | ||
use crate::rpc::ValidationRequestBody; | ||
use jsonrpsee::core::RpcResult; | ||
use jsonrpsee::proc_macros::rpc; | ||
|
||
/// trait interface for a custom rpc namespace: `validation` | ||
/// | ||
/// This defines an additional namespace where all methods are configured as trait functions. | ||
#[rpc(client, server, namespace = "flashbots")] | ||
pub trait ValidationApi { | ||
/// Validates a block submitted to the relay | ||
#[method(name = "validateBuilderSubmissionV2")] | ||
async fn validate_builder_submission_v2( | ||
&self, | ||
request_body: ValidationRequestBody, | ||
) -> RpcResult<()>; | ||
} |
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