<p>If you have not seen this yet, here is a <a href="http://www.zerohedge.com/sites/default/files/images/user3303/imageroot/2013/05/20130512_BTC.jpg" rel="nofollow noreferrer">diagram by zerohedge.com</a> I found enlightening in order to understand how transactions fit into the Bitcoin concept.</p>

<p>The wiki at <a href="https://en.bitcoin.it/wiki/Transactions" rel="nofollow noreferrer">bitcoin.it has a more in detail overview</a> of the inner works of Transactions and the inner workings of <a href="https://en.bitcoin.it/wiki/Raw_Transactions" rel="nofollow noreferrer">Raw Transactions</a>.</p>

<p>From what I understand inputs to Bitcoin addresses are always spent completely in a transaction, so whatever you don't assign to a recipient will be available to be collected by a miner as transaction fee. So you'd need to set your client software to use the same address as source as well as for the recipient address of the transaction's change.</p>

<p>You could create a transaction that collects the complete balance from your wallet and sends them to a single output address. However, it is beneficial to use more than one address in order to make it more difficult to connect different transactions as belonging to the same identity. The <a href="https://en.bitcoin.it/wiki/Anonymity" rel="nofollow noreferrer">bitcoin.it wiki has more information on privacy concerns</a></p>

<p>Additionally, Gavin Andresen, the lead developer of the reference client explained <a href="https://bitcoin.stackexchange.com/q/1629/5406">in this question</a>, why change is sent to another address.</p>

CC BY-SA 3.0
2013-08-19T10:43:10.977Z
I'd say that diagram shows more of miner part rather than transactions core. and there's no such thing as total privacy, you should have known that... anyway it's not my concern now, i'm just learning how to use bitcoins the different ways. thank you for pointing out the nature of spending and fees. i should go ask about createrawtransaction next.
kanojo
CC BY-SA 3.0
2013-08-19T12:58:30.867Z
Of course there is no total privacy, which I haven't claimed either. :)
Murch
CC BY-SA 3.0
2013-08-20T14:03:14.800Z
Just a small error in your explanation. It's not addresses that are spent as a whole, rather it's inputs to a given address. Inputs can be seen as the individual amounts that were transferred in one go to an address. So if you received two payments of 1 BTC to an address, and then send 0.7 BTC from that address, then one of the 1 BTC inputs is spent. 0.7 BTC are sent to the destination and the 0.3 BTC in change are going to another address (usually a new one) that you own.
cdecker
CC BY-SA 3.0
2013-08-20T15:06:43.310Z
i understand it entirely now. those **inputs**, otherwise known as **parts of transactions** are spent. address(technically, pubkey) is just used to allow only an owner of a certain inputs to spend them, having them signed with his privkey. address does not store anything. it's just an identifier of a person(s) on the bitcoin network.
kanojo
CC BY-SA 3.0
2013-08-19T04:19:33.540Z
2013-08-22T16:52:32.433Z
2017-04-13T12:47:33.283Z
Murch
<p>You can modify bitcoin client source a bit, so that it doesn't generate new addresses after using previous one. You actually need to set sth like <code>keyUsed = false</code> in getaddress and compile.<br>
For consolidating use raw transactions, however bear in mind that creating a transaction from lots of previous outputs requires a lot of copy &amp; paste, or some fun with pywallet to export all transactions.</p>

CC BY-SA 3.0
2013-08-19T21:18:12.333Z
i would have rather refrain from modifying cryptographic software unless i'm a hero like ones who write it. but creating raw transactions is sorta interesting, at least, at the beginning, or useful, at some point. and at least you know what you're doing.
kanojo
CC BY-SA 3.0
2013-08-19T15:36:22.150Z
2013-08-19T15:36:22.150Z
ripazha
<p>i did read up some stuff about bitcoin but never used it until today. i might be asking something very obvious, but how can i get rid of address forking? that is, after several transactions my address list grown and each has a tiny amount of btc(its a mess now, and it was unexpected for me). i would like to send further transactions without implicit generation of new addresses, how can that be achieved? i use bitcoin-qt or bitcoind.</p>

<p>should i be using createrawtransaction to reassemble my btc to one address and avoid forking in the future?</p>

