Crate finality_grandpa[][src]

Finality gadget for blockchains.

https://github.com/w3f/consensus/blob/master/pdf/grandpa.pdf

Consensus proceeds in rounds. Each round, voters will cast a prevote and precommit message.

Votes on blocks are then applied to the blockchain, being recursively applied to blocks before them. A DAG is superimposed over the blockchain with the vote_graph logic.

Equivocation detection and vote-set management is done in the round module. The work for actually casting votes is done in the voter module.

Modules

bitfield

Bitfield for handling equivocations.

round

Logic for a single round of GRANDPA.

vote_graph

Maintains the vote-graph of the blockchain.

voter

A voter in GRANDPA. This transitions between rounds and casts votes.

Structs

Equivocation

An equivocation (double-vote) in a given round.

Precommit

A precommit for a block and its ancestors.

Prevote

A prevote for a block and its ancestors.

SignedMessage

A signed message.

Enums

Error
Message

A protocol message or vote.

Traits

Chain

Chain context necessary for implementation of the finality gadget.