Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1SvXP1-0000gE-CF for bitcoin-development@lists.sourceforge.net; Sun, 29 Jul 2012 17:35:39 +0000 X-ACL-Warn: Received: from wp303.webpack.hosteurope.de ([80.237.133.72]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1SvXOx-0007Yj-6e for bitcoin-development@lists.sourceforge.net; Sun, 29 Jul 2012 17:35:39 +0000 Received: from 84-72-69-53.dclient.hispeed.ch ([84.72.69.53] helo=[192.168.0.21]); authenticated by wp303.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1SvXOk-0000IG-Vl; Sun, 29 Jul 2012 19:35:23 +0200 Message-ID: <50157450.8070806@justmoon.de> Date: Sun, 29 Jul 2012 19:35:12 +0200 From: Stefan Thomas User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: bitcoin-development@lists.sourceforge.net References: <1343579466.30862.YahooMailNeo@web121004.mail.ne1.yahoo.com> <501565D5.4060608@justmoon.de> <1343580154.34128.YahooMailNeo@web121004.mail.ne1.yahoo.com> In-Reply-To: <1343580154.34128.YahooMailNeo@web121004.mail.ne1.yahoo.com> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;moon@justmoon.de;1343583335;875e5b9e; X-Spam-Score: 0.3 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.3 AWL AWL: From: address is in the auto white-list X-Headers-End: 1SvXOx-0007Yj-6e Subject: Re: [Bitcoin-development] script tests - invalid script in script_valid.json? X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 17:35:39 -0000 I was baffled by this exact script, too. :) Big props to Gavin for adding those data-driven test cases. I can't overstate how useful they are. Is there interest to port more tests (P2SH, checksig, checkmultisig, block verification, maybe even DoS rules) into data-driven format? It might be something that I'd like to help with if pull requests in that direction are welcome. On 7/29/2012 6:42 PM, Amir Taaki wrote: > oh, bitcoin... > > Thanks justmoon :D > > > > ----- Original Message ----- > From: Stefan Thomas > To: bitcoin-development@lists.sourceforge.net > Cc: > Sent: Sunday, July 29, 2012 1:33 PM > Subject: Re: [Bitcoin-development] script tests - invalid script in script_valid.json? > > OP_WITHIN is lower-bound-inclusive, but upper bound exclusive, so 1 0 1 WITHIN is false. > > > bool fValue = (bn2 <= bn1 && bn1 < bn3); > > https://github.com/bitcoin/bitcoin/blob/master/src/script.cpp#L854 > > On 7/29/2012 6:31 PM, Amir Taaki wrote: >> Hi! >> >> Is this a valid script? >> >> ["1 0 1", "WITHIN NOT"] >> >> The first value (1) is tested to make sure it is between the lower (0) and upper (1) value. This evaluates to true, placing on the stack a single byte of [01]. NOT then inverses this to a 0 byte false value of []. >> >> What am I missing here? >> >> Thanks >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development >