evmd. For conceptual information about mempool design and architecture, see the Mempool Concepts page.
The mempool setup is split across two locations:
evmd/mempool.go—configureEVMMempoolandcreateMempoolConfig, called automatically fromNewExampleAppmempool/— the mempool implementation (ExperimentalEVMMempool,CheckTxHandler,TxPool)
MinTip can be set via app.toml without code changes. CosmosPoolConfig and BroadCastTxFn require modifying createMempoolConfig in evmd/mempool.go. BlockGasLimit is read from consensus_params.block.max_gas in genesis.json.
Configuration Options
TheEVMMempoolConfig struct controls mempool behavior:
Defaults and Fallbacks
- If
BlockGasLimitis0, the mempool uses a fallback of100_000_000gas. - If
LegacyPoolConfigis not provided, defaults fromlegacypool.DefaultConfigare used. - If
CosmosPoolConfigis not provided, a defaultPriorityNonceMempoolis created with:- Priority =
(fee_amount / gas_limit)in the EVM coin denom - Comparator = big-int comparison (higher is selected first)
MinValue = 0
- Priority =
- If
BroadCastTxFnis not provided, a default is created that uses the appclientCtx/txConfigto broadcast EVM transactions when they are promoted from queued → pending. MinTipis optional. If unset, selection uses the effective tip from each tx (min(gas_tip_cap, gas_fee_cap - base_fee)).
Custom Legacy Pool Configuration
Customize EVM transaction pool parameters:evmd/mempool.go
Custom Cosmos Mempool Configuration
The mempool uses aPriorityNonceMempool for Cosmos transactions by default. You can customize the priority calculation:
evmd/mempool.go
Custom Broadcast Function
Override the default broadcast behavior for promoted EVM transactions:evmd/mempool.go
Custom Block Gas Limit
BlockGasLimit is read automatically from consensus_params.block.max_gas in genesis.json — it is not an app.toml setting. To change it, update the genesis file before chain start. The value can also be overridden in code:
evmd/mempool.go
Event Bus Integration
For best results, connect the mempool to CometBFT’s EventBus so it can react to finalized blocks:evmd/app.go
app.toml Configuration
The following settings can be configured inapp.toml and take effect at node startup without code changes:
| Key | Default | Description |
|---|---|---|
evm.min-tip | 0 | Minimum tip (priority fee) in wei; transactions below this are excluded from block selection |
evm.mempool.price-limit | 1 | Minimum gas price in wei to accept a transaction into the pool |
evm.mempool.price-bump | 10 | Minimum % increase required to replace a pending transaction with the same nonce |
evm.mempool.account-slots | 16 | Max executable transactions per account |
evm.mempool.global-slots | 5120 | Max total executable transactions across all accounts |
evm.mempool.account-queue | 64 | Max queued (non-executable) transactions per account |
evm.mempool.global-queue | 1024 | Max total queued transactions across all accounts |
evm.mempool.lifetime | 3h | Max time a transaction can remain queued before eviction |
CosmosPoolConfig and BroadCastTxFn have no app.toml equivalent and require code changes in createMempoolConfig.
Monitoring and Debugging
Use the txpool RPC methods to monitor mempool state:txpool_status: Get pending and queued transaction countstxpool_content: View all transactions in the pooltxpool_inspect: Get human-readable transaction summariestxpool_contentFrom: View transactions from specific addresses
Related Documentation
- Mempool Concepts - Understanding mempool behavior and design
- EVM Module Integration - Prerequisites for mempool integration
- JSON-RPC Methods - Mempool query methods