summaryrefslogtreecommitdiff
path: root/a1/fd7003a66c63fb299ffc006f25f1acc4dc0acf
blob: 24258b7eec14f4eac538d6618cdf8338c76e8087 (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
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 58EB571
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 21 Mar 2016 02:51:35 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-ig0-f181.google.com (mail-ig0-f181.google.com
	[209.85.213.181])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 129FAE8
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Mon, 21 Mar 2016 02:51:35 +0000 (UTC)
Received: by mail-ig0-f181.google.com with SMTP id nk17so61926252igb.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 20 Mar 2016 19:51:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:from:date:message-id:subject:to;
	bh=ChUr9+TTDSaDTXv+oVggWBAvh4pek39nKchxqESJqhA=;
	b=BswKWDHOVFSNf7YBWGtuL99VZp1m57BM/NyoZG2qa5BUEHb3r1A4jh9BqkJAPlBanq
	ZNDVDuLNbdQ5sbOc3mmzH6olT2ozvzBEeYB76VYw/FiVdGpZ1oLQGdUnUIvm9swpamCU
	IRzdccRDWhFR7qtIxiGXPFgjhLWq1ZSIfvC3b1kQirfQYQL0jf5w2B8mjH2zcnibZKRO
	4A2l6zhHLpNYdwi+cFI8jC5FFXWu52JoC+ec47UJwXLxB6bTV5nCyoKhk5r8CXRO3b9B
	Xs548X6C8REmjMCNE2tEaHuaXFQT8ZuEdKu3PF2AC/6LD2K/WBeX/MsJc5Ci8gYPcfpm
	kb2w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
	bh=ChUr9+TTDSaDTXv+oVggWBAvh4pek39nKchxqESJqhA=;
	b=KZT3rOfdaEC9c2IRd/uGjsDAMTS2s0aUEd5KG8ibrhUwU1CS5iRWECuo8/Qi/5GxyN
	t3zZDDTD6Tr8dMJA80lELIu6fAdI1xyihxBWhYOnEG2uPMuwINd8nGnI6aRQ/FnR7X/F
	gIklhAHt5H+A/hypFmf3eQf/wQvlXjENJ1SDr8zuekkwbRnXY2xv4y3jq9oNHk5ZgSnG
	/zI4I2g9mOQJ49rDO5qmLzV4yxRiC5mjtAwSCyKkkWwxgX8RlHXPgjtbz22eGgPWv1Fh
	qRkCvi0ysNveZ59Hra0g4ztwwst3uA+GXj+ygLrOXraS6KxsluJMVrzZ8oyy0Eyh/ojr
	Z4yQ==
X-Gm-Message-State: AD7BkJKGngZzknqI783OyoFhQULg8Q6nsQxeaMTNOgbSjCUaQPLsIsb1EWSEfcKoKoM4Y0myMwN8Y7qbXeXVSw==
X-Received: by 10.50.59.242 with SMTP id c18mr10410536igr.4.1458528694430;
	Sun, 20 Mar 2016 19:51:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.143.193 with HTTP; Sun, 20 Mar 2016 19:50:55 -0700 (PDT)
From: Sergio Demian Lerner <sergio.d.lerner@gmail.com>
Date: Sun, 20 Mar 2016 23:50:55 -0300
Message-ID: <CAKzdR-pk6WHRkKWHxkTtPps+fXn9VBnJiMf-9vRCmg=O1JODfw@mail.gmail.com>
To: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary=047d7bea423eb9faac052e862c2a
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: Mon, 21 Mar 2016 16:16:29 +0000
Subject: [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: Mon, 21 Mar 2016 02:51:35 -0000

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

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.

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

<div dir=3D"ltr"><div><div>The BIP147 reads:<br><p><i>Sigop cost</i> is def=
ined. The cost of a sigop in traditional script is 4, while the cost of a s=
igop in witness program is 1.
</p>
<p>The new rule is total <i>sigop cost</i> =E2=89=A4 80,000. <br></p><p>But=
 the code implements:<br></p>if (nSigOps + (nWitSigOps + 3) / 4 &gt; MAX_BL=
OCK_SIGOPS)<br></div><div>=C2=A0... error....<br><br></div>Which is not the=
 same.<br></div><br>For example:<br><div><div>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.<br><br></div><div>Regards, Sergio.<br></div></div></d=
iv>

--047d7bea423eb9faac052e862c2a--