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§
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>
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.