TeachMeBitcoin

The Mempool: The Anchor Guide to Bitcoin's Staging Area

From TeachMeBitcoin, the free encyclopedia Reading time: 5 min

The Mempool: The Anchor Guide to Bitcoin's Staging Area

IMPORTANT

Executive Summary: The Memory Pool (Mempool) is the waiting room for the Bitcoin network. It is a localized, in-memory database where nodes store validated but unconfirmed transactions before they are selected by miners for inclusion in a block. Because each node has its own memory limits and fee policies, the mempool is not a single global entity but a decentralized web of competing caches. Understanding the mempool is the key to mastering transaction fees, confirmation times, and network congestion.


🔍 Why This Module Matters

When you click "Send" in your wallet, your money doesn't go straight to the blockchain. It goes to the mempool. If your fee is too low, your transaction might sit in the mempool for weeks or be "evicted" (deleted) entirely. This module will deconstruct the architecture of the mempool, explaining why it lives in RAM, how nodes decide which transactions to keep, and the mathematical "Fee Floor" that regulates network traffic during periods of high demand.


🏛️ Localized Truth: Why Every Mempool is Different

A common misconception is that there is "The" Mempool. In reality, every node on Earth has its own version.

1. Independent Policy

A node in New York might have a 300MB mempool, while a node in Tokyo has a 1GB mempool.

2. The Propagation Filter

Before a transaction is admitted to a node's RAM, it must pass the Standardness Filter.


⚙️ RAM Management: The Cost of Memory

The mempool is hosted in RAM, not on your hard drive. This is because nodes must search and sort the mempool thousands of times per second as new transactions arrive.

1. Data Inflation

A transaction might be 250 bytes when sent over the network, but it occupies ~1,000 bytes (1KB) in RAM.

2. The Default Limit (300MB)

By default, Bitcoin Core limits its mempool to 300MB. If the network gets busy and more than 300MB of transactions arrive, the node must start deleting data.


🛠️ The Eviction Pipeline: Survival of the Fittest

When a node hits its RAM limit, it doesn't stop accepting transactions. It becomes an Auction House.

  1. Sorting: The node sorts all transactions from lowest fee to highest fee.

  2. Trimming: The transactions with the lowest fee-per-vByte are evicted (deleted) from RAM.

  3. The New Floor: The fee of the last evicted transaction becomes the new "Minimum Fee Floor."

  4. Rejection: Any new transaction with a fee lower than this floor is rejected at the door.

graph TD
 A[Mempool Full: 300MB] --> B[Sort by Fee-per-vByte]
 B --> C[Identify Lowest 5% of Fees]
 C --> D[Evict Transactions from RAM]
 D --> E[Set New Dynamic Fee Floor]
 E --> F[Reject New Low-Fee Transactions]

⚖️ Fee Floor Decay: Returning to Normal

After a spike in activity (e.g., an NFT launch or a market crash), the fee floor might be very high (e.g., 50 sat/vB).


🎯 Learning Objectives for this Module

By the end of this module, you will be able to:

  1. Define the mempool and explain its role in the transaction lifecycle.

  2. Explain why the mempool lives in volatile RAM rather than on disk.

  3. Identify three reasons why two nodes might have different mempool contents.

  4. Describe the process of "Eviction" and how it impacts low-fee transactions.

  5. Understand the concept of "Fee Floor Decay" and its timing.


🗺️ Module Roadmap: What's Next?

Now that we understand the waiting room, we will explore its internal complexities:

  1. Ancestors & Descendants: How unconfirmed chains are tracked.

  2. CPFP (Child Pays For Parent): Using high fees to "rescue" stuck transactions.

  3. RBF (Replace-By-Fee): How to overwrite an existing mempool entry.

  4. JSON-RPC Mempool Commands: Using getmempoolinfo to audit your node.


🎓 Summary

The mempool is the "Free Market" of Bitcoin blockspace. It is a dynamic, shifting database that reflects the real-time demand for network usage. By mastering the architecture of the mempool, you gain the ability to predict confirmation times, optimize your fees, and understand the technical boundaries that keep the Bitcoin network running smoothly even under extreme load.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!