Overview
The EVM mempool manages both EVM and Cosmos transactions in a unified pool, enabling Ethereum-compatible transaction flows including out-of-order transactions and nonce gap handling. It replaces the default CometBFT FIFO mempool to support Ethereum tooling expectations while maintaining Cosmos SDK compatibility.Purpose and Design
The EVM mempool serves as a bridge between Ethereum’s transaction management model and Cosmos SDK’s consensus layer. Design Goals:- Ethereum Compatibility: Out-of-order transaction submission, nonce gap handling, transaction replacement with higher fees, standard txpool RPC methods
- Cosmos Integration: Unified mempool for both EVM and Cosmos transactions, fee-based prioritization, integration with ante handlers, preservation of consensus finality
Transaction Flow
1-3. Submission and CheckTx Routing
Transactions submitted via JSON-RPC or P2P are received by CometBFT and validated using CheckTx (source): Success Path: Valid transactions with correct nonces pass through to the Comet mempool for broadcast. Nonce Gap Detection: Transactions with future nonces are intercepted and queued locally:4-7. Mempool, Broadcast, and Block Building
Successfully validated transactions are added to the Comet mempool, broadcast via P2P, and selected for blocks based on fee priority. Queued transactions are automatically promoted when nonce gaps are filled.Architecture

Problem Statement
CometBFT rejects transactions with nonce gaps or out-of-order batches (common in deployment scripts). Ethereum tooling expects these transactions to queue rather than fail.Solution Architecture
Two-tiered approach:- Local queue: Stores gapped transactions without network propagation, preventing invalid transaction gossip
- Public mempool: Contains only valid transactions, maintaining consensus integrity
- Automatic promotion: Moves transactions from local to public when gaps fill

Core Components
CheckTx Handler: Intercepts nonce gap errors during validation, routes gapped transactions to local queue. Only nonce gaps are intercepted - other failures (fees, balance, etc.) are rejected immediately. TxPool: Direct port of Ethereum’s transaction pool managing pending (executable) and queued (future) transactions with promotion, eviction, and replacement. LegacyPool: Stores non-executable transactions with nonce gaps, tracks dependencies, automatically promotes when gaps are filled. ExperimentalEVMMempool: Unified structure managing both EVM and Cosmos transaction pools with single interface for insertion, selection, and removal.Transaction States
Queued (Local Storage): Transactions with nonce > expected nonce Rejected (Immediate Failure): Insufficient fees (GasFeeCap < BaseFee), insufficient balance, invalid signature, gas limit exceeded
API Reference
The mempool exposes Ethereum-compatible RPC methods. See JSON-RPC Methods documentation for detailed reference:txpool_status,txpool_content,txpool_contentFrom,txpool_inspect
Configuration
Basic Configuration
Advanced Configuration
mempool/txpool/legacypool/legacypool.go:168-178
Configuration Examples
High-Throughput:Integration
For chain developers integrating the mempool, see the EVM Mempool Integration Guide.Testing
Verify mempool behavior using test scripts in cosmos/evm. Thetests/systemtests/Counter/script/SimpleSends.s.sol script demonstrates typical Ethereum tooling behavior with 10 sequential transactions arriving out of order.