From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YrC33-0001SH-MV for bitcoin-development@lists.sourceforge.net; Sat, 09 May 2015 21:12:37 +0000 X-ACL-Warn: Received: from mail-wi0-f174.google.com ([209.85.212.174]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YrC30-0005UW-9e for bitcoin-development@lists.sourceforge.net; Sat, 09 May 2015 21:12:37 +0000 Received: by wiun10 with SMTP id n10so59991012wiu.1 for ; Sat, 09 May 2015 14:12:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=p8dOWM1bbgcJGfUHXpLFQTeVb0MbJqmWohify10UDBE=; b=aiFx4h7Ch9KuB6MDKqtOe7qeuCJMhrUPvpuXTCkNAzCFFlQ7Q5kfx7hk7SPqFymaJZ vWeIOgFeWpXrfQ2ve9eLs63c7bmEIrnVv2SfSGhb+wiPTVWB8NpByTKH5LqqSuqEfy7Y 0GzrFBSJKlMu35Wu3q0JhpFLI2MtdPAWg7XoTFt5ZllQp9ncCgoqqoqgA7OMZaCxQtMj Dvt59f82R0E/K1dTGIBIden+U8O/TPWQVLj+esTKnQVJLTunF/o4fDxS28VPoNwmF4Zx STv8vrLe6ip+6QjC6o2F07Y5HhIkdlGzuMqdM9f44y6/jHedDJ+nQGxwqdyAsg++IO9H oa1A== X-Gm-Message-State: ALoCoQnsL33SCndoFTBb3ahoWABLxCakiDBBSirmXrPAixheM7031aBu/72aZeBRS5nDHWP/Czc6 X-Received: by 10.194.185.82 with SMTP id fa18mr7185230wjc.50.1431205948177; Sat, 09 May 2015 14:12:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.246.69 with HTTP; Sat, 9 May 2015 14:11:57 -0700 (PDT) In-Reply-To: References: From: Jim Phillips Date: Sat, 9 May 2015 16:11:57 -0500 Message-ID: To: Pieter Wuille Content-Type: multipart/alternative; boundary=047d7bb04b0e2455090515ac9a17 X-Spam-Score: 1.1 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 HTML_MESSAGE BODY: HTML included in message 0.0 T_REMOTE_IMAGE Message contains an external image 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YrC30-0005UW-9e Cc: Andreas Schildbach , Bitcoin Dev 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: Sat, 09 May 2015 21:12:37 -0000 --047d7bb04b0e2455090515ac9a17 Content-Type: text/plain; charset=UTF-8 Makes sense.. So with that said, I'd propose the following criteria for selecting UTXOs: 1. Select the smallest possible set of addresses that can be linked in order to come up with enough BTC to send to the payee. 2. Given multiple possible sets, select the one that has the largest number of UTXOs. 3. Given multiple possible sets, choose the one that contains the largest amount of total BTC. 4. Given multiple possible sets, select the one that destroys the most bitcoin days. 5. If there's still multiple possible sets, just choose one at random. Once the final set of addresses has been identified, use ALL UTXOs from that set, sending appropriate outputs to the recipient(s), a new change address, and a mining fee. Miners should be cognisant of and reward the fact that the user is making an effort to consolidate UTXOs. They can easily spot these transactions by looking at whether all possible UTXOs from each input addresses have been used. Since most miners use Bitcoin Core, and its defaults, this test can be built into Bitcoin Core's logic for determining which transactions to include when mining a block. -- *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.* On Sat, May 9, 2015 at 3:38 PM, Pieter Wuille wrote: > Miners do not care about the age of a UTXO entry, apart for two > exceptions. It is also economically irrelevant. > * There is a free transaction policy, which sets a small portion of block > space aside for transactions which do not pay sufficient fee. This is > mostly an altruistic way of encouraging Bitcoin adoption. As a DoS > prevention mechanism, there is a requirement that these free transactions > are of sufficient priority (computed as BTC-days-destroyed per byte), > essentially requiring these transactions to consume another scarce > resource, even if not money. > * Coinbase transaction outputs can, as a consensus rule, only be spent > after 100 confirmations. This is to prevent random reorganisations from > invalidating transactions that spend young coinbase transactions (which > can't move to the new chain). In addition, wallets also select more > confirmed outputs first to consume, for the same reason. > On May 9, 2015 1:20 PM, "Raystonn" wrote: > >> That policy is included in Bitcoin Core. Miners use it because it is the >> default. The policy was likely intended to help real transactions get >> through in the face of spam. But it favors those with more bitcoin, as the >> priority is determined by amount spent multiplied by age of UTXOs. At the >> very least the amount spent should be removed as a factor, or fees are >> unlikely to ever be paid by those who can afford them. We can reassess the >> role age plays later. One change at a time is better. >> On 9 May 2015 12:52 pm, Jim Phillips wrote: >> >> On Sat, May 9, 2015 at 2:43 PM, Raystonn wrote: >> >> How about this as a happy medium default policy: Rather than select UTXOs >> based solely on age and limiting the size of the transaction, we select as >> many UTXOs as possible from as few addresses as possible, prioritizing >> which addresses to use based on the number of UTXOs it contains (more being >> preferable) and how old those UTXOs are (in order to reduce the fee)? >> >> If selecting older UTXOs gives higher priority for a lesser (or at least >> not greater) fee, that is an incentive for a rational user to use the older >> UTXOs. Such policy needs to be defended or removed. It doesn't support >> privacy or a reduction in UTXOs. >> >> Before starting this thread, I had completely forgotten that age was even >> a factor in determining which UTXOs to use. Frankly, I can't think of any >> reason why miners care how old a particular UTXO is when determining what >> fees to charge. I'm sure there is one, I just don't know what it is. I just >> tossed it in there as homage to Andreas who pointed out to me that it was >> still part of the selection criteria. >> >> --047d7bb04b0e2455090515ac9a17 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Makes sense.. So with that said, I'd propose the follo= wing criteria for selecting UTXOs:

