Bitcoin Forum

Other => Beginners & Help => Topic started by: m0w3r on June 21, 2011, 07:47:52 PM



Title: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: m0w3r on June 21, 2011, 07:47:52 PM
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?


Title: Re: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: Rob P. on June 21, 2011, 07:54:33 PM
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.


Title: Re: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: kjj on June 21, 2011, 08:17:47 PM
Also, if you send, it will create a new address to receive the change.


Title: Re: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: m0w3r on June 21, 2011, 11:57:44 PM
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?



Title: Re: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: kjj on June 22, 2011, 12:12:23 AM
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 (http://blockexplorer.com).


Title: Re: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: Rob P. on June 22, 2011, 12:37:11 AM
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 (http://blockexplorer.com).

kjj, this is the absolutely best explanation I've read anywhere.  Nicely done.


Title: Re: Question regarding Bitcoin client: "receiving" addresses in Address Book
Post by: BitcoinPorn on June 22, 2011, 01:53:01 AM
Seriously well written, thanks for that.