ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntBlockQuery (SimpleBlock c ext) result → ShowS #

showBlockQuery (SimpleBlock c ext) result → String #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Ledger.Query

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

Defined in Ouroboros.Consensus.Ledger.Query

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

HasHeader blk ⇒ StandardHash (Header blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

(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 #

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 #

Methods

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

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

(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 #

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

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

(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 #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunksContextHeader (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) Source #

wNoThunksContextHeader (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (Header (SimpleBlock' c ext ext')) → 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 #

(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, 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 Source #

decodeDecoder s (Header (SimpleBlock' c ext ext')) Source #

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

decodeListDecoder s [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 ⇒ 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 ⇒ DecodeDiskDepIx (NestedCtxt 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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ EncodeDiskDepIx (NestedCtxt Header) (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 #

SignedHeader (SimpleBftHeader c c') Source # 
Instance details

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

SignedHeader (SimplePBftHeader c c') Source # 
Instance details

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

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

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

type HeaderHash (Header blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk ∷ Type) = HeaderHash blk
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-0.21.0.0-inplace-unstable-mock-block" '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

newtype Header (DisableDiffusionPipelining blk) 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (SelectViewDiffusionPipelining blk) 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

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

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

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

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

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, 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 #

(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 #

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 #

(SimpleCrypto c, Typeable ext, Typeable ext') ⇒ StandardHash (SimpleBlock' c ext ext' ∷ Type) 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 #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

fromStorageConfig (SimpleBlock c ext) → Rep (StorageConfig (SimpleBlock c ext)) x #

toRep (StorageConfig (SimpleBlock c ext)) x → StorageConfig (SimpleBlock c ext) #

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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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 #

Methods

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

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

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 #

Methods

fromTicked (LedgerState (SimpleBlock c ext)) → Rep (Ticked (LedgerState (SimpleBlock c ext))) x #

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

(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 #

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

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

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

Methods

showsPrecIntLedgerState (SimpleBlock c ext) → ShowS #

showLedgerState (SimpleBlock c ext) → String #

showList ∷ [LedgerState (SimpleBlock c ext)] → ShowS #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntGenTx (SimpleBlock p c) → ShowS #

showGenTx (SimpleBlock p c) → String #

showList ∷ [GenTx (SimpleBlock p c)] → ShowS #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

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

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

(SimpleCrypto c, Typeable ext) ⇒ Show (Ticked (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 #

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

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 #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)LedgerState (SimpleBlock c ext) → LedgerState (SimpleBlock c ext) → Bool #

(/=)LedgerState (SimpleBlock c ext) → LedgerState (SimpleBlock c ext) → Bool #

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 #

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

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 #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)Ticked (LedgerState (SimpleBlock c ext)) → Ticked (LedgerState (SimpleBlock c ext)) → Bool #

(/=)Ticked (LedgerState (SimpleBlock c ext)) → Ticked (LedgerState (SimpleBlock c ext)) → Bool #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

compareValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Ordering #

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

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

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

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

maxValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) #

minValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) #

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 #

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

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

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

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

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

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

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 #

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

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

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

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

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

noThunksContextHeader (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) Source #

wNoThunksContextHeader (SimpleBlock' c ext ext') → IO (Maybe ThunkInfo) Source #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

NoThunks (TxId (GenTx (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

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 #

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 #

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

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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ SerialiseNodeToNodeConstraints (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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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 #

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 #

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 #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

(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 #

(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 Source #

decodeDecoder s (Header (SimpleBlock' c ext ext')) Source #

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

decodeListDecoder s [Header (SimpleBlock' c ext ext')] Source #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

SerialiseNodeToClient (MockBlock ext) SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

DecodeDisk (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

SerialiseNodeToClient (MockBlock ext) (GenTx (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) (MockError (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

Serialise ext ⇒ SerialiseNodeToNode (MockBlock ext) (Header (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

SerialiseNodeToNode (MockBlock ext) (GenTxId (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

Serialise ext ⇒ SerialiseNodeToNode (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 #

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 ⇒ 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 ⇒ DecodeDiskDepIx (NestedCtxt 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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ EncodeDisk (MockBlock ext) (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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

SerialiseNodeToClient (MockBlock ext) (Serialised (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 ⇒ 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 #

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntBlockQuery (SimpleBlock c ext) result → ShowS #

showBlockQuery (SimpleBlock c ext) result → String #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(BlockSupportsProtocol (SimpleBlock c ext), Show (SelectView (BlockProtocol (SimpleBlock c ext)))) ⇒ BlockSupportsDiffusionPipelining (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

BlockSupportsMetrics (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

(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 ⇒ BlockSupportsProtocol (SimpleBlock c SimplePraosRuleExt) Source # 
Instance details

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

(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

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

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

ConsensusProtocol (BlockProtocol (SimpleBlock c ext)) ⇒ BlockSupportsSanityCheck (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

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, Typeable ext) ⇒ BasicEnvelopeValidation (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(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) ⇒ 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 ⇒ UpdateLedger (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Dummy values

Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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 #

MockProtocolSpecific c ext ⇒ BlockSupportsLedgerQuery (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 #

HasTxs (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

TxLimits (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type TxMeasure (SimpleBlock c ext) Source #

LedgerSupportsPeerSelection (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

(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, 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, PraosCrypto c', Signable (PraosKES c') (SignedSimplePraos c c')) ⇒ LedgerSupportsProtocol (SimplePraosBlock c c') Source # 
Instance details

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

NodeInitStorage (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

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

(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

SignedHeader (SimpleBftHeader c c') Source # 
Instance details

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

SignedHeader (SimplePBftHeader c c') Source # 
Instance details

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

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

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

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 #

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

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

Methods

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

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

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

Methods

encodeDiskCodecConfig (SimpleBftBlock c 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

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

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

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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 #

showNestedCtxt_ (SimpleBlock c ext) f a → String #

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

(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 #

showSimpleBlock' c ext ext' → String #

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

(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 #

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

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 #

(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 #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseSimpleBlock' c ext ext' → String Source #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

(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 #

(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 Source #

decodeDecoder s (SimpleBlock' c ext ext') Source #

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

decodeListDecoder s [SimpleBlock' c ext ext'] Source #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HeaderHash (SimpleBlock' c ext ext' ∷ Type) = Hash (SimpleHash c) (Header (SimpleBlock' c ext 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-0.21.0.0-inplace-unstable-mock-block" '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-0.21.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleCodecConfig" 'PrefixI 'False) (U1TypeType))
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-0.21.0.0-inplace-unstable-mock-block" '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 (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-0.21.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleStorageConfig" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SecurityParam)))
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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MockState (SimpleBlock c ext)))))
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-0.21.0.0-inplace-unstable-mock-block" '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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)))
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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext)))))
type BlockProtocol (SimplePraosRuleBlock c) 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

newtype Validated (GenTx (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 LedgerCfg (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 TxId (GenTx (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

data BlockConfig (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 TentativeHeaderState (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

type TentativeHeaderView (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

type HardForkIndices (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HardForkIndices (SimpleBlock c ext) = '[SimpleBlock c ext]
type OtherHeaderEnvelopeError (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)
newtype LedgerState (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data GenTx (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type TxMeasure (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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 Signed (SimpleBftHeader c c') Source # 
Instance details

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

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

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

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

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

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 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-0.21.0.0-inplace-unstable-mock-block" '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

data SimpleBody Source #

Constructors

SimpleBody 

Fields

Instances

Instances details
Generic SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep SimpleBodyTypeType #

Show SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

ToCBOR SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

toCBORSimpleBodyEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SimpleBodySize Source #

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

Eq SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)SimpleBodySimpleBodyBool #

(/=)SimpleBodySimpleBodyBool #

HasMockTxs SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

getMockTxsSimpleBody → [Tx] Source #

Serialise SimpleBody Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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-0.21.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleBody" 'PrefixI 'True) (S1 ('MetaSel ('Just "simpleTxs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Tx])))

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

data SimpleStdHeader c ext Source #

Instances

Instances details
Generic (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (SimpleStdHeader c ext) ∷ TypeType #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntSimpleStdHeader c ext → ShowS #

showSimpleStdHeader c ext → String #

showList ∷ [SimpleStdHeader c ext] → ShowS #

(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 #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Serialise (SimpleStdHeader c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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-0.21.0.0-inplace-unstable-mock-block" '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 SizeInBytes)))))

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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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-0.21.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "SimpleBlockConfig" 'PrefixI 'False) (U1TypeType))
newtype BlockConfig (DisableDiffusionPipelining blk) 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype BlockConfig (SelectViewDiffusionPipelining blk) 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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-0.21.0.0-inplace-unstable-mock-block" '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
Generic (SimpleLedgerConfig c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type Rep (SimpleLedgerConfig c ext) ∷ TypeType #

Methods

fromSimpleLedgerConfig c ext → Rep (SimpleLedgerConfig c ext) x #

toRep (SimpleLedgerConfig c ext) x → SimpleLedgerConfig c ext #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntSimpleLedgerConfig c ext → ShowS #

showSimpleLedgerConfig c ext → String #

showList ∷ [SimpleLedgerConfig c ext] → ShowS #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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-0.21.0.0-inplace-unstable-mock-block" '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) :*: S1 ('MetaSel ('Just "simpleLedgerMockConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MockConfig))))

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 #

Methods

fromStorageConfig (SimpleBlock c ext) → Rep (StorageConfig (SimpleBlock c ext)) x #

toRep (StorageConfig (SimpleBlock c ext)) x → StorageConfig (SimpleBlock c ext) #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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-0.21.0.0-inplace-unstable-mock-block" '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

This is the Consensus notion of a ledger state. Each block type is associated with one of the Ledger types for the ledger state. Virtually every concept in this codebase revolves around this type, or the referenced blk. Whenever we use the type variable l, we intend to denote that the expected instantiation is either a LedgerState or some wrapper over it (like the ExtLedgerState).

The main operations we can do with a LedgerState are ticking (defined in IsLedger), and applying a block (defined in ApplyBlock).

Instances

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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 #

Methods

fromTicked (LedgerState (SimpleBlock c ext)) → Rep (Ticked (LedgerState (SimpleBlock c ext))) x #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

showsPrecIntLedgerState (SimpleBlock c ext) → ShowS #

showLedgerState (SimpleBlock c ext) → String #

showList ∷ [LedgerState (SimpleBlock c ext)] → ShowS #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)LedgerState (SimpleBlock c ext) → LedgerState (SimpleBlock c ext) → Bool #

(/=)LedgerState (SimpleBlock c ext) → LedgerState (SimpleBlock c ext) → Bool #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)Ticked (LedgerState (SimpleBlock c ext)) → Ticked (LedgerState (SimpleBlock c ext)) → Bool #

(/=)Ticked (LedgerState (SimpleBlock c ext)) → Ticked (LedgerState (SimpleBlock c ext)) → Bool #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (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

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 #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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 #

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

type HeaderHash (LedgerState blk ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk ∷ Type) = HeaderHash blk
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-0.21.0.0-inplace-unstable-mock-block" '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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext)))))
type AuxLedgerEvent (LedgerState (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 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

newtype LedgerState (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data family Ticked st Source #

" Ticked " piece of state, either LedgerState or ChainDepState

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. There are exactly two methods in the interface that do that: tickChainDepState and applyChainTickLedgerResult.

Also note that a successful forecast forecastFor (ledgerViewForecastAt cfg st) slot must equal protocolLedgerView cfg (applyChainTick cfg slot st). Thus a LedgerView can only be projected from a Ticked state, but cannot itself be ticked.

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
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 #

Methods

fromTicked (LedgerState (SimpleBlock c ext)) → Rep (Ticked (LedgerState (SimpleBlock c ext))) x #

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

(SimpleCrypto c, Typeable ext) ⇒ Show (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 #

showTicked () → String #

showList ∷ [Ticked ()] → ShowS #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

(==)Ticked (LedgerState (SimpleBlock c ext)) → Ticked (LedgerState (SimpleBlock c ext)) → Bool #

(/=)Ticked (LedgerState (SimpleBlock c ext)) → Ticked (LedgerState (SimpleBlock c ext)) → Bool #

(SimpleCrypto c, Typeable ext) ⇒ NoThunks (Ticked (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

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

Defined in Ouroboros.Consensus.Ledger.Extended

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

Defined in Ouroboros.Consensus.Ticked

Methods

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

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

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

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

Defined in Ouroboros.Consensus.Ticked

data Ticked () 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l ∷ Type) 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l ∷ Type) = HeaderHash l
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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "TickedSimpleLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedSimpleLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (SimpleBlock c ext)))))
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 (ExtLedgerState blk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

data Ticked (PBftState c) 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked (WrapChainDepState blk) 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

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

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 #

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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

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

Methods

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

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

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 #

Methods

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

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

Show (Validated (GenTx (SimpleBlock p c))) 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

Methods

showsPrecIntGenTx (SimpleBlock p c) → ShowS #

showGenTx (SimpleBlock p c) → String #

showList ∷ [GenTx (SimpleBlock p c)] → ShowS #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

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

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

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 #

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

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 #

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

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 #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

compareValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Ordering #

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

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

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

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

maxValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) #

minValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) #

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 #

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

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

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

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

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

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

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 #

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

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

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

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

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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 #

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 #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

SerialiseNodeToClient (MockBlock ext) (GenTx (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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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 (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-0.21.0.0-inplace-unstable-mock-block" '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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)))
newtype Validated (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data GenTx (SimpleBlock c ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data family TxId tx Source #

A generalized transaction, GenTx, identifier.

Instances

Instances details
(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 #

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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

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

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

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

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 #

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

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 #

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

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

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

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

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

condenseGenTxId (SimpleBlock p c) → String Source #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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-0.21.0.0-inplace-unstable-mock-block" 'True) (C1 ('MetaCons "SimpleGenTxId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSimpleGenTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId)))
newtype TxId (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

data family Validated x Source #

" Validated " transaction or block

The ledger defines how to validate transactions and blocks. It's possible the type before and after validation may be distinct (eg Alonzo transactions), which originally motivated this family.

We also gain the related benefit that certain interface functions, such as those that reapply blocks, can have a more precise type now. TODO

Similarly, the Node-to-Client mini protocols can explicitly indicate that the client trusts the blocks from the local server, by having the server send Validated blocks to the client. TODO

Note that validation has different implications for a transaction than for a block. In particular, a validated transaction can be " reapplied " to different ledger states, whereas a validated block must only be " reapplied " to the exact same ledger state (eg as part of rebuilding from an on-disk ledger snapshot).

Since the ledger defines validation, see the ledger details for concrete examples of what determines the validity (wrt to a LedgerState) of a transaction and/or block. Example properties include: a transaction's claimed inputs exist and are still unspent, a block carries a sufficient cryptographic signature, etc.

Instances

Instances details
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 #

Methods

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

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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 #

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

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Methods

compareValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Ordering #

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

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

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

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

maxValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) #

minValidated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) → Validated (GenTx (SimpleBlock c ext)) #

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

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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))
newtype Validated (GenTx (SimpleBlock c ext)) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Crypto

data SimpleMockCrypto Source #

Instances

Instances details
SimpleCrypto SimpleMockCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

Associated Types

type SimpleHash SimpleMockCrypto Source #

Serialise ext ⇒ ReconstructNestedCtxt Header (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 ⇒ SerialiseNodeToNodeConstraints (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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToClient (MockBlock ext) SlotNo 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) (GenTxId (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

Serialise ext ⇒ SerialiseNodeToClient (MockBlock ext) (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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

SerialiseNodeToNode (MockBlock ext) (GenTxId (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

Serialise ext ⇒ SerialiseNodeToNode (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 #

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 ⇒ 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 ⇒ DecodeDiskDepIx (NestedCtxt 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

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

Serialise ext ⇒ EncodeDisk (MockBlock ext) (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

Serialise ext ⇒ EncodeDiskDepIx (NestedCtxt Header) (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

SerialiseNodeToNode (MockBlock ext) (Serialised (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 #

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

Defined in Ouroboros.Consensus.Mock.Node.Serialisation

NodeInitStorage (SimpleBlock SimpleMockCrypto ext) Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Node

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

(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

type SimpleHash SimpleMockCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Mock.Ledger.Block

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

Serialisation

decodeSimpleHeaderSimpleCrypto c ⇒ (ext' → Encoding) → (∀ s. Decoder s ext') → ∀ s. Decoder s (Header (SimpleBlock' c ext ext')) Source #

encodeSimpleHeader ∷ (ext' → Encoding) → Header (SimpleBlock' c ext ext') → Encoding Source #

For tests