<p>SPV nodes usually only look at block headers, and then will download some of the actual block data of blocks which other peers have told them contain transactions relevant to them. SPV nodes are relying on at least one of their peers to be honest and report when a transaction appears on the network that is relevant to them. </p>

<p>But how do other peers know which transactions the SPV nodes want to know about?</p>

<p>SPV nodes essentially give their full-node peers a filter, called a bloom filter, that tells the nodes that download all the transaction data which transactions to send to the spv node. This filter also has a built-in false positive rate, so that the SPV nodes don't have to show exactly which addresses are theirs (essentially a built-in privacy level). Rather they make a filter that will validate a superset of transactions that the node is actually interested in. </p>

<p>The <code>filteradd</code>, <code>filterclear</code>, and <code>filterload</code> are the relevant p2p protocol methods. The bitcoin developer documentation goes into more detail <a href="https://bitcoin.org/en/developer-reference#filteradd" rel="nofollow">here</a>. </p>

CC BY-SA 3.0
2015-03-09T18:56:59.747Z
2015-05-11T16:12:31.140Z
2015-05-11T16:12:31.140Z
morsecoder
<p>Using SPV the client can assure that a transaction is inside a block, but how does it know in which blocks to look?</p>

<block><spv>
How do thin-clients know in which blocks to look?
randomname453
# How do thin-clients know in which blocks to look?

(Asked by: username_0 on 2015-03-09)

Using SPV the client can assure that a transaction is inside a block, but how does it know in which blocks to look?

**Tags:** block, spv


---

## 1 answers

### Answer by username_1 on 2015-03-09. Score: 3 | Accepted answer

SPV nodes usually only look at block headers, and then will download some of the actual block data of blocks which other peers have told them contain transactions relevant to them. SPV nodes are relying on at least one of their peers to be honest and report when a transaction appears on the network that is relevant to them.

But how do other peers know which transactions the SPV nodes want to know about?

SPV nodes essentially give their full-node peers a filter, called a bloom filter, that tells the nodes that download all the transaction data which transactions to send to the spv node. This filter also has a built-in false positive rate, so that the SPV nodes don't have to show exactly which addresses are theirs (essentially a built-in privacy level). Rather they make a filter that will validate a superset of transactions that the node is actually interested in.

The `filteradd`, `filterclear`, and `filterload` are the relevant p2p protocol methods. The bitcoin developer documentation goes into more detail [here](https://bitcoin.org/en/developer-reference#filteradd).


---

