<p>Have a look into the specifications <a href="https://en.bitcoin.it/wiki/Protocol_specification" rel="nofollow">https://en.bitcoin.it/wiki/Protocol_specification</a></p>

<p>Check the "inv" --> "getdata" --> "tx" sequence of transaction distribution</p>

CC BY-SA 3.0
2014-08-22T12:27:15.980Z
Thank you.  Wow, that is how I mentally outlined the possibility.  I guess this is efficient, but it seems like advertising data can become a huge network bloat, with time.
RLH
CC BY-SA 3.0
2014-08-22T12:32:00.213Z
Each node advertises data only to its peers. So, the incoming & outgoing traffic depends on the number (and size) of transactions, but does not depends on the size of network itself.
amaclin
CC BY-SA 3.0
2014-08-22T12:44:02.397Z
Yes, I understand. However, as the network increase and the number of transactions increase, total-network traffic should expand exponentially, correct? This is ultimately a graphing issue but I'm not to familiar with graphs. I was just curious of how BTC solves this problem (or if I'm missing something and it's not an issue at all!)
RLH
CC BY-SA 3.0
2014-08-22T12:58:29.167Z
The effective number of transactions is also limited by current protocol rules. Bitcoin miners solve ~6 blocks per hour, block can not be larger than 1 megabyte. Also there are some anti-flood mechanisms which prevent flood.
amaclin
CC BY-SA 3.0
2014-08-22T13:09:53.023Z
Would you happen to have any links to articles/wiki details, regarding the flood prevention?
RLH
CC BY-SA 3.0
2014-08-22T12:20:56.250Z
2014-08-22T12:20:56.250Z
amaclin
<p>How does the bitcoin core efficiently distribute transactions so that they are added to node transaction pools to be inserted into a future block?</p>

<p>I understand that each bitcoin node has a list of peers which they are in communication with.  As an originating node makes a payment, they send the payment across their peer network, which then continues the distribution process by forwarding the transactions to the peers within their peer list.</p>

<p>How is this process effeciently executed, such that transactions sent from one peer, sent numerous times across the network as it is distributed?  (For further clarification of the problem, see my <strong>Problem Outline</strong> below.)</p>

<p>In other words, how does a node resolve which peers to send new transactions to so that the transactions can be included into their local transaction pool?  If peer filtering doesn't take place, then the result would be a considerable amount of redundant, network traffic.</p>

<h2>PROBLEM OUTLINE</h2>

<p>Consider the following...</p>

<ol>
<li>Distribution level #1 - Originator <code>(A)</code> sends a transaction to peers <code>(B)</code> &amp; <code>(C)</code>.</li>
<li>Distribution level #2 - Peer <code>(B)</code> forwards the transaction to peers <code>(D)</code> &amp; <code>(E)</code>, &amp; peer <code>(C)</code> forwards the transaction to peers <code>(F)</code> &amp; <code>(G)</code>.</li>
<li>Distribution level #3 (Partial) - Peer <code>(D)</code> forwards the transaction to <code>(C)</code> and <code>(G)</code>.</li>
</ol>

<p>This is where we see the problem!  Peer <code>(D)</code> is completely unaware that nodes <code>(C)</code> and <code>(G)</code> have already received this transaction.  At best, <code>(D)</code> can only know that nodes <code>(A)-&gt;(B)-&gt;(D)</code> have received this transaction.  Since <code>(D)</code> is completely unaware of the state of the transaction in nodes <code>(C)</code>, <code>(E)</code> &amp; <code>(F)</code>, peer <code>(D)</code> can potentially forward the transaction along to a high number of peers that are aware of the transaction.  </p>

<p>Scale this to thousands of nodes and thousands of transactions and you could have a BIG problem.  How is this resolved?</p>

<transactions><peers>
How are transactions efficiently distributed to network nodes before inclusion within blocks?
RLH
# How are transactions efficiently distributed to network nodes before inclusion within blocks?

(Asked by: username_0 on 2014-08-22)

How does the bitcoin core efficiently distribute transactions so that they are added to node transaction pools to be inserted into a future block?

I understand that each bitcoin node has a list of peers which they are in communication with. As an originating node makes a payment, they send the payment across their peer network, which then continues the distribution process by forwarding the transactions to the peers within their peer list.

How is this process effeciently executed, such that transactions sent from one peer, sent numerous times across the network as it is distributed? (For further clarification of the problem, see my **Problem Outline** below.)

In other words, how does a node resolve which peers to send new transactions to so that the transactions can be included into their local transaction pool? If peer filtering doesn't take place, then the result would be a considerable amount of redundant, network traffic.

## PROBLEM OUTLINE

Consider the following...

1. Distribution level #1 - Originator `(A)` sends a transaction to peers `(B)` & `(C)`.
2. Distribution level #2 - Peer `(B)` forwards the transaction to peers `(D)` & `(E)`, & peer `(C)` forwards the transaction to peers `(F)` & `(G)`.
3. Distribution level #3 (Partial) - Peer `(D)` forwards the transaction to `(C)` and `(G)`.

This is where we see the problem! Peer `(D)` is completely unaware that nodes `(C)` and `(G)` have already received this transaction. At best, `(D)` can only know that nodes `(A)->(B)->(D)` have received this transaction. Since `(D)` is completely unaware of the state of the transaction in nodes `(C)`, `(E)` & `(F)`, peer `(D)` can potentially forward the transaction along to a high number of peers that are aware of the transaction.

Scale this to thousands of nodes and thousands of transactions and you could have a BIG problem. How is this resolved?

**Tags:** transactions, peers


---

## 1 answers

### Answer by username_1 on 2014-08-22. Score: 2 | Accepted answer

Have a look into the specifications <https://en.bitcoin.it/wiki/Protocol_specification>

Check the "inv" --> "getdata" --> "tx" sequence of transaction distribution

> **Comments:**
> **username_0**: Thank you.  Wow, that is how I mentally outlined the possibility.  I guess this is efficient, but it seems like advertising data can become a huge network bloat, with time.  
> **username_1**: Each node advertises data only to its peers. So, the incoming & outgoing traffic depends on the number (and size) of transactions, but does not depends on the size of network itself.  
> **username_0**: Yes, I understand. However, as the network increase and the number of transactions increase, total-network traffic should expand exponentially, correct? This is ultimately a graphing issue but I'm not to familiar with graphs. I was just curious of how BTC solves this problem (or if I'm missing something and it's not an issue at all!)  
> **username_1**: The effective number of transactions is also limited by current protocol rules. Bitcoin miners solve ~6 blocks per hour, block can not be larger than 1 megabyte. Also there are some anti-flood mechanisms which prevent flood.  
> **username_0**: Would you happen to have any links to articles/wiki details, regarding the flood prevention?  

---

