| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Peras.Voting.Committee
Description
Support for using concrete votes and certificates with multiple voting committee implementations.
Synopsis
- data PerasConversionError
- class PerasVoteCompatibleWithVotingCommittee vote crypto committee | vote → crypto where
- toPerasVote ∷ Vote crypto committee → Either PerasConversionError vote
- fromPerasVote ∷ vote → Either PerasConversionError (Vote crypto committee)
- class PerasCertCompatibleWithVotingCommittee cert crypto committee | cert → crypto where
- toPerasCert ∷ Cert crypto committee → Either PerasConversionError cert
- fromPerasCert ∷ cert → Either PerasConversionError (Cert crypto committee)
Peras support for multiple voting committee implementations
data PerasConversionError Source #
Errors that can occur when converting between Peras and committee types
Constructors
| EveryoneVotesButFoundNonPersistentVoterInVote SeatIndex | |
| EveryoneVotesButFoundNonPersistentVotersInCert (NE [SeatIndex]) | |
| SeatIndexOverflowError Word64 | |
| CryptoError String |
Instances
| Show PerasConversionError Source # | |
Defined in Ouroboros.Consensus.Peras.Voting.Committee Methods showsPrec ∷ Int → PerasConversionError → ShowS # show ∷ PerasConversionError → String # showList ∷ [PerasConversionError] → ShowS # | |
| Eq PerasConversionError Source # | |
Defined in Ouroboros.Consensus.Peras.Voting.Committee Methods | |
class PerasVoteCompatibleWithVotingCommittee vote crypto committee | vote → crypto where Source #
Conversion between (concrete) Peras votes and (abstract) committee votes.
NOTE: the functional dependency vote -> crypto explicitly ties each
concrete Peras vote type to a specific crypto scheme.
Methods
toPerasVote ∷ Vote crypto committee → Either PerasConversionError vote Source #
fromPerasVote ∷ vote → Either PerasConversionError (Vote crypto committee) Source #
class PerasCertCompatibleWithVotingCommittee cert crypto committee | cert → crypto where Source #
Conversion between (concrete) Peras certificates and (abstract) committee certificates.
NOTE: the functional dependency cert -> crypto explicitly ties each
concrete Peras certificate type to a specific crypto scheme.
Methods
toPerasCert ∷ Cert crypto committee → Either PerasConversionError cert Source #
fromPerasCert ∷ cert → Either PerasConversionError (Cert crypto committee) Source #