Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Protocol.BFT
Contents
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
- type BftDSIGN c
- data BftMockCrypto
- data BftStandardCrypto
- data BftValidateView c = 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
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 #
Constructors
BftFields | |
Fields
|
Instances
Generic (BftFields c toSign) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
| |||||
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.26.0.0-inplace" 'False) (C1 ('MetaCons "BftFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "bftSignature") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignedDSIGN (BftDSIGN c) toSign)))) |
Protocol parameters
Constructors
BftParams | |
Fields
|
Instances
Generic BftParams Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
| |||||
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.26.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 #
Constructors
BftInvalidSignature String |
Instances
Generic BftValidationErr Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
Methods from ∷ BftValidationErr → Rep BftValidationErr x # to ∷ Rep BftValidationErr x → BftValidationErr # | |||||
Show BftValidationErr Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Methods showsPrec ∷ Int → BftValidationErr → ShowS # show ∷ BftValidationErr → String # showList ∷ [BftValidationErr] → ShowS # | |||||
Eq BftValidationErr Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Methods | |||||
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.26.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 Associated Types
| |||||
BftCrypto BftStandardCrypto Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
|
data BftMockCrypto Source #
Instances
BftCrypto BftMockCrypto Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
| |||||
type BftDSIGN BftMockCrypto Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT |
data BftStandardCrypto Source #
Instances
BftCrypto BftStandardCrypto Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
| |||||
type BftDSIGN BftStandardCrypto Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT |
data BftValidateView c Source #
Constructors
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 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).
Instances
Generic (ConsensusConfig (HardForkProtocol xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Associated Types
Methods from ∷ ConsensusConfig (HardForkProtocol xs) → Rep (ConsensusConfig (HardForkProtocol xs)) x # to ∷ Rep (ConsensusConfig (HardForkProtocol xs)) x → ConsensusConfig (HardForkProtocol xs) # | |||||
Generic (ConsensusConfig (Bft c)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types
Methods from ∷ ConsensusConfig (Bft c) → Rep (ConsensusConfig (Bft c)) x # to ∷ Rep (ConsensusConfig (Bft c)) x → ConsensusConfig (Bft c) # | |||||
Generic (ConsensusConfig (ModChainSel p s)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel Associated Types
Methods from ∷ ConsensusConfig (ModChainSel p s) → Rep (ConsensusConfig (ModChainSel p s)) x # to ∷ Rep (ConsensusConfig (ModChainSel p s)) x → ConsensusConfig (ModChainSel p s) # | |||||
Generic (ConsensusConfig (PBft c)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT Associated Types
Methods from ∷ ConsensusConfig (PBft c) → Rep (ConsensusConfig (PBft c)) x # to ∷ Rep (ConsensusConfig (PBft c)) x → ConsensusConfig (PBft c) # | |||||
CanHardFork xs ⇒ NoThunks (ConsensusConfig (HardForkProtocol xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics Methods noThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (ConsensusConfig (HardForkProtocol xs)) → String Source # | |||||
BftCrypto c ⇒ NoThunks (ConsensusConfig (Bft c)) Source # | |||||
ConsensusProtocol p ⇒ NoThunks (ConsensusConfig (ModChainSel p s)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel Methods noThunks ∷ Context → ConsensusConfig (ModChainSel p s) → IO (Maybe ThunkInfo) Source # wNoThunks ∷ Context → ConsensusConfig (ModChainSel p s) → IO (Maybe ThunkInfo) Source # showTypeOf ∷ Proxy (ConsensusConfig (ModChainSel p s)) → String Source # | |||||
NoThunks (ConsensusConfig (PBft c)) Source # | |||||
type Rep (ConsensusConfig (HardForkProtocol xs)) Source # | |||||
Defined in Ouroboros.Consensus.HardFork.Combinator.Basics type Rep (ConsensusConfig (HardForkProtocol xs)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "HardForkConsensusConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "hardForkConsensusConfigK") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecurityParam) :*: (S1 ('MetaSel ('Just "hardForkConsensusConfigShape") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Shape xs)) :*: S1 ('MetaSel ('Just "hardForkConsensusConfigPerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PerEraConsensusConfig xs))))) | |||||
type Rep (ConsensusConfig (Bft c)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.BFT type Rep (ConsensusConfig (Bft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.26.0.0-inplace" 'False) (C1 ('MetaCons "BftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "bftParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BftParams) :*: (S1 ('MetaSel ('Just "bftSignKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyDSIGN (BftDSIGN c))) :*: S1 ('MetaSel ('Just "bftVerKeys") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map NodeId (VerKeyDSIGN (BftDSIGN c))))))) | |||||
type Rep (ConsensusConfig (ModChainSel p s)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel type Rep (ConsensusConfig (ModChainSel p s)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.ModChainSel" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "McsConsensusConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "mcsConfigP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConsensusConfig p)))) | |||||
type Rep (ConsensusConfig (PBft c)) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.PBFT type Rep (ConsensusConfig (PBft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PBftParams))) | |||||
data ConsensusConfig (HardForkProtocol xs) Source # | |||||
data ConsensusConfig (Bft c) Source # | (Static) node configuration | ||||
Defined in Ouroboros.Consensus.Protocol.BFT data ConsensusConfig (Bft c) = BftConfig {
| |||||
newtype ConsensusConfig (PBft c) Source # | (Static) node configuration | ||||
Defined in Ouroboros.Consensus.Protocol.PBFT | |||||
newtype ConsensusConfig (ModChainSel p s) Source # | |||||
Defined in Ouroboros.Consensus.Protocol.ModChainSel |