From my interpretation of the bitcoin Script Wiki and the rust-bitcoin codebase, two items on the stack get interpreted by bitcoin Script as false:
- The empty array
[]
- The single byte
0x00
Q1: Is it correct to think that a 2-byte long or more array of 0s (even though as a number would get interpreted as 0) would not be interpreted by bitcoin Script as false
? For example the script OP_PUSHBYTES_4 <0x00000000>
would put a byte array of 0s on the stack but still equate to true
? On the other hand the script OP_PUSHBYTES_1 <0x00>
would interpret as false?
Q2: Will an opcode like OP_NOT
work with/interpret both of the above as false? (the docs on rust-bitcoin, Push 1 if the top item is zero; otherwise, push 0.
are not very explicit in that sense, and the bitcoin wiki is even worse).
OP_PUSHBYTES_4 00000000
would evaluate to false.