referrerpolicy=no-referrer-when-downgrade

Trait ConsensusHook

Source
pub trait ConsensusHook {
    // Required method
    fn on_state_proof(
        state_proof: &RelayChainStateProof,
    ) -> (Weight, UnincludedSegmentCapacity);
}
Expand description

The consensus hook for dealing with the unincluded segment.

Higher-level and user-configurable consensus logic is more informed about the desired unincluded segment length, as well as any rules for adapting it dynamically according to the relay-chain state.

Required Methods§

Source

fn on_state_proof( state_proof: &RelayChainStateProof, ) -> (Weight, UnincludedSegmentCapacity)

This hook is called partway through the set_validation_data inherent in parachain-system.

The hook is allowed to panic if customized consensus rules aren’t met and is required to return a maximum capacity for the unincluded segment with weight consumed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§