Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BlockOrEBB
- data WithBlockSize a = WithBlockSize {
- blockSize ∷ !Word32
- withoutBlockSize ∷ !a
- isBlockOrEBB ∷ BlockOrEBB → IsEBB
- data ValidationPolicy
- data ChunkFileError blk
- = ChunkErrRead ReadIncrementalErr
- | ChunkErrHashMismatch (HeaderHash blk) (ChainHash blk)
- | ChunkErrCorrupt (Point blk)
- data TraceCacheEvent
- data TraceChunkValidation blk validateTo
- = StartedValidatingChunk ChunkNo validateTo
- | ValidatedChunk ChunkNo validateTo
- | MissingChunkFile ChunkNo
- | InvalidChunkFile ChunkNo (ChunkFileError blk)
- | MissingPrimaryIndex ChunkNo
- | MissingSecondaryIndex ChunkNo
- | InvalidPrimaryIndex ChunkNo
- | InvalidSecondaryIndex ChunkNo
- | RewritePrimaryIndex ChunkNo
- | RewriteSecondaryIndex ChunkNo
- data TraceEvent blk
- = NoValidLastLocation
- | ValidatedLastLocation ChunkNo (Tip blk)
- | ChunkValidationEvent (TraceChunkValidation blk ChunkNo)
- | ChunkFileDoesntFit (ChainHash blk) (ChainHash blk)
- | Migrating Text
- | DeletingAfter (WithOrigin (Tip blk))
- | DBAlreadyClosed
- | DBClosed
- | TraceCacheEvent !TraceCacheEvent
Misc types
data BlockOrEBB Source #
Instances
Generic BlockOrEBB Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types type Rep BlockOrEBB ∷ Type → Type # from ∷ BlockOrEBB → Rep BlockOrEBB x # to ∷ Rep BlockOrEBB x → BlockOrEBB # | |
Show BlockOrEBB Source # | |
Eq BlockOrEBB Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types (==) ∷ BlockOrEBB → BlockOrEBB → Bool # (/=) ∷ BlockOrEBB → BlockOrEBB → Bool # | |
NoThunks BlockOrEBB Source # | |
type Rep BlockOrEBB Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types type Rep BlockOrEBB = D1 ('MetaData "BlockOrEBB" "Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "Block" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo)) :+: C1 ('MetaCons "EBB" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))) |
data WithBlockSize a Source #
WithBlockSize | |
|
Instances
Validation policy
data ValidationPolicy Source #
The validation policy used when opening an
ImmutableDB
.
The validation policy is used by
openDB
: the initial opening of
the database, either an empty database or a database that was previously
closed.
The recovery policy dictates which on-disk files should be validated.
ValidateMostRecentChunk | The chunk and index files of the most recent chunk stored on disk will be validated. Prior chunk and index files are ignored, even their presence will not be checked. A Because not all files are validated, subsequent operations on the database after opening may result in unexpected errors. |
ValidateAllChunks | The chunk and index files of all chunks starting from the first one up to the last chunk stored on disk will be validated. A |
Instances
Generic ValidationPolicy Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types type Rep ValidationPolicy ∷ Type → Type # from ∷ ValidationPolicy → Rep ValidationPolicy x # to ∷ Rep ValidationPolicy x → ValidationPolicy # | |
Show ValidationPolicy Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types showsPrec ∷ Int → ValidationPolicy → ShowS # show ∷ ValidationPolicy → String # showList ∷ [ValidationPolicy] → ShowS # | |
Eq ValidationPolicy Source # | |
type Rep ValidationPolicy Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types type Rep ValidationPolicy = D1 ('MetaData "ValidationPolicy" "Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "ValidateMostRecentChunk" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "ValidateAllChunks" 'PrefixI 'False) (U1 ∷ Type → Type)) |
Chunk file error
data ChunkFileError blk Source #
Defined here instead of in the Parser
module because TraceEvent
depends on it.
ChunkErrRead ReadIncrementalErr | A block could not be decoded |
ChunkErrHashMismatch | The previous hash of a block did not match the hash of the previous block. |
| |
ChunkErrCorrupt (Point blk) | The integrity verification of the block with the given point returned
|
Instances
StandardHash blk ⇒ Show (ChunkFileError blk) Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types showsPrec ∷ Int → ChunkFileError blk → ShowS # show ∷ ChunkFileError blk → String # showList ∷ [ChunkFileError blk] → ShowS # | |
StandardHash blk ⇒ Eq (ChunkFileError blk) Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types (==) ∷ ChunkFileError blk → ChunkFileError blk → Bool # (/=) ∷ ChunkFileError blk → ChunkFileError blk → Bool # |
Tracing
data TraceCacheEvent Source #
The argument with type Word32
is the number of past chunk currently in
the cache.
TraceCurrentChunkHit ChunkNo Word32 | |
TracePastChunkHit ChunkNo Word32 | |
TracePastChunkMiss ChunkNo Word32 | |
TracePastChunkEvict ChunkNo Word32 | The least recently used past chunk was evicted because the cache was full. |
TracePastChunksExpired [ChunkNo] Word32 | Past chunks were expired from the cache because they haven't been used for a while. |
Instances
data TraceChunkValidation blk validateTo Source #
Instances
data TraceEvent blk Source #
NoValidLastLocation | |
ValidatedLastLocation ChunkNo (Tip blk) | |
ChunkValidationEvent (TraceChunkValidation blk ChunkNo) | |
ChunkFileDoesntFit (ChainHash blk) (ChainHash blk) | The hash of the last block in the previous epoch doesn't match the previous hash of the first block in the current epoch |
Migrating Text | Performing a migration of the on-disk files |
DeletingAfter (WithOrigin (Tip blk)) | |
DBAlreadyClosed | |
DBClosed | |
TraceCacheEvent !TraceCacheEvent |