Crate sp_consensus_babe[][src]

Expand description

Primitives for BABE.

Modules

Private implementation details of BABE digests.

Inherents for BABE

Structs

Configuration data used by the BABE consensus engine.

Configuration data used by the BABE consensus engine.

Configuration data used by the BABE consensus engine.

BABE epoch information

An opaque type used to represent the key ownership proof at the runtime API boundary. The inner value is an encoded representation of the actual key ownership proof which will be parameterized when defining the runtime. At the runtime API boundary this type is unknown and as such we keep this opaque representation, implementors of the runtime API will have to make sure that all usages of OpaqueKeyOwnershipProof refer to the same type.

Unit type wrapper that represents a slot.

A transcript of a public-coin argument.

Enums

Types of allowed slots.

An consensus log item for BABE.

Constants

The ConsensusEngineId of BABE.

The prefix used by BABE for its VRF keys.

Key type for BABE module.

How many blocks to wait before running the median algorithm for relative time This will not vary from chain to chain as it is not dependent on slot duration or epoch length.

The length of the public key

The length of the Randomness.

Length of VRF output.

Length of the short VRF proof which lacks support for batch verification.

Statics

BABE VRFInOut context.

Traits

API necessary for block authorship with BABE.

Functions

Verifies the equivocation proof by making sure that: both headers have different hashes, are targetting the same slot, and have valid signatures by the same authority.

Make a VRF transcript from given randomness, slot number and epoch.

Make a VRF transcript data container

Type Definitions

A Babe authority identifier. Necessarily equivalent to the schnorrkel public key used in the main Babe module. If that ever changes, then this must, too.

The index of an authority.

A Babe authority keypair. Necessarily equivalent to the schnorrkel public key used in the main Babe module. If that ever changes, then this must, too.

A Babe authority signature.

The weight of an authority.

The cumulative weight of a BABE block, i.e. sum of block weights starting at this block until the genesis block.

An equivocation proof for multiple block authorships on the same slot (i.e. double vote).

Schnorrkel randomness value. Same size as VRFOutput.