ouroboros-consensus:unstable-consensus-testlib
Safe HaskellNone
LanguageHaskell2010

Test.Util.TestBlock

Description

Minimal instantiation of the consensus layer to be able to run the ChainDB

Synopsis

Blocks

data family BlockConfig blk Source #

Static configuration required to work with this type of blocks

Instances

Instances details
Isomorphic BlockConfig Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Generic (BlockConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Associated Types

type Rep (BlockConfig TestBlock) 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (BlockConfig TestBlock) = D1 ('MetaData "BlockConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockEBBsAllowed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes)))
Generic (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (BlockConfig (TestBlockWith ptype)) 
Instance details

Defined in Test.Util.TestBlock

type Rep (BlockConfig (TestBlockWith ptype)) = D1 ('MetaData "BlockConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes)))

Methods

from ∷ BlockConfig (TestBlockWith ptype) → Rep (BlockConfig (TestBlockWith ptype)) x #

to ∷ Rep (BlockConfig (TestBlockWith ptype)) x → BlockConfig (TestBlockWith ptype) #

Show (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

NoThunks (BlockConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (BlockConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

NoThunks (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

data BlockConfig TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (BlockConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (BlockConfig TestBlock) = D1 ('MetaData "BlockConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockEBBsAllowed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes)))
type Rep (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (BlockConfig (TestBlockWith ptype)) = D1 ('MetaData "BlockConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes)))
newtype BlockConfig (DisableDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype BlockConfig (SelectViewDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype BlockConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data BlockConfig (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

data BlockConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family BlockQuery ∷ Type → QueryFootprint → Type → Type Source #

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

Instances

Instances details
All SingleEraBlock xs ⇒ SameDepIndex2 (BlockQuery (HardForkBlock xs) ∷ QueryFootprint → Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery (HardForkBlock xs) x a → BlockQuery (HardForkBlock xs) y b → Maybe ('(x, a) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery (DualBlock m a) ∷ QueryFootprint → Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a0 (y ∷ QueryFootprint) b. BlockQuery (DualBlock m a) x a0 → BlockQuery (DualBlock m a) y b → Maybe ('(x, a0) :~: '(y, b)) Source #

SameDepIndex2 (BlockQuery TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery TestBlock x a → BlockQuery TestBlock y b → Maybe ('(x, a) :~: '(y, b)) Source #

SerialiseHFC xs ⇒ SerialiseBlockQueryResult (HardForkBlock xs) BlockQuery Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient

(∀ (footprint ∷ QueryFootprint) result. Show (BlockQuery blk footprint result)) ⇒ Show (SomeBlockQuery (BlockQuery blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

SerialiseHFC xs ⇒ SerialiseNodeToClient (HardForkBlock xs) (SomeBlockQuery (BlockQuery (HardForkBlock xs))) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToClient

All SingleEraBlock xs ⇒ ShowQuery (BlockQuery (HardForkBlock xs) footprint) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showResult ∷ BlockQuery (HardForkBlock xs) footprint result → result → String #

ShowQuery (BlockQuery (DualBlock m a) footprint) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showResult ∷ BlockQuery (DualBlock m a) footprint result → result → String #

ShowQuery (BlockQuery TestBlock fp) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showResult ∷ BlockQuery TestBlock fp result → result → String #

Typeable xs ⇒ ShowProxy (BlockQuery (HardForkBlock xs) ∷ QueryFootprint → Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

(Typeable m, Typeable a) ⇒ ShowProxy (BlockQuery (DualBlock m a) ∷ QueryFootprint → Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showProxy ∷ Proxy (BlockQuery (DualBlock m a)) → String #

Eq (BlockQuery TestBlock fp result) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ BlockQuery TestBlock fp result → BlockQuery TestBlock fp result → Bool #

(/=) ∷ BlockQuery TestBlock fp result → BlockQuery TestBlock fp result → Bool #

All SingleEraBlock xs ⇒ Show (BlockQuery (HardForkBlock xs) footprint result) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

Methods

showsPrec ∷ Int → BlockQuery (HardForkBlock xs) footprint result → ShowS #

show ∷ BlockQuery (HardForkBlock xs) footprint result → String #

showList ∷ [BlockQuery (HardForkBlock xs) footprint result] → ShowS #

Show (BlockQuery (DualBlock m a) footprint result) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → BlockQuery (DualBlock m a) footprint result → ShowS #

show ∷ BlockQuery (DualBlock m a) footprint result → String #

showList ∷ [BlockQuery (DualBlock m a) footprint result] → ShowS #

Show (BlockQuery TestBlock fp result) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → BlockQuery TestBlock fp result → ShowS #

show ∷ BlockQuery TestBlock fp result → String #

showList ∷ [BlockQuery TestBlock fp result] → ShowS #

Inject (SomeBlockQuery :.: BlockQuery) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

data BlockQuery TestBlock fp result Source # 
Instance details

Defined in Test.Util.TestBlock

data BlockQuery (HardForkBlock xs) footprint result Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

data BlockQuery (HardForkBlock xs) footprint result where
data BlockQuery (DualBlock m a) footprint result Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data BlockQuery (DualBlock m a) footprint result

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
Isomorphic CodecConfig Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Generic (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type Rep (CodecConfig (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "DualCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualCodecConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig m)) :*: S1 ('MetaSel ('Just "dualCodecConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig a))))

Methods

from ∷ CodecConfig (DualBlock m a) → Rep (CodecConfig (DualBlock m a)) x #

to ∷ Rep (CodecConfig (DualBlock m a)) x → CodecConfig (DualBlock m a) #

Generic (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Associated Types

type Rep (CodecConfig TestBlock) 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (CodecConfig TestBlock) = D1 ('MetaData "CodecConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockCodecConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
Generic (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (CodecConfig TestBlock) 
Instance details

Defined in Test.Util.TestBlock

type Rep (CodecConfig TestBlock) = D1 ('MetaData "CodecConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockCodecConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
Show (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Show (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(NoThunks (CodecConfig m), NoThunks (CodecConfig a)) ⇒ NoThunks (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

NoThunks (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

ToExpr (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

data CodecConfig TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

data CodecConfig TestBlock Source #

The TestBlock does not need any codec config

Instance details

Defined in Test.Util.TestBlock

type Rep (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "DualCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualCodecConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig m)) :*: S1 ('MetaSel ('Just "dualCodecConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig a))))
type Rep (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (CodecConfig TestBlock) = D1 ('MetaData "CodecConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockCodecConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
type Rep (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (CodecConfig TestBlock) = D1 ('MetaData "CodecConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockCodecConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
newtype CodecConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data CodecConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family Header blk Source #

Instances

Instances details
GetHeader1 Header Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Methods

getHeader1 ∷ Header blk → Header blk Source #

Inject Header Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → Header x → Header (HardForkBlock xs) Source #

Isomorphic Header Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ Header (HardForkBlock '[blk]) → Header blk Source #

inject ∷ NoHardForks blk ⇒ Header blk → Header (HardForkBlock '[blk]) Source #

ReconstructNestedCtxt Header TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

CanHardFork xs ⇒ HasNestedContent Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

EncodeDisk TestBlock (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

SerialiseHFC xs ⇒ ReconstructNestedCtxt Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

ReconstructNestedCtxt Header (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

StandardHash blk ⇒ StandardHash (Header blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

Typeable xs ⇒ ShowProxy (Header (HardForkBlock xs) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Methods

showProxy ∷ Proxy (Header (HardForkBlock xs)) → String #

Typeable ptype ⇒ ShowProxy (Header (TestBlockWith ptype) ∷ Type) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showProxy ∷ Proxy (Header (TestBlockWith ptype)) → String #

HasNestedContent Header m ⇒ HasNestedContent Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

DecodeDisk TestBlock (ByteString → Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

ReconstructNestedCtxt Header m ⇒ ReconstructNestedCtxt Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs ⇒ SameDepIndex (NestedCtxt_ (HardForkBlock xs) Header ∷ Type → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

(Typeable m, Typeable a) ⇒ ShowProxy (DualHeader m a ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showProxy ∷ Proxy (DualHeader m a) → String #

All (Compose Eq Header) xs ⇒ Eq (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Methods

(==) ∷ Header (HardForkBlock xs) → Header (HardForkBlock xs) → Bool #

(/=) ∷ Header (HardForkBlock xs) → Header (HardForkBlock xs) → Bool #

Eq (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Eq ptype ⇒ Eq (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ Header (TestBlockWith ptype) → Header (TestBlockWith ptype) → Bool #

(/=) ∷ Header (TestBlockWith ptype) → Header (TestBlockWith ptype) → Bool #

CanHardFork xs ⇒ Show (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Show (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Show ptype ⇒ Show (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → Header (TestBlockWith ptype) → ShowS #

show ∷ Header (TestBlockWith ptype) → String #

showList ∷ [Header (TestBlockWith ptype)] → ShowS #

CanHardFork xs ⇒ NoThunks (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

NoThunks (Header (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

NoThunks ptype ⇒ NoThunks (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

SignedHeader (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

SignedHeader (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

(Typeable ptype, Eq ptype) ⇒ Condense (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

condense ∷ Header (TestBlockWith ptype) → String Source #

CanHardFork xs ⇒ HasHeader (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

HasHeader (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Typeable ptype ⇒ HasHeader (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Serialise ptype ⇒ Serialise (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

DecodeDiskDep (NestedCtxt Header) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

DecodeDiskDepIx (NestedCtxt Header) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

EncodeDiskDep (NestedCtxt Header) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

EncodeDiskDepIx (NestedCtxt Header) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

SerialiseHFC xs ⇒ SerialiseNodeToNode (HardForkBlock xs) (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseNodeToNode

SerialiseHFC xs ⇒ DecodeDiskDep (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

Serialise ptype ⇒ DecodeDiskDep (NestedCtxt Header) (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

decodeDiskDep ∷ CodecConfig (TestBlockWith ptype) → NestedCtxt Header (TestBlockWith ptype) a → ∀ s. Decoder s (ByteString → a) Source #

SerialiseHFC xs ⇒ DecodeDiskDepIx (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

Serialise ptype ⇒ EncodeDisk (TestBlockWith ptype) (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

SerialiseHFC xs ⇒ EncodeDiskDep (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

Serialise ptype ⇒ EncodeDiskDep (NestedCtxt Header) (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

SerialiseHFC xs ⇒ EncodeDiskDepIx (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

Serialise ptype ⇒ DecodeDisk (TestBlockWith ptype) (ByteString → Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

decodeDisk ∷ CodecConfig (TestBlockWith ptype) → ∀ s. Decoder s (ByteString → Header (TestBlockWith ptype)) Source #

EncodeDiskDep (NestedCtxt Header) m ⇒ EncodeDiskDep (NestedCtxt Header) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

encodeDiskDep ∷ CodecConfig (DualBlock m a) → NestedCtxt Header (DualBlock m a) a0 → a0 → Encoding Source #

EncodeDiskDepIx (NestedCtxt Header) m ⇒ EncodeDiskDepIx (NestedCtxt Header) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Show (Header m) ⇒ Show (DualHeader m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → DualHeader m a → ShowS #

show ∷ DualHeader m a → String #

showList ∷ [DualHeader m a] → ShowS #

Bridge m a ⇒ HasHeader (DualHeader m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

All SingleEraBlock xs ⇒ Show (NestedCtxt_ (HardForkBlock xs) Header a) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

newtype Header TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type HeaderHash (Header blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk ∷ Type) = HeaderHash blk
type BlockProtocol (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

newtype Header (DisableDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (SelectViewDiffusionPipelining blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsDiffusionPipelining

newtype Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

newtype Header (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type Signed (Header TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Signed (Header TestBlock) = ()
type Signed (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

type Signed (Header (TestBlockWith ptype)) = ()
newtype Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

newtype LedgerTables blk (mk ∷ MapKind) Source #

The Ledger Tables represent the portion of the data on disk that has been pulled from disk and attached to the in-memory Ledger State or that will eventually be written to disk.

With UTxO-HD and the split of the Ledger ledger state into the in-memory part and the on-disk part, this splitting was reflected in the new type parameter added to the (Consensus) LedgerState, to which we refer as "the MapKind" or mk.

Every LedgerState (or LedgerState-like type, such as the ExtLedgerState) is associated with a LedgerTables and they both share the mk. They both are of kind LedgerStateKind. LedgerTables is just a way to refer only to a partial view of the on-disk data without having the rest of the in-memory LedgerState in scope.

The mk can be instantiated to anything that is map-like, i.e. that expects two type parameters, the key and the value.

Constructors

LedgerTables 

Fields

Instances

Instances details
(∀ k v. LedgerTableConstraints' l k v ⇒ Monoid (mk k v), LedgerTableConstraints l) ⇒ Monoid (LedgerTables l mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Combinators

Methods

mempty ∷ LedgerTables l mk #

mappend ∷ LedgerTables l mk → LedgerTables l mk → LedgerTables l mk #

mconcat ∷ [LedgerTables l mk] → LedgerTables l mk #

(∀ k v. LedgerTableConstraints' blk k v ⇒ Semigroup (mk k v), LedgerTableConstraints blk) ⇒ Semigroup (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Combinators

Methods

(<>) ∷ LedgerTables blk mk → LedgerTables blk mk → LedgerTables blk mk #

sconcat ∷ NonEmpty (LedgerTables blk mk) → LedgerTables blk mk #

stimes ∷ Integral b ⇒ b → LedgerTables blk mk → LedgerTables blk mk #

Eq (mk (TxIn blk) (TxOut blk)) ⇒ Eq (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Methods

(==) ∷ LedgerTables blk mk → LedgerTables blk mk → Bool #

(/=) ∷ LedgerTables blk mk → LedgerTables blk mk → Bool #

Generic (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Associated Types

type Rep (LedgerTables blk mk) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type Rep (LedgerTables blk mk) = D1 ('MetaData "LedgerTables" "Ouroboros.Consensus.Ledger.Tables.Basics" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "LedgerTables" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mk (TxIn blk) (TxOut blk)))))

Methods

from ∷ LedgerTables blk mk → Rep (LedgerTables blk mk) x #

to ∷ Rep (LedgerTables blk mk) x → LedgerTables blk mk #

Show (mk (TxIn blk) (TxOut blk)) ⇒ Show (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

Methods

showsPrec ∷ Int → LedgerTables blk mk → ShowS #

show ∷ LedgerTables blk mk → String #

showList ∷ [LedgerTables blk mk] → ShowS #

NoThunks (mk (TxIn blk) (TxOut blk)) ⇒ NoThunks (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type Rep (LedgerTables blk mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Tables.Basics

type Rep (LedgerTables blk mk) = D1 ('MetaData "LedgerTables" "Ouroboros.Consensus.Ledger.Tables.Basics" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "LedgerTables" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mk (TxIn blk) (TxOut blk)))))

data family StorageConfig blk Source #

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

Instances

Instances details
Isomorphic StorageConfig Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Generic (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type Rep (StorageConfig (DualBlock m a)) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "DualStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualStorageConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig m)) :*: S1 ('MetaSel ('Just "dualStorageConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig a))))
Generic (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Associated Types

type Rep (StorageConfig TestBlock) 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (StorageConfig TestBlock) = D1 ('MetaData "StorageConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockStorageConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
Generic (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (StorageConfig TestBlock) 
Instance details

Defined in Test.Util.TestBlock

type Rep (StorageConfig TestBlock) = D1 ('MetaData "StorageConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockStorageConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
Show (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Show (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(NoThunks (StorageConfig m), NoThunks (StorageConfig a)) ⇒ NoThunks (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

NoThunks (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

data StorageConfig TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

data StorageConfig TestBlock Source #

The TestBlock does not need any storage config

Instance details

Defined in Test.Util.TestBlock

type Rep (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "DualStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualStorageConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig m)) :*: S1 ('MetaSel ('Just "dualStorageConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig a))))
type Rep (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (StorageConfig TestBlock) = D1 ('MetaData "StorageConfig" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockStorageConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
type Rep (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (StorageConfig TestBlock) = D1 ('MetaData "StorageConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockStorageConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
newtype StorageConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data StorageConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data TestBlockError ptype Source #

Constructors

InvalidHash

The hashes don't line up

Fields

InvalidBlock

The block itself is invalid

InvalidPayload (PayloadDependentError ptype) 

Instances

Instances details
Eq (PayloadDependentError ptype) ⇒ Eq (TestBlockError ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ TestBlockError ptype → TestBlockError ptype → Bool #

(/=) ∷ TestBlockError ptype → TestBlockError ptype → Bool #

Generic (TestBlockError ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (TestBlockError ptype) 
Instance details

Defined in Test.Util.TestBlock

type Rep (TestBlockError ptype) = D1 ('MetaData "TestBlockError" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "InvalidHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainHash (TestBlockWith ptype))) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainHash (TestBlockWith ptype)))) :+: (C1 ('MetaCons "InvalidBlock" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "InvalidPayload" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentError ptype)))))

Methods

from ∷ TestBlockError ptype → Rep (TestBlockError ptype) x #

to ∷ Rep (TestBlockError ptype) x → TestBlockError ptype #

Show (PayloadDependentError ptype) ⇒ Show (TestBlockError ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → TestBlockError ptype → ShowS #

show ∷ TestBlockError ptype → String #

showList ∷ [TestBlockError ptype] → ShowS #

(Typeable ptype, Generic (PayloadDependentError ptype), NoThunks (PayloadDependentError ptype)) ⇒ NoThunks (TestBlockError ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (TestBlockError ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (TestBlockError ptype) = D1 ('MetaData "TestBlockError" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "InvalidHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainHash (TestBlockWith ptype))) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainHash (TestBlockWith ptype)))) :+: (C1 ('MetaCons "InvalidBlock" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "InvalidPayload" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentError ptype)))))

data TestBlockWith ptype Source #

Test block parametrized on the payload type

For blocks without payload see the TestBlock type alias.

By defining a PayloadSemantics it is possible to obtain an ApplyBlock instance. See the former class for more details.

Instances

Instances details
BlockSupportsLedgerQuery TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

CanUpgradeLedgerTables LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

HasLedgerTables LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

LedgerTablesAreTrivial LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState TestBlock mk → LedgerState TestBlock mk' Source #

SerializeTablesWithHint LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

ShowProxy TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

IndexedMemPack LedgerState TestBlock Void Source # 
Instance details

Defined in Test.Util.TestBlock

SameDepIndex2 (BlockQuery TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

sameDepIndex2 ∷ ∀ (x ∷ QueryFootprint) a (y ∷ QueryFootprint) b. BlockQuery TestBlock x a → BlockQuery TestBlock y b → Maybe ('(x, a) :~: '(y, b)) Source #

HasNestedContent f (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

unnest ∷ f (TestBlockWith ptype) → DepPair (NestedCtxt f (TestBlockWith ptype)) Source #

nest ∷ DepPair (NestedCtxt f (TestBlockWith ptype)) → f (TestBlockWith ptype) Source #

PayloadSemantics ptype ⇒ ApplyBlock LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ IsLedger LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type LedgerErr LedgerState (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

ReconstructNestedCtxt Header (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

StandardHash (TestBlockWith ptype ∷ Type) Source # 
Instance details

Defined in Test.Util.TestBlock

Typeable ptype ⇒ ShowProxy (Header (TestBlockWith ptype) ∷ Type) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showProxy ∷ Proxy (Header (TestBlockWith ptype)) → String #

SameDepIndex (NestedCtxt_ (TestBlockWith ptype) f ∷ Type → Type) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

sameDepIndex ∷ NestedCtxt_ (TestBlockWith ptype) f a → NestedCtxt_ (TestBlockWith ptype) f b → Maybe (a :~: b) Source #

TrivialDependency (NestedCtxt_ (TestBlockWith ptype) f ∷ Type → Type) Source # 
Instance details

Defined in Test.Util.TestBlock

Eq ptype ⇒ Eq (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ Header (TestBlockWith ptype) → Header (TestBlockWith ptype) → Bool #

(/=) ∷ Header (TestBlockWith ptype) → Header (TestBlockWith ptype) → Bool #

Eq ptype ⇒ Eq (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ TestBlockWith ptype → TestBlockWith ptype → Bool #

(/=) ∷ TestBlockWith ptype → TestBlockWith ptype → Bool #

Ord ptype ⇒ Ord (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

compare ∷ TestBlockWith ptype → TestBlockWith ptype → Ordering #

(<) ∷ TestBlockWith ptype → TestBlockWith ptype → Bool #

(<=) ∷ TestBlockWith ptype → TestBlockWith ptype → Bool #

(>) ∷ TestBlockWith ptype → TestBlockWith ptype → Bool #

(>=) ∷ TestBlockWith ptype → TestBlockWith ptype → Bool #

max ∷ TestBlockWith ptype → TestBlockWith ptype → TestBlockWith ptype #

min ∷ TestBlockWith ptype → TestBlockWith ptype → TestBlockWith ptype #

Generic (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (BlockConfig (TestBlockWith ptype)) 
Instance details

Defined in Test.Util.TestBlock

type Rep (BlockConfig (TestBlockWith ptype)) = D1 ('MetaData "BlockConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes)))

Methods

from ∷ BlockConfig (TestBlockWith ptype) → Rep (BlockConfig (TestBlockWith ptype)) x #

to ∷ Rep (BlockConfig (TestBlockWith ptype)) x → BlockConfig (TestBlockWith ptype) #

Generic (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (CodecConfig TestBlock) 
Instance details

Defined in Test.Util.TestBlock

type Rep (CodecConfig TestBlock) = D1 ('MetaData "CodecConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockCodecConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
Generic (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (StorageConfig TestBlock) 
Instance details

Defined in Test.Util.TestBlock

type Rep (StorageConfig TestBlock) = D1 ('MetaData "StorageConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockStorageConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
Generic (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type Rep (TestBlockWith ptype) = D1 ('MetaData "TestBlockWith" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockWith" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tbHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TestHash) :*: S1 ('MetaSel ('Just "tbSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "tbValid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Validity) :*: S1 ('MetaSel ('Just "tbPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ptype))))

Methods

from ∷ TestBlockWith ptype → Rep (TestBlockWith ptype) x #

to ∷ Rep (TestBlockWith ptype) x → TestBlockWith ptype #

Show (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Show (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Show ptype ⇒ Show (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → Header (TestBlockWith ptype) → ShowS #

show ∷ Header (TestBlockWith ptype) → String #

showList ∷ [Header (TestBlockWith ptype)] → ShowS #

Show (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

Show ptype ⇒ Show (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → TestBlockWith ptype → ShowS #

show ∷ TestBlockWith ptype → String #

showList ∷ [TestBlockWith ptype] → ShowS #

NoThunks (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

NoThunks (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

NoThunks ptype ⇒ NoThunks (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

NoThunks (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

NoThunks ptype ⇒ NoThunks (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

ConvertRawHash (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type HashSize (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type HashSize (TestBlockWith ptype) = 808
(Typeable ptype, Eq ptype) ⇒ GetHeader (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

(Typeable ptype, Eq ptype) ⇒ GetPrevHash (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

BlockSupportsProtocol (TestBlockWith ptype) ⇒ BlockSupportsDiffusionPipelining (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Typeable ptype ⇒ BlockSupportsPeras (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type PerasVote (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type PerasCert (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type PerasError (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type PerasCrypto (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type PerasVotingCommitteeScheme (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

(Typeable ptype, Eq ptype, NoThunks ptype, NoThunks (CodecConfig (TestBlockWith ptype)), NoThunks (StorageConfig (TestBlockWith ptype))) ⇒ BlockSupportsProtocol (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

ConfigSupportsNode (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

HasHardForkHistory (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type HardForkIndices (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

ImmutableEraParams (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ BasicEnvelopeValidation (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ HasAnnTip (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type TipInfo (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ ValidateEnvelope (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type OtherHeaderEnvelopeError (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ GetBlockKeySets (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ UpdateLedger (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

GetTip (LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (TestBlockWith ptype) mk → Point (LedgerState (TestBlockWith ptype)) Source #

InspectLedger (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type LedgerWarning (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type LedgerUpdate (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

Methods

inspectLedger ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). TopLevelConfig (TestBlockWith ptype) → LedgerState (TestBlockWith ptype) mk1 → LedgerState (TestBlockWith ptype) mk2 → [LedgerEvent (TestBlockWith ptype)] Source #

LedgerStateSupportsPeras (LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ LedgerSupportsProtocol (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

CanStowLedgerTables (LedgerState TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

HasNetworkProtocolVersion (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type BlockNodeToNodeVersion (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

type BlockNodeToClientVersion (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

Typeable ptype ⇒ StateSupportsPerasEpochContext (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

SignedHeader (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

(Serialise ptype, PayloadSemantics ptype, IndexedMemPack LedgerState (TestBlockWith ptype) (TxOut (TestBlockWith ptype)), MemPack (TxIn (TestBlockWith ptype)), SerializeTablesWithHint LedgerState (TestBlockWith ptype)) ⇒ SerialiseDiskConstraints (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ HasBinaryBlockInfo (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

(Typeable ptype, Eq ptype) ⇒ Condense (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

condense ∷ Header (TestBlockWith ptype) → String Source #

(Typeable ptype, Eq ptype) ⇒ Condense (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

condense ∷ TestBlockWith ptype → String Source #

Typeable ptype ⇒ HasHeader (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

(Typeable ptype, Eq ptype) ⇒ HasHeader (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ Serialise (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise (RealPoint (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise (AnnTip (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ Serialise (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

ToExpr ptype ⇒ ToExpr (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

toExpr ∷ TestBlockWith ptype → Expr Source #

listToExpr ∷ [TestBlockWith ptype] → Expr Source #

DecodeDisk (TestBlockWith ptype) () Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

decodeDisk ∷ CodecConfig (TestBlockWith ptype) → ∀ s. Decoder s () Source #

EncodeDisk (TestBlockWith ptype) () Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

encodeDisk ∷ CodecConfig (TestBlockWith ptype) → () → Encoding Source #

DecodeDisk (TestBlockWith ptype) (AnnTip (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

decodeDisk ∷ CodecConfig (TestBlockWith ptype) → ∀ s. Decoder s (AnnTip (TestBlockWith ptype)) Source #

Serialise ptype ⇒ DecodeDiskDep (NestedCtxt Header) (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

decodeDiskDep ∷ CodecConfig (TestBlockWith ptype) → NestedCtxt Header (TestBlockWith ptype) a → ∀ s. Decoder s (ByteString → a) Source #

Serialise ptype ⇒ EncodeDisk (TestBlockWith ptype) (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

EncodeDisk (TestBlockWith ptype) (AnnTip (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ EncodeDisk (TestBlockWith ptype) (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ EncodeDiskDep (NestedCtxt Header) (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ DecodeDisk (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ DecodeDisk (TestBlockWith ptype) (ByteString → Either DecoderError (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise ptype ⇒ DecodeDisk (TestBlockWith ptype) (ByteString → Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

decodeDisk ∷ CodecConfig (TestBlockWith ptype) → ∀ s. Decoder s (ByteString → Header (TestBlockWith ptype)) Source #

PayloadSemantics ptype ⇒ EncodeDisk (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

Eq (PayloadDependentState ptype mk) ⇒ Eq (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk → Bool #

(/=) ∷ LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk → Bool #

Generic (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (LedgerState (TestBlockWith ptype) mk) 
Instance details

Defined in Test.Util.TestBlock

type Rep (LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "LedgerState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point (TestBlockWith ptype))) :*: S1 ('MetaSel ('Just "payloadDependentState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentState ptype mk))))

Methods

from ∷ LedgerState (TestBlockWith ptype) mk → Rep (LedgerState (TestBlockWith ptype) mk) x #

to ∷ Rep (LedgerState (TestBlockWith ptype) mk) x → LedgerState (TestBlockWith ptype) mk #

(ShowMK mk, PayloadSemantics ptype) ⇒ Show (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → LedgerState (TestBlockWith ptype) mk → ShowS #

show ∷ LedgerState (TestBlockWith ptype) mk → String #

showList ∷ [LedgerState (TestBlockWith ptype) mk] → ShowS #

NoThunks (PayloadDependentState ptype mk) ⇒ NoThunks (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Condense (ChainHash (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

ShowQuery (BlockQuery TestBlock fp) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showResult ∷ BlockQuery TestBlock fp result → result → String #

PayloadSemantics ptype ⇒ Serialise (LedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

PayloadSemantics ptype ⇒ Serialise (ExtLedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

HasLedgerTables (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

LedgerTablesAreTrivial (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

Eq (BlockQuery TestBlock fp result) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ BlockQuery TestBlock fp result → BlockQuery TestBlock fp result → Bool #

(/=) ∷ BlockQuery TestBlock fp result → BlockQuery TestBlock fp result → Bool #

Show (NestedCtxt_ (TestBlockWith ptype) f a) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → NestedCtxt_ (TestBlockWith ptype) f a → ShowS #

show ∷ NestedCtxt_ (TestBlockWith ptype) f a → String #

showList ∷ [NestedCtxt_ (TestBlockWith ptype) f a] → ShowS #

Show (BlockQuery TestBlock fp result) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → BlockQuery TestBlock fp result → ShowS #

show ∷ BlockQuery TestBlock fp result → String #

showList ∷ [BlockQuery TestBlock fp result] → ShowS #

GetTip (Ticked LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (TestBlockWith ptype) mk → Point (Ticked LedgerState (TestBlockWith ptype)) Source #

LedgerStateSupportsPeras (Ticked LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Generic (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk))))

Methods

from ∷ Ticked LedgerState (TestBlockWith ptype) mk → Rep (Ticked LedgerState (TestBlockWith ptype) mk) x #

to ∷ Rep (Ticked LedgerState (TestBlockWith ptype) mk) x → Ticked LedgerState (TestBlockWith ptype) mk #

(NoThunksMK mk, NoThunks (PayloadDependentState ptype mk)) ⇒ NoThunks (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

data CodecConfig TestBlock Source #

The TestBlock does not need any codec config

Instance details

Defined in Test.Util.TestBlock

data StorageConfig TestBlock Source #

The TestBlock does not need any storage config

Instance details

Defined in Test.Util.TestBlock

data BlockQuery TestBlock fp result Source # 
Instance details

Defined in Test.Util.TestBlock

type TxIn TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

type TxOut TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

type TrivialIndex (NestedCtxt_ (TestBlockWith ptype) f ∷ Type → Type) Source # 
Instance details

Defined in Test.Util.TestBlock

type TrivialIndex (NestedCtxt_ (TestBlockWith ptype) f ∷ Type → Type) = f (TestBlockWith ptype)
type LedgerCfg LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type LedgerErr LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type HeaderHash (TestBlockWith ptype ∷ Type) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (BlockConfig (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (BlockConfig (TestBlockWith ptype)) = D1 ('MetaData "BlockConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "testBlockNumCoreNodes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NumCoreNodes)))
type Rep (CodecConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (CodecConfig TestBlock) = D1 ('MetaData "CodecConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockCodecConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
type Rep (StorageConfig TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (StorageConfig TestBlock) = D1 ('MetaData "StorageConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockStorageConfig" 'PrefixI 'False) (U1 ∷ Type → Type))
type Rep (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (TestBlockWith ptype) = D1 ('MetaData "TestBlockWith" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockWith" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tbHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TestHash) :*: S1 ('MetaSel ('Just "tbSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "tbValid") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Validity) :*: S1 ('MetaSel ('Just "tbPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ptype))))
data BlockConfig (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type BlockProtocol (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type HashSize (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type HashSize (TestBlockWith ptype) = 808
newtype Header (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

data NestedCtxt_ (TestBlockWith ptype) f a Source # 
Instance details

Defined in Test.Util.TestBlock

data NestedCtxt_ (TestBlockWith ptype) f a where
type TentativeHeaderState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type TentativeHeaderView (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type PerasCert (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type PerasCrypto (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type PerasError (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type PerasVote (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type PerasVotingCommitteeScheme (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type HardForkIndices (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type OtherHeaderEnvelopeError (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type TipInfo (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type AuxLedgerEvent (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

data LedgerState (TestBlockWith ptype) mk Source # 
Instance details

Defined in Test.Util.TestBlock

type LedgerUpdate (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type LedgerWarning (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type BlockNodeToClientVersion (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type BlockNodeToNodeVersion (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type MaybeEraIndexedEpochToPerasRoundInfo (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type Signed (Header (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

type Signed (Header (TestBlockWith ptype)) = ()
type Rep (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "LedgerState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point (TestBlockWith ptype))) :*: S1 ('MetaSel ('Just "payloadDependentState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentState ptype mk))))
newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk))))

data TestHash where Source #

Bundled Patterns

pattern TestHash ∷ NonEmpty Word64 → TestHash 

Instances

Instances details
NFData TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

rnf ∷ TestHash → () #

Eq TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ TestHash → TestHash → Bool #

(/=) ∷ TestHash → TestHash → Bool #

Ord TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Generic TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep TestHash 
Instance details

Defined in Test.Util.TestBlock

type Rep TestHash = D1 ('MetaData "TestHash" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "UnsafeTestHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTestHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Word64))))

Methods

from ∷ TestHash → Rep TestHash x #

to ∷ Rep TestHash x → TestHash #

Show TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → TestHash → ShowS #

show ∷ TestHash → String #

showList ∷ [TestHash] → ShowS #

NoThunks TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Condense TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

ToExpr TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep TestHash Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep TestHash = D1 ('MetaData "TestHash" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "UnsafeTestHash" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTestHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty Word64))))

data Validity Source #

Constructors

Valid 
Invalid 

Instances

Instances details
Eq Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ Validity → Validity → Bool #

(/=) ∷ Validity → Validity → Bool #

Ord Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Bounded Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Enum Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Generic Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep Validity 
Instance details

Defined in Test.Util.TestBlock

type Rep Validity = D1 ('MetaData "Validity" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "Valid" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Invalid" 'PrefixI 'False) (U1 ∷ Type → Type))

Methods

from ∷ Validity → Rep Validity x #

to ∷ Rep Validity x → Validity #

Show Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → Validity → ShowS #

show ∷ Validity → String #

showList ∷ [Validity] → ShowS #

NoThunks Validity Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise Validity Source # 
Instance details

Defined in Test.Util.TestBlock

ToExpr Validity Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep Validity Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep Validity = D1 ('MetaData "Validity" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "Valid" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Invalid" 'PrefixI 'False) (U1 ∷ Type → Type))

firstBlockWithPayload ∷ Word64 → ptype → TestBlockWith ptype Source #

Create the first block in the given fork, [fork], with the given payload. The SlotNo will be 1.

successorBlockWithPayload ∷ TestHash → SlotNo → ptype → TestBlockWith ptype Source #

Create the successor of the given block without forking: b -> b ++ [0] (in the printed representation) The SlotNo is increased by 1.

In Zipper parlance, this corresponds to going down in a tree.

Test block without payload

type TestBlock = TestBlockWith () Source #

Block without payload

Payload semantics

data family PayloadDependentState ptype (mk ∷ MapKind) Source #

Instances

Instances details
Eq (PayloadDependentState () mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Generic (PayloadDependentState () mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (PayloadDependentState () mk) 
Instance details

Defined in Test.Util.TestBlock

type Rep (PayloadDependentState () mk) = D1 ('MetaData "PayloadDependentState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "EmptyPLDS" 'PrefixI 'False) (U1 ∷ Type → Type))
Show (PayloadDependentState () mk) Source # 
Instance details

Defined in Test.Util.TestBlock

NoThunks (PayloadDependentState () mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Serialise (PayloadDependentState () mk) Source # 
Instance details

Defined in Test.Util.TestBlock

data PayloadDependentState () mk Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (PayloadDependentState () mk) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (PayloadDependentState () mk) = D1 ('MetaData "PayloadDependentState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "EmptyPLDS" 'PrefixI 'False) (U1 ∷ Type → Type))

class (Typeable ptype, Eq ptype, NoThunks ptype, ∀ (mk ∷ MapKind). EqMK mk ⇒ Eq (PayloadDependentState ptype mk), ∀ (mk ∷ MapKind). NoThunksMK mk ⇒ NoThunks (PayloadDependentState ptype mk), ∀ (mk ∷ MapKind). ShowMK mk ⇒ Show (PayloadDependentState ptype mk), ∀ (mk ∷ MapKind). Generic (PayloadDependentState ptype mk), Serialise (PayloadDependentState ptype EmptyMK), HasLedgerTables LedgerState (TestBlockWith ptype), HasLedgerTables (Ticked LedgerState) (TestBlockWith ptype), CanStowLedgerTables (LedgerState (TestBlockWith ptype)), Eq (PayloadDependentError ptype), Show (PayloadDependentError ptype), Generic (PayloadDependentError ptype), ToExpr (PayloadDependentError ptype), Serialise (PayloadDependentError ptype), NoThunks (PayloadDependentError ptype), NoThunks (CodecConfig (TestBlockWith ptype)), NoThunks (StorageConfig (TestBlockWith ptype))) ⇒ PayloadSemantics ptype where Source #

Associated Types

data PayloadDependentState ptype (mk ∷ MapKind) Source #

type PayloadDependentError ptype Source #

Methods

applyPayload ∷ PayloadDependentState ptype ValuesMK → ptype → Either (PayloadDependentError ptype) (PayloadDependentState ptype TrackingMK) Source #

getPayloadKeySets ∷ ptype → LedgerTables (TestBlockWith ptype) KeysMK Source #

This function is used to implement the getBlockKeySets function of the ApplyBlock class. Thus we assume that the payload contains all the information needed to determine which keys should be retrieved from the backing store to apply a TestBlockWith.

Instances

Instances details
PayloadSemantics () Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

data PayloadDependentState () mk 
Instance details

Defined in Test.Util.TestBlock

type PayloadDependentError () 
Instance details

Defined in Test.Util.TestBlock

applyDirectlyToPayloadDependentState ∷ PayloadSemantics ptype ⇒ Ticked LedgerState (TestBlockWith ptype) ValuesMK → ptype → Either (PayloadDependentError ptype) (Ticked LedgerState (TestBlockWith ptype) TrackingMK) Source #

Apply the payload directly to the payload dependent state portion of a ticked state, leaving the rest of the input ticked state unaltered.

LedgerState

data family LedgerState blk (mk ∷ MapKind) Source #

Ledger state associated with a block

This is the Consensus notion of a Ledger 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 signal that the expected instantiation is either a LedgerState or some wrapper over it (like the ExtLedgerState).

This type is parametrized over mk :: MapKind to express the LedgerTables contained in such a LedgerState. See LedgerTables for a more thorough description.

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

Instances

Instances details
ApplyBlock LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

IsLedger LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

CanUpgradeLedgerTables LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

CanUpgradeLedgerTables LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

HasLedgerTables LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

HasLedgerTables LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

LedgerTablesAreTrivial LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Methods

convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState TestBlock mk → LedgerState TestBlock mk' Source #

LedgerTablesAreTrivial LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

convertMapKind ∷ ∀ (mk ∷ MapKind) (mk' ∷ MapKind). LedgerState TestBlock mk → LedgerState TestBlock mk' Source #

SerializeTablesWithHint LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

SerializeTablesWithHint LedgerState TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

IndexedMemPack LedgerState TestBlock Void Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

IndexedMemPack LedgerState TestBlock Void Source # 
Instance details

Defined in Test.Util.TestBlock

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ ApplyBlock LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

PayloadSemantics ptype ⇒ ApplyBlock LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

CanHardFork xs ⇒ IsLedger LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

PayloadSemantics ptype ⇒ IsLedger LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type LedgerErr LedgerState (TestBlockWith ptype) 
Instance details

Defined in Test.Util.TestBlock

(CanHardFork xs, HasHardForkTxOut xs) ⇒ CanUpgradeLedgerTables LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables LedgerState (HardForkBlock xs) Source #

Warning: projectLedgerTables and withLedgerTables are prohibitively expensive when using big tables or when used multiple times. See the TxOut instance for the HardForkBlock for more information.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Bridge m a ⇒ ApplyBlock LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Bridge m a ⇒ IsLedger LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type LedgerErr LedgerState (DualBlock m a) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanUpgradeLedgerTables LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (DualBlock m a) mk1 → LedgerState (DualBlock m a) mk2 → LedgerTables (DualBlock m a) ValuesMK → LedgerTables (DualBlock m a) ValuesMK Source #

CanUpgradeLedgerTables LedgerState (OTBlock k v) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

Methods

upgradeTables ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). LedgerState (OTBlock k v) mk1 → LedgerState (OTBlock k v) mk2 → LedgerTables (OTBlock k v) ValuesMK → LedgerTables (OTBlock k v) ValuesMK Source #

(Bridge m a, HasLedgerTables LedgerState m) ⇒ HasLedgerTables LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → LedgerState (DualBlock m a) mk Source #

(Ord k, Eq v, NoThunks k, NoThunks v) ⇒ HasLedgerTables LedgerState (OTBlock k v) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (OTBlock k v) mk → LedgerTables (OTBlock k v) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ LedgerState (OTBlock k v) any → LedgerTables (OTBlock k v) mk → LedgerState (OTBlock k v) mk Source #

(Ord (TxIn m), MemPack (TxIn m), MemPack (TxOut m)) ⇒ SerializeTablesWithHint LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

(Ord k, MemPack k, MemPack v) ⇒ SerializeTablesWithHint LedgerState (OTBlock k v) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

DecodeDisk TestBlock (LedgerState TestBlock EmptyMK) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

EncodeDisk TestBlock (LedgerState TestBlock EmptyMK) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

(txout ~ TxOut m, IndexedMemPack LedgerState m txout) ⇒ IndexedMemPack LedgerState (DualBlock m a) txout Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

MemPack v ⇒ IndexedMemPack LedgerState (OTBlock k v) v Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

CanHardFork xs ⇒ GetTip (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (HardForkBlock xs) mk → Point (LedgerState (HardForkBlock xs)) Source #

Bridge m a ⇒ GetTip (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (DualBlock m a) mk → Point (LedgerState (DualBlock m a)) Source #

GetTip (LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

GetTip (LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

getTip ∷ ∀ (mk ∷ MapKind). LedgerState (TestBlockWith ptype) mk → Point (LedgerState (TestBlockWith ptype)) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

LedgerStateSupportsPeras (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

LedgerStateSupportsPeras (LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

LedgerStateSupportsPeras (LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

All (Compose CanStowLedgerTables LedgerState) xs ⇒ CanStowLedgerTables (LedgerState (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanStowLedgerTables (LedgerState m) ⇒ CanStowLedgerTables (LedgerState (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanStowLedgerTables (LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

CanStowLedgerTables (LedgerState TestBlock) Source # 
Instance details

Defined in Test.Util.TestBlock

SerialiseHFC xs ⇒ DecodeDisk (HardForkBlock xs) (LedgerState (HardForkBlock xs) EmptyMK) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

PayloadSemantics ptype ⇒ DecodeDisk (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

SerialiseHFC xs ⇒ EncodeDisk (HardForkBlock xs) (LedgerState (HardForkBlock xs) EmptyMK) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.SerialiseDisk

PayloadSemantics ptype ⇒ EncodeDisk (TestBlockWith ptype) (LedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

(IsNonEmpty xs, SListI xs, All (Compose Arbitrary (Flip LedgerState mk)) xs) ⇒ Arbitrary (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Test.Util.Orphans.Arbitrary

(EqMK mk, CanHardFork xs) ⇒ Eq (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(Bridge m a, EqMK mk) ⇒ Eq (LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

(==) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool #

(/=) ∷ LedgerState (DualBlock m a) mk → LedgerState (DualBlock m a) mk → Bool #

Eq (LedgerState TestBlock mk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Eq (PayloadDependentState ptype mk) ⇒ Eq (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

(==) ∷ LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk → Bool #

(/=) ∷ LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk → Bool #

Generic (LedgerState TestBlock mk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

Associated Types

type Rep (LedgerState TestBlock mk) 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (LedgerState TestBlock mk) = D1 ('MetaData "LedgerState" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Point TestBlock)) :*: (S1 ('MetaSel ('Just "lastAppliedHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ChainHash TestBlock)) :*: S1 ('MetaSel ('Just "latestPerasCertRound") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe PerasRoundNo)))))
Generic (LedgerState (OTBlock k v) mk) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

Associated Types

type Rep (LedgerState (OTBlock k v) mk) 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

type Rep (LedgerState (OTBlock k v) mk) = D1 ('MetaData "LedgerState" "Test.Util.LedgerStateOnlyTables" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "OTLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "otlsLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ValuesMK k v)) :*: S1 ('MetaSel ('Just "otlsLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OTLedgerTables k v mk))))

Methods

from ∷ LedgerState (OTBlock k v) mk → Rep (LedgerState (OTBlock k v) mk) x #

to ∷ Rep (LedgerState (OTBlock k v) mk) x → LedgerState (OTBlock k v) mk #

Generic (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (LedgerState (TestBlockWith ptype) mk) 
Instance details

Defined in Test.Util.TestBlock

type Rep (LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "LedgerState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point (TestBlockWith ptype))) :*: S1 ('MetaSel ('Just "payloadDependentState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentState ptype mk))))

Methods

from ∷ LedgerState (TestBlockWith ptype) mk → Rep (LedgerState (TestBlockWith ptype) mk) x #

to ∷ Rep (LedgerState (TestBlockWith ptype) mk) x → LedgerState (TestBlockWith ptype) mk #

(ShowMK mk, CanHardFork xs) ⇒ Show (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

(Bridge m a, ShowMK mk) ⇒ Show (LedgerState (DualBlock m a) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrec ∷ Int → LedgerState (DualBlock m a) mk → ShowS #

show ∷ LedgerState (DualBlock m a) mk → String #

showList ∷ [LedgerState (DualBlock m a) mk] → ShowS #

Show (LedgerState TestBlock mk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

(ShowMK mk, PayloadSemantics ptype) ⇒ Show (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → LedgerState (TestBlockWith ptype) mk → ShowS #

show ∷ LedgerState (TestBlockWith ptype) mk → String #

showList ∷ [LedgerState (TestBlockWith ptype) mk] → ShowS #

(NoThunksMK mk, CanHardFork xs) ⇒ NoThunks (LedgerState (HardForkBlock xs) mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

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

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks (LedgerState TestBlock mk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

NoThunks (PayloadDependentState ptype mk) ⇒ NoThunks (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

(Ord k, Eq v) ⇒ CanStowLedgerTables (OTLedgerState k v) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

Serialise (LedgerState TestBlock mk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

PayloadSemantics ptype ⇒ Serialise (LedgerState (TestBlockWith ptype) EmptyMK) Source # 
Instance details

Defined in Test.Util.TestBlock

ToExpr (LedgerState TestBlock EmptyMK) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

HasLedgerTables (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

HasLedgerTables (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

LedgerTablesAreTrivial (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

LedgerTablesAreTrivial (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables (Ticked LedgerState) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

StandardHash blk ⇒ StandardHash (LedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

(Bridge m a, HasLedgerTables (Ticked LedgerState) m) ⇒ HasLedgerTables (Ticked LedgerState) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source #

(Ord k, Eq v, Eq (mk k v)) ⇒ Eq (OTLedgerState k v mk) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

Methods

(==) ∷ OTLedgerState k v mk → OTLedgerState k v mk → Bool #

(/=) ∷ OTLedgerState k v mk → OTLedgerState k v mk → Bool #

(Show k, Show v, Show (mk k v)) ⇒ Show (OTLedgerState k v mk) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

Methods

showsPrec ∷ Int → OTLedgerState k v mk → ShowS #

show ∷ OTLedgerState k v mk → String #

showList ∷ [OTLedgerState k v mk] → ShowS #

(NoThunks k, NoThunks v, NoThunks (mk k v)) ⇒ NoThunks (OTLedgerState k v mk) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (DualBlock m a) mk → Point (Ticked LedgerState (DualBlock m a)) Source #

GetTip (Ticked LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

GetTip (Ticked LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (TestBlockWith ptype) mk → Point (Ticked LedgerState (TestBlockWith ptype)) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (Ticked LedgerState (HardForkBlock xs)) Source #

LedgerStateSupportsPeras for the ticked hard fork ledger state, mirroring the instance for the unticked ledger state in Ouroboros.Consensus.HardFork.Combinator.Basics.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

LedgerStateSupportsPeras (Ticked LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

LedgerStateSupportsPeras (Ticked LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Generic (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk))))

Methods

from ∷ Ticked LedgerState (TestBlockWith ptype) mk → Rep (Ticked LedgerState (TestBlockWith ptype) mk) x #

to ∷ Rep (Ticked LedgerState (TestBlockWith ptype) mk) x → Ticked LedgerState (TestBlockWith ptype) mk #

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

Defined in Ouroboros.Consensus.Ledger.Dual

(NoThunksMK mk, NoThunks (PayloadDependentState ptype mk)) ⇒ NoThunks (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Inject (Flip LedgerState mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

Methods

inject ∷ ∀ x (xs ∷ [Type]). (CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ InjectionIndex xs x → Flip LedgerState mk x → Flip LedgerState mk (HardForkBlock xs) Source #

Isomorphic (Flip LedgerState mk) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Methods

project ∷ NoHardForks blk ⇒ Flip LedgerState mk (HardForkBlock '[blk]) → Flip LedgerState mk blk Source #

inject ∷ NoHardForks blk ⇒ Flip LedgerState mk blk → Flip LedgerState mk (HardForkBlock '[blk]) Source #

data LedgerState TestBlock mk Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type LedgerCfg LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type LedgerErr LedgerState TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type LedgerCfg LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type LedgerCfg LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type LedgerErr LedgerState (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

type LedgerErr LedgerState (TestBlockWith ptype) Source # 
Instance details

Defined in Test.Util.TestBlock

type LedgerCfg LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type LedgerErr LedgerState (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

newtype LedgerState (HardForkBlock xs) mk Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data LedgerState (TestBlockWith ptype) mk Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (LedgerState TestBlock mk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

type Rep (LedgerState TestBlock mk) = D1 ('MetaData "LedgerState" "Test.Ouroboros.Storage.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Point TestBlock)) :*: (S1 ('MetaSel ('Just "lastAppliedHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ChainHash TestBlock)) :*: S1 ('MetaSel ('Just "latestPerasCertRound") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe PerasRoundNo)))))
type Rep (LedgerState (OTBlock k v) mk) Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

type Rep (LedgerState (OTBlock k v) mk) = D1 ('MetaData "LedgerState" "Test.Util.LedgerStateOnlyTables" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "OTLedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "otlsLedgerState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ValuesMK k v)) :*: S1 ('MetaSel ('Just "otlsLedgerTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OTLedgerTables k v mk))))
type Rep (LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "LedgerState" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "lastAppliedPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point (TestBlockWith ptype))) :*: S1 ('MetaSel ('Just "payloadDependentState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PayloadDependentState ptype mk))))
data LedgerState (DualBlock m a) mk Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data LedgerState (OTBlock k v) mk Source # 
Instance details

Defined in Test.Util.LedgerStateOnlyTables

newtype Ticked LedgerState TestBlock (mk ∷ MapKind) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Test.Util.TestBlock

data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type HeaderHash (LedgerState blk ∷ MapKind → Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (LedgerState blk ∷ MapKind → Type) = HeaderHash blk
type Rep (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk))))

data family Ticked (st ∷ k) ∷ k 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.

Ticked is used mainly in two ways:

  • Ticked (Ext)LedgerState where its kind gets concretized to StateKind -> StateKind
  • Ticked (HeaderState blk) where its kind gets concretized to Type -> Type

Instances

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

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec ∷ Int → Ticked () → ShowS #

show ∷ Ticked () → String #

showList ∷ [Ticked ()] → ShowS #

CanHardFork xs ⇒ ChainDepStateSupportsPeras (Ticked (HardForkChainDepState xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

ChainDepStateSupportsPeras (Ticked (ChainDepState (BlockProtocol blk))) ⇒ ChainDepStateSupportsPeras (Ticked (HeaderState blk)) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

ChainDepStateSupportsPeras (Ticked ()) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Abstract

Methods

getEpochNonce ∷ Ticked () → Nonce Source #

HasLedgerTables (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

HasLedgerTables (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

(NoThunks (TxIn blk), NoThunks (TxOut blk), HasLedgerTables (Ticked LedgerState) blk) ⇒ HasLedgerTables (Ticked ExtLedgerState) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk mk → LedgerTables blk mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked ExtLedgerState blk any → LedgerTables blk mk → Ticked ExtLedgerState blk mk Source #

LedgerTablesAreTrivial (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

LedgerTablesAreTrivial (Ticked LedgerState) TestBlock Source # 
Instance details

Defined in Test.Util.TestBlock

(CanHardFork xs, HasCanonicalTxIn xs, HasHardForkTxOut xs) ⇒ HasLedgerTables (Ticked LedgerState) (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

(Bridge m a, HasLedgerTables (Ticked LedgerState) m) ⇒ HasLedgerTables (Ticked LedgerState) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

projectLedgerTables ∷ ∀ (mk ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) mk → LedgerTables (DualBlock m a) mk Source #

withLedgerTables ∷ ∀ (mk ∷ MapKind) (any ∷ MapKind). (CanMapMK mk, CanMapKeysMK mk, ZeroableMK mk) ⇒ Ticked LedgerState (DualBlock m a) any → LedgerTables (DualBlock m a) mk → Ticked LedgerState (DualBlock m a) mk Source #

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (DualBlock m a) mk → Point (Ticked LedgerState (DualBlock m a)) Source #

GetTip (Ticked LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

GetTip (Ticked LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked LedgerState (TestBlockWith ptype) mk → Point (Ticked LedgerState (TestBlockWith ptype)) Source #

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

Defined in Ouroboros.Consensus.Ledger.Extended

Methods

getTip ∷ ∀ (mk ∷ MapKind). Ticked ExtLedgerState blk mk → Point (Ticked ExtLedgerState blk) Source #

CanHardFork xs ⇒ LedgerStateSupportsPeras (Ticked LedgerState (HardForkBlock xs)) Source #

LedgerStateSupportsPeras for the ticked hard fork ledger state, mirroring the instance for the unticked ledger state in Ouroboros.Consensus.HardFork.Combinator.Basics.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

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

Defined in Ouroboros.Consensus.Ledger.Dual

LedgerStateSupportsPeras (Ticked LedgerState TestBlock) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

LedgerStateSupportsPeras (Ticked LedgerState (TestBlockWith ptype)) Source # 
Instance details

Defined in Test.Util.TestBlock

Generic (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk))))

Methods

from ∷ Ticked LedgerState (TestBlockWith ptype) mk → Rep (Ticked LedgerState (TestBlockWith ptype) mk) x #

to ∷ Rep (Ticked LedgerState (TestBlockWith ptype) mk) x → Ticked LedgerState (TestBlockWith ptype) mk #

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

Defined in Ouroboros.Consensus.Ledger.Dual

(NoThunksMK mk, NoThunks (PayloadDependentState ptype mk)) ⇒ NoThunks (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

Show (Ticked (f a)) ⇒ Show (((Ticked ∷ Type → Type) :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrec ∷ Int → ((Ticked ∷ Type → Type) :.: f) a → ShowS #

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

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

NoThunks (Ticked (f a)) ⇒ NoThunks (((Ticked ∷ Type → Type) :.: f) a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

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

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

showTypeOf ∷ Proxy (((Ticked ∷ Type → Type) :.: f) a) → String Source #

data Ticked () Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

data Ticked (HardForkChainDepState xs ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

data Ticked (HeaderState blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

data Ticked (PBftState c ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

newtype Ticked (WrapChainDepState blk ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

type HeaderHash (Ticked l blk ∷ k2) Source # 
Instance details

Defined in Ouroboros.Consensus.Ticked

type HeaderHash (Ticked l blk ∷ k2) = HeaderHash (l blk)
data Ticked ExtLedgerState (blk ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

newtype Ticked LedgerState TestBlock (mk ∷ MapKind) Source # 
Instance details

Defined in Test.Ouroboros.Storage.TestBlock

data Ticked LedgerState (HardForkBlock xs ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

newtype Ticked LedgerState (TestBlockWith ptype ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Test.Util.TestBlock

data Ticked LedgerState (DualBlock m a ∷ Type) (mk ∷ MapKind) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep (Ticked LedgerState (TestBlockWith ptype) mk) = D1 ('MetaData "Ticked" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "TickedTestLedger" 'PrefixI 'True) (S1 ('MetaSel ('Just "getTickedTestLedger") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (LedgerState (TestBlockWith ptype) mk))))

getTickedTestLedger ∷ ∀ ptype (mk ∷ MapKind). Ticked LedgerState (TestBlockWith ptype) mk → LedgerState (TestBlockWith ptype) mk Source #

Chain

newtype BlockChain Source #

Constructors

BlockChain Word64 

Instances

Instances details
Arbitrary BlockChain Source # 
Instance details

Defined in Test.Util.TestBlock

Show BlockChain Source # 
Instance details

Defined in Test.Util.TestBlock

Tree

newtype BlockTree Source #

Constructors

BlockTree (Tree ()) 

Instances

Instances details
Arbitrary BlockTree Source # 
Instance details

Defined in Test.Util.TestBlock

Show BlockTree Source # 
Instance details

Defined in Test.Util.TestBlock

Methods

showsPrec ∷ Int → BlockTree → ShowS #

show ∷ BlockTree → String #

showList ∷ [BlockTree] → ShowS #

Ledger infrastructure

singleNodeTestConfig ∷ TopLevelConfig TestBlock Source #

Trivial test configuration with a single core node

Support for tests

newtype Permutation Source #

Constructors

Permutation Int 

Instances

Instances details
Arbitrary Permutation Source # 
Instance details

Defined in Test.Util.TestBlock

Show Permutation Source # 
Instance details

Defined in Test.Util.TestBlock

data TestBlockLedgerConfig Source #

Constructors

TestBlockLedgerConfig 

Fields

Instances

Instances details
Eq TestBlockLedgerConfig Source # 
Instance details

Defined in Test.Util.TestBlock

Generic TestBlockLedgerConfig Source # 
Instance details

Defined in Test.Util.TestBlock

Associated Types

type Rep TestBlockLedgerConfig 
Instance details

Defined in Test.Util.TestBlock

type Rep TestBlockLedgerConfig = D1 ('MetaData "TestBlockLedgerConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "tblcHardForkParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EraParams) :*: S1 ('MetaSel ('Just "tblcForecastRange") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe SlotNo))))
Show TestBlockLedgerConfig Source # 
Instance details

Defined in Test.Util.TestBlock

NoThunks TestBlockLedgerConfig Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep TestBlockLedgerConfig Source # 
Instance details

Defined in Test.Util.TestBlock

type Rep TestBlockLedgerConfig = D1 ('MetaData "TestBlockLedgerConfig" "Test.Util.TestBlock" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'False) (C1 ('MetaCons "TestBlockLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "tblcHardForkParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EraParams) :*: S1 ('MetaSel ('Just "tblcForecastRange") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe SlotNo))))

isAncestorOf ∷ TestBlock → TestBlock → Bool Source #

A block b1 is the ancestor of another block b2 if there exists a chain of blocks from b1 to b2. For test blocks in particular, this can be seen in the hash: the hash of b1 should be a prefix of the hash of b2.

Note that this is a partial comparison function. In particular, it does hold that for all b1 and b2, b1 isDescendentOf b2 === b2 isAncestorOf b1 but it does not hold that for all b1 and b2, b1 isDescendentOf b2 === not (b1 isAncestorOf b2) || b1 == b2.

isDescendentOf ∷ TestBlock → TestBlock → Bool Source #

A block b1 is the descendent of another block b2 if there exists a chain of blocks from b2 to b1. For test blocks in particular, this can be seen in the hash: the hash of b2 should be a prefix of the hash of b1.

Note that this is a partial comparison function. In particular, it does hold that for all b1 and b2, b1 isDescendentOf b2 === b2 isAncestorOf b1 but it does not hold that for all b1 and b2, b1 isDescendentOf b2 === not (b1 isAncestorOf b2) || b1 == b2.

isStrictAncestorOf ∷ TestBlock → TestBlock → Bool Source #

Variant of isAncestorOf that returns False when the two blocks are equal.

isStrictDescendentOf ∷ TestBlock → TestBlock → Bool Source #

Variant of isDescendentOf that returns False when the two blocks are equal.

permute ∷ Permutation → [a] → [a] Source #

unsafeTestBlockWithPayload ∷ TestHash → SlotNo → Validity → ptype → TestBlockWith ptype Source #

Create a block directly with the given parameters. This allows creating inconsistent blocks; prefer firstBlockWithPayload or successorBlockWithPayload.

updateToNextNumeral ∷ RealPoint TestBlock → (Point TestBlock, NonEmpty TestBlock) Source #

Given a point to a chain of length L, generates a SwitchFork that switches to the "next" block of length L, where "next" is determined by interpreting the "forks" in the TestHash as binary digits (except the deepest, which is a simple counter).

For example, the following are input and outputs for a chains of length 3, where the TestHashes and Points are denoted by numerals (the SlotNo is merely the number of digits).

000 :-> [RollBack 00, AddBlock 001]
001 :-> [RollBack 0 , AddBlock 01 , AddBlock 010]
010 :-> [RollBack 01, AddBlock 011]
011 :-> [RollBack G , AddBlock 1  , AddBlock 10 , AddBlock 100]

100 :-> [RollBack 10, AddBlock 101]
101 :-> [RollBack 1 , AddBlock 11 , AddBlock 110]
110 :-> [RollBack 11, AddBlock 111]
111 :-> [RollBack G , AddBlock 2  , AddBlock 20 , AddBlock 200]

200 :-> [RollBack 20, AddBlock 201]
201 :-> [RollBack 2 , AddBlock 21 , AddBlock 210]
210 :-> [RollBack 21, AddBlock 211]
211 :-> [RollBack G , AddBlock 3  , AddBlock 30 , AddBlock 300]

etc