Mempool
FIFO Mempool
The mempool stores uncommitted transactions that have not yet been included in a block. In Tendermint-based blockchains, the default mempool implementation follows a first-in-first-out (FIFO) approach. This means transactions are processed in the order they arrive at a node, with the earliest received transaction being the first to be processed. This FIFO order applies both to gossiping transactions among peers and including them in a block.
Prioritized Mempool
Starting from Tendermint v0.35 (also backported to v0.34.20), a prioritized mempool implementation is available. This enables validators to select transactions based on associated fees or other incentive mechanisms. The selection process works by assigning a priority value to each transaction through the CheckTx response before it enters the mempool.
Dhive supports EIP-1559 EVM transactions via its fee market module. This transaction model incorporates a base fee along with an optional priority tip, which together determine the total transaction fee. The prioritized mempool leverages this mechanism to optimize block generation by automatically selecting transactions with the highest priority.
When using the prioritized mempool, transactions for the next block are selected in descending order of priority (i.e., based on fees). If the mempool reaches capacity, the implementation removes lower-priority transactions to free up space for incoming higher-priority transactions. More details can be found in the v1/mempool.go
implementation.
Note: While transaction processing follows a priority-based order, transaction gossiping remains FIFO.
Configuration
To enable the prioritized mempool, update the node configuration file (~/.dhived/config/config.toml
) by setting version = "v1"
. The default value, "v0"
, corresponds to the traditional FIFO mempool.
Reminder: Restart the node for the changes to take effect.
Configuration Excerpt from config.toml
:
Last updated
Was this helpful?