0

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?

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.