What is the Mempool? - How Blockchain Transactions Work (2024)

The mempool is the gateway to the blockchain. Before anything can be written on a block, it must first move through the mempool. And this important piece of Web3 is often overlooked.

Since the mempool dictates how every transaction gets written to and confirmed on-chain, understanding the mempool can help you understand what is happening with your in-flight transactions and unlock deep insights into how blockchains work.

In the course of building infrastructure to monitor the mempool, we've learned a lot about how it works. We want to share our insights about this fascinating part of the Ethereum ecosystem. To start, let’s introduce what the mempool is and why it matters to you, traders, Dapps, and DeFi protocols.

What Is The Mempool?

A blockchain creates a permanent ledger of transactions. Once you write it, you can't unwrite it. So blockchains need a mechanism to figure out the sequence of how transactions are written to the block. The mempool is the dynamic staging area in front of the blockchain that enables transaction ordering, transaction fee prioritization, and general block construction.

The term itself —mempool— comes from Bitcoin. But in this post, we will focus on the Ethereum ecosystem. The mempool refers to the set of in-memory data structures inside an Ethereum nodethat stores candidate transactions before they are mined. Geth calls it the “transaction pool”; Parity calls it the “transaction queue.” Regardless of the name, it is a pool of transactions sitting in memory waiting to be included in a block. Think of it as a “waiting area” for transactions to be accepted into a block.

What is the Mempool? - How Blockchain Transactions Work (1)

Valid transactions sent to an Ethereum node should enter the mempool. But there's not actually a single mempool. Rather, each node has its own mempool that attempts to remain synchronized with other nodes (peers) over the Ethereum network. Since network communication is not always reliable or timely, each node has a slightly (or sometimes significantly) different mempool. Also, nodes have different rules about which transactions they accept (e.g. minimum gas price and mempool size limits).

Ideally transactions leave a node's mempool because they are included in a block. But they can also leave because they are replaced via a speedup/cancel, or dropped due to the node's mempool configuration.

We dive into some of the details of entering and leaving the mempool in future posts, and our CEO explores these these topics on our YouTube channel:

Mempools as a Blockchain Primitive

The concept of a mempool is fundamental to the blockchain itself. And the history of the mempool is the history of the blockchain.

It is a core component of how blockchains move transactions from a user’s Wallet to confirmation in a block.

But in spite of its importance, the mempool is not mentioned in any major chain’s whitepaper. It isn’t even mentioned on Wikipedia.

🤔

Do you remember what we said at the beginning of this post? The mempool is often overlooked. Now that we’ve filled you in on the background of the mempool, let’s explore in a little more detail how it is part of a typical transaction flow.

How Does The Mempool Fit In a Typical Transaction Flow?

A typical transaction flow includes the following steps:

  • First, a user initiates a transaction from a Dapp or Wallet, such as sending funds to another account or contract
  • Then the user signs that transaction with their Wallet
  • The Wallet sends the signed transaction to a node, often called a gateway node, to get onto the Ethereum network (think Infura or Pocket)
  • That node will verify the transaction is valid and add it to its mempool
  • Since the node is connected to a group of peers, it broadcasts the transaction to other nodes.
  • These peer nodes will receive the transaction, validate it, move it into their own mempool, and broadcast to additional peers, essentially replicating the transaction across the network
  • Miners, as a specific kind of node, also receive the transaction from peers, validate it, and attempt to add it to a block
  • Eventually, a successful miner adds a block with the transaction to the chain
  • The new block is broadcast over the network
  • As all nodes receive the new block from their peers, they see the included transaction and remove it from their mempool

That's quite a few steps. And remember, this is the process when everything goes right! In the event that things go sideways — as they inevitably do — the transaction flow can get more complex. To help builders and traders manage the complexity of the mempool, we have built a suite of products including our industry-leading mempool explorer. This helps us stay ahead of the transaction curve, powering other useful services like our ETH gas API.

TL;DR

