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

Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Description

Test the Praos chain selection rule (with explicit leader schedule)

Synopsis

Documentation

type SimplePraosRuleBlock c = SimpleBlock c SimplePraosRuleExt Source #

Simple block extended with the fields required for Praos

c is crypto used for the block itself With an explicit leader schedule we need no crypto for the consensus protocol.

This is an example of a block which is not an instance of SignedBlock.

newtype SimplePraosRuleExt Source #

Required extension

The WithLeaderSchedule doesn't require anything in the block header. We add the CoreNodeId just so that we can check that the schedule matches the chain.

Instances

Instances details
Eq SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Show SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Generic SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Associated Types

type Rep SimplePraosRuleExtTypeType Source #

Serialise SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Methods

encodeSimplePraosRuleExt → Encoding #

decode ∷ Decoder s SimplePraosRuleExt #

encodeList ∷ [SimplePraosRuleExt] → Encoding #

decodeList ∷ Decoder s [SimplePraosRuleExt] #

Condense SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

NoThunks SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Methods

noThunks ∷ Context → SimplePraosRuleExtIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SimplePraosRuleExtIO (Maybe ThunkInfo) #

showTypeOfProxy SimplePraosRuleExtString #

SimpleCrypto c ⇒ MockProtocolSpecific c SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

SimpleCrypto c ⇒ RunMockBlock c SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

SimpleCrypto c ⇒ LedgerSupportsProtocol (SimplePraosRuleBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

EncodeDisk (SimplePraosRuleBlock c) () Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Methods

encodeDiskCodecConfig (SimplePraosRuleBlock c) → () → Encoding Source #

DecodeDisk (SimplePraosRuleBlock c) () Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

Methods

decodeDiskCodecConfig (SimplePraosRuleBlock c) → ∀ s. Decoder s () Source #

SimpleCrypto c ⇒ BlockSupportsProtocol (SimpleBlock c SimplePraosRuleExt) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

type Rep SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

type Rep SimplePraosRuleExt = D1 ('MetaData "SimplePraosRuleExt" "Ouroboros.Consensus.Mock.Ledger.Block.PraosRule" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "SimplePraosRuleExt" 'PrefixI 'True) (S1 ('MetaSel ('Just "simplePraosRuleExt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CoreNodeId)))
type MockLedgerConfig c SimplePraosRuleExt Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

type CannotForge (SimplePraosRuleBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

type ForgeStateInfo (SimplePraosRuleBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

type ForgeStateUpdateError (SimplePraosRuleBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule

type BlockProtocol (SimplePraosRuleBlock c) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block.PraosRule