memory pool
Learn about the memory pool options available in Tendermint.
First in first out memory pool
The mempool holds uncommitted transactions, which have not yet been included in a block. The default mempool implementation of the Tendermint blockchain follows the first-in-first-out (FIFO) principle, meaning that the order of transactions is determined only by the order in which they arrive at nodes. The first transaction received will be the first transaction to be processed. This works for gossiping received transactions to other nodes and including them in a block.
Priority memory pool
From Tendermint v0.35
(Also backported to v0.34.20)
This can be achieved using a priority memory pool.
This allows validators to select transactions based on associated fees or other incentives.
It does this by passing a priority
field for each CheckTx
response ,
It operates on any transaction trying to enter the mempool.
daodst supports EIP-1559 through its EVM transactions. This transaction type uses a base fee and an optional priority tip, which add up to the total transaction fee. Priority memory pools provide an option to automatically use this mechanism for block generation.
When using a priority mempool, the next transaction to generate a block is selected in order of priority (i.e. fee) from high to low. If the mempool is full, the priority implementation allows the lowest priority transactions to be dropped until enough disk space is available for incoming, higher priority transactions (see v1/mempool.go for more details).
📣 Tip: Although transactions can be prioritized, transaction gossip will always be FIFO.
configuration
📣 Tip: $install_path
is used to indicate the path where you installed the stcd
binary
To use the preferred mempool, adjust version = "v1"
in your node configuration in $install_path/.stcd/config/config.toml
.
The default value v0
means a traditional FIFO memory pool.
📣 Tip: 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"
resource
More detailed information can be found here: