Bitcoin Forum
June 22, 2018, 02:31:50 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Collecting dust -- input selection in bitcoind/bitcoin-qt  (Read 956 times)
Offline Offline

Activity: 1444
Merit: 1001

View Profile WWW
March 18, 2013, 09:49:53 AM

After having used a wallet for a while, my list of unspent outputs grow larger and larger.  Small outputs with thousands of confirmations.  To me it's dust, because I rarely send a payment of less than 1 BTC.  The reason for this is IMHO bad selection of inputs.  The client tries to find the transaction which spends the least inputs, instead of making the transaction with the highest priority.  This costs unnecessary fees as well.

E.g. I recently sent a payment of 3 BTC.  The client found a 3 BTC input with seven confirmations, decided it needed to add a fee and selected an extra input to pay the fee.  The extra input made a change output necessary, and I ended up with a rather low priority transaction with two inputs, two outputs (one very small), and a fee.

The client had many larger and older outputs to choose from, which would have genereated a higher prioirity transaction with one input and two outputs, no output smaller than 1 BTC.  This could have been sent without a fee.

Another possibility is to collect some of the dust (possible inputs < 1 BTC) with thousands of confirmations, adding up to 3.  If the resulting amount is larger, see if it can be reduced to exact by removing inputs.  If not leave a change, or possibly a fee if the extra output would require a fee > change amount.

I think the use-oldest-first method has a few benefits.
1) It is very simple and predictable.
2) Old dust will be collected.
3) In most cases it will generate a higher priority transaction due to higher age of inputs, making the transaction confirm faster.


Sjå for veksling av bitcoin mot norske kroner.  Trygt, billig, raskt og enkelt sidan 2010.
I buy with EUR and other currencies at a fair market price when you want to sell.  See
Warning: "Bitcoin" XT, Classic, Unlimited and the likes are scams. Don't use them, and don't listen to their shills.
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!