ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Mempool.Capacity

Description

Mempool capacity, size and transaction size datatypes.

This module also defines how to manually override the mempool capacity.

import           Ouroboros.Consensus.Mempool.Capacity (Capacity)
import qualified Ouroboros.Consensus.Mempool.Capacity as Capacity
Synopsis

Mempool capacity

data MempoolCapacityBytesOverride Source #

An override for the default MempoolCapacityBytes which is 2x the maximum transaction capacity

Constructors

NoMempoolCapacityBytesOverride

Use 2x the maximum transaction capacity of a block. This will change dynamically with the protocol parameters adopted in the current ledger.

MempoolCapacityBytesOverride !ByteSize32

Use the least multiple of the block capacity that is no less than this size.

computeMempoolCapacityLedgerSupportsMempool blk ⇒ LedgerConfig blk → TickedLedgerState blk → MempoolCapacityBytesOverrideTxMeasure blk Source #

If no override is provided, calculate the default mempool capacity as 2x the current ledger's maximum transaction capacity of a block.

If an override is present, reinterpret it as a number of blocks (rounded up), and then simply multiply the ledger's capacity by that number.

mkCapacityBytesOverrideByteSize32MempoolCapacityBytesOverride Source #

Create an override for the mempool capacity using the provided number of bytes.

Mempool Size

data MempoolSize Source #

The size of a mempool.

Constructors

MempoolSize 

Fields