ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Protocol.BFT

Synopsis

Documentation

data Bft c Source #

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

Instances details
Generic (ConsensusConfig (Bft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep (ConsensusConfig (Bft c)) ∷ TypeType #

Methods

fromConsensusConfig (Bft c) → Rep (ConsensusConfig (Bft c)) x #

toRep (ConsensusConfig (Bft c)) x → ConsensusConfig (Bft c) #

BftCrypto c ⇒ NoThunks (ConsensusConfig (Bft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

BftCrypto c ⇒ ConsensusProtocol (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type ChainDepState (Bft c) Source #

type IsLeader (Bft c) Source #

type CanBeLeader (Bft c) Source #

type SelectView (Bft c) Source #

type LedgerView (Bft c) Source #

type ValidationErr (Bft c) Source #

type ValidateView (Bft c) Source #

type Rep (ConsensusConfig (Bft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type Rep (ConsensusConfig (Bft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.21.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 CanBeLeader (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type ChainDepState (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type ChainDepState (Bft c) = ()
data ConsensusConfig (Bft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type IsLeader (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type IsLeader (Bft c) = ()
type LedgerView (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type LedgerView (Bft c) = ()
type SelectView (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type ValidateView (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type ValidationErr (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data BftFields c toSign Source #

Constructors

BftFields 

Fields

Instances

Instances details
Generic (BftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep (BftFields c toSign) ∷ TypeType #

Methods

fromBftFields c toSign → Rep (BftFields c toSign) x #

toRep (BftFields c toSign) x → BftFields c toSign #

BftCrypto c ⇒ Show (BftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

showsPrecIntBftFields c toSign → ShowS #

showBftFields c toSign → String #

showList ∷ [BftFields c toSign] → ShowS #

BftCrypto c ⇒ Eq (BftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

(==)BftFields c toSign → BftFields c toSign → Bool #

(/=)BftFields c toSign → BftFields c toSign → Bool #

(BftCrypto c, Typeable toSign) ⇒ NoThunks (BftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

noThunksContextBftFields c toSign → IO (Maybe ThunkInfo) Source #

wNoThunksContextBftFields c toSign → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (BftFields c toSign) → String Source #

BftCrypto c ⇒ Condense (BftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

condenseBftFields c toSign → String Source #

type Rep (BftFields c toSign) Source # 
Instance details

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))))

data BftParams Source #

Protocol parameters

Constructors

BftParams 

Fields

Instances

Instances details
Generic BftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep BftParamsTypeType #

Methods

fromBftParamsRep BftParams x #

toRep BftParams x → BftParams #

NoThunks BftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type Rep BftParams Source # 
Instance details

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

Instances details
Generic BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep BftValidationErrTypeType #

Show BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Eq BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

NoThunks BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type Rep BftValidationErr Source # 
Instance details

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 ('NothingMaybe 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

Associated Types

type BftDSIGN c ∷ Type Source #

Instances

Instances details
BftCrypto BftMockCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type BftDSIGN BftMockCrypto Source #

BftCrypto BftStandardCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type BftDSIGN BftStandardCrypto Source #

data BftMockCrypto Source #

Instances

Instances details
BftCrypto BftMockCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type BftDSIGN BftMockCrypto Source #

type BftDSIGN BftMockCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data BftValidateView c Source #

Constructors

∀ 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).

Instances

Instances details
Generic (ConsensusConfig (HardForkProtocol xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Associated Types

type Rep (ConsensusConfig (HardForkProtocol xs)) ∷ TypeType #

Generic (ConsensusConfig (Bft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep (ConsensusConfig (Bft c)) ∷ TypeType #

Methods

fromConsensusConfig (Bft c) → Rep (ConsensusConfig (Bft c)) x #

toRep (ConsensusConfig (Bft c)) x → ConsensusConfig (Bft c) #

Generic (ConsensusConfig (ModChainSel p s)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

Associated Types

type Rep (ConsensusConfig (ModChainSel p s)) ∷ TypeType #

Generic (ConsensusConfig (PBft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (ConsensusConfig (PBft c)) ∷ TypeType #

CanHardFork xs ⇒ NoThunks (ConsensusConfig (HardForkProtocol xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

BftCrypto c ⇒ NoThunks (ConsensusConfig (Bft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

ConsensusProtocol p ⇒ NoThunks (ConsensusConfig (ModChainSel p s)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

NoThunks (ConsensusConfig (PBft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (ConsensusConfig (HardForkProtocol xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type Rep (ConsensusConfig (HardForkProtocol xs)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.HardFork.Combinator.Basics" "ouroboros-consensus-0.21.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 # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type Rep (ConsensusConfig (Bft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.BFT" "ouroboros-consensus-0.21.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 # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

type Rep (ConsensusConfig (ModChainSel p s)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.ModChainSel" "ouroboros-consensus-0.21.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 # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (ConsensusConfig (PBft c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.21.0.0-inplace" 'True) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PBftParams)))
data ConsensusConfig (HardForkProtocol xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data ConsensusConfig (Bft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

newtype ConsensusConfig (PBft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype ConsensusConfig (ModChainSel p s) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel