Skip to main content

Module vote

Module vote 

Source
Expand description

Per-view vote collection and certificate formation.

Votes for views arrive concurrently, and each view is tallied on its own until it crosses a threshold and forms a certificate. VoteCollector owns the machinery common to every kind of vote, inspecting each vote only through the Ballot trait. It creates a task per view and routes votes to the appropriate task, drops duplicate and stale votes, buffers votes whose epoch is not yet resolved, and GCs decided views. How a view’s task actually combines votes into an output is delegated to a pluggable Tally strategy.

Modules§

accumulate 🔒

Structs§

EpochRootTally
Accumulates epoch-root Vote1s into the (quorum, state) certificate pair.
SimpleTally
Accumulates votes into a single Certificate via a CheckedAccumulator.
VoteCollector
Collects votes per view and forms certificate(s) using the strategy S.
VoteStats
Accumulated stake / threshold for a single view.

Traits§

Ballot
Information about a vote.
Tally
How to count votes to form a certificate.

Type Aliases§

EpochRootCerts
The quorum and light-client state certificates formed at an epoch-root view.