<p>As usual with Bitcoin, it's important to think about each party's incentives.</p>
<p>Miners earn a fixed reward for each block they find, but they also get additional rewards based on the transaction fees in that block. Each block takes a lot of work to find, and has a limited maximum size. If a miner is working on constructing a potential new block, it can improve its expected outcome by looking for as many transactions as possible to fill it with -- either to fill space that was previously unused, or to replace transactions with others that have higher fees.</p>
<hr />
<p>You might be tempted to conclude that it's also in a miner's interest to keep juicy, high-value transactions to itself, instead of broadcasting them. After all, if you can reduce the expected rewards that <em>other</em> miners earn, you make them less willing to compete for blocks, and therefore increase your own average share.</p>
<p>But users also have an interest in having their transactions incorporated into the blockchain as quickly as reasonably possible. If a miner can't be relied on to relay transactions to the entire network, those transactions will not be reliably executed, and users won't want to send them to that miner in the first place.</p>
<hr />
<p>In a sense, individual miners are free to do whatever they want. But participating in the mempool synchronization protocol is much more lucrative than not doing so.</p>

CC BY-SA 4.0
2021-11-17T17:14:52.233Z
2021-11-17T19:46:59.783Z
2021-11-17T19:46:59.783Z
David
<p>The Bitcoin network is scale-free, all participating nodes have the same privileges. Even nodes that are not currently participating in mining should be able to mine a block at any point in time. Since miners need to learn about unconfirmed transactions in order to include them in blocks, all nodes should.</p>
<p>The relay of transactions is not a waste even if a node is not mining. Learning about unconfirmed transactions makes recipients aware that they may be expecting a payment (allowing them to interact with the unconfirmed outputs), allows them to validate transactions before they are announced in blocks, enables estimating feerates on basis of which transactions are getting included in blocks, and spreads out bandwidth usage for relay.</p>
<p>Transaction data by itself does not have propagation guarantees, they're just forwarded per best-effort. While mempools of different nodes have large overlap, they are not synchronized. Synchronization only happens for the best chain of blocks: blocks and the transaction included in blocks have propagation guarantees.</p>

CC BY-SA 4.0
2021-11-17T12:41:20.057Z
2021-11-17T12:41:20.057Z
Murch
<p>There's no bloom filters involved, or any actual attempt at synchronization. Nodes relay transactions they hear about to one another, so there's probably some level of consistency in mempool contents but no guarantee. If there was no mempool, there would be no way for miners to learn about unconfirmed transactions to include in blocks to begin with.</p>

CC BY-SA 4.0
2021-11-17T06:06:26.147Z
2021-11-17T08:28:38.503Z
2021-11-17T08:28:38.503Z
Claris
<p>My understanding is that nodes maintain a mempool of unexecuted transactions. They use a bloom filter to query other nodes for transactions they do not currently have in their own mempool... thus synchronizing the state of the mempool for each node in the network.</p>
<p>I don't understand why this is necessary -- can't all the nodes just be sent the winning block (along with the transactions inside of it) once it is received by one of the nodes? They can then just verify the transactions within that block. What am I missing here?</p>

<mempool><relay>
Why is a synchronized mempool necessary in the network?
user491880
# Why is a synchronized mempool necessary in the network?

(Asked by: username_0 on 2021-11-17)

My understanding is that nodes maintain a mempool of unexecuted transactions. They use a bloom filter to query other nodes for transactions they do not currently have in their own mempool... thus synchronizing the state of the mempool for each node in the network.

I don't understand why this is necessary -- can't all the nodes just be sent the winning block (along with the transactions inside of it) once it is received by one of the nodes? They can then just verify the transactions within that block. What am I missing here?

**Tags:** mempool, relay


---

## 3 answers

### Answer by username_3 on 2021-11-17. Score: 6 | Accepted answer

There's no bloom filters involved, or any actual attempt at synchronization. Nodes relay transactions they hear about to one another, so there's probably some level of consistency in mempool contents but no guarantee. If there was no mempool, there would be no way for miners to learn about unconfirmed transactions to include in blocks to begin with.


---

### Answer by username_1 on 2021-11-17. Score: 3

As usual with Bitcoin, it's important to think about each party's incentives.

Miners earn a fixed reward for each block they find, but they also get additional rewards based on the transaction fees in that block. Each block takes a lot of work to find, and has a limited maximum size. If a miner is working on constructing a potential new block, it can improve its expected outcome by looking for as many transactions as possible to fill it with -- either to fill space that was previously unused, or to replace transactions with others that have higher fees.

---

You might be tempted to conclude that it's also in a miner's interest to keep juicy, high-value transactions to itself, instead of broadcasting them. After all, if you can reduce the expected rewards that *other* miners earn, you make them less willing to compete for blocks, and therefore increase your own average share.

But users also have an interest in having their transactions incorporated into the blockchain as quickly as reasonably possible. If a miner can't be relied on to relay transactions to the entire network, those transactions will not be reliably executed, and users won't want to send them to that miner in the first place.

---

In a sense, individual miners are free to do whatever they want. But participating in the mempool synchronization protocol is much more lucrative than not doing so.


---

### Answer by username_2 on 2021-11-17. Score: 2

The Bitcoin network is scale-free, all participating nodes have the same privileges. Even nodes that are not currently participating in mining should be able to mine a block at any point in time. Since miners need to learn about unconfirmed transactions in order to include them in blocks, all nodes should.

The relay of transactions is not a waste even if a node is not mining. Learning about unconfirmed transactions makes recipients aware that they may be expecting a payment (allowing them to interact with the unconfirmed outputs), allows them to validate transactions before they are announced in blocks, enables estimating feerates on basis of which transactions are getting included in blocks, and spreads out bandwidth usage for relay.

Transaction data by itself does not have propagation guarantees, they're just forwarded per best-effort. While mempools of different nodes have large overlap, they are not synchronized. Synchronization only happens for the best chain of blocks: blocks and the transaction included in blocks have propagation guarantees.


---

