summaryrefslogtreecommitdiff
path: root/34/72ae7aa12ad96494eeecb1bfa71aecdcea6d3f
blob: 181b411c492200ea295a552af9197960cb9a4463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
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 <jim@ergophobia.org>) 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 <bitcoin-development@lists.sourceforge.net>;
	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: <CAPg+sBgFAhVA=SBfPyz7dQAsGuyA_gBGexWao6FzUgGuRbqGrQ@mail.gmail.com>
References: <COL402-EAS2801DD28568B04AF7E4005CCDDD0@phx.gbl>
	<CAPg+sBgFAhVA=SBfPyz7dQAsGuyA_gBGexWao6FzUgGuRbqGrQ@mail.gmail.com>
From: Jim Phillips <jim@ergophobia.org>
Date: Sat, 9 May 2015 16:11:57 -0500
Message-ID: <CANe1mWxeZ+hukoTCOehw7Zkty68-5ven=5zGbftotvJQ4bcd-A@mail.gmail.com>
To: Pieter Wuille <pieter.wuille@gmail.com>
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 <andreas@schildbach.de>,
	Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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*
<https://plus.google.com/u/0/113107039501292625391/posts>
<http://www.linkedin.com/in/ergophobe>

*"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 <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
> 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" <raystonn@hotmail.com> 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 <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: 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

<div dir=3D"ltr">Makes sense.. So with that said, I&#39;d propose the follo=
wing criteria for selecting UTXOs:<div><br></div><div>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.</div><div>2. Given multiple possible sets, se=
lect the one that has the largest number of UTXOs.</div><div>3. Given multi=
ple possible sets, choose the one that contains the largest amount of total=
 BTC.</div><div>4. Given multiple possible sets, select the one that destro=
ys the most bitcoin days.</div><div>5. If there&#39;s still multiple possib=
le sets, just choose one at random.</div><div><br></div><div>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.</div><div><br></div><div>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&#39;s logic for det=
ermining which transactions to include when mining a block.</div></div><div=
 class=3D"gmail_extra"><br clear=3D"all"><div><div class=3D"gmail_signature=
"><div>--<div><b>James G. Phillips IV</b>=C2=A0<a href=3D"https://plus.goog=
le.com/u/0/113107039501292625391/posts" style=3D"font-size:x-small" target=
=3D"_blank"><img src=3D"https://ssl.gstatic.com/images/icons/gplus-16.png">=
</a>=C2=A0<a href=3D"http://www.linkedin.com/in/ergophobe" target=3D"_blank=
"><img src=3D"http://developer.linkedin.com/sites/default/files/LinkedIn_Lo=
go16px.png"></a></div></div><div><font size=3D"1"><i>&quot;Don&#39;t bunt. =
Aim out of the ball park. Aim for the company of immortals.&quot; -- David =
Ogilvy<br></i></font><div><font size=3D"1"><br></font></div></div><div><fon=
t size=3D"1"><img src=3D"http://findicons.com/files/icons/1156/fugue/16/lea=
f.png">=C2=A0<em style=3D"background-color:rgb(255,255,255);font-family:ver=
dana,geneva,sans-serif;line-height:16px;color:green">This message was creat=
ed with 100% recycled electrons. Please think twice before printing.</em></=
font></div></div></div>
<br><div class=3D"gmail_quote">On Sat, May 9, 2015 at 3:38 PM, Pieter Wuill=
e <span dir=3D"ltr">&lt;<a href=3D"mailto:pieter.wuille@gmail.com" target=
=3D"_blank">pieter.wuille@gmail.com</a>&gt;</span> wrote:<br><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><p dir=3D"ltr">Miners do not care about the age of a UTXO =
entry, apart for two exceptions. It is also economically irrelevant.<br>
* 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.=
<br>
* 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&#39;t =
move to the new chain). In addition, wallets also select more confirmed out=
puts first to consume, for the same reason.</p><div class=3D"HOEnZb"><div c=
lass=3D"h5">
<div class=3D"gmail_quote">On May 9, 2015 1:20 PM, &quot;Raystonn&quot; &lt=
;<a href=3D"mailto:raystonn@hotmail.com" target=3D"_blank">raystonn@hotmail=
.com</a>&gt; wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=
<p dir=3D"ltr">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.<br>
</p>
<div class=3D"gmail_quote">On 9 May 2015 12:52 pm, Jim Phillips &lt;<a href=
=3D"mailto:jim@ergophobia.org" target=3D"_blank">jim@ergophobia.org</a>&gt;=
 wrote:<br type=3D"attribution"><blockquote style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div><d=
iv>On Sat, May 9, 2015 at 2:43 PM, Raystonn <span dir=3D"ltr">&lt;<a href=
=3D"mailto:raystonn@hotmail.com" target=3D"_blank">raystonn@hotmail.com</a>=
&gt;</span> wrote:<br></div></div></div><div><blockquote style=3D"margin:0p=
x 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);bo=
rder-left-style:solid;padding-left:1ex"><blockquote style=3D"margin:0px 0px=
 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-=
left-style:solid;padding-left:1ex"><span style=3D"color:rgb(80,0,80);font-s=
ize:12.8000001907349px">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</span></blockquote><p dir=3D"ltr">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&#39;t support privacy o=
r a reduction in UTXOs.</p></blockquote><div>Before starting this thread, I=
 had completely forgotten that age was even a factor in determining which U=
TXOs to use. Frankly, I can&#39;t think of any reason why miners care how o=
ld a particular UTXO is when determining what fees to charge. I&#39;m sure =
there is one, I just don&#39;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.</div></div></div></div>
</blockquote></div></blockquote></div>
</div></div></blockquote></div><br></div>

--047d7bb04b0e2455090515ac9a17--