Mempool

The mempool (memory pool) is a critical component in Tendermint-based blockchains, responsible for storing uncommitted transactions awaiting inclusion in a block. CosVM, integrated into Tendermint, offers different mempool options, enabling developers to manage transaction ordering and selection. Here are the available mempool options within CosVM:

1. FIFO Mempool

Functionality:

Follows a first-in-first-out (FIFO) principle. Transactions are ordered solely based on their arrival at the node. The first transaction received is the first to be processed, including gossiping to other peers and block inclusion.

Use Case:

Suitable for straightforward transaction ordering without prioritization based on fees or incentives.

2. Prioritized Mempool

  • Introduced: Tendermint v0.35 (backported to v0.34.20)

  • Purpose: Enables validators to prioritize transactions based on associated fees or other incentive mechanisms.

  • Usage with CosVM: Supports EIP-1559 EVM transactions through the fee-market module, utilizing base fees and selectable priority tips to determine total transaction fees.

  • Transaction Ordering: In the prioritized mempool, transactions for the next block are selected in order of priority (typically based on fees) from highest to lowest.

  • Overflow Handling: If the mempool reaches capacity, lower-priority transactions may be removed to accommodate higher-priority incoming transactions.

  • Note: Transaction processing follows priority order, but transaction gossiping adheres to FIFO.

Configuration Steps:

To utilize the prioritized mempool in CosVM, follow these steps for configuration:

  1. Adjustment in Node Configuration:

    • Edit the config.toml file at ~/.cvmd/config/config.toml.

    • Locate the [mempool] section.

    • Set version = "v1" to enable the prioritized mempool.

    • The default value version = "v0" signifies the traditional FIFO mempool.

  2. Restart Node:

    • After making changes in the config.toml file, restart the node for the modifications to take effect.

Additional Resources:

For more comprehensive information and details:

These resources offer deeper insights into the technical aspects and implications of using different mempool options in CosVM, aiding developers in making informed decisions regarding transaction handling and prioritization strategies.

Last updated