ouroboros-consensus-mock-0.1.0.0: Mock ledger integration in the Ouroboros consensus layer
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

Synopsis

Documentation

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

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

Defined in Ouroboros.Consensus.Protocol.PBFT

Associated Types

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

Generic (ConsensusConfig (Bft c)) 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

Associated Types

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

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

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

Associated Types

type Rep (ConsensusConfig (WithLeaderSchedule p)) ∷ TypeType Source #

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

Defined in Ouroboros.Consensus.Mock.Protocol.Praos

Associated Types

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

NoThunks (ConsensusConfig (PBft c)) 
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 #

BftCrypto c ⇒ NoThunks (ConsensusConfig (Bft c)) 
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 #

ConsensusProtocol p ⇒ NoThunks (ConsensusConfig (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

Methods

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

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

showTypeOfProxy (ConsensusConfig (WithLeaderSchedule p)) → String #

PraosCrypto c ⇒ NoThunks (ConsensusConfig (Praos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.Praos

Methods

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

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

showTypeOfProxy (ConsensusConfig (Praos c)) → String #

type Rep (ConsensusConfig (PBft c)) 
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)))
type Rep (ConsensusConfig (Bft c)) 
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 (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type Rep (ConsensusConfig (WithLeaderSchedule p)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Mock.Protocol.LeaderSchedule" "ouroboros-consensus-mock-0.1.0.0-inplace" '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 (Praos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.Praos

type Rep (ConsensusConfig (Praos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Mock.Protocol.Praos" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PraosConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "praosParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PraosParams) :*: (S1 ('MetaSel ('Just "praosInitialEta") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "praosInitialStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StakeDist))) :*: (S1 ('MetaSel ('Just "praosEvolvingStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PraosEvolvingStake) :*: (S1 ('MetaSel ('Just "praosSignKeyVRF") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyVRF (PraosVRF c))) :*: S1 ('MetaSel ('Just "praosVerKeys") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map CoreNodeId (VerKeyKES (PraosKES c), VerKeyVRF (PraosVRF c))))))))
newtype ConsensusConfig (PBft c)

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data ConsensusConfig (Bft c)

(Static) node configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

data ConsensusConfig (Bft c) = BftConfig {}
data ConsensusConfig (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

data ConsensusConfig (Praos c) Source #

The configuration that will be provided to every node when running the MockPraos protocol.

Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.Praos

newtype LeaderSchedule Source #

Instances

Instances details
Eq LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Ord LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Show LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Generic LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Associated Types

type Rep LeaderScheduleTypeType Source #

Semigroup LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Condense LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

NoThunks LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

Methods

noThunks ∷ Context → LeaderScheduleIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → LeaderScheduleIO (Maybe ThunkInfo) #

showTypeOfProxy LeaderScheduleString #

type Rep LeaderSchedule 
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

type Rep LeaderSchedule = D1 ('MetaData "LeaderSchedule" "Ouroboros.Consensus.Protocol.LeaderSchedule" "ouroboros-consensus-0.1.0.0-inplace" 'True) (C1 ('MetaCons "LeaderSchedule" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLeaderSchedule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map SlotNo [CoreNodeId]))))

data WithLeaderSchedule p Source #

Extension of protocol p by a static leader schedule.

Instances

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

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

Associated Types

type Rep (ConsensusConfig (WithLeaderSchedule p)) ∷ TypeType Source #

ConsensusProtocol p ⇒ ConsensusProtocol (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

ConsensusProtocol p ⇒ NoThunks (ConsensusConfig (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

Methods

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

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

showTypeOfProxy (ConsensusConfig (WithLeaderSchedule p)) → String #

type Rep (ConsensusConfig (WithLeaderSchedule p)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type Rep (ConsensusConfig (WithLeaderSchedule p)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Mock.Protocol.LeaderSchedule" "ouroboros-consensus-mock-0.1.0.0-inplace" '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))))
data ConsensusConfig (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type ValidateView (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type ValidationErr (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type LedgerView (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type SelectView (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type CanBeLeader (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type IsLeader (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

type ChainDepState (WithLeaderSchedule p) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.LeaderSchedule

leaderScheduleForCoreNodeIdLeaderScheduleSet SlotNo Source #

The Slots a given node is supposed to lead in