summaryrefslogtreecommitdiff
path: root/04/b8297ce43f097f45b664f755a958e769f7d675
blob: 84430b33d43b1a5b8b3cbf37f387d34d4f681d2a (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
Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
	helo=mx.sourceforge.net)
	by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <tier.nolan@gmail.com>) id 1YtZye-0002tD-OD
	for bitcoin-development@lists.sourceforge.net;
	Sat, 16 May 2015 11:09:56 +0000
Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.192.54 as permitted sender)
	client-ip=209.85.192.54; envelope-from=tier.nolan@gmail.com;
	helo=mail-qg0-f54.google.com; 
Received: from mail-qg0-f54.google.com ([209.85.192.54])
	by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1YtZyd-0002kN-Jc
	for bitcoin-development@lists.sourceforge.net;
	Sat, 16 May 2015 11:09:56 +0000
Received: by qgew3 with SMTP id w3so22260899qge.2
	for <bitcoin-development@lists.sourceforge.net>;
	Sat, 16 May 2015 04:09:50 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.55.56.201 with SMTP id f192mr28749201qka.88.1431774590163;
	Sat, 16 May 2015 04:09:50 -0700 (PDT)
Received: by 10.140.85.241 with HTTP; Sat, 16 May 2015 04:09:50 -0700 (PDT)
In-Reply-To: <87a8x5l6bt.fsf@rustcorp.com.au>
References: <16096345.A1MpJQQkRW@crushinator>
	<CAOG=w-szbLgc1jLpkE_uMa3bkFTi-RiBEaQ6Y-u5aKLBC2HvUg@mail.gmail.com>
	<CAAS2fgQRS7w7RRNXVK_+=4CQ7=AWxWQQ7+Tf4tNUPTTZOf7rEQ@mail.gmail.com>
	<CAE-z3OUzYZDvsOYEDT229vnvNBa9ntW+86O3uA-K5-KaneMF_g@mail.gmail.com>
	<87a8x5l6bt.fsf@rustcorp.com.au>
Date: Sat, 16 May 2015 12:09:50 +0100
Message-ID: <CAE-z3OXue5E0TzRhx6y8eTOTy=EARsrGwJ1qv8Kv1nbCsjVE_g@mail.gmail.com>
From: Tier Nolan <tier.nolan@gmail.com>
Cc: Bitcoin Development <bitcoin-development@lists.sourceforge.net>
Content-Type: multipart/alternative; boundary=001a11459238d86087051630ff21
X-Spam-Score: 2.4 (++)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
	See http://spamassassin.org/tag/ for more details.
	-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
	sender-domain
	0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
	(tier.nolan[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	1.2 MISSING_HEADERS        Missing To: header
	1.0 HTML_MESSAGE           BODY: HTML included in message
	-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	author's domain
	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
	1.9 MALFORMED_FREEMAIL Bad headers on message from free email service
	-0.1 AWL AWL: Adjusted score from AWL reputation of From: address
X-Headers-End: 1YtZyd-0002kN-Jc
Subject: Re: [Bitcoin-development] Proposed alternatives to the 20MB step
	function
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, 16 May 2015 11:09:56 -0000

--001a11459238d86087051630ff21
Content-Type: text/plain; charset=UTF-8

On Sat, May 16, 2015 at 1:22 AM, Rusty Russell <rusty@rustcorp.com.au>
wrote:

> Some tweaks:
>
> 1) Nomenclature: call tx_size "tx_cost" and real_size "tx_bytes"?
>

Fair enough.

>
> 2) If we have a reasonable hard *byte* limit, I don't think that we need
>    the MAX().  In fact, it's probably OK to go negative.
>

I agree, we want people to compress the UTXO space and a transaction with
100 inputs and one output is great.

It may have privacy problem though.


>
> 3) ... or maybe not, if any consumed UTXO was generated before the soft
>    fork (reducing Tier's perverse incentive).
>

The incentive problem can be fixed by excluding UTXOs from blocks before a
certain count.

UTXOs in blocks before 375000 don't count.


>
> 4) How do we measure UTXO size?  There are some constant-ish things in
>    there (eg. txid as key, height, outnum, amount).  Maybe just add 32
>    to scriptlen?
>

They can be stored as a fixed digest.  That can be any size, depending on
security requirements.

Gmaxwell's cost proposal is 3-4 bytes per UTXO change.  It isn't
4*UXTO.size - 3*UTXO.size

It is only a small nudge.  With only 10% of the block space to play with it
can't be massive.

