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

The types that are used by the engine API.

Required Associated Types§

type ExecutionData: ExecutionPayload

The execution payload type provided as input

type BuiltPayload: BuiltPayload + Clone + Unpin

The built payload type.

type PayloadAttributes: PayloadAttributes + Unpin

The RPC payload attributes type the CL node emits via the engine API.

type PayloadBuilderAttributes: PayloadBuilderAttributes<RpcPayloadAttributes = Self::PayloadAttributes> + Clone + Unpin

The payload attributes type that contains information about a running payload job.

Required Methods§

fn block_to_payload( block: SealedBlock<<<Self::BuiltPayload as BuiltPayload>::Primitives as NodePrimitives>::Block>, ) -> Self::ExecutionData

Converts a block into an execution payload.

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.

Implementations on Foreign Types§

§

impl PayloadTypes for EthPayloadTypes

§

type BuiltPayload = EthBuiltPayload

§

type PayloadAttributes = PayloadAttributes

§

type PayloadBuilderAttributes = EthPayloadBuilderAttributes

§

type ExecutionData = ExecutionData

§

fn block_to_payload( block: SealedBlock<<<<EthPayloadTypes as PayloadTypes>::BuiltPayload as BuiltPayload>::Primitives as NodePrimitives>::Block>, ) -> <EthPayloadTypes as PayloadTypes>::ExecutionData

§

impl<T> PayloadTypes for EthEngineTypes<T>
where <T as PayloadTypes>::BuiltPayload: BuiltPayload, <<T as PayloadTypes>::BuiltPayload as BuiltPayload>::Primitives: NodePrimitives<Block = Block<TransactionSigned>>, T: PayloadTypes<ExecutionData = ExecutionData>,

Implementors§

impl<N: NodePrimitives> PayloadTypes for OpPayloadTypes<N>
where OpBuiltPayload<N>: BuiltPayload<Primitives: NodePrimitives<Block = OpBlock>>,

impl<T: PayloadTypes<ExecutionData = OpExecutionData, BuiltPayload: BuiltPayload<Primitives: NodePrimitives<Block = OpBlock>>>> PayloadTypes for OpEngineTypes<T>