ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Protocol.PBFT

Synopsis

Documentation

data PBft c Source #

Instances

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

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (ConsensusConfig (PBft c)) :: Type -> Type #

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

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => ConsensusProtocol (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => ChainSelection (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type ChainSelConfig (PBft c) Source #

type SelectView (PBft c) Source #

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-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PBftParams)))
type ChainDepState (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type IsLeader (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type CanBeLeader (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type LedgerView (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type ValidationErr (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type ValidateView (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type ChainSelConfig (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type ChainSelConfig (PBft c) = ()
type SelectView (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type SelectView (PBft c)
data ConsensusConfig (PBft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype PBftSignatureThreshold Source #

Signature threshold. This represents the proportion of blocks in a pbftSignatureWindow-sized window which may be signed by any single key.

Instances

Instances details
Eq PBftSignatureThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Show PBftSignatureThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Generic PBftSignatureThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep PBftSignatureThreshold :: Type -> Type #

NoThunks PBftSignatureThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep PBftSignatureThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep PBftSignatureThreshold = D1 ('MetaData "PBftSignatureThreshold" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'True) (C1 ('MetaCons "PBftSignatureThreshold" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPBftSignatureThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))

data PBftLedgerView c Source #

Constructors

PBftLedgerView 

Fields

Instances

Instances details
Eq (PBftVerKeyHash c) => Eq (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Show (PBftVerKeyHash c) => Show (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Generic (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (PBftLedgerView c) :: Type -> Type #

PBftCrypto c => NoThunks (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

(Serialise (PBftVerKeyHash c), Ord (PBftVerKeyHash c)) => Serialise (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftLedgerView c) = D1 ('MetaData "PBftLedgerView" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftLedgerView" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftDelegates") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Bimap (PBftVerKeyHash c) (PBftVerKeyHash c)))))
data Ticked (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data PBftFields c toSign Source #

Constructors

PBftFields 

Fields

Instances

Instances details
PBftCrypto c => Eq (PBftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Methods

(==) :: PBftFields c toSign -> PBftFields c toSign -> Bool #

(/=) :: PBftFields c toSign -> PBftFields c toSign -> Bool #

PBftCrypto c => Show (PBftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Methods

showsPrec :: Int -> PBftFields c toSign -> ShowS #

show :: PBftFields c toSign -> String #

showList :: [PBftFields c toSign] -> ShowS #

Generic (PBftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (PBftFields c toSign) :: Type -> Type #

Methods

from :: PBftFields c toSign -> Rep (PBftFields c toSign) x #

to :: Rep (PBftFields c toSign) x -> PBftFields c toSign #

(PBftCrypto c, Typeable toSign) => NoThunks (PBftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => Condense (PBftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Methods

condense :: PBftFields c toSign -> String Source #

type Rep (PBftFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftFields c toSign) = D1 ('MetaData "PBftFields" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftIssuer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerKeyDSIGN (PBftDSIGN c))) :*: (S1 ('MetaSel ('Just "pbftGenKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerKeyDSIGN (PBftDSIGN c))) :*: S1 ('MetaSel ('Just "pbftSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedDSIGN (PBftDSIGN c) toSign)))))

data PBftParams Source #

Protocol parameters

Constructors

PBftParams 

Fields

Instances

Instances details
Show PBftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Generic PBftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep PBftParams :: Type -> Type #

NoThunks PBftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep PBftParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep PBftParams = D1 ('MetaData "PBftParams" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecurityParam) :*: (S1 ('MetaSel ('Just "pbftNumNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes) :*: S1 ('MetaSel ('Just "pbftSignatureThreshold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PBftSignatureThreshold))))

data PBftCanBeLeader c Source #

If we are a core node (i.e. a block producing node) we know which core node we are, and we have the operational key pair and delegation certificate.

Instances

Instances details
Generic (PBftCanBeLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (PBftCanBeLeader c) :: Type -> Type #

PBftCrypto c => NoThunks (PBftCanBeLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftCanBeLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftCanBeLeader c) = D1 ('MetaData "PBftCanBeLeader" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftCanBeLeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftCanBeLeaderCoreNodeId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreNodeId) :*: (S1 ('MetaSel ('Just "pbftCanBeLeaderSignKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyDSIGN (PBftDSIGN c))) :*: S1 ('MetaSel ('Just "pbftCanBeLeaderDlgCert") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PBftDelegationCert c)))))

data PBftIsLeader c Source #

Information required to produce a block.

Instances

Instances details
Generic (PBftIsLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (PBftIsLeader c) :: Type -> Type #

Methods

from :: PBftIsLeader c -> Rep (PBftIsLeader c) x #

to :: Rep (PBftIsLeader c) x -> PBftIsLeader c #

PBftCrypto c => NoThunks (PBftIsLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftIsLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftIsLeader c) = D1 ('MetaData "PBftIsLeader" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftIsLeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftIsLeaderSignKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyDSIGN (PBftDSIGN c))) :*: S1 ('MetaSel ('Just "pbftIsLeaderDlgCert") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PBftDelegationCert c))))

pbftWindowSize :: SecurityParam -> WindowSize Source #

Window size used by PBFT

We set the window size to be equal to k.

pbftWindowExceedsThreshold :: PBftCrypto c => PBftWindowParams -> PBftState c -> PBftVerKeyHash c -> Either Word64 () Source #

Does the number of blocks signed by this key exceed the threshold?

Returns Just the number of blocks signed if exceeded.

Forging

forgePBftFields Source #

Arguments

:: forall c toSign. (PBftCrypto c, Signable (PBftDSIGN c) toSign) 
=> (VerKeyDSIGN (PBftDSIGN c) -> ContextDSIGN (PBftDSIGN c))

Construct DSIGN context given pbftGenKey

-> IsLeader (PBft c) 
-> toSign 
-> PBftFields c toSign 

Classes

class (Typeable c, DSIGNAlgorithm (PBftDSIGN c), Condense (SigDSIGN (PBftDSIGN c)), Show (PBftVerKeyHash c), Ord (PBftVerKeyHash c), Eq (PBftVerKeyHash c), Show (PBftVerKeyHash c), NoThunks (PBftVerKeyHash c), NoThunks (PBftDelegationCert c)) => PBftCrypto c where Source #

Crypto primitives required by BFT

Cardano stores a map of stakeholder IDs rather than the verification key directly. We make this family injective for convenience - whilst it's _possible_ that there could be non-injective instances, the chances of there being more than the two instances here are basically non-existent.

Associated Types

type PBftDSIGN c :: Type Source #

type PBftDelegationCert c = (d :: Type) | d -> c Source #

type PBftVerKeyHash c = (d :: Type) | d -> c Source #

data PBftValidateView c Source #

Part of the header that we validate

Constructors

forall signed.Signable (PBftDSIGN c) signed => PBftValidateRegular (PBftFields c signed) signed (ContextDSIGN (PBftDSIGN c))

Regular block

Regular blocks are signed, and so we need to validate them. We also need to know the slot number of the block

PBftValidateBoundary

Boundary block (EBB)

EBBs are not signed and they do not affect the consensus state.

pbftValidateRegular :: (SignedHeader hdr, Signable (PBftDSIGN c) (Signed hdr)) => ContextDSIGN (PBftDSIGN c) -> (hdr -> PBftFields c (Signed hdr)) -> hdr -> PBftValidateView c Source #

Convenience constructor for PBftValidateView for regular blocks

pbftValidateBoundary :: hdr -> PBftValidateView c Source #

Convenience constructor for PBftValidateView for boundary blocks

CannotForge

data PBftCannotForge c Source #

Expresses that, whilst we believe ourselves to be a leader for this slot, we are nonetheless unable to forge a block.

Constructors

PBftCannotForgeInvalidDelegation !(PBftVerKeyHash c)

We cannot forge a block because we are not the current delegate of the genesis key we have a delegation certificate from.

PBftCannotForgeThresholdExceeded !Word64

We cannot lead because delegates of the genesis key we have a delegation from have already forged the maximum number of blocks in this signing window.

Instances

Instances details
PBftCrypto c => Show (PBftCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Generic (PBftCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (PBftCannotForge c) :: Type -> Type #

PBftCrypto c => NoThunks (PBftCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftCannotForge c) = D1 ('MetaData "PBftCannotForge" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftCannotForgeInvalidDelegation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PBftVerKeyHash c))) :+: C1 ('MetaCons "PBftCannotForgeThresholdExceeded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)))

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)) :: Type -> Type #

Generic (ConsensusConfig (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Associated Types

type Rep (ConsensusConfig (WithLeaderSchedule p)) :: Type -> Type #

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

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

type Rep (ConsensusConfig (Bft c)) :: Type -> Type #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Associated Types

type Rep (ConsensusConfig (HardForkProtocol xs)) :: Type -> Type #

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

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (ConsensusConfig (PBft c)) :: Type -> Type #

(ConsensusProtocol p, ChainSelection s) => NoThunks (ConsensusConfig (ModChainSel p s)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

ConsensusProtocol p => NoThunks (ConsensusConfig (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

BftCrypto c => NoThunks (ConsensusConfig (Bft c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

CanHardFork xs => NoThunks (ConsensusConfig (HardForkProtocol xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Protocol.PBFT

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-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "McsConsensusConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "mcsConfigS") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainSelConfig s)) :*: S1 ('MetaSel ('Just "mcsConfigP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ConsensusConfig p))))
type Rep (ConsensusConfig (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

type Rep (ConsensusConfig (WithLeaderSchedule p)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.LeaderSchedule" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "WLSConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "wlsConfigSchedule") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LeaderSchedule) :*: (S1 ('MetaSel ('Just "wlsConfigP") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ConsensusConfig p)) :*: S1 ('MetaSel ('Just "wlsConfigNodeId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 CoreNodeId))))
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-GfJNvFcM6lj2s5utKAUPEp" '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-GfJNvFcM6lj2s5utKAUPEp" '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-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "PBftConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "pbftParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PBftParams)))
data ConsensusConfig (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

data ConsensusConfig (Bft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data ConsensusConfig (HardForkProtocol xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data ConsensusConfig (PBft c) Source #

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data ConsensusConfig (ModChainSel p s) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

data family Ticked st :: Type Source #

" Ticked " piece of state (LedgerState, LedgerView, ChainIndepState)

Ticking refers to the passage of time (the ticking of the clock). When a piece of state is marked as ticked, it means that time-related changes have been applied to the state (or forecast).

Some examples of time related changes:

  • Scheduled delegations might have been applied in Byron
  • New leader schedule computed for Shelley
  • Transition from Byron to Shelley activated in the hard fork combinator.
  • Nonces switched out at the start of a new epoch.

Instances

Instances details
Show (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec :: Int -> Ticked () -> ShowS #

show :: Ticked () -> String #

showList :: [Ticked ()] -> ShowS #

Show (Ticked a) => Show (Ticked (K a x)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec :: Int -> Ticked (K a x) -> ShowS #

show :: Ticked (K a x) -> String #

showList :: [Ticked (K a x)] -> ShowS #

(SListI xs, Show (Ticked a)) => Show (Ticked (HardForkLedgerView_ (K a :: Type -> Type) xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.LedgerView

Generic (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Associated Types

type Rep (Ticked (LedgerState (HardForkBlock xs))) :: Type -> Type #

NoThunks (Ticked (LedgerState (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Bridge m a => GetTip (Ticked (LedgerState (DualBlock m a))) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => GetTip (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

IsLedger l => GetTip (Ticked (LedgerDB l r)) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

Methods

getTip :: Ticked (LedgerDB l r) -> Point (Ticked (LedgerDB l r)) Source #

IsLedger (LedgerState blk) => GetTip (Ticked (ExtLedgerState blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Isomorphic (Ticked :.: LedgerState) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

Show (Ticked (f a)) => Show ((Ticked :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec :: Int -> (Ticked :.: f) a -> ShowS #

show :: (Ticked :.: f) a -> String #

showList :: [(Ticked :.: f) a] -> ShowS #

NoThunks (Ticked (f a)) => NoThunks ((Ticked :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked () Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type Rep (Ticked (LedgerState (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type Rep (Ticked (LedgerState (HardForkBlock xs))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.HardFork.Combinator.Ledger" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) (C1 ('MetaCons "TickedHardForkLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tickedHardForkLedgerStateTransition") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransitionInfo) :*: S1 ('MetaSel ('Just "tickedHardForkLedgerStatePerEra") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HardForkState (Ticked :.: LedgerState) xs))))
type HeaderHash (Ticked l) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

data Ticked (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data Ticked (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

data Ticked (HeaderState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

data Ticked (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

newtype Ticked (WrapLedgerView blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype Ticked (WrapChainDepState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

data Ticked (HardForkChainDepState xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (PBftState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked (PBftLedgerView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked (LedgerDB l r) Source #

Ticking the ledger DB just ticks the current state

We don't push the new state into the DB until we apply a block.

Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

data Ticked (HardForkLedgerView_ f xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.LedgerView

newtype Ticked (K a x) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

newtype Ticked (K a x) = TickedK {}

Exported for tracing errors

data PBftValidationErr c Source #

NOTE: this type is stored in the state, so it must be in normal form to avoid space leaks.

Instances

Instances details
PBftCrypto c => Eq (PBftValidationErr c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => Show (PBftValidationErr c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Generic (PBftValidationErr c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

type Rep (PBftValidationErr c) :: Type -> Type #

PBftCrypto c => NoThunks (PBftValidationErr c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftValidationErr c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

type Rep (PBftValidationErr c) = D1 ('MetaData "PBftValidationErr" "Ouroboros.Consensus.Protocol.PBFT" "ouroboros-consensus-0.1.0.0-GfJNvFcM6lj2s5utKAUPEp" 'False) ((C1 ('MetaCons "PBftInvalidSignature" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "PBftNotGenesisDelegate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PBftVerKeyHash c)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PBftLedgerView c)))) :+: (C1 ('MetaCons "PBftExceededSignThreshold" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PBftVerKeyHash c)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)) :+: C1 ('MetaCons "PBftInvalidSlot" 'PrefixI 'False) (U1 :: Type -> Type)))