Trait PayloadValidator
pub trait PayloadValidator:
Send
+ Sync
+ Unpin
+ 'static {
type Block: Block;
type ExecutionData;
// Required method
fn ensure_well_formed_payload(
&self,
payload: Self::ExecutionData,
) -> Result<RecoveredBlock<Self::Block>, NewPayloadError>;
// Provided method
fn validate_block_post_execution_with_hashed_state(
&self,
_state_updates: &HashedPostState,
_block: &RecoveredBlock<Self::Block>,
) -> Result<(), ConsensusError> { ... }
}
Expand description
Type that validates an ExecutionPayload
.
Required Associated Types§
type ExecutionData
type ExecutionData
The execution payload type used by the engine.
Required Methods§
fn ensure_well_formed_payload(
&self,
payload: Self::ExecutionData,
) -> Result<RecoveredBlock<Self::Block>, NewPayloadError>
fn ensure_well_formed_payload( &self, payload: Self::ExecutionData, ) -> Result<RecoveredBlock<Self::Block>, NewPayloadError>
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.
Provided Methods§
fn validate_block_post_execution_with_hashed_state(
&self,
_state_updates: &HashedPostState,
_block: &RecoveredBlock<Self::Block>,
) -> Result<(), ConsensusError>
fn validate_block_post_execution_with_hashed_state( &self, _state_updates: &HashedPostState, _block: &RecoveredBlock<Self::Block>, ) -> Result<(), ConsensusError>
Verifies payload post-execution w.r.t. hashed state updates.