Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WI4Mn-0007H1-3n for bitcoin-development@lists.sourceforge.net; Mon, 24 Feb 2014 22:51:17 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of bitpay.com designates 209.85.212.179 as permitted sender) client-ip=209.85.212.179; envelope-from=jgarzik@bitpay.com; helo=mail-wi0-f179.google.com; Received: from mail-wi0-f179.google.com ([209.85.212.179]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WI4Mm-0003Cs-6c for bitcoin-development@lists.sourceforge.net; Mon, 24 Feb 2014 22:51:17 +0000 Received: by mail-wi0-f179.google.com with SMTP id bs8so3703995wib.12 for ; Mon, 24 Feb 2014 14:51:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=0x0QHQZfLPnnPuIbjp1umcz9ajlIOETQORRZs610nDw=; b=HOmnCmx8BYOBAwEvgXqdpBgT5d491OXfRl9pn3/V3PKfBKJS3J3T2wcmZPOP9vHOqT mBdA5qhdZCiHf1BKdkYQA21Jx2OBrrR9p2cYZStQd3iZAXSVx1ilaYLGTHM/YvdY+c3q KqlZLz2rO0OuO0F8+JLY4UHb0Zot57N54wGLrV5jItYIIXQj8KskaBQ7t82kJ4rcRK+o JsGlWXJmCsW5k8LqHp5DCXrGKVaMenKoyX6M2pMukxULYD+P3C8A035+7OIjvhJnEjIs yNpQB+Xt/WAB+CGPs2yjRJrKkMSBr8cxkJRQB1V9O3dv6XX038+d/g6IIdCV9Qmr2yYS UtsQ== X-Gm-Message-State: ALoCoQnhShrBJTaKS97FLea4LsO99s0rpF7zi73CnP/FZmv/+gM/LbQFwjS7xN4Qpgot6kXUzLSK X-Received: by 10.195.12.5 with SMTP id em5mr576986wjd.77.1393282270087; Mon, 24 Feb 2014 14:51:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.197 with HTTP; Mon, 24 Feb 2014 14:50:50 -0800 (PST) In-Reply-To: References: From: Jeff Garzik Date: Mon, 24 Feb 2014 17:50:50 -0500 Message-ID: To: Jeremy Spilman Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1WI4Mm-0003Cs-6c Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] On OP_RETURN in upcoming 0.9 release X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2014 22:51:17 -0000 Sure, no objection to that. On Mon, Feb 24, 2014 at 5:12 PM, Jeremy Spilman wrote: > On Mon, 24 Feb 2014 09:10:26 -0800, Jeff Garzik 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 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/