Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 5B67569 for ; 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 ; 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 ) id 1aiG7o-001OSU-Ly; Tue, 22 Mar 2016 02:49:09 -0400 From: To: "'Sergio Demian Lerner'" References: In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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

Do you mean = BIP141?

 

Your example = is an error by BIP141:

 

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

 

From:<= /b> = 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.

------=_NextPart_000_002F_01D18449.F379A650--