<p>Whomever originates the transaction (the sender) <em>wants</em> their transaction completed as quickly as possible, especially if they attached a big "incentive" (fee) to it.</p>

<p>So they will announce their transaction to many other nodes.</p>

<p>Nothing really forces those nodes to share the transaction with all other nodes, although they are supposed to share it.  </p>

<p>But the original sender can send out the transaction to any node/pool/miner it thinks might be able to complete the transaction.  The sender will ultimately make sure the transaction is distributed widely, even if some nodes don't follow the sharing protocol.</p>

<p>In general, there is simply no reason to not share all transactions with other nodes.  When an exceptionally valuable transaction comes along, keeping it to yourself might sound like a good idea, but it'll get shared among the miners with or without your cooperation.</p>

CC BY-SA 3.0
2017-06-02T01:25:11.943Z
2017-06-02T01:25:11.943Z
abelenky
<p>A transaction can go in a block if it's valid (references inputs that are already in the same or previous blocks, scripts are legal and return success, and signatures validate ok), regardless of whether any other nodes have ever seen it before or not.  So if a "selfish" node associated with a particular miner receives a transaction, it's perfectly free to sit on it until it can include it in one of its own blocks.</p>

<p>That's why you don't send your transaction to just one node.  You send it to as many different nodes as you can.  (Bitcoin Core by default will try to remain connected to up to 125 nodes at any given time, and as far as I know it would attempt to send a newly created transaction to all 125 of them.)  Perhaps a few of those nodes are "selfish", but you hope that at least some of them are not affiliated with any particular miner, and will make an effort to relay your transaction as widely as they can, as is the default behavior of standard node software.  </p>

<p>With reasonable luck, your transaction will quickly propagate to every miner on the network, and each of them has an incentive (namely the fee) to include it in the very next block they mine.  (If Miner X declines to include it in his next block, hoping to sit on it until he mines another block at some later time, he risks that some other miner Y who has received the transaction will include it in one of <em>her</em> block before Miner X gets to mine a second block.  In that case, Miner X never gets the fee at all.)</p>

<p>So, a node that fails to relay a transaction, saving it for its next block, doesn't do much harm and also doesn't gain much.  A node that tries to save a transaction for a <em>later</em> block does some harm, but also risks a monetary loss, and so has an incentive not to do that.</p>

CC BY-SA 3.0
2017-06-02T01:26:57.683Z
2017-06-02T01:26:57.683Z
Nate Eldredge
<p>How are transactions provided to the miners?  And what keeps the following scenario from occurring?</p>

<hr>

<p>A valid transaction is initially reported to a "rogue" node, <code>A</code>, in the network.  If that node is a miner, it simply keeps the transaction for itself so that it can (eventually) obtain the incentive the next time it gets a block into the chain.  The network will accept the block since the transaction is valid, eh?</p>

<p>If the <code>A</code> is not a miner, it simply works with a "partner" miner <code>B</code> which gives <code>A</code> a portion of the incentive earned for each transaction <code>A</code> sends to <code>B</code> and <code>B</code> successfully got into the block chain.</p>

<hr>

<p>So, in a sense, what keeps miners from (illegally) paying other nodes in the network for more (valid) transactions?  In light of something like net neutrality, perhaps miners can pay to for better service from nodes that receive transactions?  How many nodes must know about a transaction before it can be put in a block?</p>

<transactions><mining-theory><relay><validation><block-validity>
What forces transactions to be visible to all miners?
jayflo
# What forces transactions to be visible to all miners?

(Asked by: username_0 on 2017-06-02)

How are transactions provided to the miners? And what keeps the following scenario from occurring?

---

A valid transaction is initially reported to a "rogue" node, `A`, in the network. If that node is a miner, it simply keeps the transaction for itself so that it can (eventually) obtain the incentive the next time it gets a block into the chain. The network will accept the block since the transaction is valid, eh?

If the `A` is not a miner, it simply works with a "partner" miner `B` which gives `A` a portion of the incentive earned for each transaction `A` sends to `B` and `B` successfully got into the block chain.

---

So, in a sense, what keeps miners from (illegally) paying other nodes in the network for more (valid) transactions? In light of something like net neutrality, perhaps miners can pay to for better service from nodes that receive transactions? How many nodes must know about a transaction before it can be put in a block?

**Tags:** transactions, mining-theory, relay, validation, block-validity


---

## 2 answers

### Answer by username_2 on 2017-06-02. Score: 6 | Accepted answer

A transaction can go in a block if it's valid (references inputs that are already in the same or previous blocks, scripts are legal and return success, and signatures validate ok), regardless of whether any other nodes have ever seen it before or not. So if a "selfish" node associated with a particular miner receives a transaction, it's perfectly free to sit on it until it can include it in one of its own blocks.

That's why you don't send your transaction to just one node. You send it to as many different nodes as you can. (Bitcoin Core by default will try to remain connected to up to 125 nodes at any given time, and as far as I know it would attempt to send a newly created transaction to all 125 of them.) Perhaps a few of those nodes are "selfish", but you hope that at least some of them are not affiliated with any particular miner, and will make an effort to relay your transaction as widely as they can, as is the default behavior of standard node software.

With reasonable luck, your transaction will quickly propagate to every miner on the network, and each of them has an incentive (namely the fee) to include it in the very next block they mine. (If Miner X declines to include it in his next block, hoping to sit on it until he mines another block at some later time, he risks that some other miner Y who has received the transaction will include it in one of *her* block before Miner X gets to mine a second block. In that case, Miner X never gets the fee at all.)

So, a node that fails to relay a transaction, saving it for its next block, doesn't do much harm and also doesn't gain much. A node that tries to save a transaction for a *later* block does some harm, but also risks a monetary loss, and so has an incentive not to do that.


---

### Answer by username_1 on 2017-06-02. Score: 4

Whomever originates the transaction (the sender) *wants* their transaction completed as quickly as possible, especially if they attached a big "incentive" (fee) to it.

So they will announce their transaction to many other nodes.

Nothing really forces those nodes to share the transaction with all other nodes, although they are supposed to share it.

But the original sender can send out the transaction to any node/pool/miner it thinks might be able to complete the transaction. The sender will ultimately make sure the transaction is distributed widely, even if some nodes don't follow the sharing protocol.

In general, there is simply no reason to not share all transactions with other nodes. When an exceptionally valuable transaction comes along, keeping it to yourself might sound like a good idea, but it'll get shared among the miners with or without your cooperation.


---

