Skip to main content

Module election

Module election 

Source
Expand description

The election trait, used to decide which node is the leader and determine if a vote is valid.

Reads of per-epoch state go through a MembershipSnapshot obtained from Membership::snapshot. Each snapshot is a consistent point-in-time view; its accessors observe one moment of the membership state, so derived values from the same snapshot are guaranteed to come from one logical instant. Reads of the views before the first epoch go through the GenesisStakeTables from Membership::genesis_stake_tables.

Structsยง

GenesisStakeTables
The stake tables of views before the first epoch, when epochs were not enabled yet: the genesis stake table and the genesis DA committee.
NoStakeTableHash

Traitsยง

Membership
A protocol for determining membership in and participating in a committee.
MembershipSnapshot
A consistent per-epoch view of a Membership.

Functionsยง

entry ๐Ÿ”’
The entry of table for key, where keys are the keys of table.
keys ๐Ÿ”’
total_stake ๐Ÿ”’