Tier Nolan [ARCHIVE] on Nostr: 📅 Original date posted:2015-11-06 📝 Original message:I meant not to use the ...
📅 Original date posted:2015-11-06
📝 Original message: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_0
OP_PUSHDATA1 (length = 1, data = 0)
OP_EQUAL
The 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 at 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".
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20151106/435de781/attachment.html>
Published at
2023-06-07 17:44:18Event JSON
{
"id": "0c63fc285c5ebf0baa98f48e0c0b127652d1e0c6da987f94d1ed664b8d4eff3b",
"pubkey": "46986f86b97cc97829a031b03209644d134b939d0163375467f0b1363e0d875e",
"created_at": 1686159858,
"kind": 1,
"tags": [
[
"e",
"8bea40c9aca13fd590801b4ac87b57a3fa19ab1b40338c62d08701cf4269e071",
"",
"root"
],
[
"e",
"6ed3c04a2475a1756316445fce10886c0adbfee08700b0597f93f541525994db",
"",
"reply"
],
[
"p",
"8a620b25e89444e9903ffc62514250941ca318d3dd371308821b4cbe30dd482a"
]
],
"content": "📅 Original date posted:2015-11-06\n📝 Original message:I meant not to use the OP_PUSH opcodes to do the push.\n\nDoes OP_0 give a zero length byte array?\n\nWould this script return true?\n\nOP_0\nOP_PUSHDATA1 (length = 1, data = 0)\nOP_EQUAL\n\nThe easiest definition is that OP_0 and OP_1 must be used to push the data\nand not any other push opcodes.\n\n\nOn Fri, Nov 6, 2015 at 9:32 AM, Oleg Andreev \u003coleganza at gmail.com\u003e wrote:\n\n\u003e\n\u003e \u003e One and zero should be defined as arrays of length one. Otherwise, it is\n\u003e still possible to mutate the transaction by changing the length of the\n\u003e array.\n\u003e \u003e\n\u003e \u003e They should also be minimally encoded but that is covered by previous\n\u003e rules.\n\u003e\n\u003e These two lines contradict each other. Minimally-encoded \"zero\" is an\n\u003e array of length zero, not one. I'd suggest defining this explicitly here as\n\u003e \"IF/NOTIF argument must be either zero-length array or a single byte 0x01\".\n\u003e\n\u003e\n\u003e\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20151106/435de781/attachment.html\u003e",
"sig": "fa386d913453b97788f4353367683e95a51db03298bd36951bf1a003e05b9b3b033137075963eb55bf9d1adec067b4136804aede60d4f392504d8400aa38da5a"
}