Crate noble_grandpa[][src]

GRANDPA Consensus module for runtime.

This manages the GRANDPA authority set ready for the native code. These authorities are only for GRANDPA finality, not for consensus overall.

In the future, it will also handle misbehavior reports, and on-chain finality notifications.

For full integration with GRANDPA, the GrandpaApi should be implemented. The necessary items are re-exported via the fg_primitives crate.

Re-exports

pub use tp_finality_grandpa as fg_primitives;
pub use $crate::traits::GetNobleVersion as _;

Structs

EquivocationHandler

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

GenesisConfig

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

GrandpaEquivocationOffence

A grandpa equivocation offence report.

GrandpaTimeSlot

A round number and set id which point on the time of an offence.

Module
OldStoredPendingChange

A stored pending change, old format.

StoredPendingChange

A stored pending change.

VersionedAuthorityList

An AuthorityList that is encoded with a version specifier. The encoding version is updated any time the AuthorityList type changes. This ensures that encodings of different versions of an AuthorityList are differentiable. Attempting to decode an authority list with an unknown version will fail.

Enums

Call

Dispatchable calls.

Error
Event

Events for this module.

StoredState

Current state of the GRANDPA authority set. State transitions must happen in the same order of states defined below, e.g. Paused implies a prior PendingPause.

Traits

Config
GrandpaOffence

An interface for types that will be used as GRANDPA offences and must also implement the Offence trait. This trait provides a constructor that is provided all available data during processing of GRANDPA equivocations.

HandleEquivocation

A trait with utility methods for handling equivocation reports in GRANDPA. The offence type is generic, and the trait provides , reporting an offence triggered by a valid equivocation report, and also for creating and submitting equivocation report extrinsics (useful only in offchain context).

WeightInfo

Type Definitions

AuthorityId

Identity of a Grandpa authority.

AuthorityList

A list of Grandpa authorities with associated weights.

AuthorityWeight

The weight of an authority.