On 06 Nov 2015, at 10:37, Tier Nolan via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote: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_0OP_PUSHDATA1 (length = 1, data = 0)OP_EQUALThe 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 <oleganza@gmail.com> 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