This requires that transactions include scriptPubKey information when
broadcasting them.


>
> 5) Add a CHECKSIG cost.  Naively, since we allow 20,000 CHECKSIGs and
>    1MB blocks, that implies a cost of 50 bytes per CHECKSIG (but counted
>    correctly, unlike now).
>
> This last one implies that the initial cost limit would be 2M, but in
> practice probably somewhere in the middle.
>
>   tx_cost = 50*num-CHECKSIG
>                 + tx_bytes
>                 + 4*utxo_created_size
>                 - 3*utxo_consumed_size
>
> > A 250 byte transaction with 2 inputs and 2 outputs would have an adjusted
> > size of 252 bytes.
>
> Now cost == 352.
>

That is to large a cost for a 10% block change.  It could be included in
the block size hard fork though.  I think have one combined "cost" for
transactions is good.  It means much fewer spread out transaction checks.
The code for the cost formula would be in one place.

--001a11459238d86087051630ff21
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On S=
at, May 16, 2015 at 1:22 AM, Rusty Russell <span dir=3D"ltr">&lt;<a href=3D=
"mailto:rusty@rustcorp.com.au" target=3D"_blank">rusty@rustcorp.com.au</a>&=
gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Some tweaks:<br>
<br>
1) Nomenclature: call tx_size &quot;tx_cost&quot; and real_size &quot;tx_by=
tes&quot;?<br></blockquote><div><br></div><div>Fair enough. <br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex">
<br>
2) If we have a reasonable hard *byte* limit, I don&#39;t think that we nee=
d<br>
=C2=A0 =C2=A0the MAX().=C2=A0 In fact, it&#39;s probably OK to go negative.=
<br></blockquote><div><br></div><div>I agree, we want people to compress th=
e UTXO space and a transaction with 100 inputs and one output is great.<br>=
<br></div><div>It may have privacy problem though.<br></div><div>=C2=A0</di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex">
<br>
3) ... or maybe not, if any consumed UTXO was generated before the soft<br>
=C2=A0 =C2=A0fork (reducing Tier&#39;s perverse incentive).<br></blockquote=
><div><br></div><div>The incentive problem can be fixed by excluding UTXOs =
from blocks before a certain count.<br><br></div><div>UTXOs in blocks befor=
e 375000 don&#39;t count.<br></div><div>=C2=A0</div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-le=
ft:1ex">
<br>
4) How do we measure UTXO size?=C2=A0 There are some constant-ish things in=
<br>
=C2=A0 =C2=A0there (eg. txid as key, height, outnum, amount).=C2=A0 Maybe j=
ust add 32<br>
=C2=A0 =C2=A0to scriptlen?<br></blockquote><div><br></div><div>They can be =
stored as a fixed digest.=C2=A0 That can be any size, depending on security=
 requirements.<br><br></div><div>Gmaxwell&#39;s cost proposal is 3-4 bytes =
per UTXO change.=C2=A0 It isn&#39;t 4*UXTO.size - 3*UTXO.size<br><br>It is =
only a small nudge.=C2=A0 With only 10% of the block space to play with it =
can&#39;t be massive.<br></div><div><br></div><div>This requires that trans=
actions include scriptPubKey information when broadcasting them.<br></div><=
div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex">
<br>
5) Add a CHECKSIG cost.=C2=A0 Naively, since we allow 20,000 CHECKSIGs and<=
br>
=C2=A0 =C2=A01MB blocks, that implies a cost of 50 bytes per CHECKSIG (but =
counted<br>
=C2=A0 =C2=A0correctly, unlike now).<br>
<br>
This last one implies that the initial cost limit would be 2M, but in<br>
practice probably somewhere in the middle.<br>
<br>
=C2=A0 tx_cost =3D 50*num-CHECKSIG<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 + tx_bytes<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 + 4*utxo_created_si=
ze<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - 3*utxo_consumed_s=
ize<br>
<span class=3D""><br>
&gt; A 250 byte transaction with 2 inputs and 2 outputs would have an adjus=
ted<br>
&gt; size of 252 bytes.<br>
<br>
</span>Now cost =3D=3D 352.<br></blockquote><div><br></div><div>That is to =
large a cost for a 10% block change.=C2=A0 It could be included in the bloc=
k size hard fork though.=C2=A0 I think have one combined &quot;cost&quot; f=
or transactions is good.=C2=A0 It means much fewer spread out transaction c=
hecks.=C2=A0 The code for the cost formula would be in one place.<br></div>=
</div></div></div>

--001a11459238d86087051630ff21--