ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
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 Source #

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

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

noThunks ∷ Context → ConsensusConfig (Bft c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (Bft c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (Bft c)) → String #

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.1.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 ChainDepState (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

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

Defined in Ouroboros.Consensus.Protocol.BFT

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

Defined in Ouroboros.Consensus.Protocol.BFT

type SelectView (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type LedgerView (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

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

Defined in Ouroboros.Consensus.Protocol.BFT

type ValidateView (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data ConsensusConfig (Bft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data ConsensusConfig (Bft c) = BftConfig {}

data BftFields c toSign Source #

Constructors

BftFields 

Fields

Instances

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

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

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

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

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

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

showsPrecIntBftFields c toSign → ShowS Source #

showBftFields c toSign → String Source #

showList ∷ [BftFields c toSign] → ShowS Source #

Generic (BftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep (BftFields c toSign) ∷ TypeType Source #

Methods

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

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

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

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

noThunks ∷ Context → BftFields c toSign → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BftFields c toSign → IO (Maybe ThunkInfo) #

showTypeOfProxy (BftFields c toSign) → String #

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.1.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 Source #

NoThunks BftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

noThunks ∷ Context → BftParamsIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BftParamsIO (Maybe ThunkInfo) #

showTypeOfProxy BftParamsString #

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.1.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
Eq BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Show BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Generic BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep BftValidationErrTypeType Source #

NoThunks BftValidationErr Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

noThunks ∷ Context → BftValidationErrIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BftValidationErrIO (Maybe ThunkInfo) #

showTypeOfProxy BftValidationErrString #

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.1.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

type BftDSIGN BftMockCrypto = MockDSIGN

data BftStandardCrypto Source #

Instances

Instances details
BftCrypto BftStandardCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type BftDSIGN BftStandardCrypto Source #

type BftDSIGN BftStandardCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

type BftDSIGN BftStandardCrypto = Ed448DSIGN

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 (ModChainSel p s)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

Associated Types

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

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

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

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

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Associated Types

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

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

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

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

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

Defined in Ouroboros.Consensus.Protocol.ModChainSel

Methods

noThunks ∷ Context → ConsensusConfig (ModChainSel p s) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (ModChainSel p s) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (ModChainSel p s)) → String #

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

Defined in Ouroboros.Consensus.Protocol.BFT

Methods

noThunks ∷ Context → ConsensusConfig (Bft c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (Bft c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (Bft c)) → String #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (HardForkProtocol xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (HardForkProtocol xs)) → String #

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

Defined in Ouroboros.Consensus.Protocol.PBFT

Methods

noThunks ∷ Context → ConsensusConfig (PBft c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (PBft c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (PBft c)) → String #

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.1.0.0-inplace" 'True) (C1 ('MetaCons "McsConsensusConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "mcsConfigP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConsensusConfig p))))
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.1.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 (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.1.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 (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.1.0.0-inplace" 'True) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PBftParams)))
data ConsensusConfig (Bft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data ConsensusConfig (Bft c) = BftConfig {}
data ConsensusConfig (HardForkProtocol xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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