| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types
Synopsis
- data BlockOrEBB
- isBlockOrEBB :: BlockOrEBB -> IsEBB
- data WithBlockSize a = WithBlockSize {
- blockSize :: !Word32
- withoutBlockSize :: !a
- data ValidationPolicy
- data ChunkFileError blk
- = ChunkErrRead ReadIncrementalErr
- | ChunkErrHashMismatch (HeaderHash blk) (ChainHash blk)
- | ChunkErrCorrupt (Point blk)
- data TraceEvent blk
- = NoValidLastLocation
- | ValidatedLastLocation ChunkNo (Tip blk)
- | ValidatingChunk ChunkNo
- | MissingChunkFile ChunkNo
- | InvalidChunkFile ChunkNo (ChunkFileError blk)
- | ChunkFileDoesntFit (ChainHash blk) (ChainHash blk)
- | MissingPrimaryIndex ChunkNo
- | MissingSecondaryIndex ChunkNo
- | InvalidPrimaryIndex ChunkNo
- | InvalidSecondaryIndex ChunkNo
- | RewritePrimaryIndex ChunkNo
- | RewriteSecondaryIndex ChunkNo
- | Migrating Text
- | DeletingAfter (WithOrigin (Tip blk))
- | DBAlreadyClosed
- | DBClosed
- | TraceCacheEvent !TraceCacheEvent
- data TraceCacheEvent
Misc types
data BlockOrEBB Source #
Instances
| Eq BlockOrEBB Source # | |
| Show BlockOrEBB Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types Methods showsPrec :: Int -> BlockOrEBB -> ShowS # show :: BlockOrEBB -> String # showList :: [BlockOrEBB] -> ShowS # | |
| Generic BlockOrEBB Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types Associated Types type Rep BlockOrEBB :: Type -> Type # | |
| 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.1.0.0-GfJNvFcM6lj2s5utKAUPEp" '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))) | |
isBlockOrEBB :: BlockOrEBB -> IsEBB Source #
data WithBlockSize a Source #
Constructors
| WithBlockSize | |
Fields
| |
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.
Constructors
| 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
Chunk file error
data ChunkFileError blk Source #
Defined here instead of in the Parser module because TraceEvent
depends on it.
Constructors
| ChunkErrRead ReadIncrementalErr | A block could not be decoded |
| ChunkErrHashMismatch | The previous hash of a block did not match the hash of the previous block. |
Fields
| |
| ChunkErrCorrupt (Point blk) | The integrity verification of the block with the given point returned
|
Instances
| StandardHash blk => Eq (ChunkFileError blk) Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types Methods (==) :: ChunkFileError blk -> ChunkFileError blk -> Bool # (/=) :: ChunkFileError blk -> ChunkFileError blk -> Bool # | |
| StandardHash blk => Show (ChunkFileError blk) Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types Methods showsPrec :: Int -> ChunkFileError blk -> ShowS # show :: ChunkFileError blk -> String # showList :: [ChunkFileError blk] -> ShowS # | |
Tracing
data TraceEvent blk Source #
Constructors
| NoValidLastLocation | |
| ValidatedLastLocation ChunkNo (Tip blk) | |
| ValidatingChunk ChunkNo | |
| MissingChunkFile ChunkNo | |
| InvalidChunkFile ChunkNo (ChunkFileError blk) | |
| 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 |
| MissingPrimaryIndex ChunkNo | |
| MissingSecondaryIndex ChunkNo | |
| InvalidPrimaryIndex ChunkNo | |
| InvalidSecondaryIndex ChunkNo | |
| RewritePrimaryIndex ChunkNo | |
| RewriteSecondaryIndex ChunkNo | |
| Migrating Text | Performing a migration of the on-disk files |
| DeletingAfter (WithOrigin (Tip blk)) | |
| DBAlreadyClosed | |
| DBClosed | |
| TraceCacheEvent !TraceCacheEvent |
Instances
data TraceCacheEvent Source #
The argument with type Word32 is the number of past chunk currently in
the cache.
Constructors
| 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. |