Crate sp_consensus

Source
Expand description

Common utilities for building and using consensus engines in substrate.

Much of this crate is unstable and thus the API is likely to undergo change. Implementors of traits should not rely on the interfaces to remain the same.

Re-exports§

pub use self::error::Error;

Modules§

block_validation
Block announcement validation.
error
Error types for consensus modules.

Structs§

DisableProofRecording
Express that proof recording is disabled.
EnableProofRecording
Express that proof recording is enabled.
InherentData
Inherent data to include in a block.
NoNetwork
A synchronization oracle for when there is no network.
NoProofRecorded
Error that is returned when ProofRecording requested to record a proof, but no proof was recorded.
Proposal
A proposal that is created by a Proposer.

Enums§

BlockOrigin
Block data origin.
BlockStatus
Block status.

Traits§

Environment
Environment for a Consensus instance.
ProofRecording
A trait to express the state of proof recording on type system level.
Proposer
Logic for a proposer.
SelectChain
The SelectChain trait defines the strategy upon which the head is chosen if multiple forks are present for an opaque definition of “best” in the specific chain build.
StateBackend
A state backend is used to read state data and can have changes committed to it.
SyncOracle
An oracle for when major synchronization work is being undertaken.