ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Committee.AcrossEpochs

Description

This module extends a given voting committee to work across epochs.

This is needed to support the case of validating an old vote or certificate from a previous epoch arriving too late. In the general case, this means we would need to store an arbitrary number of past voting committee selections. However, since: 1. the length of an epoch is much larger than the immutability window, and 2. we don't care about validating votes older than the immutability window, it follows that we only need to store the voting committee selection for the current and previous epochs. NOTE: this rationale might need to be revisited if we ever want to support validating votes and certificates older than the immutability window, e.g., for historical queries.

Synopsis

Documentation

data InterEpochVotingCommittee crypto committee Source #

Constructors

InterEpochVotingCommittee 

Fields

mkInterEpochVotingCommitteeCryptoSupportsVotingCommittee crypto committee ⇒ VotingCommitteeInput crypto committee → Either (VotingCommitteeError crypto committee) (InterEpochVotingCommittee crypto committee) Source #

Construct an inter-epoch committee selection for the first epoch

newEpochCryptoSupportsVotingCommittee crypto committee ⇒ VotingCommitteeInput crypto committee → InterEpochVotingCommittee crypto committee → Either (VotingCommitteeError crypto committee) (InterEpochVotingCommittee crypto committee) Source #

Update an inter-epoch committee selection at the beginning of a new epoch

getVotingCommitteeForElectionElectionId crypto → InterEpochVotingCommittee crypto committee → Maybe (VotingCommittee crypto committee) Source #

Get the voting committee corresponding to an election, if any