feat: introduce payload types (#8756)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
jn
2024-06-11 13:46:01 -07:00
committed by GitHub
parent 92d2f29ab8
commit 268e768d82
6 changed files with 38 additions and 25 deletions

View File

@ -22,6 +22,17 @@ pub use payload::PayloadOrAttributes;
use reth_primitives::ChainSpec;
use std::fmt::Debug;
/// The types that are used by the engine API.
pub trait PayloadTypes: Send + Sync + Unpin {
/// The RPC payload attributes type the CL node emits via the engine API.
type PayloadAttributes: PayloadAttributes + Unpin;
/// The payload attributes type that contains information about a running payload job.
type PayloadBuilderAttributes: PayloadBuilderAttributes<RpcPayloadAttributes = Self::PayloadAttributes>
+ Clone
+ Unpin;
}
/// Validates the timestamp depending on the version called:
///
/// * If V2, this ensures that the payload timestamp is pre-Cancun.