Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Protocol.PBFT.Crypto
Synopsis
- class (Typeable c, DSIGNAlgorithm (PBftDSIGN c), Condense (SigDSIGN (PBftDSIGN c)), Show (PBftVerKeyHash c), Ord (PBftVerKeyHash c), Eq (PBftVerKeyHash c), Show (PBftVerKeyHash c), NoThunks (PBftVerKeyHash c), NoThunks (PBftDelegationCert c), Serialise (PBftVerKeyHash c)) ⇒ PBftCrypto c where
- type PBftDSIGN c
- type PBftDelegationCert c = (d ∷ Type) | d → c
- type PBftVerKeyHash c = (d ∷ Type) | d → c
- dlgCertGenVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c)
- dlgCertDlgVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c)
- hashVerKey ∷ VerKeyDSIGN (PBftDSIGN c) → PBftVerKeyHash c
- data PBftMockCrypto
- newtype PBftMockVerKeyHash = PBftMockVerKeyHash {}
Documentation
class (Typeable c, DSIGNAlgorithm (PBftDSIGN c), Condense (SigDSIGN (PBftDSIGN c)), Show (PBftVerKeyHash c), Ord (PBftVerKeyHash c), Eq (PBftVerKeyHash c), Show (PBftVerKeyHash c), NoThunks (PBftVerKeyHash c), NoThunks (PBftDelegationCert c), Serialise (PBftVerKeyHash c)) ⇒ PBftCrypto c where Source #
Crypto primitives required by BFT
Cardano stores a map of stakeholder IDs rather than the verification key directly. We make this family injective for convenience - whilst it's _possible_ that there could be non-injective instances, the chances of there being more than the two instances here are basically non-existent.
Associated Types
type PBftDelegationCert c = (d ∷ Type) | d → c Source #
type PBftVerKeyHash c = (d ∷ Type) | d → c Source #
Methods
dlgCertGenVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c) Source #
dlgCertDlgVerKey ∷ PBftDelegationCert c → VerKeyDSIGN (PBftDSIGN c) Source #
hashVerKey ∷ VerKeyDSIGN (PBftDSIGN c) → PBftVerKeyHash c Source #
Instances
data PBftMockCrypto Source #
Instances
PBftCrypto PBftMockCrypto Source # | |||||||||||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Associated Types
Methods dlgCertGenVerKey ∷ PBftDelegationCert PBftMockCrypto → VerKeyDSIGN (PBftDSIGN PBftMockCrypto) Source # dlgCertDlgVerKey ∷ PBftDelegationCert PBftMockCrypto → VerKeyDSIGN (PBftDSIGN PBftMockCrypto) Source # hashVerKey ∷ VerKeyDSIGN (PBftDSIGN PBftMockCrypto) → PBftVerKeyHash PBftMockCrypto Source # | |||||||||||||
type PBftDSIGN PBftMockCrypto Source # | |||||||||||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto | |||||||||||||
type PBftDelegationCert PBftMockCrypto Source # | |||||||||||||
type PBftVerKeyHash PBftMockCrypto Source # | |||||||||||||
newtype PBftMockVerKeyHash Source #
We don't hash and just use the underlying Word64
.
Constructors
PBftMockVerKeyHash | |
Instances
Generic PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Associated Types
Methods | |||||
Show PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Methods showsPrec ∷ Int → PBftMockVerKeyHash → ShowS # show ∷ PBftMockVerKeyHash → String # showList ∷ [PBftMockVerKeyHash] → ShowS # | |||||
Eq PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Methods | |||||
Ord PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Methods compare ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → Ordering # (<) ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → Bool # (<=) ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → Bool # (>) ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → Bool # (>=) ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → Bool # max ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → PBftMockVerKeyHash # min ∷ PBftMockVerKeyHash → PBftMockVerKeyHash → PBftMockVerKeyHash # | |||||
NoThunks PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto | |||||
Serialise PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto Methods encode ∷ PBftMockVerKeyHash → Encoding Source # decode ∷ Decoder s PBftMockVerKeyHash Source # | |||||
type Rep PBftMockVerKeyHash Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto type Rep PBftMockVerKeyHash = D1 ('MetaData "PBftMockVerKeyHash" "Ouroboros.Consensus.Protocol.PBFT.Crypto" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "PBftMockVerKeyHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPBftMockVerKeyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerKeyDSIGN MockDSIGN)))) |