The Mempool: The Anchor Guide to Bitcoin's Staging Area
The Mempool: The Anchor Guide to Bitcoin's Staging Area
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.
- Result: The Tokyo node will "know" about low-fee transactions that the New York node has already forgotten.
2. The Propagation Filter
Before a transaction is admitted to a node's RAM, it must pass the Standardness Filter.
-
Rules: Is it too big? Does it have a "dust" output (too small to spend)? Is the fee higher than the minimum relay fee (usually 1 sat/vB)?
-
Consequence: If your transaction is "non-standard," it won't even enter the mempool, meaning miners will never see it.
⚙️ 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.
- Why?: The node must store extra "Metadata" like:
- Pointers: Links to the parents and children of the transaction.
- Indices: Maps to find the transaction by its hash or fee level.
- DAGs: Directed Acyclic Graphs that track dependencies.
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.
-
Sorting: The node sorts all transactions from lowest fee to highest fee.
-
Trimming: The transactions with the lowest fee-per-vByte are evicted (deleted) from RAM.
-
The New Floor: The fee of the last evicted transaction becomes the new "Minimum Fee Floor."
-
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).
-
The Decay: To ensure the network eventually accepts cheap transactions again, the fee floor "decays" over time.
-
The Math: The minimum fee requirement is cut in half every 12 hours until it reaches the baseline of 1 sat/vB.
🎯 Learning Objectives for this Module
By the end of this module, you will be able to:
-
Define the mempool and explain its role in the transaction lifecycle.
-
Explain why the mempool lives in volatile RAM rather than on disk.
-
Identify three reasons why two nodes might have different mempool contents.
-
Describe the process of "Eviction" and how it impacts low-fee transactions.
-
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:
-
Ancestors & Descendants: How unconfirmed chains are tracked.
-
CPFP (Child Pays For Parent): Using high fees to "rescue" stuck transactions.
-
RBF (Replace-By-Fee): How to overwrite an existing mempool entry.
-
JSON-RPC Mempool Commands: Using
getmempoolinfoto 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.
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: