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

Ouroboros.Consensus.Mock.Ledger.Block

Description

Simple block to go with the mock ledger

None of the definitions in this module depend on, or even refer to, any specific consensus protocols.

Synopsis

Documentation

data family BlockQuery blk ∷ TypeType Source #

Different queries supported by the ledger, indexed by the result type.

Instances

Instances details
SameDepIndex (BlockQuery (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

sameDepIndexBlockQuery (SimpleBlock c ext) a → BlockQuery (SimpleBlock c ext) b → Maybe (a :~: b) Source #

(SimpleCrypto c, Typeable ext) ⇒ ShowQuery (BlockQuery (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showResultBlockQuery (SimpleBlock c ext) result → result → String Source #

SerialiseResult (MockBlock ext) (BlockQuery (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeResultCodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) result → result → Encoding Source #

decodeResultCodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) result → ∀ s. Decoder s result Source #

SerialiseNodeToClient (MockBlock ext) (SomeSecond BlockQuery (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SameDepIndex (BlockQuery blk) ⇒ Eq (SomeSecond BlockQuery blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

Show (BlockQuery (SimpleBlock c ext) result) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntBlockQuery (SimpleBlock c ext) result → ShowS Source #

showBlockQuery (SimpleBlock c ext) result → String Source #

showList ∷ [BlockQuery (SimpleBlock c ext) result] → ShowS Source #

(∀ result. Show (BlockQuery blk result)) ⇒ Show (SomeSecond BlockQuery blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

(Typeable c, Typeable ext) ⇒ ShowProxy (BlockQuery (SimpleBlock c ext) ∷ TypeType) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data BlockQuery (SimpleBlock c ext) result Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data BlockQuery (SimpleBlock c ext) result where

data family Header blk Source #

Instances

Instances details
Serialise ext ⇒ ReconstructNestedCtxt Header (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

(Typeable c, Typeable ext, Typeable ext') ⇒ ShowProxy (Header (SimpleBlock' c ext ext') ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (Header (SimpleBlock' c ext ext')) → String Source #

(SimpleCrypto c, Eq ext', Typeable ext) ⇒ Eq (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)Header (SimpleBlock' c ext ext') → Header (SimpleBlock' c ext ext') → Bool Source #

(/=)Header (SimpleBlock' c ext ext') → Header (SimpleBlock' c ext ext') → Bool Source #

(SimpleCrypto c, Show ext', Typeable ext) ⇒ Show (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntHeader (SimpleBlock' c ext ext') → ShowS Source #

showHeader (SimpleBlock' c ext ext') → String Source #

showList ∷ [Header (SimpleBlock' c ext ext')] → ShowS Source #

Generic (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (Header (SimpleBlock' c ext ext')) ∷ TypeType Source #

Methods

fromHeader (SimpleBlock' c ext ext') → Rep (Header (SimpleBlock' c ext ext')) x Source #

toRep (Header (SimpleBlock' c ext ext')) x → Header (SimpleBlock' c ext ext') Source #

(SimpleCrypto c, Serialise ext') ⇒ Serialise (Header (SimpleBlock' c ext ext')) Source #

Custom Serialise instance that doesn't serialise the hash

Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeHeader (SimpleBlock' c ext ext') → Encoding #

decode ∷ Decoder s (Header (SimpleBlock' c ext ext')) #

encodeList ∷ [Header (SimpleBlock' c ext ext')] → Encoding #

decodeList ∷ Decoder s [Header (SimpleBlock' c ext ext')] #

Condense ext' ⇒ Condense (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseHeader (SimpleBlock' c ext ext') → String Source #

(SimpleCrypto c, NoThunks ext', Typeable ext) ⇒ NoThunks (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → Header (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Header (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) #

showTypeOfProxy (Header (SimpleBlock' c ext ext')) → String #

HasHeader blk ⇒ StandardHash (Header blk) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

(SimpleCrypto c, Typeable ext, Typeable ext') ⇒ HasHeader (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getHeaderFieldsHeader (SimpleBlock' c ext ext') → HeaderFields (Header (SimpleBlock' c ext ext')) Source #

Serialise ext ⇒ SerialiseNodeToNode (MockBlock ext) (Header (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ EncodeDisk (MockBlock ext) (Header (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskCodecConfig (MockBlock ext) → Header (MockBlock ext) → Encoding Source #

Serialise ext ⇒ EncodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ EncodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskDepCodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → a → Encoding Source #

Serialise ext ⇒ DecodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ DecodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskDepCodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → ∀ s. Decoder s (ByteString → a) Source #

Serialise ext ⇒ DecodeDisk (MockBlock ext) (ByteStringHeader (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskCodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteStringHeader (MockBlock ext)) Source #

SignedHeader (SimplePBftHeader c c') Source # 
Instance details

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

SignedHeader (SimpleBftHeader c c') Source # 
Instance details

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

PraosCrypto c' ⇒ SignedHeader (SimplePraosHeader c c') Source # 
Instance details

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

type Rep (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (Header (SimpleBlock' c ext ext')) = D1 ('MetaData "Header" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleHeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HeaderHash (SimpleBlock' c ext ext'))) :*: (S1 ('MetaSel ('Just "simpleHeaderStd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleStdHeader c ext)) :*: S1 ('MetaSel ('Just "simpleHeaderExt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ext'))))
type BlockProtocol (Header blk) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) = HeaderHash blk
type Signed (SimplePBftHeader c c') Source # 
Instance details

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

type Signed (SimpleBftHeader c c') Source # 
Instance details

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

type Signed (SimplePraosHeader c c') Source # 
Instance details

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

data Header (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type SimpleBlock c ext = SimpleBlock' c ext ext Source #

data SimpleBlock' c ext ext' Source #

Constructors

SimpleBlock 

Fields

Instances

Instances details
Serialise ext ⇒ ReconstructNestedCtxt Header (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

(Typeable c, Typeable ext) ⇒ ShowProxy (GenTx (SimpleBlock c ext) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (GenTx (SimpleBlock c ext)) → String Source #

(Typeable c, Typeable ext) ⇒ ShowProxy (TxId (GenTx (SimpleBlock c ext)) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (TxId (GenTx (SimpleBlock c ext))) → String Source #

(Typeable c, Typeable ext, Typeable ext') ⇒ ShowProxy (Header (SimpleBlock' c ext ext') ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (Header (SimpleBlock' c ext ext')) → String Source #

HasNestedContent f (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

unnest ∷ f (SimpleBlock c ext) → DepPair (NestedCtxt f (SimpleBlock c ext)) Source #

nestDepPair (NestedCtxt f (SimpleBlock c ext)) → f (SimpleBlock c ext) Source #

Eq (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

(/=)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

Eq (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool Source #

(/=)TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool Source #

Eq (Validated (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool Source #

(/=)Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Bool Source #

(SimpleCrypto c, Typeable ext) ⇒ Eq (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Eq ext', Typeable ext) ⇒ Eq (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)Header (SimpleBlock' c ext ext') → Header (SimpleBlock' c ext ext') → Bool Source #

(/=)Header (SimpleBlock' c ext ext') → Header (SimpleBlock' c ext ext') → Bool Source #

(SimpleCrypto c, Typeable ext) ⇒ Eq (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Ord (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

compareGenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Ordering Source #

(<)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

(<=)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

(>)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

(>=)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

maxGenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) Source #

minGenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) Source #

Ord (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

compareTxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Ordering Source #

(<)TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool Source #

(<=)TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool Source #

(>)TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool Source #

(>=)TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → Bool Source #

maxTxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) Source #

minTxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) → TxId (GenTx (SimpleBlock c ext)) Source #

Ord (Validated (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Show (GenTx (SimpleBlock p c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Show (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntTxId (GenTx (SimpleBlock c ext)) → ShowS Source #

showTxId (GenTx (SimpleBlock c ext)) → String Source #

showList ∷ [TxId (GenTx (SimpleBlock c ext))] → ShowS Source #

Show (Validated (GenTx (SimpleBlock p c))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ Show (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Show ext', Typeable ext) ⇒ Show (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntHeader (SimpleBlock' c ext ext') → ShowS Source #

showHeader (SimpleBlock' c ext ext') → String Source #

showList ∷ [Header (SimpleBlock' c ext ext')] → ShowS Source #

(SimpleCrypto c, Typeable ext) ⇒ Show (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Generic (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (GenTx (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromGenTx (SimpleBlock c ext) → Rep (GenTx (SimpleBlock c ext)) x Source #

toRep (GenTx (SimpleBlock c ext)) x → GenTx (SimpleBlock c ext) Source #

Generic (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (TxId (GenTx (SimpleBlock c ext))) ∷ TypeType Source #

Methods

fromTxId (GenTx (SimpleBlock c ext)) → Rep (TxId (GenTx (SimpleBlock c ext))) x Source #

toRep (TxId (GenTx (SimpleBlock c ext))) x → TxId (GenTx (SimpleBlock c ext)) Source #

Generic (Validated (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (Validated (GenTx (SimpleBlock c ext))) ∷ TypeType Source #

Methods

fromValidated (GenTx (SimpleBlock c ext)) → Rep (Validated (GenTx (SimpleBlock c ext))) x Source #

toRep (Validated (GenTx (SimpleBlock c ext))) x → Validated (GenTx (SimpleBlock c ext)) Source #

Generic (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (LedgerState (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromLedgerState (SimpleBlock c ext) → Rep (LedgerState (SimpleBlock c ext)) x Source #

toRep (LedgerState (SimpleBlock c ext)) x → LedgerState (SimpleBlock c ext) Source #

Generic (BlockConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (BlockConfig (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromBlockConfig (SimpleBlock c ext) → Rep (BlockConfig (SimpleBlock c ext)) x Source #

toRep (BlockConfig (SimpleBlock c ext)) x → BlockConfig (SimpleBlock c ext) Source #

Generic (CodecConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (CodecConfig (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromCodecConfig (SimpleBlock c ext) → Rep (CodecConfig (SimpleBlock c ext)) x Source #

toRep (CodecConfig (SimpleBlock c ext)) x → CodecConfig (SimpleBlock c ext) Source #

Generic (StorageConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (StorageConfig (SimpleBlock c ext)) ∷ TypeType Source #

Generic (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (Header (SimpleBlock' c ext ext')) ∷ TypeType Source #

Methods

fromHeader (SimpleBlock' c ext ext') → Rep (Header (SimpleBlock' c ext ext')) x Source #

toRep (Header (SimpleBlock' c ext ext')) x → Header (SimpleBlock' c ext ext') Source #

Generic (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (Ticked (LedgerState (SimpleBlock c ext))) ∷ TypeType Source #

Serialise (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeGenTx (SimpleBlock c ext) → Encoding #

decode ∷ Decoder s (GenTx (SimpleBlock c ext)) #

encodeList ∷ [GenTx (SimpleBlock c ext)] → Encoding #

decodeList ∷ Decoder s [GenTx (SimpleBlock c ext)] #

Serialise (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeTxId (GenTx (SimpleBlock c ext)) → Encoding #

decode ∷ Decoder s (TxId (GenTx (SimpleBlock c ext))) #

encodeList ∷ [TxId (GenTx (SimpleBlock c ext))] → Encoding #

decodeList ∷ Decoder s [TxId (GenTx (SimpleBlock c ext))] #

Serialise (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeLedgerState (SimpleBlock c ext) → Encoding #

decode ∷ Decoder s (LedgerState (SimpleBlock c ext)) #

encodeList ∷ [LedgerState (SimpleBlock c ext)] → Encoding #

decodeList ∷ Decoder s [LedgerState (SimpleBlock c ext)] #

(SimpleCrypto c, Serialise ext') ⇒ Serialise (Header (SimpleBlock' c ext ext')) Source #

Custom Serialise instance that doesn't serialise the hash

Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeHeader (SimpleBlock' c ext ext') → Encoding #

decode ∷ Decoder s (Header (SimpleBlock' c ext ext')) #

encodeList ∷ [Header (SimpleBlock' c ext ext')] → Encoding #

decodeList ∷ Decoder s [Header (SimpleBlock' c ext ext')] #

Serialise ext ⇒ SerialiseNodeToNodeConstraints (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

(Serialise ext, Typeable ext) ⇒ SerialiseNodeToClientConstraints (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

(Serialise ext, RunMockBlock SimpleMockCrypto ext) ⇒ SerialiseDiskConstraints (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

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

(Serialise ext, Typeable ext) ⇒ HasBinaryBlockInfo (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

HasTxId (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

txIdGenTx (SimpleBlock c ext) → TxId (GenTx (SimpleBlock c ext)) Source #

GetTip (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

GetTip (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

MockProtocolSpecific c ext ⇒ IsLedger (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type LedgerErr (LedgerState (SimpleBlock c ext)) Source #

type AuxLedgerEvent (LedgerState (SimpleBlock c ext)) Source #

Condense (GenTx (SimpleBlock p c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseGenTx (SimpleBlock p c) → String Source #

Condense (GenTxId (SimpleBlock p c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseGenTxId (SimpleBlock p c) → String Source #

Condense ext' ⇒ Condense (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseHeader (SimpleBlock' c ext ext') → String Source #

SameDepIndex (BlockQuery (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

sameDepIndexBlockQuery (SimpleBlock c ext) a → BlockQuery (SimpleBlock c ext) b → Maybe (a :~: b) Source #

(Typeable p, Typeable c) ⇒ NoThunks (GenTx (SimpleBlock p c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → GenTx (SimpleBlock p c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → GenTx (SimpleBlock p c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (GenTx (SimpleBlock p c)) → String #

NoThunks (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → TxId (GenTx (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → TxId (GenTx (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

showTypeOfProxy (TxId (GenTx (SimpleBlock c ext))) → String #

(Typeable p, Typeable c) ⇒ NoThunks (Validated (GenTx (SimpleBlock p c))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → Validated (GenTx (SimpleBlock p c)) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Validated (GenTx (SimpleBlock p c)) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Validated (GenTx (SimpleBlock p c))) → String #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → LedgerState (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → LedgerState (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (LedgerState (SimpleBlock c ext)) → String #

NoThunks (BlockConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig (SimpleBlock c ext)) → String #

NoThunks (CodecConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → CodecConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig (SimpleBlock c ext)) → String #

NoThunks (StorageConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig (SimpleBlock c ext)) → String #

(SimpleCrypto c, NoThunks ext', Typeable ext) ⇒ NoThunks (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → Header (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Header (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) #

showTypeOfProxy (Header (SimpleBlock' c ext ext')) → String #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → Ticked (LedgerState (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Ticked (LedgerState (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Ticked (LedgerState (SimpleBlock c ext))) → String #

(SimpleCrypto c, Typeable ext, Typeable ext') ⇒ HasHeader (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getHeaderFieldsHeader (SimpleBlock' c ext ext') → HeaderFields (Header (SimpleBlock' c ext ext')) Source #

(SimpleCrypto c, Typeable ext) ⇒ ShowQuery (BlockQuery (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showResultBlockQuery (SimpleBlock c ext) result → result → String Source #

HasMockTxs (GenTx (SimpleBlock p c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getMockTxsGenTx (SimpleBlock p c) → [Tx] Source #

SerialiseNodeToClient (MockBlock ext) SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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 #

SerialiseNodeToNode (MockBlock ext) (GenTxId (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToNode (MockBlock ext) (GenTx (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ SerialiseNodeToNode (MockBlock ext) (SerialisedHeader (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToNode (MockBlock ext) (Serialised (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ SerialiseNodeToNode (MockBlock ext) (Header (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ SerialiseNodeToNode (MockBlock ext) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToClient (MockBlock ext) (MockError (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToClient (MockBlock ext) (GenTxId (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToClient (MockBlock ext) (GenTx (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToClient (MockBlock ext) (Serialised (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ SerialiseNodeToClient (MockBlock ext) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseResult (MockBlock ext) (BlockQuery (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeResultCodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) result → result → Encoding Source #

decodeResultCodecConfig (MockBlock ext) → BlockNodeToClientVersion (MockBlock ext) → BlockQuery (MockBlock ext) result → ∀ s. Decoder s result Source #

EncodeDisk (MockBlock ext) (AnnTip (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskCodecConfig (MockBlock ext) → AnnTip (MockBlock ext) → Encoding Source #

EncodeDisk (MockBlock ext) (LedgerState (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskCodecConfig (MockBlock ext) → LedgerState (MockBlock ext) → Encoding Source #

Serialise ext ⇒ EncodeDisk (MockBlock ext) (Header (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskCodecConfig (MockBlock ext) → Header (MockBlock ext) → Encoding Source #

Serialise ext ⇒ EncodeDisk (MockBlock ext) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskCodecConfig (MockBlock ext) → MockBlock ext → Encoding Source #

DecodeDisk (MockBlock ext) (AnnTip (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskCodecConfig (MockBlock ext) → ∀ s. Decoder s (AnnTip (MockBlock ext)) Source #

DecodeDisk (MockBlock ext) (LedgerState (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskCodecConfig (MockBlock ext) → ∀ s. Decoder s (LedgerState (MockBlock ext)) Source #

Serialise ext ⇒ EncodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ EncodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskDepCodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → a → Encoding Source #

Serialise ext ⇒ DecodeDiskDepIx (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ DecodeDiskDep (NestedCtxt Header) (MockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskDepCodecConfig (MockBlock ext) → NestedCtxt Header (MockBlock ext) a → ∀ s. Decoder s (ByteString → a) Source #

SerialiseNodeToClient (MockBlock ext) (SomeSecond BlockQuery (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ DecodeDisk (MockBlock ext) (ByteStringHeader (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskCodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteStringHeader (MockBlock ext)) Source #

Serialise ext ⇒ DecodeDisk (MockBlock ext) (ByteStringMockBlock ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskCodecConfig (MockBlock ext) → ∀ s. Decoder s (ByteStringMockBlock ext) Source #

MockProtocolSpecific c ext ⇒ ApplyBlock (LedgerState (SimpleBlock c ext)) (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(Typeable c, Typeable ext, Typeable ext') ⇒ ShowProxy (SimpleBlock' c ext ext' ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (SimpleBlock' c ext ext') → String Source #

Show (BlockQuery (SimpleBlock c ext) result) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntBlockQuery (SimpleBlock c ext) result → ShowS Source #

showBlockQuery (SimpleBlock c ext) result → String Source #

showList ∷ [BlockQuery (SimpleBlock c ext) result] → ShowS Source #

(LedgerSupportsProtocol (SimpleBlock SimpleMockCrypto ext), Show (CannotForge (SimpleBlock SimpleMockCrypto ext)), Show (ForgeStateInfo (SimpleBlock SimpleMockCrypto ext)), Show (ForgeStateUpdateError (SimpleBlock SimpleMockCrypto ext)), Serialise ext, RunMockBlock SimpleMockCrypto ext) ⇒ RunNode (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

NodeInitStorage (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

MockProtocolSpecific c ext ⇒ QueryLedger (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

answerBlockQueryExtLedgerCfg (SimpleBlock c ext) → BlockQuery (SimpleBlock c ext) result → ExtLedgerState (SimpleBlock c ext) → result Source #

RunMockBlock c ext ⇒ ConfigSupportsNode (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Abstract

HasHardForkHistory (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type HardForkIndices (SimpleBlock c ext) ∷ [Type] Source #

(SimpleCrypto c, Signable MockDSIGN (SignedSimplePBft c PBftMockCrypto)) ⇒ LedgerSupportsProtocol (SimplePBftBlock c PBftMockCrypto) Source #

The ledger view is constant for the mock instantiation of PBFT (mock blocks cannot change delegation)

Instance details

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

(SimpleCrypto c, BftCrypto c', Signable (BftDSIGN c') (SignedSimpleBft c c')) ⇒ LedgerSupportsProtocol (SimpleBftBlock c c') Source # 
Instance details

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

(SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ LedgerSupportsProtocol (SimplePraosBlock c c') Source # 
Instance details

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

InspectLedger (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type LedgerWarning (SimpleBlock c ext) Source #

type LedgerUpdate (SimpleBlock c ext) Source #

(SimpleCrypto c, Typeable ext) ⇒ HasAnnTip (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type TipInfo (SimpleBlock c ext) Source #

Methods

getTipInfoHeader (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) Source #

tipInfoHash ∷ proxy (SimpleBlock c ext) → TipInfo (SimpleBlock c ext) → HeaderHash (SimpleBlock c ext) Source #

(SimpleCrypto c, Typeable ext) ⇒ BasicEnvelopeValidation (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ ValidateEnvelope (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type OtherHeaderEnvelopeError (SimpleBlock c ext) Source #

MockProtocolSpecific c ext ⇒ LedgerSupportsMempool (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

HasTxs (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

extractTxsSimpleBlock c ext → [GenTx (SimpleBlock c ext)] Source #

BlockSupportsMetrics (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

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

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

(SimpleCrypto c, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ BlockSupportsProtocol (SimpleBlock c (SimplePraosExt c c')) Source # 
Instance details

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

(SimpleCrypto c, Signable MockDSIGN (SignedSimplePBft c PBftMockCrypto)) ⇒ BlockSupportsProtocol (SimplePBftBlock c PBftMockCrypto) Source # 
Instance details

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

(SimpleCrypto c, BftCrypto c', Signable (BftDSIGN c') (SignedSimpleBft c c')) ⇒ BlockSupportsProtocol (SimpleBftBlock c c') Source # 
Instance details

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

MockProtocolSpecific c ext ⇒ CommonProtocolParams (SimpleBlock c ext) Source #

Dummy values

Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

LedgerSupportsPeerSelection (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

MockProtocolSpecific c ext ⇒ UpdateLedger (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ GetPrevHash (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

SameDepIndex (NestedCtxt_ (SimpleBlock c ext) f) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

sameDepIndexNestedCtxt_ (SimpleBlock c ext) f a → NestedCtxt_ (SimpleBlock c ext) f b → Maybe (a :~: b) Source #

TrivialDependency (NestedCtxt_ (SimpleBlock c ext) f) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Associated Types

type TrivialIndex (NestedCtxt_ (SimpleBlock c ext) f) Source #

SignedHeader (SimplePBftHeader c c') Source # 
Instance details

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

SignedHeader (SimpleBftHeader c c') Source # 
Instance details

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

PraosCrypto c' ⇒ SignedHeader (SimplePraosHeader c c') Source # 
Instance details

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

HasNetworkProtocolVersion (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

SupportedNetworkProtocolVersion (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

EncodeDisk (SimpleBftBlock c c') () Source # 
Instance details

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

Methods

encodeDiskCodecConfig (SimpleBftBlock c c') → () → Encoding Source #

DecodeDisk (SimpleBftBlock c c') () Source # 
Instance details

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

Methods

decodeDiskCodecConfig (SimpleBftBlock c c') → ∀ s. Decoder s () Source #

(Serialise (PBftVerKeyHash c'), PBftCrypto c') ⇒ EncodeDisk (SimplePBftBlock c c') (PBftState c') Source # 
Instance details

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

Methods

encodeDiskCodecConfig (SimplePBftBlock c c') → PBftState c' → Encoding Source #

PraosCrypto c' ⇒ EncodeDisk (SimplePraosBlock c c') (PraosChainDepState c') Source # 
Instance details

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

Methods

encodeDiskCodecConfig (SimplePraosBlock c c') → PraosChainDepState c' → Encoding Source #

(Serialise (PBftVerKeyHash c'), PBftCrypto c') ⇒ DecodeDisk (SimplePBftBlock c c') (PBftState c') Source # 
Instance details

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

Methods

decodeDiskCodecConfig (SimplePBftBlock c c') → ∀ s. Decoder s (PBftState c') Source #

PraosCrypto c' ⇒ DecodeDisk (SimplePraosBlock c c') (PraosChainDepState c') Source # 
Instance details

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

Methods

decodeDiskCodecConfig (SimplePraosBlock c c') → ∀ s. Decoder s (PraosChainDepState c') Source #

(Typeable c, Typeable ext) ⇒ ShowProxy (BlockQuery (SimpleBlock c ext) ∷ TypeType) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Eq ext', Typeable ext) ⇒ Eq (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)SimpleBlock' c ext ext' → SimpleBlock' c ext ext' → Bool Source #

(/=)SimpleBlock' c ext ext' → SimpleBlock' c ext ext' → Bool Source #

Show (NestedCtxt_ (SimpleBlock c ext) f a) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

showsPrecIntNestedCtxt_ (SimpleBlock c ext) f a → ShowS Source #

showNestedCtxt_ (SimpleBlock c ext) f a → String Source #

showList ∷ [NestedCtxt_ (SimpleBlock c ext) f a] → ShowS Source #

(SimpleCrypto c, Show ext', Typeable ext) ⇒ Show (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntSimpleBlock' c ext ext' → ShowS Source #

showSimpleBlock' c ext ext' → String Source #

showList ∷ [SimpleBlock' c ext ext'] → ShowS Source #

Generic (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (SimpleBlock' c ext ext') ∷ TypeType Source #

Methods

fromSimpleBlock' c ext ext' → Rep (SimpleBlock' c ext ext') x Source #

toRep (SimpleBlock' c ext ext') x → SimpleBlock' c ext ext' Source #

(SimpleCrypto c, Serialise ext') ⇒ Serialise (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeSimpleBlock' c ext ext' → Encoding #

decode ∷ Decoder s (SimpleBlock' c ext ext') #

encodeList ∷ [SimpleBlock' c ext ext'] → Encoding #

decodeList ∷ Decoder s [SimpleBlock' c ext ext'] #

(SimpleCrypto c, Typeable ext, Typeable ext') ⇒ GetHeader (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getHeaderSimpleBlock' c ext ext' → Header (SimpleBlock' c ext ext') Source #

blockMatchesHeaderHeader (SimpleBlock' c ext ext') → SimpleBlock' c ext ext' → Bool Source #

headerIsEBBHeader (SimpleBlock' c ext ext') → Maybe EpochNo Source #

SimpleCrypto c ⇒ ConvertRawHash (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

toRawHash ∷ proxy (SimpleBlock' c ext ext') → HeaderHash (SimpleBlock' c ext ext') → ByteString Source #

fromRawHash ∷ proxy (SimpleBlock' c ext ext') → ByteStringHeaderHash (SimpleBlock' c ext ext') Source #

toShortRawHash ∷ proxy (SimpleBlock' c ext ext') → HeaderHash (SimpleBlock' c ext ext') → ShortByteString Source #

fromShortRawHash ∷ proxy (SimpleBlock' c ext ext') → ShortByteStringHeaderHash (SimpleBlock' c ext ext') Source #

hashSize ∷ proxy (SimpleBlock' c ext ext') → Word32 Source #

Condense ext' ⇒ Condense (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseSimpleBlock' c ext ext' → String Source #

(SimpleCrypto c, Typeable ext, Typeable ext') ⇒ StandardHash (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext, Typeable ext') ⇒ HasHeader (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getHeaderFieldsSimpleBlock' c ext ext' → HeaderFields (SimpleBlock' c ext ext') Source #

HasMockTxs (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getMockTxsSimpleBlock' c ext ext' → [Tx] Source #

type Rep (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (GenTx (SimpleBlock c ext)) = D1 ('MetaData "GenTx" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleGenTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleGenTx") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Tx) :*: S1 ('MetaSel ('Just "simpleGenTxId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TxId)))
type Rep (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (TxId (GenTx (SimpleBlock c ext))) = D1 ('MetaData "TxId" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)))
type Rep (Validated (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (Validated (GenTx (SimpleBlock c ext))) = Rep (GenTx (SimpleBlock c ext))
type Rep (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (LedgerState (SimpleBlock c ext)) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "SimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MockState (SimpleBlock c ext)))))
type Rep (BlockConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (BlockConfig (SimpleBlock c ext)) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleBlockConfig" 'PrefixI 'False) (U1TypeType))
type Rep (CodecConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (CodecConfig (SimpleBlock c ext)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleCodecConfig" 'PrefixI 'False) (U1TypeType))
type Rep (StorageConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (StorageConfig (SimpleBlock c ext)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleStorageConfig" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SecurityParam)))
type Rep (Header (SimpleBlock' c ext ext')) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (Header (SimpleBlock' c ext ext')) = D1 ('MetaData "Header" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleHeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleHeaderHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HeaderHash (SimpleBlock' c ext ext'))) :*: (S1 ('MetaSel ('Just "simpleHeaderStd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SimpleStdHeader c ext)) :*: S1 ('MetaSel ('Just "simpleHeaderExt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ext'))))
type Rep (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (Ticked (LedgerState (SimpleBlock c ext))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext)))))
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

newtype TxId (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

newtype Validated (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type LedgerCfg (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type AuxLedgerEvent (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type LedgerErr (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type BlockProtocol (SimplePraosRuleBlock c) Source # 
Instance details

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

newtype Ticked (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data BlockQuery (SimpleBlock c ext) result Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data BlockQuery (SimpleBlock c ext) result where
type HardForkIndices (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HardForkIndices (SimpleBlock c ext) = '[SimpleBlock c ext]
type LedgerUpdate (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type LedgerWarning (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type TipInfo (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type TipInfo (SimpleBlock c ext) = HeaderHash (SimpleBlock c ext)
type OtherHeaderEnvelopeError (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type CannotForge (SimplePBftBlock c c') Source # 
Instance details

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

type CannotForge (SimpleBftBlock c c') Source # 
Instance details

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

type CannotForge (SimplePraosBlock c c') Source # 
Instance details

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

type ForgeStateInfo (SimplePBftBlock c c') Source # 
Instance details

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

type ForgeStateInfo (SimpleBftBlock c c') Source # 
Instance details

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

type ForgeStateInfo (SimplePraosBlock c c') Source # 
Instance details

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

type ForgeStateUpdateError (SimplePBftBlock c c') Source # 
Instance details

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

type ForgeStateUpdateError (SimpleBftBlock c c') Source # 
Instance details

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

type ForgeStateUpdateError (SimplePraosBlock c c') Source # 
Instance details

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

data GenTx (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type ApplyTxErr (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

newtype LedgerState (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type BlockProtocol (SimplePBftBlock c c') Source # 
Instance details

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

type BlockProtocol (SimpleBftBlock c c') Source # 
Instance details

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

type BlockProtocol (SimplePraosBlock c c') Source # 
Instance details

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

data BlockConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data CodecConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data StorageConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data NestedCtxt_ (SimpleBlock c ext) f a Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

data NestedCtxt_ (SimpleBlock c ext) f a where
type TrivialIndex (NestedCtxt_ (SimpleBlock c ext) f) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

type TrivialIndex (NestedCtxt_ (SimpleBlock c ext) f) = f (SimpleBlock c ext)
type Signed (SimplePBftHeader c c') Source # 
Instance details

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

type Signed (SimpleBftHeader c c') Source # 
Instance details

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

type Signed (SimplePraosHeader c c') Source # 
Instance details

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

type BlockNodeToClientVersion (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

type BlockNodeToNodeVersion (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

type Rep (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (SimpleBlock' c ext ext') = D1 ('MetaData "SimpleBlock'" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleBlock" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleHeader") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Header (SimpleBlock' c ext ext'))) :*: S1 ('MetaSel ('Just "simpleBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SimpleBody)))
data Header (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HeaderHash (SimpleBlock' c ext ext') Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HeaderHash (SimpleBlock' c ext ext') = Hash (SimpleHash c) (Header (SimpleBlock' c ext ext'))

data SimpleBody Source #

Constructors

SimpleBody 

Fields

Instances

Instances details
Eq SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Show SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Generic SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep SimpleBodyTypeType Source #

Serialise SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeSimpleBody → Encoding #

decode ∷ Decoder s SimpleBody #

encodeList ∷ [SimpleBody] → Encoding #

decodeList ∷ Decoder s [SimpleBody] #

ToCBOR SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

toCBORSimpleBody → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SimpleBody → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SimpleBody] → Size

HasMockTxs SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getMockTxsSimpleBody → [Tx] Source #

type Rep SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep SimpleBody = D1 ('MetaData "SimpleBody" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleBody" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleTxs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tx])))

type family SimpleHash c ∷ Type Source #

Instances

Instances details
type SimpleHash SimpleMockCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type SimpleHash SimpleMockCrypto = ShortHash
type SimpleHash SimpleStandardCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type SimpleHeader c ext = Header (SimpleBlock c ext) Source #

data SimpleStdHeader c ext Source #

Instances

Instances details
(SimpleCrypto c, Typeable ext) ⇒ Eq (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)SimpleStdHeader c ext → SimpleStdHeader c ext → Bool Source #

(/=)SimpleStdHeader c ext → SimpleStdHeader c ext → Bool Source #

(SimpleCrypto c, Typeable ext) ⇒ Show (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Generic (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (SimpleStdHeader c ext) ∷ TypeType Source #

Methods

fromSimpleStdHeader c ext → Rep (SimpleStdHeader c ext) x Source #

toRep (SimpleStdHeader c ext) x → SimpleStdHeader c ext Source #

Serialise (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeSimpleStdHeader c ext → Encoding #

decode ∷ Decoder s (SimpleStdHeader c ext) #

encodeList ∷ [SimpleStdHeader c ext] → Encoding #

decodeList ∷ Decoder s [SimpleStdHeader c ext] #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → SimpleStdHeader c ext → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SimpleStdHeader c ext → IO (Maybe ThunkInfo) #

showTypeOfProxy (SimpleStdHeader c ext) → String #

type Rep (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (SimpleStdHeader c ext) = D1 ('MetaData "SimpleStdHeader" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleStdHeader" 'PrefixI 'True) ((S1 ('MetaSel ('Just "simplePrev") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainHash (SimpleBlock c ext))) :*: S1 ('MetaSel ('Just "simpleSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "simpleBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: (S1 ('MetaSel ('Just "simpleBodyHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash (SimpleHash c) SimpleBody)) :*: S1 ('MetaSel ('Just "simpleBodySize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))))

Working with SimpleBlock

matchesSimpleHeaderSimpleCrypto c ⇒ Header (SimpleBlock' c ext ext') → SimpleBlock' c ext ext'' → Bool Source #

Check whether the block matches the header

mkSimpleHeaderSimpleCrypto c ⇒ (ext' → Encoding) → SimpleStdHeader c ext → ext' → Header (SimpleBlock' c ext ext') Source #

Create a header by hashing the header without hash and adding to the resulting value.

Configuration

data family BlockConfig blk Source #

Static configuration required to work with this type of blocks

Instances

Instances details
Generic (BlockConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (BlockConfig (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromBlockConfig (SimpleBlock c ext) → Rep (BlockConfig (SimpleBlock c ext)) x Source #

toRep (BlockConfig (SimpleBlock c ext)) x → BlockConfig (SimpleBlock c ext) Source #

NoThunks (BlockConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig (SimpleBlock c ext)) → String #

type Rep (BlockConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (BlockConfig (SimpleBlock c ext)) = D1 ('MetaData "BlockConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleBlockConfig" 'PrefixI 'False) (U1TypeType))
data BlockConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data family CodecConfig blk Source #

Static configuration required for serialisation and deserialisation of types pertaining to this type of block.

Data family instead of type family to get better type inference.

Instances

Instances details
Generic (CodecConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (CodecConfig (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromCodecConfig (SimpleBlock c ext) → Rep (CodecConfig (SimpleBlock c ext)) x Source #

toRep (CodecConfig (SimpleBlock c ext)) x → CodecConfig (SimpleBlock c ext) Source #

NoThunks (CodecConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → CodecConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig (SimpleBlock c ext)) → String #

type Rep (CodecConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (CodecConfig (SimpleBlock c ext)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleCodecConfig" 'PrefixI 'False) (U1TypeType))
data CodecConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data SimpleLedgerConfig c ext Source #

Constructors

SimpleLedgerConfig 

Fields

Instances

Instances details
Show (MockLedgerConfig c ext) ⇒ Show (SimpleLedgerConfig c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Generic (SimpleLedgerConfig c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (SimpleLedgerConfig c ext) ∷ TypeType Source #

NoThunks (MockLedgerConfig c ext) ⇒ NoThunks (SimpleLedgerConfig c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → SimpleLedgerConfig c ext → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SimpleLedgerConfig c ext → IO (Maybe ThunkInfo) #

showTypeOfProxy (SimpleLedgerConfig c ext) → String #

type Rep (SimpleLedgerConfig c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (SimpleLedgerConfig c ext) = D1 ('MetaData "SimpleLedgerConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleMockLedgerConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (MockLedgerConfig c ext)) :*: S1 ('MetaSel ('Just "simpleLedgerEraParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EraParams)))

data family StorageConfig blk Source #

Config needed for the NodeInitStorage class. Defined here to avoid circular dependencies.

Instances

Instances details
Generic (StorageConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (StorageConfig (SimpleBlock c ext)) ∷ TypeType Source #

NoThunks (StorageConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig (SimpleBlock c ext)) → String #

type Rep (StorageConfig (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (StorageConfig (SimpleBlock c ext)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'False) (C1 ('MetaCons "SimpleStorageConfig" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SecurityParam)))
data StorageConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Protocol-specific part

UpdateLedger

data family LedgerState blk Source #

Ledger state associated with a block

Instances

Instances details
(SimpleCrypto c, Typeable ext) ⇒ Eq (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ Eq (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ Show (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ Show (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Generic (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (LedgerState (SimpleBlock c ext)) ∷ TypeType Source #

Methods

fromLedgerState (SimpleBlock c ext) → Rep (LedgerState (SimpleBlock c ext)) x Source #

toRep (LedgerState (SimpleBlock c ext)) x → LedgerState (SimpleBlock c ext) Source #

Generic (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (Ticked (LedgerState (SimpleBlock c ext))) ∷ TypeType Source #

Serialise (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

encodeLedgerState (SimpleBlock c ext) → Encoding #

decode ∷ Decoder s (LedgerState (SimpleBlock c ext)) #

encodeList ∷ [LedgerState (SimpleBlock c ext)] → Encoding #

decodeList ∷ Decoder s [LedgerState (SimpleBlock c ext)] #

GetTip (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

GetTip (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

MockProtocolSpecific c ext ⇒ IsLedger (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type LedgerErr (LedgerState (SimpleBlock c ext)) Source #

type AuxLedgerEvent (LedgerState (SimpleBlock c ext)) Source #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → LedgerState (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → LedgerState (SimpleBlock c ext) → IO (Maybe ThunkInfo) #

showTypeOfProxy (LedgerState (SimpleBlock c ext)) → String #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → Ticked (LedgerState (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Ticked (LedgerState (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Ticked (LedgerState (SimpleBlock c ext))) → String #

EncodeDisk (MockBlock ext) (LedgerState (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

encodeDiskCodecConfig (MockBlock ext) → LedgerState (MockBlock ext) → Encoding Source #

DecodeDisk (MockBlock ext) (LedgerState (MockBlock ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Methods

decodeDiskCodecConfig (MockBlock ext) → ∀ s. Decoder s (LedgerState (MockBlock ext)) Source #

MockProtocolSpecific c ext ⇒ ApplyBlock (LedgerState (SimpleBlock c ext)) (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (LedgerState (SimpleBlock c ext)) = D1 ('MetaData "LedgerState" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "SimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MockState (SimpleBlock c ext)))))
type Rep (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (Ticked (LedgerState (SimpleBlock c ext))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext)))))
type LedgerCfg (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type AuxLedgerEvent (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type LedgerErr (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

newtype Ticked (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HeaderHash (LedgerState blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

newtype LedgerState (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data family Ticked st 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
(SimpleCrypto c, Typeable ext) ⇒ Eq (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Show (Ticked ()) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked () → ShowS Source #

showTicked () → String Source #

showList ∷ [Ticked ()] → ShowS Source #

(SimpleCrypto c, Typeable ext) ⇒ Show (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Show (Ticked a) ⇒ Show (Ticked (K a x)) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked (K a x) → ShowS Source #

showTicked (K a x) → String Source #

showList ∷ [Ticked (K a x)] → ShowS Source #

Generic (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (Ticked (LedgerState (SimpleBlock c ext))) ∷ TypeType Source #

IsLedger l ⇒ GetTip (Ticked (LedgerDB l)) 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

Methods

getTipTicked (LedgerDB l) → Point (Ticked (LedgerDB l)) Source #

IsLedger (LedgerState blk) ⇒ GetTip (Ticked (ExtLedgerState blk)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

GetTip (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunks ∷ Context → Ticked (LedgerState (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Ticked (LedgerState (SimpleBlock c ext)) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Ticked (LedgerState (SimpleBlock c ext))) → String #

Show (Ticked (f a)) ⇒ Show ((Ticked :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecInt → (Ticked :.: f) a → ShowS Source #

show ∷ (Ticked :.: f) a → String Source #

showList ∷ [(Ticked :.: f) a] → ShowS Source #

NoThunks (Ticked (f a)) ⇒ NoThunks ((Ticked :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

noThunks ∷ Context → (Ticked :.: f) a → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → (Ticked :.: f) a → IO (Maybe ThunkInfo) #

showTypeOfProxy ((Ticked :.: f) a) → String #

data Ticked () 
Instance details

Defined in Ouroboros.Consensus.Ticked

type Rep (Ticked (LedgerState (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type Rep (Ticked (LedgerState (SimpleBlock c ext))) = D1 ('MetaData "Ticked" "Ouroboros.Consensus.Mock.Ledger.Block" "ouroboros-consensus-mock-0.1.0.0-inplace" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext)))))
newtype Ticked (PBftLedgerView c) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked (PBftState c) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data Ticked (LedgerDB l)

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 (ExtLedgerState blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

newtype Ticked (WrapChainDepState blk) 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

newtype Ticked (WrapLedgerView blk) 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

data Ticked (HeaderState blk) 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

newtype Ticked (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data Ticked (PraosChainDepState c) Source #

Ticking the Praos chain dep state has no effect

For the real Praos implementation, ticking is crucial, as it determines the point where the "nonce under construction" is swapped out for the "active" nonce. However, for the mock implementation, we keep the full history, and choose the right nonce from that; this means that ticking has no effect.

We do however need access to the ticked stake distribution.

Instance details

Defined in Ouroboros.Consensus.Mock.Protocol.Praos

type HeaderHash (Ticked l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

newtype Ticked (K a x) 
Instance details

Defined in Ouroboros.Consensus.Ticked

newtype Ticked (K a x) = TickedK {}

ApplyTx (mempool support)

data family GenTx blk Source #

Generalized transaction

The mempool (and, accordingly, blocks) consist of "generalized transactions"; this could be "proper" transactions (transferring funds) but also other kinds of things such as update proposals, delegations, etc.

Instances

Instances details
(Typeable c, Typeable ext) ⇒ ShowProxy (GenTx (SimpleBlock c ext) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (GenTx (SimpleBlock c ext)) → String Source #

(Typeable c, Typeable ext) ⇒ ShowProxy (TxId (GenTx (SimpleBlock c ext)) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showProxyProxy (TxId (GenTx (SimpleBlock c ext))) → String Source #

Eq (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

(/=)GenTx (SimpleBlock c ext) → GenTx (SimpleBlock c ext) → Bool Source #

Eq (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)TxId (