ouroboros-consensus-0.26.0.0: 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 LedgerDbSerialiseConstraints blk = (Serialise (HeaderHash blk), EncodeDisk blk (LedgerState blk EmptyMK), DecodeDisk blk (LedgerState blk EmptyMK), EncodeDisk blk (AnnTip blk), DecodeDisk blk (AnnTip blk), EncodeDisk blk (ChainDepState (BlockProtocol blk)), DecodeDisk blk (ChainDepState (BlockProtocol blk)), MemPack (TxIn (LedgerState blk)), SerializeTablesWithHint (LedgerState blk), IndexedMemPack (LedgerState blk EmptyMK) (TxOut (LedgerState blk))) Source #

Serialization constraints required by the LedgerDB to be properly instantiated with a blk.

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