Before any transaction can become part of the blockchain, it must move through the mempool. And this piece of Web3 infrastructure is overlooked and often misunderstood. Think of the mempool as a waiting area for your transaction. Nodes see incoming transactions, ensure they meet basic requirements, and then broadcast them to peer groups. Eventually, miners will grab pending transactions from nodes and include them in a block — earning a fee for their service. It’s only when a transaction is finalized in a block that it will leave the mempool for good.

Blocknative will explore each aspect of the Ethereum mempool in-depth in future posts. We will look at the structure of the mempool, how each node keeps its mempool in sync with peers, how different transaction situations are handled in the mempool, and other mempool details. To learn more and join the conversation, follow us @Blocknative or join our Discord Community.

Interested to dive deeper? Explore the second post in our Mastering the Mempool Series — A Note On Nodes. And if you're ready to explore other pre-chain layer concepts, check out our ETH Gas 101 Guide. Learn more about future upgrades to ETH via ourGuide to The Ethereum Merge.

What is the Mempool? - How Blockchain Transactions Work (2024)

FAQs

What is the Mempool? - How Blockchain Transactions Work? ›

Mempools serve as a temporary holding area for unconfirmed transactions. When you send a transaction from your Bitcoin wallet, it doesn't immediately get added to the blockchain. First, your transaction enters the mempool, where it waits for a Bitcoin miner to pick it up and include it in a new block.

How does mempool work in blockchain? ›

The Ethereum mempool, short for “memory pool,” is a temporary storage area where transactions wait before being added to the blockchain. When you send a transaction on Ethereum, it first goes into the mempool, where it sits until a miner picks it up and includes it in a block.

How blockchain transactions work? ›

The Bitcoin blockchain collects transaction information and enters it into a 4MB file called a block (other blockchains use different size blocks). Once it is full, certain information is run through an encryption algorithm, which creates a hexadecimal number called the block header hash.

How do I get mempool transactions? ›

Ethereum mempool data is available via the Blockchain Transactions endpoint, enabling users to query transactions, pending transactions, completed transactions, or failed transactions. Our API offers both a real-time view using the WebSocket Secure (WSS) endpoint and historical data using the REST endpoint.

What is the mempool protocol in Bitcoin? ›

The Mempool (short for Memory Pool) can be considered the waiting room for unconfirmed transactions before miners include them in a valid block. Each node hosts their own individual mempool defined by their own rules. Nodes then propagate unconfirmed transactions via a gossip protocol to other nodes across the network.

Why is it called a mempool? ›

space's definition: “A mempool (short for "memory pool") is the queue of pending and unconfirmed transactions for a cryptocurrency network node. There is no one global mempool: every node on the network maintains its own mempool, so different nodes may hold different transactions in their mempools.”

How does blockchain proof of work work? ›

The “work” in proof of work is key: The system requires miners to compete with each other to be the first to solve arbitrary mathematical puzzles to prevent anybody from gaming the system. The winner of this race is selected to add the newest batch of data or transactions to the blockchain.

How long does a transaction stay in mempool? ›

Mempools vary in size and speed. However, the average time of transactions leaving the mempool is 10 minutes on the Bitcoin network. A transaction will be automatically cancelled if it is stuck in a mempool for more than 72 hours.

How do I get blockchain transactions? ›

On the blockchain explorer
  1. Go to the blockchain explorer that you'd like to check the transaction on.
  2. Paste the transaction ID or address into the search bar.
  3. On the transaction screen, you'll see whether the transaction was confirmed, unconfirmed or has failed.

How do private mempools work? ›

Private Mempools: The Exclusive Lane

Private mempools, such as those facilitated by OMNIA Protocol, offer a more controlled environment. They prioritize transactions based on predefined criteria, ensuring faster processing times and providing a layer of privacy that is not available in public mempools.

Why is my Bitcoin in mempool? ›

