ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Storage.ChainDB.Impl

Synopsis

Initialization

defaultArgs :: forall m blk. Monad m => ( RelativeMountPoint -> SomeHasFS m) -> DiskPolicy -> ChainDbArgs Defaults m blk Source #

Default arguments

See defaultArgs , defaultArgs , defaultArgs , and defaultSpecificArgs for a list of which fields are not given a default and must therefore be set explicitly.

Trace types

data TraceReplayEvent blk Source #

Events traced while replaying blocks against the ledger to bring it up to date w.r.t. the tip of the ImmutableDB during initialisation. As this process takes a while, we trace events to inform higher layers of our progress.

Instances

Instances details
( StandardHash blk, InspectLedger blk) => Eq ( TraceReplayEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.OnDisk

( StandardHash blk, InspectLedger blk) => Show ( TraceReplayEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.OnDisk

Generic ( TraceReplayEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.OnDisk

type Rep ( TraceReplayEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.OnDisk

type Rep ( TraceReplayEvent blk) = D1 (' MetaData "TraceReplayEvent" "Ouroboros.Consensus.Storage.LedgerDB.OnDisk" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ( C1 (' MetaCons "ReplayFromGenesis" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ReplayGoal blk))) :+: ( C1 (' MetaCons "ReplayFromSnapshot" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 DiskSnapshot ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ReplayStart blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ReplayGoal blk)))) :+: C1 (' MetaCons "ReplayedBlock" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ LedgerEvent blk])) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ReplayStart blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ReplayGoal blk))))))

data NewTipInfo blk Source #

Information about the new tip of the current chain.

NOTE: the fields of this record are intentionally lazy to prevent the forcing of this information in case it doesn't have to be traced. However, this means that the tracer processing this message must not hold on to it, otherwise it leaks memory.

Constructors

NewTipInfo

Fields

  • newTipPoint :: RealPoint blk

    The new tip of the current chain.

  • newTipEpoch :: EpochNo

    The epoch of the new tip.

  • newTipSlotInEpoch :: Word64

    The slot in the epoch, i.e., the relative slot number, of the new tip.

  • newTipTrigger :: RealPoint blk

    The new tip of the current chain ( newTipPoint ) is the result of performing chain selection for a trigger block ( newTipTrigger ). In most cases, we add a new block to the tip of the current chain, in which case the new tip is the trigger block.

    However, this is not always the case. For example, with our current chain being A and having a disconnected C lying around, adding B will result in A -> B -> C as the new chain. The trigger B /= the new tip C.

Instances