1. Select the smalles= t possible set of addresses that can be linked in order to come up with eno= ugh BTC to send to the payee.
2. Given multiple possible sets, se= lect the one that has the largest number of UTXOs.
3. Given multi= ple possible sets, choose the one that contains the largest amount of total= BTC.
4. Given multiple possible sets, select the one that destro= ys the most bitcoin days.
5. If there's still multiple possib= le sets, just choose one at random.

Once the final= set of addresses has been identified, use ALL UTXOs from that set, sending= appropriate outputs to the recipient(s), a new change address, and a minin= g fee.

Miners should be cognisant of and reward th= e fact that the user is making an effort to consolidate UTXOs. They can eas= ily spot these transactions by looking at whether all possible UTXOs from e= ach input addresses have been used. Since most miners use Bitcoin Core, and= its defaults, this test can be built into Bitcoin Core's logic for det= ermining which transactions to include when mining a block.

--
James G. Phillips IV=C2=A0= =C2=A0
"Don't bunt. = Aim out of the ball park. Aim for the company of immortals." -- David = Ogilvy

=C2=A0This message was creat= ed with 100% recycled electrons. Please think twice before printing.

On Sat, May 9, 2015 at 3:38 PM, Pieter Wuill= e <pieter.wuille@gmail.com> wrote:

Miners do not care about the age of a UTXO = entry, apart for two exceptions. It is also economically irrelevant.
* There is a free transaction policy, which sets a small portion of block s= pace aside for transactions which do not pay sufficient fee. This is mostly= an altruistic way of encouraging Bitcoin adoption. As a DoS prevention mec= hanism, there is a requirement that these free transactions are of sufficie= nt priority (computed as BTC-days-destroyed per byte), essentially requirin= g these transactions to consume another scarce resource, even if not money.=
* Coinbase transaction outputs can, as a consensus rule, only be spent afte= r 100 confirmations. This is to prevent random reorganisations from invalid= ating transactions that spend young coinbase transactions (which can't = move to the new chain). In addition, wallets also select more confirmed out= puts first to consume, for the same reason.

On May 9, 2015 1:20 PM, "Raystonn" <= ;raystonn@hotmail= .com> wrote:
=

That policy is included in Bitcoin Core.=C2=A0 Miners use it= because it is the default.=C2=A0 The policy was likely intended to help re= al transactions get through in the face of spam.=C2=A0 But it favors those = with more bitcoin, as the priority is determined by amount spent multiplied= by age of UTXOs.=C2=A0 At the very least the amount spent should be remove= d as a factor, or fees are unlikely to ever be paid by those who can afford= them.=C2=A0 We can reassess the role age plays later.=C2=A0 One change at = a time is better.

On 9 May 2015 12:52 pm, Jim Phillips <jim@ergophobia.org>= wrote:
On Sat, May 9, 2015 at 2:43 PM, Raystonn <raystonn@hotmail.com= > wrote:
How about this as a happy medium default policy: Ra= ther than select UTXOs based solely on age and limiting the size of the tra= nsaction, we select as many UTXOs as possible from as few addresses as poss= ible, prioritizing which addresses to use based on the number of UTXOs it c= ontains (more being preferable) and how old those UTXOs are (in order to re= duce the fee)?=C2=A0

If selecting older U= TXOs gives higher priority for a lesser (or at least not greater) fee, that= is an incentive for a rational user to use the older UTXOs.=C2=A0 Such pol= icy needs to be defended or removed.=C2=A0 It doesn't support privacy o= r a reduction in UTXOs.

Before starting this thread, I= had completely forgotten that age was even a factor in determining which U= TXOs to use. Frankly, I can't think of any reason why miners care how o= ld a particular UTXO is when determining what fees to charge. I'm sure = there is one, I just don't know what it is. I just tossed it in there a= s homage to Andreas who pointed out to me that it was still part of the sel= ection criteria.

--047d7bb04b0e2455090515ac9a17--