feat: remove relay types (#8314)

This commit is contained in:
Matthias Seitz
2024-05-19 14:31:56 +02:00
committed by GitHub
parent 4b2d5eb83b
commit 3daec1d9b9
8 changed files with 6 additions and 746 deletions

View File

@ -1,7 +1,9 @@
//! API for block submission validation.
use jsonrpsee::proc_macros::rpc;
use reth_rpc_types::relay::{BuilderBlockValidationRequest, BuilderBlockValidationRequestV2};
use reth_rpc_types::beacon::relay::{
BuilderBlockValidationRequest, BuilderBlockValidationRequestV2,
};
/// Block validation rpc interface.
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "flashbots"))]

View File

@ -20,20 +20,15 @@ alloy-rpc-types-anvil.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-rpc-types-engine = { workspace = true, features = ["jsonrpsee-types"] }
ethereum_ssz_derive = { version = "0.5", optional = true }
ethereum_ssz = { version = "0.5", optional = true }
# misc
thiserror.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_with = "3.3"
serde_json.workspace = true
jsonrpsee-types = { workspace = true, optional = true }
[features]
default = ["jsonrpsee-types"]
arbitrary = ["alloy-primitives/arbitrary", "alloy-rpc-types/arbitrary"]
ssz = ["dep:ethereum_ssz" ,"dep:ethereum_ssz_derive", "alloy-primitives/ssz", "alloy-rpc-types/ssz", "alloy-rpc-types-engine/ssz"]
[dev-dependencies]

View File

@ -14,7 +14,6 @@ mod eth;
mod mev;
mod net;
mod peer;
pub mod relay;
mod rpc;
// re-export for convenience
@ -31,6 +30,9 @@ pub mod trace {
// Anvil specific rpc types coming from alloy.
pub use alloy_rpc_types_anvil as anvil;
// re-export beacon
pub use alloy_rpc_types_beacon as beacon;
// Ethereum specific rpc types related to typed transaction requests and the engine API.
pub use eth::{
engine,

View File

@ -1,40 +0,0 @@
//! Error types for the relay.
use alloy_primitives::B256;
/// Error thrown by the `validateBuilderSubmission` endpoints if the message differs from payload.
#[derive(Debug, thiserror::Error)]
pub enum ValidateBuilderSubmissionEqualityError {
/// Thrown if parent hash mismatches
#[error("incorrect ParentHash {actual}, expected {expected}")]
IncorrectParentHash {
/// The expected parent hash
expected: B256,
/// The actual parent hash
actual: B256,
},
/// Thrown if block hash mismatches
#[error("incorrect BlockHash {actual}, expected {expected}")]
IncorrectBlockHash {
/// The expected block hash
expected: B256,
/// The actual block hash
actual: B256,
},
/// Thrown if block hash mismatches
#[error("incorrect GasLimit {actual}, expected {expected}")]
IncorrectGasLimit {
/// The expected gas limit
expected: u64,
/// The actual gas limit
actual: B256,
},
/// Thrown if block hash mismatches
#[error("incorrect GasUsed {actual}, expected {expected}")]
IncorrectGasUsed {
/// The expected gas used
expected: u64,
/// The actual gas used
actual: B256,
},
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long