Instances details
StandardHash blk => Eq ( NewTipInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

StandardHash blk => Show ( NewTipInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( NewTipInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Associated Types

type Rep ( NewTipInfo blk) :: Type -> Type Source #

type Rep ( NewTipInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

data TraceAddBlockEvent blk Source #

Trace type for the various events that occur when adding a block.

Constructors

IgnoreBlockOlderThanK ( RealPoint blk)

A block with a BlockNo more than k back than the current tip was ignored.

IgnoreBlockAlreadyInVolatileDB ( RealPoint blk)

A block that is already in the Volatile DB was ignored.

IgnoreInvalidBlock ( RealPoint blk) ( InvalidBlockReason blk)

A block that is know to be invalid was ignored.

AddedBlockToQueue ( RealPoint blk) ( Enclosing' Word )

The block was added to the queue and will be added to the ChainDB by the background thread. The size of the queue is included.

PoppedBlockFromQueue ( Enclosing' ( RealPoint blk))

The block popped from the queue and will imminently be added to the ChainDB.

BlockInTheFuture ( RealPoint blk) SlotNo

The block is from the future, i.e., its slot number is greater than the current slot (the second argument).

AddedBlockToVolatileDB ( RealPoint blk) BlockNo IsEBB Enclosing

A block was added to the Volatile DB

TryAddToCurrentChain ( RealPoint blk)

The block fits onto the current chain, we'll try to use it to extend our chain.

TrySwitchToAFork ( RealPoint blk) ( ChainDiff ( HeaderFields blk))

The block fits onto some fork, we'll try to switch to that fork (if it is preferable to our chain).

StoreButDontChange ( RealPoint blk)

The block doesn't fit onto any other block, so we store it and ignore it.

AddedToCurrentChain [ LedgerEvent blk] ( NewTipInfo blk) ( AnchoredFragment ( Header blk)) ( AnchoredFragment ( Header blk))

The new block fits onto the current chain (first fragment) and we have successfully used it to extend our (new) current chain (second fragment).

SwitchedToAFork [ LedgerEvent blk] ( NewTipInfo blk) ( AnchoredFragment ( Header blk)) ( AnchoredFragment ( Header blk))

The new block fits onto some fork and we have switched to that fork (second fragment), as it is preferable to our (previous) current chain (first fragment).

AddBlockValidation ( TraceValidationEvent blk)

An event traced during validating performed while adding a block.

ChainSelectionForFutureBlock ( RealPoint blk)

Run chain selection for a block that was previously from the future. This is done for all blocks from the future each time a new block is added.

PipeliningEvent ( TracePipeliningEvent blk)

The tentative header (in the context of diffusion pipelining) has been updated.

ChangingSelection ( Point blk)

Herald of AddedToCurrentChain or SwitchedToAFork . Lists the tip of the new chain.

Instances

Instances details
( HasHeader blk, Eq ( Header blk), LedgerSupportsProtocol blk, InspectLedger blk) => Eq ( TraceAddBlockEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( HasHeader blk, Show ( Header blk), LedgerSupportsProtocol blk, InspectLedger blk) => Show ( TraceAddBlockEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceAddBlockEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceAddBlockEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceAddBlockEvent blk) = D1 (' MetaData "TraceAddBlockEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) (((( C1 (' MetaCons "IgnoreBlockOlderThanK" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk))) :+: C1 (' MetaCons "IgnoreBlockAlreadyInVolatileDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)))) :+: ( C1 (' MetaCons "IgnoreInvalidBlock" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( InvalidBlockReason blk))) :+: C1 (' MetaCons "AddedBlockToQueue" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Enclosing' Word ))))) :+: (( C1 (' MetaCons "PoppedBlockFromQueue" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Enclosing' ( RealPoint blk)))) :+: C1 (' MetaCons "BlockInTheFuture" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SlotNo ))) :+: ( C1 (' MetaCons "AddedBlockToVolatileDB" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 BlockNo )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 IsEBB ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Enclosing ))) :+: C1 (' MetaCons "TryAddToCurrentChain" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)))))) :+: ((( C1 (' MetaCons "TrySwitchToAFork" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ChainDiff ( HeaderFields blk)))) :+: C1 (' MetaCons "StoreButDontChange" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)))) :+: ( C1 (' MetaCons "AddedToCurrentChain" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ LedgerEvent blk]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( NewTipInfo blk))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))))) :+: C1 (' MetaCons "SwitchedToAFork" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ LedgerEvent blk]) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( NewTipInfo blk))) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))))))) :+: (( C1 (' MetaCons "AddBlockValidation" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceValidationEvent blk))) :+: C1 (' MetaCons "ChainSelectionForFutureBlock" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)))) :+: ( C1 (' MetaCons "PipeliningEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TracePipeliningEvent blk))) :+: C1 (' MetaCons "ChangingSelection" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk)))))))

data TraceCopyToImmutableDBEvent blk Source #

Constructors

CopiedBlockToImmutableDB ( Point blk)

A block was successfully copied to the ImmutableDB.

NoBlocksToCopyToImmutableDB

There are no block to copy to the ImmutableDB.

Instances

Instances details
StandardHash blk => Eq ( TraceCopyToImmutableDBEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

StandardHash blk => Show ( TraceCopyToImmutableDBEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceCopyToImmutableDBEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceCopyToImmutableDBEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceCopyToImmutableDBEvent blk) = D1 (' MetaData "TraceCopyToImmutableDBEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ( C1 (' MetaCons "CopiedBlockToImmutableDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk))) :+: C1 (' MetaCons "NoBlocksToCopyToImmutableDB" ' PrefixI ' False ) ( U1 :: Type -> Type ))

data TraceEvent blk Source #

Trace type for the various events of the ChainDB.

Instances

Instances details
( HasHeader blk, Eq ( Header blk), LedgerSupportsProtocol blk, InspectLedger blk) => Eq ( TraceEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( HasHeader blk, Show ( Header blk), LedgerSupportsProtocol blk, InspectLedger blk) => Show ( TraceEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Associated Types

type Rep ( TraceEvent blk) :: Type -> Type Source #

type Rep ( TraceEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceEvent blk) = D1 (' MetaData "TraceEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ((( C1 (' MetaCons "TraceAddBlockEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceAddBlockEvent blk))) :+: C1 (' MetaCons "TraceFollowerEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceFollowerEvent blk)))) :+: ( C1 (' MetaCons "TraceCopyToImmutableDBEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceCopyToImmutableDBEvent blk))) :+: ( C1 (' MetaCons "TraceGCEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceGCEvent blk))) :+: C1 (' MetaCons "TraceInitChainSelEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceInitChainSelEvent blk)))))) :+: (( C1 (' MetaCons "TraceOpenEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceOpenEvent blk))) :+: ( C1 (' MetaCons "TraceIteratorEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceIteratorEvent blk))) :+: C1 (' MetaCons "TraceLedgerEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceEvent blk))))) :+: ( C1 (' MetaCons "TraceLedgerReplayEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceReplayEvent blk))) :+: ( C1 (' MetaCons "TraceImmutableDBEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceEvent blk))) :+: C1 (' MetaCons "TraceVolatileDBEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceEvent blk)))))))

