<p>Generally speaking, <a href="https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki" rel="nofollow">BIP37</a> bloom filtering SPV has atrocious scaling though it is hard to say exactly how poor it is in the real works.  </p>

<ul>
<li><p>Every peer must sync the entire block chain from the last they had contact with the network, in the worst case this is approximately 50GB. The node must load every single block from disk, filter it to the clients specifications and return the result. The amount will grow until the end of Bitcoin or time, whichever comes first. Without some protocol changes pruning is incompatible with BIP37 SPV as it expects all blocks to be available at all hosts. </p></li>
<li><p>For every wallet which is synchronized, each incoming block and transaction must be individually filtered. This involves a non negligible amount of CPU time, and must be done for each peer in turn for every inventory item. </p>

<ul>
<li><p>It is unclear exactly how much CPU power an average node has, but at least some portion of nodes are running on bottom of the barrel hardware like a Raspberry Pi which is very unlikely to be able to happily serve more than a couple of peers at a time. </p>

<p>Similarly a large portion of listening nodes are hosted on budget VPS providers which offer a single shared core and extremely poor performance. <a href="https://getaddr.bitnodes.io/nodes/?q=ovh" rel="nofollow">OVH</a> has 300, <a href="https://getaddr.bitnodes.io/nodes/?q=hetzner" rel="nofollow">Hetzner</a> has 300 <a href="https://getaddr.bitnodes.io/nodes/?q=digital%20ocean" rel="nofollow">Digital Ocean</a> has 124, <a href="https://getaddr.bitnodes.io/nodes/?q=AS55053" rel="nofollow">CloudAtCost</a> is truly at the bottom of the pile with 6. </p></li>
</ul></li>
<li><p>BIP37 is vulnerable to trivial denial of service attacks, <a href="https://github.com/petertodd/bloom-io-attack" rel="nofollow">demonstration code is available</a> that is able to cripple nodes by fast inventory requests through filters causing continuous disk seek and high CPU usage.  It is tempting to say that clients could use proof of work (but this is impossible on a battery powered device like a phone) or micropayments (impossible if a node doesn't know it has received money yet) but neither really offers a clear solution.</p></li>
<li><p>There's also likely a lot less than 6000 listening nodes, some are pruned which is fairly useless for a SPV client to sync with, many are listening on both IPv4 and IPV6 and are duplicated in that number as a result. The real number of actual nodes is probably more along the lines of 5000, and the number of them not on dialup speed uplinks is substantially lower. </p></li>
</ul>

<blockquote>
  <p>Is it reasonable to expect millions of SPV node users connecting to ~6,000 full nodes?</p>
</blockquote>

<p>Absolutely not, even just for the reason that the code defaults to a maximum of 117 incoming connections which would be around half a million total available sockets in the network (the majority of which are already consumed today). </p>

CC BY-SA 3.0
2015-06-29T12:11:40.580Z
2015-10-26T22:55:34.267Z
2015-10-26T22:55:34.267Z
Claris
<p>SPV clients typically connect to full node peers and set filters on what information they download. How many SPV peers can a single full node support, typically? </p>

<p>Is it reasonable to expect millions of SPV node users connecting to <a href="https://getaddr.bitnodes.io/">~6,000</a> full nodes?</p>

<scalability><transaction-verification><spv>
Is the SPV client model scalable?
morsecoder
# Is the SPV client model scalable?

(Asked by: username_0 on 2015-05-11)

SPV clients typically connect to full node peers and set filters on what information they download. How many SPV peers can a single full node support, typically?

Is it reasonable to expect millions of SPV node users connecting to [~6,000](https://getaddr.bitnodes.io/) full nodes?

**Tags:** scalability, transaction-verification, spv


---

## 1 answers

### Answer by username_1 on 2015-06-29. Score: 6 | Accepted answer

Generally speaking, [BIP37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki) bloom filtering SPV has atrocious scaling though it is hard to say exactly how poor it is in the real works.

* Every peer must sync the entire block chain from the last they had contact with the network, in the worst case this is approximately 50GB. The node must load every single block from disk, filter it to the clients specifications and return the result. The amount will grow until the end of Bitcoin or time, whichever comes first. Without some protocol changes pruning is incompatible with BIP37 SPV as it expects all blocks to be available at all hosts.
* For every wallet which is synchronized, each incoming block and transaction must be individually filtered. This involves a non negligible amount of CPU time, and must be done for each peer in turn for every inventory item.

  + It is unclear exactly how much CPU power an average node has, but at least some portion of nodes are running on bottom of the barrel hardware like a Raspberry Pi which is very unlikely to be able to happily serve more than a couple of peers at a time.

    Similarly a large portion of listening nodes are hosted on budget VPS providers which offer a single shared core and extremely poor performance. [OVH](https://getaddr.bitnodes.io/nodes/?q=ovh) has 300, [Hetzner](https://getaddr.bitnodes.io/nodes/?q=hetzner) has 300 [Digital Ocean](https://getaddr.bitnodes.io/nodes/?q=digital%20ocean) has 124, [CloudAtCost](https://getaddr.bitnodes.io/nodes/?q=AS55053) is truly at the bottom of the pile with 6.
* BIP37 is vulnerable to trivial denial of service attacks, [demonstration code is available](https://github.com/petertodd/bloom-io-attack) that is able to cripple nodes by fast inventory requests through filters causing continuous disk seek and high CPU usage. It is tempting to say that clients could use proof of work (but this is impossible on a battery powered device like a phone) or micropayments (impossible if a node doesn't know it has received money yet) but neither really offers a clear solution.
* There's also likely a lot less than 6000 listening nodes, some are pruned which is fairly useless for a SPV client to sync with, many are listening on both IPv4 and IPV6 and are duplicated in that number as a result. The real number of actual nodes is probably more along the lines of 5000, and the number of them not on dialup speed uplinks is substantially lower.

> Is it reasonable to expect millions of SPV node users connecting to ~6,000 full nodes?

Absolutely not, even just for the reason that the code defaults to a maximum of 117 incoming connections which would be around half a million total available sockets in the network (the majority of which are already consumed today).


---

