reth_engine_primitives

Trait PayloadValidator

Source
pub trait PayloadValidator:
    Debug
    + Send
    + Sync
    + Unpin
    + 'static {
    type Block: Block;

    // Required method
    fn ensure_well_formed_payload(
        &self,
        payload: ExecutionPayload,
        sidecar: ExecutionPayloadSidecar,
    ) -> Result<SealedBlockFor<Self::Block>, PayloadError>;
}
Expand description

Type that validates an [ExecutionPayload].

Required Associated Types§

Source

type Block: Block

The block type used by the engine.

Required Methods§

Source

fn ensure_well_formed_payload( &self, payload: ExecutionPayload, sidecar: ExecutionPayloadSidecar, ) -> Result<SealedBlockFor<Self::Block>, PayloadError>

Ensures that the given payload does not violate any consensus rules that concern the block’s layout.

This function must convert the payload into the executable block and pre-validate its fields.

Implementers should ensure that the checks are done in the order that conforms with the engine-API specification.

Implementors§