data TraceFollowerEvent blk Source #

Constructors

NewFollower

A new follower was created.

FollowerNoLongerInMem ( FollowerRollState blk)

The follower was in the FollowerInMem state but its point is no longer on the in-memory chain fragment, so it has to switch to the FollowerInImmutableDB state.

FollowerSwitchToMem

The follower was in the FollowerInImmutableDB state and is switched to the FollowerInMem state.

Fields

FollowerNewImmIterator

The follower is in the FollowerInImmutableDB state but the iterator is exhausted while the ImmutableDB has grown, so we open a new iterator to stream these blocks too.

Fields

Instances

Instances details
StandardHash blk => Eq ( TraceFollowerEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

StandardHash blk => Show ( TraceFollowerEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceFollowerEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceFollowerEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

data TraceGCEvent blk Source #

Constructors

ScheduledGC SlotNo Time

A garbage collection for the given SlotNo was scheduled to happen at the given time.

PerformedGC SlotNo

A garbage collection for the given SlotNo was performed.

Instances

Instances details
Eq ( TraceGCEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Show ( TraceGCEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceGCEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Associated Types

type Rep ( TraceGCEvent blk) :: Type -> Type Source #

type Rep ( TraceGCEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

data TraceInitChainSelEvent blk Source #

Constructors

StartedInitChainSelection

An event traced when inital chain selection has started during the initialization of ChainDB

InitalChainSelected

An event traced when inital chain has been selected

InitChainSelValidation ( TraceValidationEvent blk)

An event traced during validation performed while performing initial chain selection.

Instances

Instances details
( HasHeader blk, Eq ( Header blk), LedgerSupportsProtocol blk) => Eq ( TraceInitChainSelEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( Show ( Header blk), LedgerSupportsProtocol blk) => Show ( TraceInitChainSelEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceInitChainSelEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceInitChainSelEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceInitChainSelEvent blk) = D1 (' MetaData "TraceInitChainSelEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ( C1 (' MetaCons "StartedInitChainSelection" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "InitalChainSelected" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "InitChainSelValidation" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( TraceValidationEvent blk)))))

data TraceIteratorEvent blk Source #

Constructors

UnknownRangeRequested ( UnknownRange blk)

An unknown range was requested, see UnknownRange .

StreamFromVolatileDB ( StreamFrom blk) ( StreamTo blk) [ RealPoint blk]

Stream only from the VolatileDB.

StreamFromImmutableDB ( StreamFrom blk) ( StreamTo blk)

Stream only from the ImmutableDB.

StreamFromBoth ( StreamFrom blk) ( StreamTo blk) [ RealPoint blk]

Stream from both the VolatileDB and the ImmutableDB.

BlockMissingFromVolatileDB ( RealPoint blk)

A block is no longer in the VolatileDB because it has been garbage collected. It might now be in the ImmutableDB if it was part of the current chain.

BlockWasCopiedToImmutableDB ( RealPoint blk)

A block that has been garbage collected from the VolatileDB is now found and streamed from the ImmutableDB.

BlockGCedFromVolatileDB ( RealPoint blk)

A block is no longer in the VolatileDB and isn't in the ImmutableDB either; it wasn't part of the current chain.

SwitchBackToVolatileDB

We have streamed one or more blocks from the ImmutableDB that were part of the VolatileDB when initialising the iterator. Now, we have to look back in the VolatileDB again because the ImmutableDB doesn't have the next block we're looking for.

Instances

Instances details
StandardHash blk => Eq ( TraceIteratorEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

StandardHash blk => Show ( TraceIteratorEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceIteratorEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceIteratorEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceIteratorEvent blk) = D1 (' MetaData "TraceIteratorEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ((( C1 (' MetaCons "UnknownRangeRequested" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( UnknownRange blk))) :+: C1 (' MetaCons "StreamFromVolatileDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( StreamFrom blk)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( StreamTo blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ RealPoint blk])))) :+: ( C1 (' MetaCons "StreamFromImmutableDB" ' 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 "StreamFromBoth" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( StreamFrom blk)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( StreamTo blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ RealPoint blk]))))) :+: (( C1 (' MetaCons "BlockMissingFromVolatileDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk))) :+: C1 (' MetaCons "BlockWasCopiedToImmutableDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk)))) :+: ( C1 (' MetaCons "BlockGCedFromVolatileDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk))) :+: C1 (' MetaCons "SwitchBackToVolatileDB" ' PrefixI ' False ) ( U1 :: Type -> Type ))))

