Author

Topic: Question regarding Bitcoin client: "receiving" addresses in Address Book (Read 904 times)

hero member
Activity: 630
Merit: 500
Posts: 69
Seriously well written, thanks for that.
member
Activity: 84
Merit: 10
The client simplifies and automates your wallet.  Beyond curiosity, you really don't want to have to deal with the nuts and bolts.

When you send coins, you aren't sending from your balance, and you aren't sending from your addresses, you are sending from previous transactions that have been sent to keys in your wallet.  That part is critical, because a transaction can only be redeemed once, and always in full.

Say, you have received three transactions for 1.3, 4.6 and 0.5 BTC, for a total of 6.4 BTC.  You want to send 6.1 BTC to someone.  The client will create a transaction that redeems all three inputs, because it needs all three to reach the desired spend amount.  But that is 6.4 BTC, not 6.1 BTC, so it creates a new key and address to accept the "change", and finishes the transaction with two outputs, one for 6.1 BTC to the address you wanted to send to, and one of 0.3 BTC back to your wallet via the newly generated change address.

That is why spending coins can (and usually does) generate new addresses in your address book.  The GUI doesn't really show how your balance is distributed amongst your addresses, but I think you can get it on the command line, or by punching the addresses into the block explorer.

kjj, this is the absolutely best explanation I've read anywhere.  Nicely done.
kjj
legendary
Activity: 1302
Merit: 1026
The client simplifies and automates your wallet.  Beyond curiosity, you really don't want to have to deal with the nuts and bolts.

When you send coins, you aren't sending from your balance, and you aren't sending from your addresses, you are sending from previous transactions that have been sent to keys in your wallet.  That part is critical, because a transaction can only be redeemed once, and always in full.

Say, you have received three transactions for 1.3, 4.6 and 0.5 BTC, for a total of 6.4 BTC.  You want to send 6.1 BTC to someone.  The client will create a transaction that redeems all three inputs, because it needs all three to reach the desired spend amount.  But that is 6.4 BTC, not 6.1 BTC, so it creates a new key and address to accept the "change", and finishes the transaction with two outputs, one for 6.1 BTC to the address you wanted to send to, and one of 0.3 BTC back to your wallet via the newly generated change address.

That is why spending coins can (and usually does) generate new addresses in your address book.  The GUI doesn't really show how your balance is distributed amongst your addresses, but I think you can get it on the command line, or by punching the addresses into the block explorer.
full member
Activity: 131
Merit: 100
Appreciate your replies, I did some sending, but am still a bit confused with these addresses showing up:

Why does it create a new address when I send?

How do I know which specific address in the wallet has the bitcoins, all I see is a total balance?

kjj
legendary
Activity: 1302
Merit: 1026
Also, if you send, it will create a new address to receive the change.
member
Activity: 84
Merit: 10
Once you've labeled them, it creates new ones for you to label.

The behavior is a little erratic, but not too bad.  Just label them as you use them.
full member
Activity: 131
Merit: 100
I created 3 Receiving addresses (that I labeled) in my Address Book, but it appears 4 more were created somehow (they don't have a label).    What is the reason for the client creating these extra addresses?
Jump to: