<p>In theory, that would be ideal if your goal is solely getting the transaction to mine.</p>

<p><strong>Hurts permissionless mining</strong> However it does require knowing how to reach miners directly. Mining is designed to be a permissionless business, accessible for anyone with the right hardware. Your solution would require publishing the IP addresses of miners to all transaction creators.</p>

<p><strong>Hurts sender privacy</strong> It would also hurt privacy, as miners would learn the sender IP of transaction creators; possibly enabling them to censor based on that information.</p>

<p><strong>Not relaying transactions doesn't gain you much</strong> The marginal cost of relaying every transaction to every node is low since the introduction of algorithms like BIP152 (compact blocks). Assuming a transaction will eventually be mined anyway, that transaction needs to reach every full node eventually (as part of a block). Relaying it as a separate transaction ahead of time doesn't cost anything, if the relay of the block can refer to the earlier transaction instead. There are some costs related to 'inv' messages that can be reduced though, without removing transaction relay.</p>

<p><strong>Hurts block propagation speed</strong> And lastly, only broadcasting transaction to miners directly would worsen block propagation speed very significantly. Modern block relay protocols (like BIP152 and FIBRE) rely on nodes knowing the bulk of blocks' transaction ahead of time to quickly relay those blocks.</p>

CC BY-SA 4.0
2018-12-19T21:24:25.910Z
Good answer. You might want to mention that full nodes can opt out of relaying unconfirmed transactions by running in blocks-only mode.
Murch
CC BY-SA 4.0
2018-12-19T21:32:58.233Z
Thanks for the reply. I was looking into this solution in order to somehow reduce the 'waste' that currently happens when transactions are being relayed across the network as nodes currently will receive many INV for a transaction that they already have. In this proposed solution, non-mining nodes will only receive transactions once they are in the mined block and hence no duplication of tx INV
Herofire
CC BY-SA 4.0
2018-12-19T22:01:47.927Z
@Herofire I'm actually working myself on a solution to that redundancy, using set reconciliation algorithms to find differences between known invs instead of just broadcasting them all.
Pieter Wuille
CC BY-SA 4.0
2018-12-19T21:18:16.263Z
2018-12-19T23:09:53.380Z
2018-12-19T23:09:53.380Z
Pieter Wuille
<p>In the case of confirming that a transaction has been successfully submitted, failure to use mempool as a distributed pool means you'd have to query that one "mining node". Example: I send a transaction with my wallet directly to that 1 node to pay for a service. The service gives 10 minutes to see the transaction before invalidating the entire thing. Unless the service is looking right at that node, then how would it know's it's been submitted to the network?</p>

<p>Basically there are many use cases where confirming that a transaction exists (but not mined) can be particularly important. Interacting with a network that all shares the same mempool means no matter where you send it from/to it'll be visible everywhere to everyone. </p>

<p>Imagine how many times you'd end up telling a person "I sent it, you'll have to wait to see it." As it is now block explorers will detect the transaction in most cases within seconds. You can almost instantly point and say "See, it's processing". Thanks to mempool.</p>

CC BY-SA 4.0
2018-12-19T22:40:06.490Z
This is true in practice, the mempool and its associated unconfirmed tx relay are used to actually inform the receiver about a payment. But not doing so is not in contradiction to OP's question; you could a transaction to the recipient and miners (somehow). If the recipient doesn't believe it was sent to miners he could do it himself as well.
Pieter Wuille
CC BY-SA 4.0
2018-12-19T23:05:50.260Z
Once a node receives the 'new' transactions from the mined block, the node could theoretically verify all the transactions by itself without a need for a mempool of transactions correct? Just following the same procedure it does before adding it to the mempool currently?
Herofire
CC BY-SA 4.0
2018-12-19T22:34:25.827Z
2018-12-19T22:34:25.827Z
cleanmarker
<p>That could significantly lower the chances of the transaction being mined if, say that mining node's miners represented a very small fraction of the hashpower of the network. If only a small subset of the network hashpower is mining a specific transaction, it may take very long or never get mined at all. You'd have to calculate how often those miners win a block to know the average confirmation time sending to that node.</p>

<p><strong>Edit</strong>: Misunderstood the question. Relaying transactions to all "mining" nodes shouldn't really affect security other than relaying the transaction  to all mining nodes may take longer if it hits dead ends (with "non-mining" nodes). Also, some nodes are used to make block explorers and wallets who usually can tell you the tx is pending, but they wouldn't have the tx until is was mined. Also, you can already whitelist nodes from which you will relay transactions in <code>bitcoind</code> using the <code>-whitelist</code> flag.</p>

CC BY-SA 4.0
2018-12-19T20:36:47.253Z
I'm talking about sending the transaction to all the mining nodes within the network, so no matter what node mined the new block, they will have all the latest transactions in their pool to choose from. Is it theoretically necessary for all the other nodes who aren't mining a block to know about the transactions before it is mined within the block?
Herofire
CC BY-SA 4.0
2018-12-19T21:02:51.157Z
Ah, well there isn't a security reason this wouldn't work, really, other than the transaction relay to all mining nodes may take longer if it hits dead ends. Also, some nodes are used to make block explorers who usually can tell you the tx is pending, but they wouldn't have the tx until is was mined. You can already whitelist nodes if you want in `bitcoind` using the `-whitelist` flag.
JBaczuk
CC BY-SA 4.0
2018-12-19T21:12:05.020Z
I think you mean `-addnode` instead of `-whitelist`.
Pieter Wuille
CC BY-SA 4.0
2018-12-19T21:16:36.743Z
`addnode` will still allow other nodes to connect and relay txs if they are connected to the node you added, right?
JBaczuk
CC BY-SA 4.0
2018-12-19T20:27:41.520Z
2018-12-20T02:46:43.747Z
2018-12-20T02:46:43.747Z
JBaczuk
<p>Instead of propagating transactions across all nodes in the bitcoin network, would it be theoretically better to just send transactions to mining nodes as transactions are only confirmed and 'used' when confirmed inside a block. The other nodes would then be able to confirm and validate these transactions when they learn about the new mined block with the 'confirmed' transactions? </p>

