Mempool - Bitcoin Transaction Waiting Room
The mempool is where unconfirmed transactions wait before being included in a block. How fees, eviction, and miner selection work.
Mempool (Memory Pool) is a space where unconfirmed transactions that have not yet been included in a block wait. Each Bitcoin node maintains its own independent mempool, so strictly speaking there is no single "the mempool" but rather tens of thousands of individual mempools distributed across the network.
graph LR USER["👤 User"] -->|"Create Tx"| NODE["📡 Node"] NODE -->|"Broadcast"| MEMPOOL["🔄 Mempool
(Unconfirmed Tx Queue)"] MEMPOOL -->|"Miner Selects
(Higher Fee First)"| BLOCK["⛏️ Block"] BLOCK -->|"Verified & Added"| CHAIN["⛓️ Blockchain"] style MEMPOOL fill:#f7931a,stroke:#f7931a,color:#000 style CHAIN fill:#3fb950,stroke:#3fb950,color:#000
Transaction Lifecycle
A Bitcoin transaction passes through distinct stages from creation to final confirmation.
Creation: The user constructs a transaction through wallet software. UTXOs to spend are selected as inputs, recipient addresses and amounts are specified as outputs, and the transaction is signed with the private key. At this point, the transaction has not yet been broadcast to the network.
Propagation: The signed transaction is sent to connected peer nodes. The receiving node announces the new transaction to other peers via an inv message, and when interested peers request it with getdata, the actual transaction data is delivered. Through this gossip mechanism, transactions propagate across the entire network within seconds.
Validation: Each node independently validates the received transaction. It checks signature validity, whether referenced UTXOs exist, double-spend attempts, script execution results, and fee adequacy. Transactions that fail validation are immediately discarded.
Mempool Waiting: Transactions that pass validation are added to the node's mempool. They wait here until a miner includes them in a block. Transactions with higher fees have a greater probability of being mined quickly.
Mining and Confirmation: Miners select transactions from the mempool in order of fee rate (sat/vB) to construct candidate blocks, and once valid proof of work is found, the block propagates across the network. Transactions included in that block are removed from the mempool and reach 1-confirmation status.
Mempool Policy: Minimum Relay Fee and Expiration
Nodes apply policy rules for mempool management. The minimum relay fee (minRelayTxFee) defaults to 1 sat/vB; transactions with fees below this threshold are neither added to the mempool nor relayed to other nodes. This serves as the first line of defense against spam transactions flooding the mempool.
The mempool expiration time defaults to 336 hours (2 weeks). Transactions that remain unmined during this period are automatically removed. Additionally, a mempool size cap (default 300 MB) is configured, and when exceeded, transactions with the lowest fees are evicted first.
Adjusting Fees: RBF and CPFP
Once a transaction is waiting in the mempool with too low a fee, two mechanisms can move it up the queue. Both have their own dedicated entries:
- Replace-by-Fee (RBF) — the sender replaces the stuck transaction with a higher-fee version that spends the same inputs.
- Child-Pays-for-Parent (CPFP) — anyone holding a spendable output (including the recipient) attaches a high-fee child transaction so miners confirm the package together.
For a hands-on walkthrough of reading mempool status, fee estimation, the full-RBF debate, and the risks of zero-confirmation payments, see the practical article What Is the Mempool?.
Related Concepts
- Node - Bitcoin network participants that maintain mempool, validate and broadcast transactions
- Proof of Work - Consensus mechanism where miners select transactions from the mempool to create blocks
- SegWit - Bitcoin protocol upgrade that influenced the fee structure
- Lightning Network - Off-chain payment solution that bypasses mempool congestion
- What is Bitcoin? - Starting point introducing the basic concepts and how Bitcoin works
- Why Your Transaction Is Stuck - when the mempool holds up your payment
- Why Fees Suddenly Spike - mempool congestion and fee surges
- How Bitcoin Fees Are Calculated - setting the right fee in sat/vByte