Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 26C03904 for ; Fri, 6 Nov 2015 10:16:48 +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 ABF7A13E for ; Fri, 6 Nov 2015 10:16:47 +0000 (UTC) Received: from localhost ([::1]:56525 helo=server47.web-hosting.com) by server47.web-hosting.com with esmtpa (Exim 4.85) (envelope-from ) id 1Zue4c-002k2Q-FL; Fri, 06 Nov 2015 05:16:46 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 06 Nov 2015 05:16:46 -0500 From: jl2012@xbt.hk To: Tier Nolan In-Reply-To: References: <0e72b173ea8e8aaf6b1b678182fa1ea7@xbt.hk> <8D9D1049-E502-4A37-ACE4-5A2B1369A90A@gmail.com> Message-ID: <73251cb4c7585cf9acecb1708b25db8d@xbt.hk> X-Sender: jl2012@xbt.hk User-Agent: Roundcube Webmail/1.0.5 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-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,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 Cc: Bitcoin Dev Subject: Re: [bitcoin-dev] =?utf-8?q?Dealing_with_OP=5FIF_and_OP=5FNOTIF_malle?= =?utf-8?q?ability?= 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: Fri, 06 Nov 2015 10:16:48 -0000 I assume this proposal is implemented at the same time as BIP62. As long as OP_IF/OP_NOTIF interprets the argument as a number, zero-padded number and negative zero are already prohibited in BIP62 Tier Nolan via bitcoin-dev 於 2015-11-06 04:37 寫到: > I meant not to use the OP_PUSH opcodes to do the push. > > Does OP_0 give a zero length byte array? > > Would this script return true? > > OP_0 > > OP_PUSHDATA1 (length = 1, data = 0) > > OP_EQUAL > > The easiest definition is that OP_0 and OP_1 must be used to push the > data and not any other push opcodes. > > On Fri, Nov 6, 2015 at 9:32 AM, Oleg Andreev > wrote: > >>> One and zero should be defined as arrays of length one. >> Otherwise, it is still possible to mutate the transaction by >> changing the length of the array. >>> >>> They should also be minimally encoded but that is covered by >> previous rules. >> >> These two lines contradict each other. Minimally-encoded "zero" is >> an array of length zero, not one. I'd suggest defining this >> explicitly here as "IF/NOTIF argument must be either zero-length >> array or a single byte 0x01". > > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev