Crate pallet_babe[][src]

Expand description

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


pub use pallet::*;


The module that hosts all the FRAME types needed to add this pallet to a runtime.


A BABE equivocation offence report.

Randomness produced semi-freshly with each block, but inherits limitations of RandomnessFromTwoEpochsAgo from which it derives.

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.

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

Randomness usable by on-chain code that does not depend upon finality and takes action based upon on-chain commitments made during the previous epoch.

Randomness usable by consensus protocols that depend upon finality and take action based upon on-chain commitments made during the epoch before the previous epoch.

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


The length of the public key

The length of the Randomness.

Length of VRF output.


Trigger an epoch change, if any should take place.

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).

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.

A BABE public key