Crate sp_consensus[−][src]
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 announcement validation.
Error types in Consensus
Block evaluation and evaluation errors.
Structs
Returns always true
for can_author_with
. This is useful for tests.
Checks if the node can author blocks by using
NativeVersion::can_author_with
.
Express that proof recording is disabled.
Express that proof recording is enabled.
Inherent data to include in a block.
Never can author.
A synchronization oracle for when there is no network.
Error that is returned when ProofRecording
requested to record a proof,
but no proof was recorded.
A proposal that is created by a Proposer
.
Enums
Traits
Checks if the current active native block authoring implementation can author with the runtime at the given block.
Environment for a Consensus instance.
A trait to express the state of proof recording on type system level.
Logic for a proposer.
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.
A type from which a slot duration can be obtained.
A state backend is used to read state data and can have changes committed to it.
An oracle for when major synchronization work is being undertaken.
Type Definitions
Type of keys in the blockchain cache that consensus module could use for its needs.