Skip to main content

Mempool

Discover the Tendermint mempool possibilities that are offered.

FIFO Mempool

The mempool in Tendermint blockchains stores uncommitted transactions that have not yet been included in a block. The default mempool implementation follows a first-in-first-out (FIFO) principle, which means that the order of transactions is determined by the order in which they are received by the node. The first transaction to be received will be the first to be processed, and this order is maintained when gossiping the received transactions to other peers as well as when including them in a block.

Prioritized Mempool

Use of a prioritized mempool implementation is possible as of Tendermint v0.35 (backports to v0.34.20 have also been made). This enables validators to make decisions based on fees or other incentive structures. In order to accomplish this, each CheckTx response includes a priority field that is sent on to each transaction attempting to access the mempool.

Humans.ai's feemarket module supports EIP-1559 EVM transactions. For this transaction type, the total transaction fees are comprised of a base fee plus a chosen priority tip. An option to automatically use this block generation process is provided by the prioritized mempool.

When utilizing the prioritized mempool, transactions are selected for inclusion in the next produced block in order of their priority, which is determined by their associated fees. The prioritized implementation allows for the removal of transactions with the lowest priority when the mempool is full, in order to make space for incoming, higher-priority transactions. For more information, see the implementation details in v1/mempool.go.

tip

Even if the processing of transactions can be done in a priority order, the order in which they are discussed will always remain FIFO.

Configuration

Change version = "v1" in the node configuration at ~/.humansd/config/config.toml to utilize the priority mempool. The "v0" default value denotes the conventional FIFO mempool.

tip

To make the modifications effective, don't forget to restart the node.

Here is the relevant section of config.toml:

#######################################################
### Mempool Configuration Option ###
#######################################################
[mempool]

# Mempool version to use:
# 1) "v0" - (default) FIFO mempool.
# 2) "v1" - prioritized mempool.
version = "v1"

Resources

You can get more thorough information here: