ouroboros-consensus-0.1.0.2: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Node.Run

Description

Infrastructure required to run a node

The definitions in this module are independent from any specific protocol.

Synopsis

SerialiseDisk

type ImmutableDbSerialiseConstraints blk = (EncodeDisk blk blk, DecodeDisk blk (ByteString → blk), DecodeDiskDep (NestedCtxt Header) blk, ReconstructNestedCtxt Header blk, HasBinaryBlockInfo blk) Source #

EncodeDisk and DecodeDisk constraints needed for the ImmutableDB.

type LgrDbSerialiseConstraints blk = (Serialise (HeaderHash blk), EncodeDisk blk (LedgerState blk), DecodeDisk blk (LedgerState blk), EncodeDisk blk (AnnTip blk), DecodeDisk blk (AnnTip blk), EncodeDisk blk (ChainDepState (BlockProtocol blk)), DecodeDisk blk (ChainDepState (BlockProtocol blk))) Source #

EncodeDisk and DecodeDisk constraints needed for the LgrDB.

class (ImmutableDbSerialiseConstraints blk, LgrDbSerialiseConstraints blk, VolatileDbSerialiseConstraints blk, EncodeDiskDep (NestedCtxt Header) blk) ⇒ SerialiseDiskConstraints blk Source #

All the serialisation related constraints needed by the ChainDB.

type VolatileDbSerialiseConstraints blk = (EncodeDisk blk blk, DecodeDisk blk (ByteString → blk), DecodeDiskDep (NestedCtxt Header) blk, HasNestedContent Header blk, HasBinaryBlockInfo blk) Source #

EncodeDisk and DecodeDisk constraints needed for the VolatileDB.

SerialiseNodeToNode

class (ConvertRawHash blk, SerialiseNodeToNode blk blk, SerialiseNodeToNode blk (Header blk), SerialiseNodeToNode blk (Serialised blk), SerialiseNodeToNode blk (SerialisedHeader blk), SerialiseNodeToNode blk (GenTx blk), SerialiseNodeToNode blk (GenTxId blk)) ⇒ SerialiseNodeToNodeConstraints blk where Source #

Serialisation constraints needed by the node-to-node protocols

Methods

estimateBlockSizeHeader blk → SizeInBytes Source #

An upper bound on the size in bytes of the block corresponding to the header. This can be an overestimate, but not an underestimate.

The block fetch client uses this to estimate how bytes will be in flight. This is also used to limit the number of bytes accepted when downloading a block.

This is part of this class as it depends on the node-to-node serialisation format used for blocks.

SerialiseNodeToClient

RunNode