data TraceOpenEvent blk Source #

Constructors

StartedOpeningDB

The ChainDB started the process of opening.

OpenedDB

The ChainDB was opened.

Fields

ClosedDB

The ChainDB was closed.

Fields

StartedOpeningImmutableDB

The ImmutableDB started the process of opening.

OpenedImmutableDB

The ImmutableDB was opened.

Fields

StartedOpeningVolatileDB

The VolatileDB started opening.

OpenedVolatileDB

The VolatileDB was opened.

StartedOpeningLgrDB

The LedgerDB started opening.

OpenedLgrDB

The LedgerDB was opened.

Instances

Instances details
StandardHash blk => Eq ( TraceOpenEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

StandardHash blk => Show ( TraceOpenEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceOpenEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Associated Types

type Rep ( TraceOpenEvent blk) :: Type -> Type Source #

type Rep ( TraceOpenEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceOpenEvent blk) = D1 (' MetaData "TraceOpenEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) ((( C1 (' MetaCons "StartedOpeningDB" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "OpenedDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk)))) :+: ( C1 (' MetaCons "ClosedDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk))) :+: C1 (' MetaCons "StartedOpeningImmutableDB" ' PrefixI ' False ) ( U1 :: Type -> Type ))) :+: (( C1 (' MetaCons "OpenedImmutableDB" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Point blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ChunkNo )) :+: C1 (' MetaCons "StartedOpeningVolatileDB" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "OpenedVolatileDB" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "StartedOpeningLgrDB" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "OpenedLgrDB" ' PrefixI ' False ) ( U1 :: Type -> Type )))))

data TraceValidationEvent blk Source #

Constructors

InvalidBlock ( ExtValidationError blk) ( RealPoint blk)

A point was found to be invalid.

ValidCandidate ( AnchoredFragment ( Header blk))

A candidate chain was valid.

CandidateContainsFutureBlocks

Candidate contains headers from the future which do no exceed the clock skew.

Fields

CandidateContainsFutureBlocksExceedingClockSkew

Candidate contains headers from the future which exceed the clock skew, making them invalid.

Fields

UpdateLedgerDbTraceEvent ( UpdateLedgerDbTraceEvent blk)

Instances

Instances details
( HasHeader blk, Eq ( Header blk), LedgerSupportsProtocol blk) => Eq ( TraceValidationEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( Show ( Header blk), LedgerSupportsProtocol blk) => Show ( TraceValidationEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

Generic ( TraceValidationEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceValidationEvent blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

type Rep ( TraceValidationEvent blk) = D1 (' MetaData "TraceValidationEvent" "Ouroboros.Consensus.Storage.ChainDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' False ) (( C1 (' MetaCons "InvalidBlock" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( ExtValidationError blk)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( RealPoint blk))) :+: C1 (' MetaCons "ValidCandidate" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))))) :+: ( C1 (' MetaCons "CandidateContainsFutureBlocks" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Header blk])) :+: ( C1 (' MetaCons "CandidateContainsFutureBlocksExceedingClockSkew" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( AnchoredFragment ( Header blk))) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ Header blk])) :+: C1 (' MetaCons "UpdateLedgerDbTraceEvent" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( UpdateLedgerDbTraceEvent blk))))))

Re-exported for convenience

newtype RelativeMountPoint Source #

A relative path for a MountPoint

The root is determined by context.

Internals for testing purposes

data Internal m blk Source #

Constructors

Internal

Fields