Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: mgio on May 13, 2013, 01:05:27 AM



Title: Help me understand transactions please
Post by: mgio on May 13, 2013, 01:05:27 AM
I've been viewing the transactions I've made on blockchain.info, and I'm a little confused on what I am looking at. I guess there are parts of the bitcoin protocol that I don't undersand completely.

For example, the transaction 49d43691e1c001dd627116fd8dd3854e9c4531c5f5be19628f0a0d39a4444882
which you can see at: https://blockchain.info/tx/49d43691e1c001dd627116fd8dd3854e9c4531c5f5be19628f0a0d39a4444882

Show one input, that is my wallet, and two outputs, one of 0.4 to the address I sent 0.4 to, but it also shows 0.0836985 going to 1LLzHZAjQLGrGR5PLfnTNGxfTrB7pxbU6Q.

What is that all about? For the "estimated BTC transacted" amount it shows 0.4 which is correct.

So my question is, what is that other address for? Who owns? Where did that amount come from? And why is the amount only "estimated" by blockchain, shouldn't it know the exact amount?

Looking at all my transactions, it seems there are other addresses involved that are not my addresses, nor are they the addresses I've sent to.

Can someone explain to me how bitcoin transactions are recorded? I must be confused. Thanks.


Title: Re: Help me understand transactions please
Post by: maaku on May 13, 2013, 01:17:32 AM
They are change addresses, and you own them.


Title: Re: Help me understand transactions please
Post by: mgio on May 13, 2013, 02:41:58 AM
They are change addresses, and you own them.

Oh, so they are generated and added to my wallet when I send a transaction?

That would mean I should backup my wallet after every transaction?

Is there a way that I can see all the addresses in my wallet?

Finally, why does there have to be change. Why can't it just be a transaction for 0.4?


Title: Re: Help me understand transactions please
Post by: CIYAM on May 13, 2013, 02:57:02 AM
Your wallet has a "pool" of addresses (100 by default) so you don't need to back it up after each transaction but regular backups would be advisable (also note that your wallet keeps the "labels" you might assign to addresses so these could be lost if not backed up).

There is no simple way to see all your addresses in the current version of bitcoin-qt (you can play around with the console if you are really keen) but if the new "coin control" implementation gets merged then there will be an "expert" mode that would allow you to.

All payments are made from what are known as UTXOs (unspent transaction outputs) which put simply are the "coins" that have been sent to you (including any "coins" that you might have mined).

Each UTXO needs to be completely spent when used to create a transaction - so if you have 1 UTXO of 1 BTC and you want to send someone 0.25 BTC then the *only* way this can be done is to create a tx with 2 outputs - one of 0.25 and the other of 0.75 (with the latter being a "change" address).

Also note that "fees" are simply the difference between the total of the UTXOs and the transaction outputs (so if you had nominated to pay a 0.0005 fee then the 0.75 amount would become 0.7495).


Title: Re: Help me understand transactions please
Post by: Stephen Gornick on May 13, 2013, 04:22:32 AM
 - http://en.bitcoin.it/wiki/Change


Title: Re: Help me understand transactions please
Post by: mgio on May 13, 2013, 04:38:50 AM
Your wallet has a "pool" of addresses (100 by default) so you don't need to back it up after each transaction but regular backups would be advisable (also note that your wallet keeps the "labels" you might assign to addresses so these could be lost if not backed up).

There is no simple way to see all your addresses in the current version of bitcoin-qt (you can play around with the console if you are really keen) but if the new "coin control" implementation gets merged then there will be an "expert" mode that would allow you to.

All payments are made from what are known as UTXOs (unspent transaction outputs) which put simply are the "coins" that have been sent to you (including any "coins" that you might have mined).

Each UTXO needs to be completely spent when used to create a transaction - so if you have 1 UTXO of 1 BTC and you want to send someone 0.25 BTC then the *only* way this can be done is to create a tx with 2 outputs - one of 0.25 and the other of 0.75 (with the latter being a "change" address).

Also note that "fees" are simply the difference between the total of the UTXOs and the transaction outputs (so if you had nominated to pay a 0.0005 fee then the 0.75 amount would become 0.7495).


Thanks, I get it now. I forgot the blockchain doesn't store amounts for addresses but only the transactions.