Expand description

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

Voters rely on some external context to function:

  • setting timers to cast votes.
  • incoming vote streams.
  • providing voter weights.
  • getting the local voter id.

The local voter id is used to check whether to cast votes for a given round. If no local id is defined or if it’s not part of the voter set then votes will not be pushed to the sink. The protocol state machine still transitions state as if the votes had been pushed out.

Modules

Contains a number of data transfer objects for reporting data to the outside world.

Structs

The result of processing for a bad catch up.

The result of processing for a bad commit

The result of processing for a good catch up.

The result of processing for a good commit.

Data necessary to participate in a round.

A future that maintains and multiplexes between different rounds, and caches votes.

Enums

Callback used to pass information about the outcome of importing a given message (e.g. vote, commit, catch up). Useful to propagate data to the network after making sure the import is successful.

The outcome of processing a catch up.

The outcome of processing a commit.

Communication between nodes that is not round-localized.

Communication between nodes that is not round-localized.

Traits

Necessary environment for a voter.

Trait for querying the state of the voter. Used by Voter to return a queryable object without exposing too many data types.