Trait PayloadTypes
pub trait PayloadTypes:
Send
+ Sync
+ Unpin
+ Debug
+ Clone
+ 'static {
type ExecutionData: ExecutionPayload;
type BuiltPayload: BuiltPayload + Clone + Unpin;
type PayloadAttributes: PayloadAttributes + Unpin;
type PayloadBuilderAttributes: PayloadBuilderAttributes<RpcPayloadAttributes = Self::PayloadAttributes> + Clone + Unpin;
// Required method
fn block_to_payload(
block: SealedBlock<<<Self::BuiltPayload as BuiltPayload>::Primitives as NodePrimitives>::Block>,
) -> Self::ExecutionData;
}
Expand description
Core trait that defines the associated types for working with execution payloads.
Required Associated Types§
type ExecutionData: ExecutionPayload
type ExecutionData: ExecutionPayload
The format for execution payload data that can be processed and validated.
This type represents the canonical format for block data that includes all necessary information for execution and validation.
type BuiltPayload: BuiltPayload + Clone + Unpin
type BuiltPayload: BuiltPayload + Clone + Unpin
The type representing a successfully built payload/block.
type PayloadAttributes: PayloadAttributes + Unpin
type PayloadAttributes: PayloadAttributes + Unpin
Attributes that specify how a payload should be constructed.
These attributes typically come from external sources (e.g., consensus layer over RPC such as the Engine API) and contain parameters like timestamp, fee recipient, and randomness.
type PayloadBuilderAttributes: PayloadBuilderAttributes<RpcPayloadAttributes = Self::PayloadAttributes> + Clone + Unpin
type PayloadBuilderAttributes: PayloadBuilderAttributes<RpcPayloadAttributes = Self::PayloadAttributes> + Clone + Unpin
Extended attributes used internally during payload building.
This type augments the basic payload attributes with additional information needed during the building process, such as unique identifiers and parent block references.
Required Methods§
fn block_to_payload(
block: SealedBlock<<<Self::BuiltPayload as BuiltPayload>::Primitives as NodePrimitives>::Block>,
) -> Self::ExecutionData
fn block_to_payload( block: SealedBlock<<<Self::BuiltPayload as BuiltPayload>::Primitives as NodePrimitives>::Block>, ) -> Self::ExecutionData
Converts a sealed block into the execution payload format.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.