Crate pallet_babe[][src]

Consensus extension module for BABE consensus. Collects on-chain randomness from VRF outputs and manages epoch transitions.

Re-exports

pub use $crate::traits::GetPalletVersion as _;

Structs

Authorities

Current epoch authorities.

BabeEquivocationOffence

A BABE equivocation offence report.

CurrentSlot

Current slot number.

EpochIndex

Current epoch index.

EquivocationHandler

Generic equivocation handler. This type implements HandleEquivocation using existing subsystems that are part of frame (type bounds described below) and will dispatch to them directly, it's only purpose is to wire all subsystems together.

ExternalTrigger

A type signifying to BABE that an external trigger for epoch changes (e.g. pallet-session) is used.

GenesisConfig

Genesis config for the module, allow to build genesis storage.

GenesisSlot

The slot at which the first epoch actually started. This is 0 until the first block of the chain.

Module

The BABE Pallet

Randomness

The epoch randomness for the current epoch.

SameAuthoritiesForever

A type signifying to BABE that it should perform epoch changes with an internal trigger, recycling the same authorities forever.

Enums

Call

Dispatchable calls.

Error

Constants

PUBLIC_KEY_LENGTH

The length of the public key

RANDOMNESS_LENGTH

The length of the Randomness.

VRF_OUTPUT_LENGTH

Length of VRF output.

Traits

Config
EpochChangeTrigger

Trigger an epoch change, if any should take place.

HandleEquivocation

A trait with utility methods for handling equivocation reports in BABE. The trait provides methods for reporting an offence triggered by a valid equivocation report, checking the current block author (to declare as the reporter), and also for creating and submitting equivocation report extrinsics (useful only in offchain context).

WeightInfo

Type Definitions

AuthorityId

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.

BabeKey

A BABE public key