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
|
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 <moon@justmoon.de>) 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 <moon@justmoon.de>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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 <moon@justmoon.de>
> 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
>
|