CC BY-SA 3.0
2013-08-19T05:20:21.863Z
That's how it's supposed to work. Why don't you want your funds to be split between several addresses?
Meni Rosenfeld
CC BY-SA 3.0
2013-08-19T13:07:32.170Z
I think that I at least on a conceptual level answered your questions (of which I counted three). If you feel that I have not answered your question completely, it might help if you improved your question to have a clearer aim. I.e. pose each question by itself. If you feel that I have answered your question, please accept my answer.
Murch
<address>
multiple outputs, address forking
kanojo
# multiple outputs, address forking

(Asked by: username_0 on 2013-08-19)

i did read up some stuff about bitcoin but never used it until today. i might be asking something very obvious, but how can i get rid of address forking? that is, after several transactions my address list grown and each has a tiny amount of btc(its a mess now, and it was unexpected for me). i would like to send further transactions without implicit generation of new addresses, how can that be achieved? i use bitcoin-qt or bitcoind.

should i be using createrawtransaction to reassemble my btc to one address and avoid forking in the future?

**Tags:** address

> **Comments:**
> **username_1**: That's how it's supposed to work. Why don't you want your funds to be split between several addresses?  
> **username_2**: I think that I at least on a conceptual level answered your questions (of which I counted three). If you feel that I have not answered your question completely, it might help if you improved your question to have a clearer aim. I.e. pose each question by itself. If you feel that I have answered your question, please accept my answer.  

---

## 2 answers

### Answer by username_2 on 2013-08-19. Score: 2 | Accepted answer

If you have not seen this yet, here is a [diagram by zerohedge.com](http://www.zerohedge.com/sites/default/files/images/user3303/imageroot/2013/05/20130512_BTC.jpg) I found enlightening in order to understand how transactions fit into the Bitcoin concept.

The wiki at [bitcoin.it has a more in detail overview](https://en.bitcoin.it/wiki/Transactions) of the inner works of Transactions and the inner workings of [Raw Transactions](https://en.bitcoin.it/wiki/Raw_Transactions).

From what I understand inputs to Bitcoin addresses are always spent completely in a transaction, so whatever you don't assign to a recipient will be available to be collected by a miner as transaction fee. So you'd need to set your client software to use the same address as source as well as for the recipient address of the transaction's change.

You could create a transaction that collects the complete balance from your wallet and sends them to a single output address. However, it is beneficial to use more than one address in order to make it more difficult to connect different transactions as belonging to the same identity. The [bitcoin.it wiki has more information on privacy concerns](https://en.bitcoin.it/wiki/Anonymity)

Additionally, Gavin Andresen, the lead developer of the reference client explained [in this question](https://bitcoin.stackexchange.com/q/1629/5406), why change is sent to another address.

> **Comments:**
> **username_0**: I'd say that diagram shows more of miner part rather than transactions core. and there's no such thing as total privacy, you should have known that... anyway it's not my concern now, i'm just learning how to use bitcoins the different ways. thank you for pointing out the nature of spending and fees. i should go ask about createrawtransaction next.  
> **username_2**: Of course there is no total privacy, which I haven't claimed either. :)  
> **username_3**: Just a small error in your explanation. It's not addresses that are spent as a whole, rather it's inputs to a given address. Inputs can be seen as the individual amounts that were transferred in one go to an address. So if you received two payments of 1 BTC to an address, and then send 0.7 BTC from that address, then one of the 1 BTC inputs is spent. 0.7 BTC are sent to the destination and the 0.3 BTC in change are going to another address (usually a new one) that you own.  
> **username_0**: i understand it entirely now. those **inputs**, otherwise known as **parts of transactions** are spent. address(technically, pubkey) is just used to allow only an owner of a certain inputs to spend them, having them signed with his privkey. address does not store anything. it's just an identifier of a person(s) on the bitcoin network.  

---

### Answer by username_4 on 2013-08-19. Score: 1

You can modify bitcoin client source a bit, so that it doesn't generate new addresses after using previous one. You actually need to set sth like `keyUsed = false` in getaddress and compile.  
For consolidating use raw transactions, however bear in mind that creating a transaction from lots of previous outputs requires a lot of copy & paste, or some fun with pywallet to export all transactions.

> **Comments:**
> **username_0**: i would have rather refrain from modifying cryptographic software unless i'm a hero like ones who write it. but creating raw transactions is sorta interesting, at least, at the beginning, or useful, at some point. and at least you know what you're doing.  

---

