| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Main
Description
Concurrent benchmark of the real mempool's shared-state access patterns under a Leios-scale transaction load.
It opens the actual mempool (openMempoolWithoutSyncThread) over a mocked
ledger interface whose forker reads inject a configurable latency to model
on-disk UTxO reads. Three roles run concurrently against it, as in a node
under tx-submission load:
- Adders (tx-submission clients and local clients): each submits an
independent chain of transactions via the real
addTx, rate-limited to a target rate. - Readers (tx-submission servers / block forging): call the real
getSnapshot(readTMVar istate) on a configurable per-peer cadence, measuring how long a read blocks. - Syncer (the mempool sync thread): periodically advances the ledger tip
and runs the real
testSyncWithLedger, which revalidates the mempool through the latency-injected forker.
With the mempool holding many transactions, this reproduces the contention between revalidation, ingestion and serving that the mempool sync targets.