| 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
- data BftStandardCrypto
- data BftMockCrypto
- data BftValidateView c = forall 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 #
Constructors
| BftFields | |
Fields
| |
Instances
| BftCrypto c => Eq (BftFields c toSign) Source # | |
| BftCrypto c => Show (BftFields c toSign) Source # | |
| Generic (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.1.0.0-GfJNvFcM6lj2s5utKAUPEp" '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 # | |
| 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.1.0.0-GfJNvFcM6lj2s5utKAUPEp" '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
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 type BftDSIGN BftMockCrypto Source # | |
| BftCrypto BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types type BftDSIGN BftStandardCrypto Source # | |
data BftStandardCrypto Source #
Instances
| BftCrypto BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types type BftDSIGN BftStandardCrypto Source # | |
| type BftDSIGN BftStandardCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT | |
data BftMockCrypto Source #
Instances
| BftCrypto BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT Associated Types type BftDSIGN BftMockCrypto Source # | |
| type BftDSIGN BftMockCrypto Source # | |
Defined in Ouroboros.Consensus.Protocol.BFT | |
data BftValidateView c Source #
Constructors
| forall 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).