Dealing with OP_IF and OP_NOTIF malleability



Summary:

The discussion revolves around the use of different opcodes for push operations in Bitcoin scripts. The writer mentions not using OP_PUSH opcodes for push operations and asks if OP_0 gives a zero-length byte array. They then present a script consisting of OP_0, OP_PUSHDATA1 (length = 1, data = 0), and OP_EQUAL and ask if it would return true. The writer suggests that only OP_0 and OP_1 should be used for pushing data and not any other opcode. In response to this, Oleg Andreev points out a contradiction between two suggestions made by the writer regarding the definition of one and zero as arrays of length one or zero.


Updated on: 2023-06-11T00:55:37.880701+00:00