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

Ouroboros.Consensus.Storage.VolatileDB.Impl.Types

Synopsis

Blocks per file

mkBlocksPerFile :: Word32 -> BlocksPerFile Source #

Create a BlocksPerFile .

PRECONDITION: the given number must be greater than 0, if not, this function will throw an error .

opaque

Block validation policy

data BlockValidationPolicy Source #

When block validation is enabled, the parser checks for each block a number of properties and stops parsing if it finds any invalid blocks.

Parse error

data ParseError blk Source #

Note that we recover from the error, and thus never throw it as an Exception .

Defined here instead of in the Parser module because TraceEvent depends on it.

Constructors

BlockReadErr ReadIncrementalErr

A block could not be parsed.

BlockCorruptedErr ( HeaderHash blk)

A block was corrupted, e.g., checking its signature and/or hash failed.

DuplicatedBlock ( HeaderHash blk) FsPath FsPath

A block with the same hash occurred twice in the VolatileDB files.

We include the file in which it occurred first and the file in which it occured the second time. The two files can be the same.

Tracing

data TraceEvent blk Source #

Instances

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

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

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

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

Generic ( TraceEvent blk) Source #
Instance details

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

Associated Types

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

type Rep ( TraceEvent blk) Source #
Instance details

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

Internal indices

newtype BlockOffset Source #

The offset at which a block is stored in a file.

Instances

Instances details
Eq BlockOffset Source #
Instance details

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

Show BlockOffset Source #
Instance details

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

Generic BlockOffset Source #
Instance details

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

NoThunks BlockOffset Source #
Instance details

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

type Rep BlockOffset Source #
Instance details

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

type Rep BlockOffset = D1 (' MetaData "BlockOffset" "Ouroboros.Consensus.Storage.VolatileDB.Impl.Types" "ouroboros-consensus-0.1.0.1-DT4Cvwf63DZKctsEvaJqCU" ' True ) ( C1 (' MetaCons "BlockOffset" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unBlockOffset") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

newtype BlockSize Source #

type FileId = Int Source #

The FileId is the unique identifier of each file found in the db. For example, the file blocks-42.dat has FileId 42 .

data InternalBlockInfo blk Source #

The internal information the db keeps for each block.

Instances

Instances details
Generic ( InternalBlockInfo blk) Source #
Instance details

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

( StandardHash blk, Typeable blk) => NoThunks ( InternalBlockInfo blk) Source #
Instance details

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

type Rep ( InternalBlockInfo blk) Source #
Instance details

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

type ReverseIndex blk = Map ( HeaderHash blk) ( InternalBlockInfo blk) Source #

We map the header hash of each block to the InternalBlockInfo .

type SuccessorsIndex blk = Map ( ChainHash blk) ( Set ( HeaderHash blk)) Source #

For each block, we store the set of all blocks which have this block as a predecessor (set of successors).