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 that may change with epochs.
  • 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 slot duration defined in milliseconds.
  • A transcript of a public-coin argument.

Enums

Constants

Statics

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.
  • Returns the epoch index the given slot belongs to.
  • Returns the first slot at the given epoch index.
  • 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.