ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Ouroboros.Storage.ChainDB.StateMachine

Description

Main tests for the chain DB.

These are the main tests for the chain DB. Commands include

  • Add a block
  • Get the current chain and/or ledger state
  • Create a new iterator and use it to stream blocks
  • Create a new follower and use it to follow the chain
  • (Limited) disk corruption (the chain DB relies on the immutable DB and volatile DB for the storage proper and they have extensive disk corruption tests, so we don't need to repeat that here).
Synopsis

Commands

newtype At (t ∷ Type → Type → Type → Type) blk (m ∷ Type → Type) (r ∷ Type → Type) Source #

Instantiate functor t blk to t blk (IterRef blk m r) (FollowerRef blk m r).

Needed because we need to (partially) apply At t blk flr m to r.

Constructors

At 

Fields

Instances

Instances details
Bifoldable (t blk) ⇒ Foldable (At t blk m ∷ (Type → Type) → Type) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

foldMap ∷ Monoid m0 ⇒ (∀ x. p x → m0) → At t blk m p → m0

Bifunctor (t blk) ⇒ Functor (At t blk m ∷ (Type → Type) → Type) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fmap ∷ (∀ x. p x → q x) → At t blk m p → At t blk m q

Bitraversable (t blk) ⇒ Traversable (At t blk m ∷ (Type → Type) → Type) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

traverse ∷ Applicative f ⇒ (∀ a. p a → f (q a)) → At t blk m p → f (At t blk m q)

CommandNames (At Cmd blk m ∷ (Type → Type) → Type) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

cmdName ∷ ∀ (r ∷ Type → Type). At Cmd blk m r → String

cmdNames ∷ ∀ (r ∷ Type → Type). Proxy (At Cmd blk m r) → [String]

(TestConstraints blk, Eq1 r) ⇒ Eq (At Resp blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

(==) ∷ At Resp blk m r → At Resp blk m r → Bool #

(/=) ∷ At Resp blk m r → At Resp blk m r → Bool #

Generic (At t blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Associated Types

type Rep (At t blk m r) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Rep (At t blk m r) = D1 ('MetaData "At" "Test.Ouroboros.Storage.ChainDB.StateMachine" "ouroboros-consensus-4.0.0.0-inplace-storage-test" 'True) (C1 ('MetaCons "At" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t blk (IterRef blk m r) (FollowerRef blk m r)))))

Methods

from ∷ At t blk m r → Rep (At t blk m r) x #

to ∷ Rep (At t blk m r) x → At t blk m r #

Show (t blk (IterRef blk m r) (FollowerRef blk m r)) ⇒ Show (At t blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

showsPrec ∷ Int → At t blk m r → ShowS #

show ∷ At t blk m r → String #

showList ∷ [At t blk m r] → ShowS #

type Rep (At t blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Rep (At t blk m r) = D1 ('MetaData "At" "Test.Ouroboros.Storage.ChainDB.StateMachine" "ouroboros-consensus-4.0.0.0-inplace-storage-test" 'True) (C1 ('MetaCons "At" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (t blk (IterRef blk m r) (FollowerRef blk m r)))))

data Cmd blk it flr Source #

Commands

Constructors

AddBlock blk (Persistent [blk])

Add a block, with (possibly) some gap blocks leading to it. For more information about gap blocks, refer to GenState below.

AddPerasCert (WithArrivalTime (ValidatedPerasCert blk)) (Persistent [blk])

Add a Peras cert for a block, with (possibly) some gap blocks leading to it. For more information about gap blocks, refer to GenState below.

AddPerasVote (WithArrivalTime (ValidatedPerasVote blk)) (Persistent [blk])

Add a Peras vote, with (possibly) some gap blocks leading to the voted block. For more information about gap blocks, refer to GenState below.

GetCurrentChain 
GetTipBlock 
GetTipHeader 
GetTipPoint 
GetBlockComponent (RealPoint blk) 
GetLatestPerasCertOnChainRound 
GetGCedBlockComponent (RealPoint blk)

Only for blocks that may have been garbage collected.

GetMaxSlotNo 
GetIsValid (RealPoint blk) 
Stream (StreamFrom blk) (StreamTo blk) 
UpdateLoE (AnchoredFragment blk)

Update the LoE fragment and run chain selection.

IteratorNext it 
IteratorNextGCed it

Only for blocks that may have been garbage collected.

IteratorClose it 
NewFollower ChainType 
FollowerInstruction flr

followerInstructionBlocking is excluded, as it requires multiple threads. Its code path is pretty much the same as followerInstruction anyway.

FollowerForward flr [Point blk] 
FollowerClose flr 
Close 
Reopen 
PersistBlks

Copy the blocks older than k from the Volatile DB to the Immutable DB.

PersistBlksThenGC

Copy the blocks older than k from the Volatile DB to the Immutable DB and then perform garbage colllection.

The garbage collection procedure of the Chain DB (our system under test) removes the blocks from the volatile DB without caring about whether the removed blocks were persisted. Therefore, this part of the Chain DB logic assumes that copy to the immutable DB took place before garbage collection. The model uses this assumption as well. As a result, we cannot perform garbage collection in isolation, since this will break the model's invariant.

UpdateLedgerSnapshots

Write a new LedgerDB snapshot to disk and remove the oldest ones.

WipeVolatileDB 

Instances

Instances details
Bifoldable (Cmd blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bifold ∷ Monoid m ⇒ Cmd blk m m → m #

bifoldMap ∷ Monoid m ⇒ (a → m) → (b → m) → Cmd blk a b → m #

bifoldr ∷ (a → c → c) → (b → c → c) → c → Cmd blk a b → c #

bifoldl ∷ (c → a → c) → (c → b → c) → c → Cmd blk a b → c #

Bifunctor (Cmd blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bimap ∷ (a → b) → (c → d) → Cmd blk a c → Cmd blk b d #

first ∷ (a → b) → Cmd blk a c → Cmd blk b c #

second ∷ (b → c) → Cmd blk a b → Cmd blk a c #

Bitraversable (Cmd blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bitraverse ∷ Applicative f ⇒ (a → f c) → (b → f d) → Cmd blk a b → f (Cmd blk c d) #

Functor (Cmd blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fmap ∷ (a → b) → Cmd blk it a → Cmd blk it b #

(<$) ∷ a → Cmd blk it b → Cmd blk it a #

Foldable (Cmd blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fold ∷ Monoid m ⇒ Cmd blk it m → m #

foldMap ∷ Monoid m ⇒ (a → m) → Cmd blk it a → m #

foldMap' ∷ Monoid m ⇒ (a → m) → Cmd blk it a → m #

foldr ∷ (a → b → b) → b → Cmd blk it a → b #

foldr' ∷ (a → b → b) → b → Cmd blk it a → b #

foldl ∷ (b → a → b) → b → Cmd blk it a → b #

foldl' ∷ (b → a → b) → b → Cmd blk it a → b #

foldr1 ∷ (a → a → a) → Cmd blk it a → a #

foldl1 ∷ (a → a → a) → Cmd blk it a → a #

toList ∷ Cmd blk it a → [a] #

null ∷ Cmd blk it a → Bool #

length ∷ Cmd blk it a → Int #

elem ∷ Eq a ⇒ a → Cmd blk it a → Bool #

maximum ∷ Ord a ⇒ Cmd blk it a → a #

minimum ∷ Ord a ⇒ Cmd blk it a → a #

sum ∷ Num a ⇒ Cmd blk it a → a #

product ∷ Num a ⇒ Cmd blk it a → a #

Traversable (Cmd blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

traverse ∷ Applicative f ⇒ (a → f b) → Cmd blk it a → f (Cmd blk it b) #

sequenceA ∷ Applicative f ⇒ Cmd blk it (f a) → f (Cmd blk it a) #

mapM ∷ Monad m ⇒ (a → m b) → Cmd blk it a → m (Cmd blk it b) #

sequence ∷ Monad m ⇒ Cmd blk it (m a) → m (Cmd blk it a) #

CommandNames (At Cmd blk m ∷ (Type → Type) → Type) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

cmdName ∷ ∀ (r ∷ Type → Type). At Cmd blk m r → String

cmdNames ∷ ∀ (r ∷ Type → Type). Proxy (At Cmd blk m r) → [String]

Generic (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Associated Types

type Code (Cmd blk it flr) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (Cmd blk it flr) = GCode (Cmd blk it flr)

Methods

from ∷ Cmd blk it flr → Rep (Cmd blk it flr) Source #

to ∷ Rep (Cmd blk it flr) → Cmd blk it flr Source #

HasDatatypeInfo (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Associated Types

type DatatypeInfoOf (Cmd blk it flr) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type DatatypeInfoOf (Cmd blk it flr) = GDatatypeInfoOf (Cmd blk it flr)

Methods

datatypeInfo ∷ proxy (Cmd blk it flr) → DatatypeInfo (Code (Cmd blk it flr)) Source #

Generic (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Associated Types

type Rep (Cmd blk it flr) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Rep (Cmd blk it flr) = D1 ('MetaData "Cmd" "Test.Ouroboros.Storage.ChainDB.StateMachine" "ouroboros-consensus-4.0.0.0-inplace-storage-test" 'False) ((((C1 ('MetaCons "AddBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 blk) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Persistent [blk]))) :+: (C1 ('MetaCons "AddPerasCert" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithArrivalTime (ValidatedPerasCert blk))) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Persistent [blk]))) :+: C1 ('MetaCons "AddPerasVote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithArrivalTime (ValidatedPerasVote blk))) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Persistent [blk]))))) :+: (C1 ('MetaCons "GetCurrentChain" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "GetTipBlock" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "GetTipHeader" 'PrefixI 'False) (U1 ∷ Type → Type)))) :+: ((C1 ('MetaCons "GetTipPoint" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "GetBlockComponent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons "GetLatestPerasCertOnChainRound" 'PrefixI 'False) (U1 ∷ Type → Type))) :+: ((C1 ('MetaCons "GetGCedBlockComponent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons "GetMaxSlotNo" 'PrefixI 'False) (U1 ∷ Type → Type)) :+: (C1 ('MetaCons "GetIsValid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons "Stream" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StreamFrom blk)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StreamTo blk))))))) :+: (((C1 ('MetaCons "UpdateLoE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AnchoredFragment blk))) :+: (C1 ('MetaCons "IteratorNext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 it)) :+: C1 ('MetaCons "IteratorNextGCed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 it)))) :+: ((C1 ('MetaCons "IteratorClose" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 it)) :+: C1 ('MetaCons "NewFollower" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainType))) :+: (C1 ('MetaCons "FollowerInstruction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flr)) :+: C1 ('MetaCons "FollowerForward" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flr) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Point blk]))))) :+: ((C1 ('MetaCons "FollowerClose" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flr)) :+: (C1 ('MetaCons "Close" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Reopen" 'PrefixI 'False) (U1 ∷ Type → Type))) :+: ((C1 ('MetaCons "PersistBlks" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "PersistBlksThenGC" 'PrefixI 'False) (U1 ∷ Type → Type)) :+: (C1 ('MetaCons "UpdateLedgerSnapshots" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "WipeVolatileDB" 'PrefixI 'False) (U1 ∷ Type → Type))))))

Methods

from ∷ Cmd blk it flr → Rep (Cmd blk it flr) x #

to ∷ Rep (Cmd blk it flr) x → Cmd blk it flr #

(StandardHash blk, Show blk, Show it, Show flr, Show (PerasCert blk), Show (PerasVote blk)) ⇒ Show (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

showsPrec ∷ Int → Cmd blk it flr → ShowS #

show ∷ Cmd blk it flr → String #

showList ∷ [Cmd blk it flr] → ShowS #

type Code (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (Cmd blk it flr) = GCode (Cmd blk it flr)
type DatatypeInfoOf (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type DatatypeInfoOf (Cmd blk it flr) = GDatatypeInfoOf (Cmd blk it flr)
type Rep (Cmd blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Rep (Cmd blk it flr) = D1 ('MetaData "Cmd" "Test.Ouroboros.Storage.ChainDB.StateMachine" "ouroboros-consensus-4.0.0.0-inplace-storage-test" 'False) ((((C1 ('MetaCons "AddBlock" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 blk) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Persistent [blk]))) :+: (C1 ('MetaCons "AddPerasCert" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithArrivalTime (ValidatedPerasCert blk))) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Persistent [blk]))) :+: C1 ('MetaCons "AddPerasVote" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithArrivalTime (ValidatedPerasVote blk))) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Persistent [blk]))))) :+: (C1 ('MetaCons "GetCurrentChain" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "GetTipBlock" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "GetTipHeader" 'PrefixI 'False) (U1 ∷ Type → Type)))) :+: ((C1 ('MetaCons "GetTipPoint" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "GetBlockComponent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons "GetLatestPerasCertOnChainRound" 'PrefixI 'False) (U1 ∷ Type → Type))) :+: ((C1 ('MetaCons "GetGCedBlockComponent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons "GetMaxSlotNo" 'PrefixI 'False) (U1 ∷ Type → Type)) :+: (C1 ('MetaCons "GetIsValid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RealPoint blk))) :+: C1 ('MetaCons "Stream" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StreamFrom blk)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StreamTo blk))))))) :+: (((C1 ('MetaCons "UpdateLoE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AnchoredFragment blk))) :+: (C1 ('MetaCons "IteratorNext" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 it)) :+: C1 ('MetaCons "IteratorNextGCed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 it)))) :+: ((C1 ('MetaCons "IteratorClose" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 it)) :+: C1 ('MetaCons "NewFollower" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainType))) :+: (C1 ('MetaCons "FollowerInstruction" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flr)) :+: C1 ('MetaCons "FollowerForward" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flr) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Point blk]))))) :+: ((C1 ('MetaCons "FollowerClose" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flr)) :+: (C1 ('MetaCons "Close" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Reopen" 'PrefixI 'False) (U1 ∷ Type → Type))) :+: ((C1 ('MetaCons "PersistBlks" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "PersistBlksThenGC" 'PrefixI 'False) (U1 ∷ Type → Type)) :+: (C1 ('MetaCons "UpdateLedgerSnapshots" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "WipeVolatileDB" 'PrefixI 'False) (U1 ∷ Type → Type))))))

newtype Persistent a Source #

A randomly generated value that gets persisted between steps, so that we more details.

Constructors

Persistent 

Fields

Instances

Instances details
Functor Persistent Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fmap ∷ (a → b) → Persistent a → Persistent b #

(<$) ∷ a → Persistent b → Persistent a #

Eq a ⇒ Eq (Persistent a) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

(==) ∷ Persistent a → Persistent a → Bool #

(/=) ∷ Persistent a → Persistent a → Bool #

Show a ⇒ Show (Persistent a) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

showsPrec ∷ Int → Persistent a → ShowS #

show ∷ Persistent a → String #

showList ∷ [Persistent a] → ShowS #

type FollowerRef blk (m ∷ Type → Type) (r ∷ Type → Type) = Reference (Opaque (TestFollower m blk)) r Source #

Concrete or symbolic references to a real follower

type IterRef blk (m ∷ Type → Type) (r ∷ Type → Type) = Reference (Opaque (TestIterator m blk)) r Source #

Concrete or symbolic references to a real iterator

data IteratorResult blk b Source #

Constructors

IteratorExhausted 
IteratorResult b 
IteratorBlockGCed (RealPoint blk)

The block that was supposed to be streamed was garbage-collected from the VolatileDB, but not added to the ImmutableDB.

This will only happen when streaming very old forks very slowly.

The following example illustrates a situation in which an iterator result could be a IteratorBlockGCed value. Suppose we start with an iterator positioned at block c, where [[ x ]] denotes a block in the immutable DB:

                          iterator i
                            ↓
... ⟶ [[ a ]] → [[ b ]] → [ c ] -> [ d ]
──────────────────────╯   ╰────────────╯
  Immutable DB             Current chain

Suppose we switch to a longer fork that branches off from the immutable tip ('[[b]]').

                           iterator i
                            ↓
... ⟶ [[ a ]] → [[ b ]] → [ c ] -> [ d ]
──────────────────────╯│
   Immutable DB        │
                       ╰-→ [ e ] -> [ f ] -> [ g ]
                           ╰─────────────────────╯
                                 Current chain

Assume k=2. This means that block e is the new immutable tip. If we would call iteratorNext on i after block e is copied to the immutable DB and c and d are garbage collected, then we will get IteratorBlockGCed.

Instances

Instances details
Functor (IteratorResult blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

Methods

fmap ∷ (a → b) → IteratorResult blk a → IteratorResult blk b #

(<$) ∷ a → IteratorResult blk b → IteratorResult blk a #

Foldable (IteratorResult blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

Methods

fold ∷ Monoid m ⇒ IteratorResult blk m → m #

foldMap ∷ Monoid m ⇒ (a → m) → IteratorResult blk a → m #

foldMap' ∷ Monoid m ⇒ (a → m) → IteratorResult blk a → m #

foldr ∷ (a → b → b) → b → IteratorResult blk a → b #

foldr' ∷ (a → b → b) → b → IteratorResult blk a → b #

foldl ∷ (b → a → b) → b → IteratorResult blk a → b #

foldl' ∷ (b → a → b) → b → IteratorResult blk a → b #

foldr1 ∷ (a → a → a) → IteratorResult blk a → a #

foldl1 ∷ (a → a → a) → IteratorResult blk a → a #

toList ∷ IteratorResult blk a → [a] #

null ∷ IteratorResult blk a → Bool #

length ∷ IteratorResult blk a → Int #

elem ∷ Eq a ⇒ a → IteratorResult blk a → Bool #

maximum ∷ Ord a ⇒ IteratorResult blk a → a #

minimum ∷ Ord a ⇒ IteratorResult blk a → a #

sum ∷ Num a ⇒ IteratorResult blk a → a #

product ∷ Num a ⇒ IteratorResult blk a → a #

Traversable (IteratorResult blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

Methods

traverse ∷ Applicative f ⇒ (a → f b) → IteratorResult blk a → f (IteratorResult blk b) #

sequenceA ∷ Applicative f ⇒ IteratorResult blk (f a) → f (IteratorResult blk a) #

mapM ∷ Monad m ⇒ (a → m b) → IteratorResult blk a → m (IteratorResult blk b) #

sequence ∷ Monad m ⇒ IteratorResult blk (m a) → m (IteratorResult blk a) #

(Eq blk, Eq b, StandardHash blk) ⇒ Eq (IteratorResult blk b) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

Methods

(==) ∷ IteratorResult blk b → IteratorResult blk b → Bool #

(/=) ∷ IteratorResult blk b → IteratorResult blk b → Bool #

(Show blk, Show b, StandardHash blk) ⇒ Show (IteratorResult blk b) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

Methods

showsPrec ∷ Int → IteratorResult blk b → ShowS #

show ∷ IteratorResult blk b → String #

showList ∷ [IteratorResult blk b] → ShowS #

data IteratorResultGCed blk Source #

Similar to MaybeGCedBlock, but for the block returned by iteratorNext. A garbage-collected block could result in IteratorBlockGCed instead of IteratorResult.

Constructors

IteratorResultGCed 

Fields

Instances

Instances details
(Eq blk, Eq (Header blk), StandardHash blk, HasNestedContent Header blk) ⇒ Eq (IteratorResultGCed blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

(Show blk, Show (Header blk), StandardHash blk, HasNestedContent Header blk) ⇒ Show (IteratorResultGCed blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Responses

newtype Resp blk it flr Source #

Responses are either successful termination or an error.

Constructors

Resp 

Fields

Instances

Instances details
Bifoldable (Resp blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bifold ∷ Monoid m ⇒ Resp blk m m → m #

bifoldMap ∷ Monoid m ⇒ (a → m) → (b → m) → Resp blk a b → m #

bifoldr ∷ (a → c → c) → (b → c → c) → c → Resp blk a b → c #

bifoldl ∷ (c → a → c) → (c → b → c) → c → Resp blk a b → c #

Bifunctor (Resp blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bimap ∷ (a → b) → (c → d) → Resp blk a c → Resp blk b d #

first ∷ (a → b) → Resp blk a c → Resp blk b c #

second ∷ (b → c) → Resp blk a b → Resp blk a c #

Bitraversable (Resp blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bitraverse ∷ Applicative f ⇒ (a → f c) → (b → f d) → Resp blk a b → f (Resp blk c d) #

Functor (Resp blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fmap ∷ (a → b) → Resp blk it a → Resp blk it b #

(<$) ∷ a → Resp blk it b → Resp blk it a #

Foldable (Resp blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fold ∷ Monoid m ⇒ Resp blk it m → m #

foldMap ∷ Monoid m ⇒ (a → m) → Resp blk it a → m #

foldMap' ∷ Monoid m ⇒ (a → m) → Resp blk it a → m #

foldr ∷ (a → b → b) → b → Resp blk it a → b #

foldr' ∷ (a → b → b) → b → Resp blk it a → b #

foldl ∷ (b → a → b) → b → Resp blk it a → b #

foldl' ∷ (b → a → b) → b → Resp blk it a → b #

foldr1 ∷ (a → a → a) → Resp blk it a → a #

foldl1 ∷ (a → a → a) → Resp blk it a → a #

toList ∷ Resp blk it a → [a] #

null ∷ Resp blk it a → Bool #

length ∷ Resp blk it a → Int #

elem ∷ Eq a ⇒ a → Resp blk it a → Bool #

maximum ∷ Ord a ⇒ Resp blk it a → a #

minimum ∷ Ord a ⇒ Resp blk it a → a #

sum ∷ Num a ⇒ Resp blk it a → a #

product ∷ Num a ⇒ Resp blk it a → a #

Traversable (Resp blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

traverse ∷ Applicative f ⇒ (a → f b) → Resp blk it a → f (Resp blk it b) #

sequenceA ∷ Applicative f ⇒ Resp blk it (f a) → f (Resp blk it a) #

mapM ∷ Monad m ⇒ (a → m b) → Resp blk it a → m (Resp blk it b) #

sequence ∷ Monad m ⇒ Resp blk it (m a) → m (Resp blk it a) #

(TestConstraints blk, Eq it, Eq flr) ⇒ Eq (Resp blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

(==) ∷ Resp blk it flr → Resp blk it flr → Bool #

(/=) ∷ Resp blk it flr → Resp blk it flr → Bool #

(TestConstraints blk, Show it, Show flr) ⇒ Show (Resp blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

showsPrec ∷ Int → Resp blk it flr → ShowS #

show ∷ Resp blk it flr → String #

showList ∷ [Resp blk it flr] → ShowS #

(TestConstraints blk, Eq1 r) ⇒ Eq (At Resp blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

(==) ∷ At Resp blk m r → At Resp blk m r → Bool #

(/=) ∷ At Resp blk m r → At Resp blk m r → Bool #

data Success blk it flr Source #

Return type for successful database operations.

Instances

Instances details
Bifoldable (Success blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bifold ∷ Monoid m ⇒ Success blk m m → m #

bifoldMap ∷ Monoid m ⇒ (a → m) → (b → m) → Success blk a b → m #

bifoldr ∷ (a → c → c) → (b → c → c) → c → Success blk a b → c #

bifoldl ∷ (c → a → c) → (c → b → c) → c → Success blk a b → c #

Bifunctor (Success blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bimap ∷ (a → b) → (c → d) → Success blk a c → Success blk b d #

first ∷ (a → b) → Success blk a c → Success blk b c #

second ∷ (b → c) → Success blk a b → Success blk a c #

Bitraversable (Success blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

bitraverse ∷ Applicative f ⇒ (a → f c) → (b → f d) → Success blk a b → f (Success blk c d) #

Functor (Success blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fmap ∷ (a → b) → Success blk it a → Success blk it b #

(<$) ∷ a → Success blk it b → Success blk it a #

Foldable (Success blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

fold ∷ Monoid m ⇒ Success blk it m → m #

foldMap ∷ Monoid m ⇒ (a → m) → Success blk it a → m #

foldMap' ∷ Monoid m ⇒ (a → m) → Success blk it a → m #

foldr ∷ (a → b → b) → b → Success blk it a → b #

foldr' ∷ (a → b → b) → b → Success blk it a → b #

foldl ∷ (b → a → b) → b → Success blk it a → b #

foldl' ∷ (b → a → b) → b → Success blk it a → b #

foldr1 ∷ (a → a → a) → Success blk it a → a #

foldl1 ∷ (a → a → a) → Success blk it a → a #

toList ∷ Success blk it a → [a] #

null ∷ Success blk it a → Bool #

length ∷ Success blk it a → Int #

elem ∷ Eq a ⇒ a → Success blk it a → Bool #

maximum ∷ Ord a ⇒ Success blk it a → a #

minimum ∷ Ord a ⇒ Success blk it a → a #

sum ∷ Num a ⇒ Success blk it a → a #

product ∷ Num a ⇒ Success blk it a → a #

Traversable (Success blk it) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

traverse ∷ Applicative f ⇒ (a → f b) → Success blk it a → f (Success blk it b) #

sequenceA ∷ Applicative f ⇒ Success blk it (f a) → f (Success blk it a) #

mapM ∷ Monad m ⇒ (a → m b) → Success blk it a → m (Success blk it b) #

sequence ∷ Monad m ⇒ Success blk it (m a) → m (Success blk it a) #

(TestConstraints blk, Eq it, Eq flr) ⇒ Eq (Success blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

(==) ∷ Success blk it flr → Success blk it flr → Bool #

(/=) ∷ Success blk it flr → Success blk it flr → Bool #

(TestConstraints blk, Show it, Show flr) ⇒ Show (Success blk it flr) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

showsPrec ∷ Int → Success blk it flr → ShowS #

show ∷ Success blk it flr → String #

showList ∷ [Success blk it flr] → ShowS #

Model

data Model blk (m ∷ Type → Type) (r ∷ Type → Type) Source #

Execution model

Instances

Instances details
Generic (Model blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Associated Types

type Rep (Model blk m r) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Rep (Model blk m r)

Methods

from ∷ Model blk m r → Rep (Model blk m r) x #

to ∷ Rep (Model blk m r) x → Model blk m r #

(TestConstraints blk, Show1 r) ⇒ Show (Model blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

showsPrec ∷ Int → Model blk m r → ShowS #

show ∷ Model blk m r → String #

showList ∷ [Model blk m r] → ShowS #

(ToExpr blk, ToExpr (HeaderHash blk), ToExpr (ChainDepState (BlockProtocol blk)), ToExpr (TipInfo blk), ToExpr (LedgerState blk EmptyMK), ToExpr (ExtValidationError blk), ToExpr (PerasVotingCommittee blk), StandardHash blk, Show blk, Show (PerasVote blk), Show (PerasCert blk), Show (PerasVotingCommittee blk)) ⇒ ToExpr (Model blk IO Concrete) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

toExpr ∷ Model blk IO Concrete → Expr Source #

listToExpr ∷ [Model blk IO Concrete] → Expr Source #

type Rep (Model blk m r) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Rep (Model blk m r)

Running the model

type DBModel blk = Model blk Source #

System under test

data ChainDBEnv (m ∷ Type → Type) blk Source #

Environment to run commands against the real ChainDB implementation.

Constructors

ChainDBEnv 

Fields

data ChainDBState (m ∷ Type → Type) blk Source #

The current ChainDB instance and things related to it.

When closing and reopening the ChainDB, this record will be replaced in the varDB field of ChainDBEnv with a new one.

Constructors

ChainDBState 

Fields

Instances

Instances details
NoThunks (ChainDBState m blk) Source # 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type TestFollower (m ∷ Type → Type) blk = WithEq (Follower m blk (AllComponents blk)) Source #

Short-hand

type TestIterator (m ∷ Type → Type) blk = WithEq (Iterator m blk (AllComponents blk)) Source #

Short-hand

close ∷ IOLike m ⇒ ChainDBState m blk → m () Source #

open ∷ (IOLike m, TestConstraints blk) ⇒ ChainDbArgs Identity m blk → m (ChainDBState m blk) Source #

reopen ∷ (IOLike m, TestConstraints blk) ⇒ ChainDBEnv m blk → m () Source #

run ∷ (IOLike m, TestConstraints blk) ⇒ TopLevelConfig blk → ChainDBEnv m blk → Cmd blk (TestIterator m blk) (TestFollower m blk) → m (Success blk (TestIterator m blk) (TestFollower m blk)) Source #

Specifying block components

type AllComponents blk = (blk, blk, Header blk, ByteString, ByteString, HeaderHash blk, SlotNo, IsEBB, SizeInBytes, Word16, SomeSecond (NestedCtxt Header) blk) Source #

A list of all the BlockComponent indices (b) we are interested in.

allComponents ∷ BlockComponent blk (AllComponents blk) Source #

Product of all BlockComponents. As this is a GADT, generating random values of it (and combinations!) is not so simple. Therefore, we just always request all block components.

Constraints

Tracing

Entry point to the tests

Orphan instances

ModelSupportsBlock TestBlock Source # 
Instance details

Generic (TraceAddBlockEvent blk) Source # 
Instance details

Associated Types

type Code (TraceAddBlockEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Generic (TraceAddPerasCertEvent blk) Source # 
Instance details

Generic (TraceChainSelStarvationEvent blk) Source # 
Instance details

Generic (TraceCopyToImmutableDBEvent blk) Source # 
Instance details

Generic (TraceEvent blk) Source # 
Instance details

Associated Types

type Code (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceEvent blk) = GCode (TraceEvent blk)

Methods

from ∷ TraceEvent blk → Rep (TraceEvent blk) Source #

to ∷ Rep (TraceEvent blk) → TraceEvent blk Source #

Generic (TraceFollowerEvent blk) Source # 
Instance details

Associated Types

type Code (TraceFollowerEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Generic (TraceGCEvent blk) Source # 
Instance details

Associated Types

type Code (TraceGCEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceGCEvent blk) = GCode (TraceGCEvent blk)

Methods

from ∷ TraceGCEvent blk → Rep (TraceGCEvent blk) Source #

to ∷ Rep (TraceGCEvent blk) → TraceGCEvent blk Source #

Generic (TraceInitChainSelEvent blk) Source # 
Instance details

Generic (TraceIteratorEvent blk) Source # 
Instance details

Associated Types

type Code (TraceIteratorEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Generic (TraceOpenEvent blk) Source # 
Instance details

Associated Types

type Code (TraceOpenEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Generic (TraceValidationEvent blk) Source # 
Instance details

Associated Types

type Code (TraceValidationEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Generic (TraceEvent blk) Source # 
Instance details

Associated Types

type Code (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceEvent blk) = GCode (TraceEvent blk)

Methods

from ∷ TraceEvent blk → Rep (TraceEvent blk) Source #

to ∷ Rep (TraceEvent blk) → TraceEvent blk Source #

Generic (TraceEvent blk) Source # 
Instance details

Associated Types

type Code (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceEvent blk) = GCode (TraceEvent blk)

Methods

from ∷ TraceEvent blk → Rep (TraceEvent blk) Source #

to ∷ Rep (TraceEvent blk) → TraceEvent blk Source #

Generic (TraceEvent blk) Source # 
Instance details

Associated Types

type Code (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceEvent blk) = GCode (TraceEvent blk)

Methods

from ∷ TraceEvent blk → Rep (TraceEvent blk) Source #

to ∷ Rep (TraceEvent blk) → TraceEvent blk Source #

Generic (TraceEvent blk) Source # 
Instance details

Associated Types

type Code (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceEvent blk) = GCode (TraceEvent blk)

Methods

from ∷ TraceEvent blk → Rep (TraceEvent blk) Source #

to ∷ Rep (TraceEvent blk) → TraceEvent blk Source #

Generic (TraceEvent blk) Source # 
Instance details

Associated Types

type Code (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

type Code (TraceEvent blk) = GCode (TraceEvent blk)

Methods

from ∷ TraceEvent blk → Rep (TraceEvent blk) Source #

to ∷ Rep (TraceEvent blk) → TraceEvent blk Source #

HasDatatypeInfo (TraceAddBlockEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceAddPerasCertEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceChainSelStarvationEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceCopyToImmutableDBEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceEvent blk) Source # 
Instance details

Associated Types

type DatatypeInfoOf (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

datatypeInfo ∷ proxy (TraceEvent blk) → DatatypeInfo (Code (TraceEvent blk)) Source #

HasDatatypeInfo (TraceFollowerEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceGCEvent blk) Source # 
Instance details

Methods

datatypeInfo ∷ proxy (TraceGCEvent blk) → DatatypeInfo (Code (TraceGCEvent blk)) Source #

HasDatatypeInfo (TraceInitChainSelEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceIteratorEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceOpenEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceValidationEvent blk) Source # 
Instance details

HasDatatypeInfo (TraceEvent blk) Source # 
Instance details

Associated Types

type DatatypeInfoOf (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

datatypeInfo ∷ proxy (TraceEvent blk) → DatatypeInfo (Code (TraceEvent blk)) Source #

HasDatatypeInfo (TraceEvent blk) Source # 
Instance details

Associated Types

type DatatypeInfoOf (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

datatypeInfo ∷ proxy (TraceEvent blk) → DatatypeInfo (Code (TraceEvent blk)) Source #

HasDatatypeInfo (TraceEvent blk) Source # 
Instance details

Associated Types

type DatatypeInfoOf (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

datatypeInfo ∷ proxy (TraceEvent blk) → DatatypeInfo (Code (TraceEvent blk)) Source #

HasDatatypeInfo (TraceEvent blk) Source # 
Instance details

Associated Types

type DatatypeInfoOf (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

datatypeInfo ∷ proxy (TraceEvent blk) → DatatypeInfo (Code (TraceEvent blk)) Source #

HasDatatypeInfo (TraceEvent blk) Source # 
Instance details

Associated Types

type DatatypeInfoOf (TraceEvent blk) 
Instance details

Defined in Test.Ouroboros.Storage.ChainDB.StateMachine

Methods

datatypeInfo ∷ proxy (TraceEvent blk) → DatatypeInfo (Code (TraceEvent blk)) Source #