Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Bft c
- data BftFields c toSign = BftFields {
- bftSignature ∷ !(SignedDSIGN (BftDSIGN c) toSign)
- data BftParams = BftParams {}
- data BftValidationErr = BftInvalidSignature String
- forgeBftFields ∷ (BftCrypto c, Signable (BftDSIGN c) toSign) ⇒ ConsensusConfig (Bft c) → toSign → BftFields c toSign
- class (Typeable c, DSIGNAlgorithm (BftDSIGN c), Condense (SigDSIGN (BftDSIGN c)), NoThunks (SigDSIGN (BftDSIGN c)), ContextDSIGN (BftDSIGN c) ~ ()) ⇒ BftCrypto c where
- data BftMockCrypto
- data BftStandardCrypto
- data BftValidateView c = ∀ signed.Signable (BftDSIGN c) signed ⇒ BftValidateView (BftFields c signed) signed
- bftValidateView ∷ (SignedHeader hdr, Signable (BftDSIGN c) (Signed hdr)) ⇒ (hdr → BftFields c (Signed hdr)) → hdr → BftValidateView c
- data family ConsensusConfig p ∷ Type
Documentation
Basic BFT
Basic BFT is very simple:
- No support for delegation (and hence has no need for a ledger view)
- Requires round-robin block signing throughout (and so has no need for any chain state or cryptographic leader proofs).
- Does not use any stateful crypto (and so has no need for node state)
Instances
data BftFields c toSign Source #
BftFields | |
|
Instances
Generic (BftFields c toSign) Source # | |
BftCrypto c ⇒ Show (BftFields c toSign) Source # | |
BftCrypto c ⇒ Eq (BftFields c toSign) Source # | |
(BftCrypto c, Typeable toSign) ⇒ NoThunks (BftFields c toSign) Source # | |
BftCrypto c ⇒ Condense (BftFields c toSign) Source # | |
type Rep (BftFields c toSign) Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type Rep (BftFields c toSign) = D1 ('MetaData "BftFields" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "BftFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "bftSignature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignedDSIGN (BftDSIGN c) toSign)))) |
Protocol parameters
BftParams | |
|
Instances
Generic BftParams Source # | |
NoThunks BftParams Source # | |
type Rep BftParams Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type Rep BftParams = D1 ('MetaData "BftParams" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "BftParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "bftSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecurityParam) :*: S1 ('MetaSel ('Just "bftNumNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes))) |
data BftValidationErr Source #
Instances
Generic BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type Rep BftValidationErr ∷ Type → Type # from ∷ BftValidationErr → Rep BftValidationErr x # to ∷ Rep BftValidationErr x → BftValidationErr # | |
Show BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT showsPrec ∷ Int → BftValidationErr → ShowS # show ∷ BftValidationErr → String # showList ∷ [BftValidationErr] → ShowS # | |
Eq BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT | |
NoThunks BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT | |
type Rep BftValidationErr Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type Rep BftValidationErr = D1 ('MetaData "BftValidationErr" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "BftInvalidSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))) |
forgeBftFields ∷ (BftCrypto c, Signable (BftDSIGN c) toSign) ⇒ ConsensusConfig (Bft c) → toSign → BftFields c toSign Source #
Classes
class (Typeable c, DSIGNAlgorithm (BftDSIGN c), Condense (SigDSIGN (BftDSIGN c)), NoThunks (SigDSIGN (BftDSIGN c)), ContextDSIGN (BftDSIGN c) ~ ()) ⇒ BftCrypto c Source #
Crypto primitives required by BFT
Instances
BftCrypto BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftMockCrypto Source # | |
BftCrypto BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftStandardCrypto Source # |
data BftMockCrypto Source #
Instances
BftCrypto BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftMockCrypto Source # | |
type BftDSIGN BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT |
data BftStandardCrypto Source #
Instances
BftCrypto BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT type BftDSIGN BftStandardCrypto Source # | |
type BftDSIGN BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT |
data BftValidateView c Source #
∀ signed.Signable (BftDSIGN c) signed ⇒ BftValidateView (BftFields c signed) signed |
bftValidateView ∷ (SignedHeader hdr, Signable (BftDSIGN c) (Signed hdr)) ⇒ (hdr → BftFields c (Signed hdr)) → hdr → BftValidateView c Source #
Convenience constructor for BftValidateView
Type instances
data family ConsensusConfig p ∷ Type Source #
Static configuration required to run the consensus protocol
Every method in the ConsensusProtocol
class takes the consensus
configuration as a parameter, so having this as a data family rather than a
type family resolves most ambiguity.
Defined out of the class so that protocols can define this type without having to define the entire protocol at the same time (or indeed in the same module).