Every time someone initiates a Bitcoin transaction, it first lands in the mempool. Here, it awaits confirmation by Bitcoin miners, who select these transactions, verify them, and include them in a new block. Visualize the mempool as a large pool of water, with transactions being streams flowing into it.

Where is the mempool stored Bitcoin? ›

The mempool is not a single location. Rather each Bitcoin node has its own mempool, and each mempool has its own memory capacity. These nodes are run by Bitcoin miners and Bitcoin users who choose to run a full node on their computer to help decentralize and secure the network.

How long can a transaction stay in the mempool? ›

Mempools vary in size and speed. However, the average time of transactions leaving the mempool is 10 minutes on the Bitcoin network. A transaction will be automatically cancelled if it is stuck in a mempool for more than 72 hours.

How does mempool space work? ›

Mempool. space is a software application or website used to explore or visualize data about the Bitcoin ecosystem. This data includes unconfirmed Bitcoin transactions, address history, transaction status, and transaction fee rate estimates. Ideally, it denotes both a mempool explorer and a Bitcoin block explorer.

How many confirmations does mempool need? ›

When a transaction is included in a block, it is removed from the mempool and considered confirmed. However, this transaction only has one confirmation. It is generally considered a best practice to wait until a transaction has between two and six confirmations before considering it irreversible.

Top Articles
¿Qué es y qué funciones cumple un Servidor de Impresión? - Verbok
Reasons Why You Should Study Management 
Faridpur Govt. Girls' High School, Faridpur Test Examination—2023; English : Paper II
Missing 2023 Showtimes Near Lucas Cinemas Albertville
Gmail Psu
A rough Sunday for some of the NFL's best teams in 2023 led to the three biggest upsets: Analysis - NFL
Peraton Sso
Money blog: Domino's withdraws popular dips; 'we got our dream £30k kitchen for £1,000'
Bfg Straap Dead Photo Graphic
Aldine Isd Pay Scale 23-24
SF bay area cars & trucks "chevrolet 50" - craigslist
Palm Springs Ca Craigslist
What Is Vioc On Credit Card Statement
The Ultimate Guide to Extras Casting: Everything You Need to Know - MyCastingFile
Miltank Gamepress
Like Some Annoyed Drivers Wsj Crossword
Reser Funeral Home Obituaries
Znamy dalsze plany Magdaleny Fręch. Nie będzie nawet chwili przerwy
Dtm Urban Dictionary
Keyn Car Shows
HP PARTSURFER - spare part search portal
Happy Shuttle Cancun Review
Free Tiktok Likes Compara Smm
Deepwoken: Best Attunement Tier List - Item Level Gaming
My Dog Ate A 5Mg Flexeril
The Bold and the Beautiful
Transformers Movie Wiki
Craigslist Cars And Trucks Mcallen
140000 Kilometers To Miles
How does paysafecard work? The only guide you need
Despacito Justin Bieber Lyrics
Rogers Centre is getting a $300M reno. Here's what the Blue Jays ballpark will look like | CBC News
Game8 Silver Wolf
Wattengel Funeral Home Meadow Drive
Pensacola Cars Craigslist
Kerry Cassidy Portal
Blackstone Launchpad Ucf
Entry of the Globbots - 20th Century Electro​-​Synthesis, Avant Garde & Experimental Music 02;31,​07 - Volume II, by Various
Mcalister's Deli Warrington Reviews
Alston – Travel guide at Wikivoyage
Deepwoken: How To Unlock All Fighting Styles Guide - Item Level Gaming
Samsung 9C8
UNC Charlotte Admission Requirements
1990 cold case: Who killed Cheryl Henry and Andy Atkinson on Lovers Lane in west Houston?
The 13 best home gym equipment and machines of 2023
17 of the best things to do in Bozeman, Montana
Diccionario De Los Sueños Misabueso
R Detroit Lions
Powah: Automating the Energizing Orb - EnigmaticaModpacks/Enigmatica6 GitHub Wiki
Arnold Swansinger Family
211475039
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 6013

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.