Bitcoin Forum

Other => Beginners & Help => Topic started by: mike80439 on September 09, 2011, 12:49:55 PM



Title: Bitcoin fragmentation
Post by: mike80439 on September 09, 2011, 12:49:55 PM
Unless bitcoins are aggregated at some point, won't we eventually have gazillios of .0001 coins in our wallets?

When I spend a bitcoin, does the client aggregate the smallest amounts into a larger abount?



Title: Re: Bitcoin fragmentation
Post by: casascius on September 09, 2011, 12:52:05 PM
Coins don't aggregate automatically, but if you send a transaction bigger than any of the individual "coins" in your wallet, the transaction will effectively combine enough of your coins to cover the transaction, the result being an aggregate "coin" whose value is the sum of all the inputs.  The only way to get a bunch of 0.0001's in your wallet is to receive many transactions of that size and then, importantly, to never send any of them out.  If your wallet only contains 0.0001's and you do a single send transaction, the ones you send will combine.


Title: Re: Bitcoin fragmentation
Post by: bitlotto on September 09, 2011, 02:45:17 PM
If you look at one of my draws:
https://blockexplorer.com/address/1Gw6NJpoaBmaG77px8p6jE63SqpykrJcRx
You see a whole bunch of 0.25 amounts. When I pay the winner it looks like:
https://blockexplorer.com/tx/be309f53b41534073e9a3f57066907ca2db7a81a153f6dd7ceadd59f599605b1
The next time the winner spends it:
https://blockexplorer.com/tx/b72dfca4cc2d69a0b0dcb662677bd9631184bb615561efae880efb4ecd4325d5

So yes, Bitcoin will group up the coins with time. Sometimes Bitcoin will have many change addresses and for those to be combined you have to spend an amount bigger than the change addresses. So if you spent all your BTC back to yourself it will combine all your coins. Not really worth it though as it doesn't really accomplish much and you may end up paying fees depending on how many small amounts you have.


Title: Re: Bitcoin fragmentation
Post by: MadHacker on September 09, 2011, 08:03:48 PM
SO i could just send the bitcoins to myself and that would defrag my bitcoins as well?


Title: Re: Bitcoin fragmentation
Post by: casascius on September 09, 2011, 08:08:29 PM
SO i could just send the bitcoins to myself and that would defrag my bitcoins as well?

It would, but the way the current software works, it doesn't delete old transactions.  So while yes they would be defragmented, every node on the entire network would also have the old fragmented copy as well.

I will bet soon enough there will be a client that can ignore or discard old transactions, because the growth of the block chain and every user having to download it is going to be unsustainable.  But for now, it will have no practical benefit.


Title: Re: Bitcoin fragmentation
Post by: julz on September 11, 2011, 06:36:05 AM
SO i could just send the bitcoins to myself and that would defrag my bitcoins as well?

Yes - but read some of the answers on this stackexchange question to see why you might not want to do this:

http://bitcoin.stackexchange.com/questions/792/in-order-to-reduce-fees-can-i-consolidate-my-wallet-by-sending-the-entire-bala