Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YrGiC-0001Pu-SO for bitcoin-development@lists.sourceforge.net; Sun, 10 May 2015 02:11:24 +0000 X-ACL-Warn: Received: from resqmta-ch2-02v.sys.comcast.net ([69.252.207.34]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1YrGiB-0008DB-5W for bitcoin-development@lists.sourceforge.net; Sun, 10 May 2015 02:11:24 +0000 Received: from resomta-ch2-08v.sys.comcast.net ([69.252.207.104]) by resqmta-ch2-02v.sys.comcast.net with comcast id S2BC1q0072Fh1PH012BH6x; Sun, 10 May 2015 02:11:17 +0000 Received: from crushinator.localnet ([IPv6:2601:6:4800:47f:1e4e:1f4d:332c:3bf6]) by resomta-ch2-08v.sys.comcast.net with comcast id S2BE1q00D2JF60R012BG2h; Sun, 10 May 2015 02:11:17 +0000 From: Matt Whitlock To: bitcoin-development@lists.sourceforge.net Date: Sat, 09 May 2015 22:11:13 -0400 Message-ID: <2114827.D6GUhXtGkV@crushinator> User-Agent: KMail/4.14.7 (Linux/3.18.11-gentoo; KDE/4.14.7; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [69.252.207.34 listed in list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YrGiB-0008DB-5W Subject: Re: [Bitcoin-development] A suggestion for reducing the size of the UTXO database X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 May 2015 02:11:24 -0000 Minimizing the number of UTXOs in a wallet is sometimes not in the best interests of the user. In fact, quite often I've wished for a configuration option like "Try to maintain _[number]_ UTXOs in the wallet." This is because I often want to make multiple spends from my wallet within one block, but spends of unconfirmed inputs are less reliable than spends of confirmed inputs, and some wallets (e.g., Andreas Schildbach's wallet) don't even allow it - you can only spend confirmed UTXOs. I can't tell you how aggravating it is to have to tell a friend, "Oh, oops, I can't pay you yet. I have to wait for the last transaction I did to confirm first." All the more aggravating because I know, if I have multiple UTXOs in my wallet, I can make multiple spends within the same block. On Saturday, 9 May 2015, at 12:09 pm, Jim Phillips wrote: > Forgive me if this idea has been suggested before, but I made this > suggestion on reddit and I got some feedback recommending I also bring it > to this list -- so here goes. > > I wonder if there isn't perhaps a simpler way of dealing with UTXO growth. > What if, rather than deal with the issue at the protocol level, we deal > with it at the source of the problem -- the wallets. Right now, the typical > wallet selects only the minimum number of unspent outputs when building a > transaction. The goal is to keep the transaction size to a minimum so that > the fee stays low. Consequently, lots of unspent outputs just don't get > used, and are left lying around until some point in the future. > > What if we started designing wallets to consolidate unspent outputs? When > selecting unspent outputs for a transaction, rather than choosing just the > minimum number from a particular address, why not select them ALL? Take all > of the UTXOs from a particular address or wallet, send however much needs > to be spent to the payee, and send the rest back to the same address or a > change address as a single output? Through this method, we should wind up > shrinking the UTXO database over time rather than growing it with each > transaction. Obviously, as Bitcoin gains wider adoption, the UTXO database > will grow, simply because there are 7 billion people in the world, and > eventually a good percentage of them will have one or more wallets with > spendable bitcoin. But this idea could limit the growth at least. > > The vast majority of users are running one of a handful of different wallet > apps: Core, Electrum; Armory; Mycelium; Breadwallet; Coinbase; Circle; > Blockchain.info; and maybe a few others. The developers of all these > wallets have a vested interest in the continued usefulness of Bitcoin, and > so should not be opposed to changing their UTXO selection algorithms to one > that reduces the UTXO database instead of growing it. > > >From the miners perspective, even though these types of transactions would > be larger, the fee could stay low. Miners actually benefit from them in > that it reduces the amount of storage they need to dedicate to holding the > UTXO. So miners are incentivized to mine these types of transactions with a > higher priority despite a low fee. > > Relays could also get in on the action and enforce this type of behavior by > refusing to relay or deprioritizing the relay of transactions that don't > use all of the available UTXOs from the addresses used as inputs. Relays > are not only the ones who benefit the most from a reduction of the UTXO > database, they're also in the best position to promote good behavior. > > -- > *James G. Phillips IV* > > > *"Don't bunt. Aim out of the ball park. Aim for the company of immortals." > -- David Ogilvy* > > *This message was created with 100% recycled electrons. Please think twice > before printing.*