| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Peras.Cert.V1
Description
Concrete Peras certificate types using BLS signatures.
NOTE: this module is meant to be imported qualified.
NOTE: the validation performed during serialization is minimal, and does not cover any of additional semantic and cryptographic checks that must be performed on the certificate later on.
Synopsis
- data PerasCert blk = PerasCert {}
- newtype PerasCertVoters = PerasCertVoters {}
- castPerasCert ∷ ∀ blk' blk. PerasCert blk → PerasCert blk'
- perasCertSizeUpperBound ∷ PerasCert blk → PerasCertSize
- perasCertNumberOfNonPersistentVoters ∷ PerasCert blk → Int
- perasCertNumberOfVoters ∷ PerasCert blk → Int
Documentation
Concrete Peras certificates using BLS signatures
NOTE: the blk parameter is a phantom type used to track the block type that
the certificate is associated with, to ensure injectivity when PerasCert
is used as a type instance for BlockSupportsPeras class.
Constructors
| PerasCert | |
Fields
| |
Instances
newtype PerasCertVoters Source #
Voters contained in a certificate with their appropriate eligibility proof
Constructors
| PerasCertVoters | |
Instances
| FromCBOR PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 | |||||
| ToCBOR PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 Methods toCBOR ∷ PerasCertVoters → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasCertVoters → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasCertVoters] → Size Source # | |||||
| Eq PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 Methods (==) ∷ PerasCertVoters → PerasCertVoters → Bool # (/=) ∷ PerasCertVoters → PerasCertVoters → Bool # | |||||
| Generic PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 Associated Types
Methods from ∷ PerasCertVoters → Rep PerasCertVoters x # to ∷ Rep PerasCertVoters x → PerasCertVoters # | |||||
| Show PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 Methods showsPrec ∷ Int → PerasCertVoters → ShowS # show ∷ PerasCertVoters → String # showList ∷ [PerasCertVoters] → ShowS # | |||||
| NoThunks PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 | |||||
| type Rep PerasCertVoters Source # | |||||
Defined in Ouroboros.Consensus.Peras.Cert.V1 type Rep PerasCertVoters = D1 ('MetaData "PerasCertVoters" "Ouroboros.Consensus.Peras.Cert.V1" "ouroboros-consensus-5.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasCertVoters" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasCertVoters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NE (Map PerasSeatIndex PerasVoteEligibilityProof))))) | |||||
castPerasCert ∷ ∀ blk' blk. PerasCert blk → PerasCert blk' Source #
Retag a PerasCert with a new phantom blk type.
perasCertSizeUpperBound ∷ PerasCert blk → PerasCertSize Source #
A reasonably tight upper bound on the size of a Peras certificate. This upper bound is used to check, at aggregation time, that the certificate does not exceed the size limit we've set for Peras certificates. We use an upper bound instead of the actual size, because the latter would require serializing the certificate, which is expensive and only actually needs to be done when the certificate is to be included in a block.
NOTE: this will be moved to 'cardano-base' soon, see https://github.com/IntersectMBO/cardano-base/pull/701
Exported for testing purposes only
perasCertNumberOfVoters ∷ PerasCert blk → Int Source #