Is it the case that the blockchain has information on the balance associated with each public key-address, such that the client on my PC, say, will look at every public/private keys pair in wallet.dat, find all public keys in the blockchain for each of my private keys, sum up the balances for each, and show me the overall balance?
Asked
Active
Viewed 3,266 times
4
-
Essentially, yes. – Nick ODell Apr 21 '13 at 06:19
1 Answers
1
The Bitcoin-Qt/bitcoind client computes the balance as you describe, by summing up all the transactions for all the Bitcoin addresses in the wallet.dat.
The blockchain contains all transactions since the genesis block (block 0). So the balances are simply all the unspent transaction outputs (UTXOs).
There are third party services which will monitor the blockchain to provide balance info for a specified address or addresses. BTCBalance.net is one.

Stephen Gornick
- 27,040
- 12
- 67
- 141
-
I see, so there are no balances as such, only transactions. If I use the same address to receive / send the money 3 times, what will be recorded for that public key is, +20, -4, +7. These will be summed up along with everything else in the blockchain that corresponds to my wallet.dat when calculating the total balance. – Strychnine Apr 21 '13 at 18:20
-
And of course, the system rejects any transaction which would cause the balance for the public key used to become negative. – Strychnine Apr 21 '13 at 21:44
-