public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@bitpay•com>
To: Jeremy Spilman <jeremy@taplink•co>
Cc: Bitcoin Dev <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] On OP_RETURN in upcoming 0.9 release
Date: Mon, 24 Feb 2014 17:50:50 -0500	[thread overview]
Message-ID: <CAJHLa0O2XbJ8TOAdE-oJd7V0NuO-0T5BNa+8cPZU20y=enGfJQ@mail.gmail.com> (raw)
In-Reply-To: <op.xbs3yki1yldrnw@laptop-air>

Sure, no objection to that.


On Mon, Feb 24, 2014 at 5:12 PM, Jeremy Spilman <jeremy@taplink•co> wrote:
> On Mon, 24 Feb 2014 09:10:26 -0800, Jeff Garzik <jgarzik@bitpay•com> wrote:
>>
>> This PR reduces the size to 40 bytes:
>> https://github.com/bitcoin/bitcoin/pull/3737
>
>
> Just quickly GLANCED at it, but if I understand correctly how the template
> matching code works, that will change max size of the <data> to 40 bytes but
> does not do anything to enforce most-efficient encoding.
>
>   else if (opcode2 == OP_SMALLDATA)
>   {
>       // small pushdata, <= MAX_OP_RETURN_RELAY bytes
>       if (vch1.size() > MAX_OP_RETURN_RELAY)
>          break;
>   }
>
> This code was a bit hard for me to parse since it's not actually requiring
> any data, just disallowing more than a certain number of bytes of data. So a
> bare OP_RETURN would be allowed as well, for whatever good that will do.
>
> If you want to strictly require no PUSHDATA, perhaps you could do:
>
>   else if (opcode2 == OP_SMALLDATA)
>   {
>       // small pushdata, <= MAX_OP_RETURN_RELAY bytes
>       if (opcode1 >= OP_PUSHDATA1 || vch1.size() > MAX_OP_RETURN_RELAY)
>          break;
>   }
>
> Thanks,
> Jeremy
>



-- 
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.      https://bitpay.com/



      reply	other threads:[~2014-02-24 22:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 16:03 Jeff Garzik
2014-02-24 16:16 ` Pieter Wuille
2014-02-24 16:32   ` Jeff Garzik
2014-02-24 16:33   ` Jeff Garzik
2014-02-24 16:39 ` Wladimir
2014-02-24 16:45   ` Gavin Andresen
2014-02-24 16:50     ` Pavol Rusnak
2014-02-24 17:23   ` Mark Friedenbach
2014-02-24 23:06     ` Andreas Petersson
2014-02-24 23:13       ` Gregory Maxwell
2014-02-24 23:13       ` Luke-Jr
2014-02-28  5:25     ` Troy Benjegerdes
2014-02-28 14:42       ` Warren Togami Jr.
2014-02-28 19:25         ` Mark Friedenbach
2014-02-28 19:36           ` Justus Ranvier
2014-02-28 20:10         ` Drak
2014-02-24 17:10 ` Jeff Garzik
2014-02-24 22:12 ` Jeremy Spilman
2014-02-24 22:50   ` Jeff Garzik [this message]

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='CAJHLa0O2XbJ8TOAdE-oJd7V0NuO-0T5BNa+8cPZU20y=enGfJQ@mail.gmail.com' \
    --to=jgarzik@bitpay$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=jeremy@taplink$(echo .)co \
    /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