Safe Haskell | None |
---|---|
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
data WithBlockSize a Source #
WithBlockSize | |
|
Instances
isBlockOrEBB :: BlockOrEBB -> IsEBB Source #
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
Eq ValidationPolicy Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types (==) :: ValidationPolicy -> ValidationPolicy -> Bool Source # (/=) :: ValidationPolicy -> ValidationPolicy -> Bool Source # |
|
Show ValidationPolicy Source # | |
Generic ValidationPolicy Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types from :: ValidationPolicy -> Rep ValidationPolicy x Source # to :: Rep ValidationPolicy x -> 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.1.0.1-DT4Cvwf63DZKctsEvaJqCU" '
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 => Eq ( ChunkFileError blk) Source # | |
Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types (==) :: ChunkFileError blk -> ChunkFileError blk -> Bool Source # (/=) :: ChunkFileError blk -> ChunkFileError blk -> Bool Source # |
|
StandardHash blk => Show ( ChunkFileError blk) Source # | |
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 |