Mempool
Learn about the available mempool options in Tendermint.
FIFO Mempool
The mempool holds uncommitted transactions, which are not yet included in a block. The default mempool implementation for Tendermint blockchains follows a first-in-first-out (FIFO) principle, which means the ordering of transactions depends solely on the order in which they arrive at the node. The first transaction to be received will be the first transaction to be processed. This is true for gossiping the received transactions to the rest of the peers as well as including them in a block.
Prioritized Mempool
Starting with Tendermint v0.35
(has also been backported to v0.34.20)
it is possible to use a prioritized mempool implementation.
This allows validators to choose transactions based on the associated fees or other incentive mechanisms.
It is achieved by passing a priority
field with each CheckTx
response,
which is run on any transaction trying to enter the mempool.
Evmos supports EIP-1559 EVM transactions through its feemarket module. This transaction type uses a base fee and a selectable priority tip that add up to the total transaction fees. The prioritized mempool presents an option to automatically make use of this mechanism regarding block generation.
When using the prioritized mempool, transactions for the next produced block are chosen by order of their priority (i.e. their fees) from highest to lowest. Should the mempool be full, the prioritized implementation allows to remove the transactions with the lowest priority until enough disk space is available for an incoming, higher-priority transaction (see v1/mempool.go implementation for more details).
Even though the transaction processing can be ordered by priority, the gossiping of transactions will always be according to FIFO.
Configuration
To use the a prioritized mempool, adjust version = "v1"
in the node configuration at ~/.evmosd/config/config.toml
.
The default value "v0"
indicates the traditional FIFO mempool.
Remember to restart the node for the changes to take effect.
See the relevant excerpt from config.toml
here:
#######################################################
### Mempool Configuration Option ###
#######################################################
[mempool]
# Mempool version to use:
# 1) "v0" - (default) FIFO mempool.
# 2) "v1" - prioritized mempool.
version = "v1"
Resources
More detailed information can be found here: