<p>They will not do so automatically. When a peer sets a bloom filter, the node will not do any additional work except note that there is a bloom filter set for a given peer and begin matching things against the filter. It will not go back in history to match historical data against the filter and then relaying everything that matches. Doing so would be computationally expensive and a way to effectively DoS a node.</p>

<p>Instead of giving a node the historical data, the peer that set the filter must ask for it. They do so by sending <code>getdata</code> messages for historical blocks and the full node will pull up those blocks, match them against the filter, and then send a <code>merkleblock</code> message. This way it's easier to avoid being DoS'd and the receiving peer can specify where the full node should start and stop so that it can get the data it wants as quickly as possible.</p>

CC BY-SA 3.0
2018-01-16T02:43:52.760Z
2018-01-16T02:43:52.760Z
Ava Chow
<p>I assume that an spv client like bitcoinJ requested transactions related to the client one week before and the client has been offline for a week. When the spv client come online, does it just request new transactions which has been created while it was offline? </p>

<p>Also, does a full client which receives a bloom filter from the spv client check only the new transactions, or all the blockchain from the genesis block?</p>

<spv><bip37-bloom-filter>
Bitcoin full clients checks all the blockchain every time they receive bloom filter?
yahoge
# Bitcoin full clients checks all the blockchain every time they receive bloom filter?

(Asked by: username_0 on 2018-01-16)

I assume that an spv client like bitcoinJ requested transactions related to the client one week before and the client has been offline for a week. When the spv client come online, does it just request new transactions which has been created while it was offline?

Also, does a full client which receives a bloom filter from the spv client check only the new transactions, or all the blockchain from the genesis block?

**Tags:** spv, bip37-bloom-filter


---

## 1 answers

### Answer by username_1 on 2018-01-16. Score: 1 | Accepted answer

They will not do so automatically. When a peer sets a bloom filter, the node will not do any additional work except note that there is a bloom filter set for a given peer and begin matching things against the filter. It will not go back in history to match historical data against the filter and then relaying everything that matches. Doing so would be computationally expensive and a way to effectively DoS a node.

Instead of giving a node the historical data, the peer that set the filter must ask for it. They do so by sending `getdata` messages for historical blocks and the full node will pull up those blocks, match them against the filter, and then send a `merkleblock` message. This way it's easier to avoid being DoS'd and the receiving peer can specify where the full node should start and stop so that it can get the data it wants as quickly as possible.


---

