<p>When MultiBit imports a private key also in the import file is the key birthdate I.e when it was first generated.</p>

<p>From that date it looks up the most recent checkpoint (about every 2000 blocks) in a list of checkpoints it stores.</p>

<p>Then it contacts a bitcoind and says 'give me all the blocks from block (say) 200,000. Here is the bloom filter I want you to use to filter the blocks'.</p>

<p>This is fairly time consuming  compared to if you have a blockstore. (Or something like a remote server like Electrum and Mycelium do). The advantage is that it only uses the Bitcoin Network.</p>

<p>It now has all the relevant transactions for that private key and hence can calculate the overall balance.</p>

CC BY-SA 3.0
2014-08-26T07:37:26.293Z
In short: it *does* go through all blocks in the chain. However, this happens on another machine, it skips parts from before wallet creation, and uses Bloom filters to speed up the communication.
Pieter Wuille
CC BY-SA 3.0
2014-08-26T11:07:59.390Z
But how do you verify the integrity of a block without all of its contents; only with a filtered portion? Couldn't a dishonest bitcoind report incorrect filtered content? Or does the bloom filter simply ask bitcoind "Give me only the blocks where my address appears"?
Luca Matteis
CC BY-SA 3.0
2014-08-26T06:57:03.187Z
2014-08-26T06:57:03.187Z
jim618
<p>MultiBit is a Simplified Payment Verification (SPV) client that uses the merkle root of block headers to validate transactions. I'm wondering however, when an address (private key) is imported into MultiBit, how does it know its balance without going through all the transactions within the blockchain?</p>

<multibit><thin-clients><spv>
How does MultiBit figure out balance of an imported address?
Luca Matteis
# How does MultiBit figure out balance of an imported address?

(Asked by: username_0 on 2014-08-25)

MultiBit is a Simplified Payment Verification (SPV) client that uses the merkle root of block headers to validate transactions. I'm wondering however, when an address (private key) is imported into MultiBit, how does it know its balance without going through all the transactions within the blockchain?

**Tags:** multibit, thin-clients, spv


---

## 1 answers

### Answer by username_1 on 2014-08-26. Score: 2 | Accepted answer

When MultiBit imports a private key also in the import file is the key birthdate I.e when it was first generated.

From that date it looks up the most recent checkpoint (about every 2000 blocks) in a list of checkpoints it stores.

Then it contacts a bitcoind and says 'give me all the blocks from block (say) 200,000. Here is the bloom filter I want you to use to filter the blocks'.

This is fairly time consuming compared to if you have a blockstore. (Or something like a remote server like Electrum and Mycelium do). The advantage is that it only uses the Bitcoin Network.

It now has all the relevant transactions for that private key and hence can calculate the overall balance.

> **Comments:**
> **username_2**: In short: it *does* go through all blocks in the chain. However, this happens on another machine, it skips parts from before wallet creation, and uses Bloom filters to speed up the communication.  
> **username_0**: But how do you verify the integrity of a block without all of its contents; only with a filtered portion? Couldn't a dishonest bitcoind report incorrect filtered content? Or does the bloom filter simply ask bitcoind "Give me only the blocks where my address appears"?  

---

