summaryrefslogtreecommitdiff
path: root/ae/7550f4be13479deb2a223a1eaec4fa1a8f3e5c
blob: 0e3bff4235135ee4e2b9ccc690ba20e7ab4de212 (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
Return-Path: <jl2012@xbt.hk>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 5B67569
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 22 Mar 2016 06:49:11 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from s47.web-hosting.com (s47.web-hosting.com [199.188.200.16])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3F25FE0
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 22 Mar 2016 06:49:10 +0000 (UTC)
Received: from 119246245241.ctinets.com ([119.246.245.241]:60718 helo=2012R2)
	by server47.web-hosting.com with esmtpsa
	(TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1)
	(envelope-from <jl2012@xbt.hk>)
	id 1aiG7o-001OSU-Ly; Tue, 22 Mar 2016 02:49:09 -0400
From: <jl2012@xbt.hk>
To: "'Sergio Demian Lerner'" <sergio.d.lerner@gmail.com>
References: <CAKzdR-pk6WHRkKWHxkTtPps+fXn9VBnJiMf-9vRCmg=O1JODfw@mail.gmail.com>
In-Reply-To: <CAKzdR-pk6WHRkKWHxkTtPps+fXn9VBnJiMf-9vRCmg=O1JODfw@mail.gmail.com>
Date: Tue, 22 Mar 2016 14:48:49 +0800
Message-ID: <002e01d18406$e55554e0$affffea0$@xbt.hk>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_002F_01D18449.F379A650"
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQGt6Actn/nh4o4EX2HIeLU5fx7XdJ+sPMEw
Content-Language: en-hk
X-AntiAbuse: This header was added to track abuse,
	please include it with any abuse report
X-AntiAbuse: Primary Hostname - server47.web-hosting.com
X-AntiAbuse: Original Domain - lists.linuxfoundation.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - xbt.hk
X-Get-Message-Sender-Via: server47.web-hosting.com: authenticated_id:
	jl2012@xbt.hk
X-Authenticated-Sender: server47.web-hosting.com: jl2012@xbt.hk
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-From-Rewrite: unmodified, already matched
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,
	LOTS_OF_MONEY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Tue, 22 Mar 2016 09:20:08 +0000
Cc: bitcoin-dev@lists.linuxfoundation.org
Subject: Re: [bitcoin-dev] BIP147 minor error
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Mar 2016 06:49:11 -0000

This is a multipart message in MIME format.

------=_NextPart_000_002F_01D18449.F379A650
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Do you mean BIP141?

=20

Your example is an error by BIP141:

=20

1*4 + 79999*1 =3D 80003 > 80000

=20

From: bitcoin-dev-bounces@lists.linuxfoundation.org =
[mailto:bitcoin-dev-bounces@lists.linuxfoundation.org] On Behalf Of =
Sergio Demian Lerner via bitcoin-dev
Sent: Monday, 21 March, 2016 10:51
To: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
Subject: [bitcoin-dev] BIP147 minor error

=20

The BIP147 reads:

Sigop cost is defined. The cost of a sigop in traditional script is 4, =
while the cost of a sigop in witness program is 1.=20

The new rule is total sigop cost =E2=89=A4 80,000.=20

But the code implements:

if (nSigOps + (nWitSigOps + 3) / 4 > MAX_BLOCK_SIGOPS)

 ... error....

Which is not the same.


For example:

nSigOps =3D 1
nWitSigOps =3D79999

Is not an error by BIP definition but it's an error by the implemented =
code.

Regards, Sergio.


------=_NextPart_000_002F_01D18449.F379A650
Content-Type: text/html;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"\@DengXian";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-HK =
link=3D"#0563C1" vlink=3D"#954F72"><div class=3DWordSection1><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>Do you mean =
BIP141?<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</=
o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>Your example =
is an error by BIP141:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</=
o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>1*4 + =
79999*1 =3D 80003 &gt; 80000<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p>&nbsp;</=
o:p></span></p><p class=3DMsoNormal><b><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span lang=3DEN-US =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
bitcoin-dev-bounces@lists.linuxfoundation.org =
[mailto:bitcoin-dev-bounces@lists.linuxfoundation.org] <b>On Behalf Of =
</b>Sergio Demian Lerner via bitcoin-dev<br><b>Sent:</b> Monday, 21 =
March, 2016 10:51<br><b>To:</b> bitcoin-dev =
&lt;bitcoin-dev@lists.linuxfoundation.org&gt;<br><b>Subject:</b> =
[bitcoin-dev] BIP147 minor error<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><div><p =
class=3DMsoNormal>The BIP147 reads:<o:p></o:p></p><p><i>Sigop cost</i> =
is defined. The cost of a sigop in traditional script is 4, while the =
cost of a sigop in witness program is 1. <o:p></o:p></p><p>The new rule =
is total <i>sigop cost</i> =E2=89=A4 80,000. <o:p></o:p></p><p>But the =
code implements:<o:p></o:p></p><p class=3DMsoNormal>if (nSigOps + =
(nWitSigOps + 3) / 4 &gt; MAX_BLOCK_SIGOPS)<o:p></o:p></p></div><div><p =
class=3DMsoNormal style=3D'margin-bottom:12.0pt'>&nbsp;... =
error....<o:p></o:p></p></div><p class=3DMsoNormal>Which is not the =
same.<o:p></o:p></p></div><p class=3DMsoNormal><br>For =
example:<o:p></o:p></p><div><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>nSigOps =3D 1<br>nWitSigOps =
=3D79999<br><br>Is not an error by BIP definition but it's an error by =
the implemented code.<o:p></o:p></p></div><div><p =
class=3DMsoNormal>Regards, =
Sergio.<o:p></o:p></p></div></div></div></div></body></html>
------=_NextPart_000_002F_01D18449.F379A650--