public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Tier Nolan <tier.nolan@gmail•com>
Cc: Bitcoin Dev <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] Dealing with OP_IF and OP_NOTIF malleability
Date: Fri, 6 Nov 2015 09:37:58 +0000	[thread overview]
Message-ID: <CAE-z3OX6bMY+RjphyDS-zAO=aXLs-B41G4m6ssUjFC03ByQkWA@mail.gmail.com> (raw)
In-Reply-To: <8D9D1049-E502-4A37-ACE4-5A2B1369A90A@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

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@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".
>
>
>

[-- Attachment #2: Type: text/html, Size: 1326 bytes --]

  reply	other threads:[~2015-11-06  9:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06  8:13 jl2012
2015-11-06  9:22 ` Nick ODell
2015-11-06  9:27 ` Tier Nolan
2015-11-06  9:32   ` Oleg Andreev
2015-11-06  9:37     ` Tier Nolan [this message]
2015-11-06 10:16       ` jl2012
2015-11-10 10:52       ` Oleg Andreev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE-z3OX6bMY+RjphyDS-zAO=aXLs-B41G4m6ssUjFC03ByQkWA@mail.gmail.com' \
    --to=tier.nolan@gmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox