Dhive Docs
  • Welcome to Dhive
  • Dhive L1
  • Dhive EVM "CLI"
    • Client Configuration Guide
    • Using Dhive with Docker
    • Running a Single Node Local Network
  • Loyalty Program
    • Tokenization of loyalty Program
  • Redeemable NFTs
  • Onchain Reviews
  • Dhive Bridging
  • Dhive Amm
    • Overview
    • Get Started
    • Create A Wallet
    • Get DVI 20 Tokens
    • Token Swaps
  • Liquidity Pools
  • Add/Remove Liquidity
  • Contracts
  • Dhive rNFT Marketplace
    • Overveiw
  • Tokenize Your Business
  • List Product "rNFT"
  • Buy rNFT
  • Redeem rNFT
  • Cashback Mechanism
  • Contracts
  • Post A Reveiw
  • For Validators
    • Overview
    • Run a Validator
    • Configuration
    • Disk Usage Optimization
    • State Sync
    • Mempool
  • Tokenomics
    • Overview
    • DFuel Tokenomics
    • Dhive Validator Token Tokenomics
  • Others
    • Dhive Roadmap
Powered by GitBook
On this page

Was this helpful?

  1. For Validators

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:

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

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

PreviousState SyncNextOverview

Last updated 3 months ago

Was this helpful?