reth::api

Trait PayloadValidator

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

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

Type that validates an ExecutionPayload.

Required Associated Types§

type Block: Block

The block type used by the engine.

Required Methods§

fn ensure_well_formed_payload( &self, payload: ExecutionPayload, sidecar: ExecutionPayloadSidecar, ) -> Result<SealedBlock<<Self::Block as Block>::Header, <Self::Block as Block>::Body>, 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.

Implementations on Foreign Types§

§

impl PayloadValidator for EthereumEngineValidator

Implementors§