Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Mempool.Capacity
Contents
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
- data MempoolCapacityBytesOverride
- computeMempoolCapacity ∷ ∀ blk (mk ∷ MapKind). LedgerSupportsMempool blk ⇒ LedgerConfig blk → TickedLedgerState blk mk → MempoolCapacityBytesOverride → TxMeasure blk
- mkCapacityBytesOverride ∷ ByteSize32 → MempoolCapacityBytesOverride
- data MempoolSize = MempoolSize {}
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. |
Instances
computeMempoolCapacity ∷ ∀ blk (mk ∷ MapKind). LedgerSupportsMempool blk ⇒ LedgerConfig blk → TickedLedgerState blk mk → MempoolCapacityBytesOverride → TxMeasure 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.
mkCapacityBytesOverride ∷ ByteSize32 → MempoolCapacityBytesOverride 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
|