1

SPV nodes rely on their peers to send them transaction data that is relevant to them. When an SPV node sets up a bloom filter with one of their full node peers, doesn't that only tell the full node which transactions to send the SPV node from now on?

How do SPV nodes catch up after being offline? Which p2p calls can they use to get their transaction info from their peers?

Nick ODell
  • 29,396
  • 11
  • 72
  • 130
morsecoder
  • 14,168
  • 2
  • 42
  • 94

1 Answers1

5

Block fetching requests are also filtered, so the client requests every single block they missed out on seeing since the last time they were last online, sequentially. The client downloads all block headers from genesis up to the current head using getheaders, sets a filter on their peer with filterload, and then downloads filtered blocks with getdata until they are in sync with the network. filteradd may be used in deterministic wallets to extend the filter to include more keys as used ones are discovered in their scan. When they are in sync, they will only receive new inventory that matches the filter.

Claris
  • 15,408
  • 2
  • 26
  • 43