<transaction-propagation>
Sending transactions to mining nodes only?
Herofire
# Sending transactions to mining nodes only?

(Asked by: username_0 on 2018-12-19)

Instead of propagating transactions across all nodes in the bitcoin network, would it be theoretically better to just send transactions to mining nodes as transactions are only confirmed and 'used' when confirmed inside a block. The other nodes would then be able to confirm and validate these transactions when they learn about the new mined block with the 'confirmed' transactions?

**Tags:** transaction-propagation


---

## 3 answers

### Answer by username_1 on 2018-12-19. Score: 8

In theory, that would be ideal if your goal is solely getting the transaction to mine.

**Hurts permissionless mining** However it does require knowing how to reach miners directly. Mining is designed to be a permissionless business, accessible for anyone with the right hardware. Your solution would require publishing the IP addresses of miners to all transaction creators.

**Hurts sender privacy** It would also hurt privacy, as miners would learn the sender IP of transaction creators; possibly enabling them to censor based on that information.

**Not relaying transactions doesn't gain you much** The marginal cost of relaying every transaction to every node is low since the introduction of algorithms like BIP152 (compact blocks). Assuming a transaction will eventually be mined anyway, that transaction needs to reach every full node eventually (as part of a block). Relaying it as a separate transaction ahead of time doesn't cost anything, if the relay of the block can refer to the earlier transaction instead. There are some costs related to 'inv' messages that can be reduced though, without removing transaction relay.

**Hurts block propagation speed** And lastly, only broadcasting transaction to miners directly would worsen block propagation speed very significantly. Modern block relay protocols (like BIP152 and FIBRE) rely on nodes knowing the bulk of blocks' transaction ahead of time to quickly relay those blocks.

> **Comments:**
> **username_2**: Good answer. You might want to mention that full nodes can opt out of relaying unconfirmed transactions by running in blocks-only mode.  
> **username_0**: Thanks for the reply. I was looking into this solution in order to somehow reduce the 'waste' that currently happens when transactions are being relayed across the network as nodes currently will receive many INV for a transaction that they already have. In this proposed solution, non-mining nodes will only receive transactions once they are in the mined block and hence no duplication of tx INV  
> **username_1**: @username_0 I'm actually working myself on a solution to that redundancy, using set reconciliation algorithms to find differences between known invs instead of just broadcasting them all.  

---

### Answer by username_3 on 2018-12-19. Score: 1

In the case of confirming that a transaction has been successfully submitted, failure to use mempool as a distributed pool means you'd have to query that one "mining node". Example: I send a transaction with my wallet directly to that 1 node to pay for a service. The service gives 10 minutes to see the transaction before invalidating the entire thing. Unless the service is looking right at that node, then how would it know's it's been submitted to the network?

Basically there are many use cases where confirming that a transaction exists (but not mined) can be particularly important. Interacting with a network that all shares the same mempool means no matter where you send it from/to it'll be visible everywhere to everyone.

Imagine how many times you'd end up telling a person "I sent it, you'll have to wait to see it." As it is now block explorers will detect the transaction in most cases within seconds. You can almost instantly point and say "See, it's processing". Thanks to mempool.

> **Comments:**
> **username_1**: This is true in practice, the mempool and its associated unconfirmed tx relay are used to actually inform the receiver about a payment. But not doing so is not in contradiction to OP's question; you could a transaction to the recipient and miners (somehow). If the recipient doesn't believe it was sent to miners he could do it himself as well.  
> **username_0**: Once a node receives the 'new' transactions from the mined block, the node could theoretically verify all the transactions by itself without a need for a mempool of transactions correct? Just following the same procedure it does before adding it to the mempool currently?  

---

### Answer by username_4 on 2018-12-19. Score: 0

That could significantly lower the chances of the transaction being mined if, say that mining node's miners represented a very small fraction of the hashpower of the network. If only a small subset of the network hashpower is mining a specific transaction, it may take very long or never get mined at all. You'd have to calculate how often those miners win a block to know the average confirmation time sending to that node.

**Edit**: Misunderstood the question. Relaying transactions to all "mining" nodes shouldn't really affect security other than relaying the transaction to all mining nodes may take longer if it hits dead ends (with "non-mining" nodes). Also, some nodes are used to make block explorers and wallets who usually can tell you the tx is pending, but they wouldn't have the tx until is was mined. Also, you can already whitelist nodes from which you will relay transactions in `bitcoind` using the `-whitelist` flag.

> **Comments:**
> **username_0**: I'm talking about sending the transaction to all the mining nodes within the network, so no matter what node mined the new block, they will have all the latest transactions in their pool to choose from. Is it theoretically necessary for all the other nodes who aren't mining a block to know about the transactions before it is mined within the block?  
> **username_4**: Ah, well there isn't a security reason this wouldn't work, really, other than the transaction relay to all mining nodes may take longer if it hits dead ends. Also, some nodes are used to make block explorers who usually can tell you the tx is pending, but they wouldn't have the tx until is was mined. You can already whitelist nodes if you want in `bitcoind` using the `-whitelist` flag.  
> **username_1**: I think you mean `-addnode` instead of `-whitelist`.  
> **username_4**: `addnode` will still allow other nodes to connect and relay txs if they are connected to the node you added, right?  

---

