pub trait FullConsensus<N: NodePrimitives = EthPrimitives>: AsConsensus<N::BlockHeader, N::BlockBody> {
// Required method
fn validate_block_post_execution(
&self,
block: &BlockWithSenders<N::Block>,
input: PostExecutionInput<'_, N::Receipt>,
) -> Result<(), ConsensusError>;
}
Expand description
Consensus
implementation which knows full node primitives and is able to validation block’s
execution outcome.
Required Methods§
Sourcefn validate_block_post_execution(
&self,
block: &BlockWithSenders<N::Block>,
input: PostExecutionInput<'_, N::Receipt>,
) -> Result<(), ConsensusError>
fn validate_block_post_execution( &self, block: &BlockWithSenders<N::Block>, input: PostExecutionInput<'_, N::Receipt>, ) -> Result<(), ConsensusError>
Validate a block considering world state, i.e. things that can not be checked before execution.
See the Yellow Paper sections 4.3.2 “Holistic Validity”.
Note: validating blocks does not include other validations of the Consensus
Implementations on Foreign Types§
Source§impl<'a, N: NodePrimitives, T: 'a + FullConsensus<N> + ?Sized> FullConsensus<N> for &'a Twhere
&'a T: AsConsensus<N::BlockHeader, N::BlockBody>,
impl<'a, N: NodePrimitives, T: 'a + FullConsensus<N> + ?Sized> FullConsensus<N> for &'a Twhere
&'a T: AsConsensus<N::BlockHeader, N::BlockBody>,
fn validate_block_post_execution( &self, block: &BlockWithSenders<N::Block>, input: PostExecutionInput<'_, N::Receipt>, ) -> Result<(), ConsensusError>
Source§impl<N: NodePrimitives, T: FullConsensus<N> + ?Sized> FullConsensus<N> for Arc<T>where
Arc<T>: AsConsensus<N::BlockHeader, N::BlockBody>,
impl<N: NodePrimitives, T: FullConsensus<N> + ?Sized> FullConsensus<N> for Arc<T>where
Arc<T>: AsConsensus<N::BlockHeader, N::BlockBody>,
fn validate_block_post_execution( &self, block: &BlockWithSenders<N::Block>, input: PostExecutionInput<'_, N::Receipt>, ) -> Result<(), ConsensusError>
Implementors§
impl<N: NodePrimitives> FullConsensus<N> for NoopConsensus
impl<N: NodePrimitives> FullConsensus<N> for TestConsensus
Available on crate feature
test-utils
only.