summaryrefslogtreecommitdiff
path: root/f9/bf24326db3952a67b9c46ec230c1eebd027e71
blob: b8fe408329be2591e3ea27d371ec39a945a521dc (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
Return-Path: <sergio.d.lerner@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 0E69374
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 22 Mar 2016 10:39:53 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-ig0-f176.google.com (mail-ig0-f176.google.com
	[209.85.213.176])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 767A9118
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 22 Mar 2016 10:39:52 +0000 (UTC)
Received: by mail-ig0-f176.google.com with SMTP id ig19so102796272igb.0
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 22 Mar 2016 03:39:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc; bh=ToZRzj0NviMliI2t+DmAAU5RQv5eeABu8Cy1axDyAVM=;
	b=lxIowEKfAog1sso5DM9yuqj+H+BanrnAFARJm4+Pirx1NE6QFbyqqS0SOiGyGsOy5o
	DTqUODsIZqPy/iSs7bsgCZ7ocCbk8inRO1ABmbjC8dKrdMv+meTmEqNerLgJarbnTOyw
	QJMFrMNmAdHBG2b209maAtboUVJGVXaGG+u5u7Wfn2sBj0JipsytcAbdcjQpD2fh+OUI
	sxTxWvwT1uEjoELrIUX+W8xhkpyDtCboVawphKnCphD/LZeGYrkx8EiejawQhm5Uvsk5
	W8EZFr1eP+izUjQ2EgNo/jzX0nTPvT6//FNK/fONh6j3quUFyHddLmJGusacTd2ZNPWw
	SLag==
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:date
	:message-id:subject:from:to:cc;
	bh=ToZRzj0NviMliI2t+DmAAU5RQv5eeABu8Cy1axDyAVM=;
	b=EZa+sVTMheQ7PwxsojxHFdJRl1D7EzTYFApARUS09eUvsOf6jYCcBpoROYcKyfm/Zc
	d6n0aHJT9ePvXHut9JHUabccFJX759RW1ePZgoju3cF6HPqb6b0iU6GB2WjHOeaXbt8t
	C/1X6Ax002CTP9dxEQRQE+pmPIn06L7yopNIADcYfLogklvdpELr1UUr+XZjgGIbOblW
	JeE6sDJ3tTlfRGQ9reP5p7FWldrCWtjjN9HZgPpzkuBR47AmSlgMQW3GW7KAK0V11aGp
	d7JhWfmG87O+m3Cq4C2KreQG8xxE8+4mZbXUwaQZyts2M8kFPanh9sEhEYQMWOLpPHPF
	d5JA==
X-Gm-Message-State: AD7BkJL3fUxO55SOPcnZENQEp9CioyFLTXINk/juWVzRD4Ub61NcCS//LUaYG2dNXf+x9pa1Lm56PjKN1Xhjgg==
MIME-Version: 1.0
X-Received: by 10.50.66.179 with SMTP id g19mr17636386igt.4.1458643191813;
	Tue, 22 Mar 2016 03:39:51 -0700 (PDT)
Received: by 10.107.143.193 with HTTP; Tue, 22 Mar 2016 03:39:51 -0700 (PDT)
Received: by 10.107.143.193 with HTTP; Tue, 22 Mar 2016 03:39:51 -0700 (PDT)
In-Reply-To: <002e01d18406$e55554e0$affffea0$@xbt.hk>
References: <CAKzdR-pk6WHRkKWHxkTtPps+fXn9VBnJiMf-9vRCmg=O1JODfw@mail.gmail.com>
	<002e01d18406$e55554e0$affffea0$@xbt.hk>
Date: Tue, 22 Mar 2016 07:39:51 -0300
Message-ID: <CAKzdR-pZMR0vpu+T6a5n7RQeffDHmqrtw7doDEkAaPzkcpWWJg@mail.gmail.com>
From: Sergio Demian Lerner <sergio.d.lerner@gmail.com>
To: jl2012@xbt.hk
Content-Type: multipart/alternative; boundary=047d7bdc15b24d5eb9052ea0d563
X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,LOTS_OF_MONEY,
	RCVD_IN_DNSWL_LOW 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 13:39:09 +0000
Cc: bitcoin-dev <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 10:39:53 -0000

--047d7bdc15b24d5eb9052ea0d563
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

My mistake.
El mar 22, 2016 3:49 AM, <jl2012@xbt.hk> escribi=C3=B3:

> Do you mean BIP141?
>
>
>
> Your example is an error by BIP141:
>
>
>
> 1*4 + 79999*1 =3D 80003 > 80000
>
>
>
> *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
>
>
>
> 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.
>
> The new rule is total *sigop cost* =E2=89=A4 80,000.
>
> 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.
>

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

<p dir=3D"ltr">My mistake.</p>
<div class=3D"gmail_quote">El mar 22, 2016 3:49 AM,  &lt;<a href=3D"mailto:=
jl2012@xbt.hk">jl2012@xbt.hk</a>&gt; escribi=C3=B3:<br type=3D"attribution"=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div lang=3D"EN-HK" link=3D"#0563C1" vlink=
=3D"#954F72"><div><p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;fo=
nt-family:&quot;Calibri&quot;,sans-serif">Do you mean BIP141?<u></u><u></u>=
</span></p><p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-fami=
ly:&quot;Calibri&quot;,sans-serif"><u></u>=C2=A0<u></u></span></p><p class=
=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Calibri&qu=
ot;,sans-serif">Your example is an error by BIP141:<u></u><u></u></span></p=
><p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;C=
alibri&quot;,sans-serif"><u></u>=C2=A0<u></u></span></p><p class=3D"MsoNorm=
al"><span style=3D"font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-se=
rif">1*4 + 79999*1 =3D 80003 &gt; 80000<u></u><u></u></span></p><p class=3D=
"MsoNormal"><span style=3D"font-size:11.0pt;font-family:&quot;Calibri&quot;=
,sans-serif"><u></u>=C2=A0<u></u></span></p><p class=3D"MsoNormal"><b><span=
 lang=3D"EN-US" style=3D"font-size:11.0pt;font-family:&quot;Calibri&quot;,s=
ans-serif">From:</span></b><span lang=3D"EN-US" style=3D"font-size:11.0pt;f=
ont-family:&quot;Calibri&quot;,sans-serif"> <a href=3D"mailto:bitcoin-dev-b=
ounces@lists.linuxfoundation.org" target=3D"_blank">bitcoin-dev-bounces@lis=
ts.linuxfoundation.org</a> [mailto:<a href=3D"mailto:bitcoin-dev-bounces@li=
sts.linuxfoundation.org" target=3D"_blank">bitcoin-dev-bounces@lists.linuxf=
oundation.org</a>] <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=
;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank"=
>bitcoin-dev@lists.linuxfoundation.org</a>&gt;<br><b>Subject:</b> [bitcoin-=
dev] BIP147 minor error<u></u><u></u></span></p><p class=3D"MsoNormal"><u><=
/u>=C2=A0<u></u></p><div><div><div><p class=3D"MsoNormal">The BIP147 reads:=
<u></u><u></u></p><p><i>Sigop cost</i> is defined. The cost of a sigop in t=
raditional script is 4, while the cost of a sigop in witness program is 1. =
<u></u><u></u></p><p>The new rule is total <i>sigop cost</i> =E2=89=A4 80,0=
00. <u></u><u></u></p><p>But the code implements:<u></u><u></u></p><p class=
=3D"MsoNormal">if (nSigOps + (nWitSigOps + 3) / 4 &gt; MAX_BLOCK_SIGOPS)<u>=
</u><u></u></p></div><div><p class=3D"MsoNormal" style=3D"margin-bottom:12.=
0pt">=C2=A0... error....<u></u><u></u></p></div><p class=3D"MsoNormal">Whic=
h is not the same.<u></u><u></u></p></div><p class=3D"MsoNormal"><br>For ex=
ample:<u></u><u></u></p><div><div><p class=3D"MsoNormal" style=3D"margin-bo=
ttom:12.0pt">nSigOps =3D 1<br>nWitSigOps =3D79999<br><br>Is not an error by=
 BIP definition but it&#39;s an error by the implemented code.<u></u><u></u=
></p></div><div><p class=3D"MsoNormal">Regards, Sergio.<u></u><u></u></p></=
div></div></div></div></div></blockquote></div>

--047d7bdc15b24d5eb9052ea0d563--