summaryrefslogtreecommitdiff
path: root/43/5bb950c4088cd8f581248ba0a845c2a0980d5c
blob: 4fc0bebf685fcc94e369fe7dafb90e8b08f4bc9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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 <jgarzik@bitpay.com>) 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 <bitcoin-development@lists.sourceforge.net>;
	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: <op.xbs3yki1yldrnw@laptop-air>
References: <CAJHLa0PXHY1qisXhN98DMxgp11ouqkzYMBvrTTNOtwX09T1kZg@mail.gmail.com>
	<op.xbs3yki1yldrnw@laptop-air>
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Mon, 24 Feb 2014 17:50:50 -0500
Message-ID: <CAJHLa0O2XbJ8TOAdE-oJd7V0NuO-0T5BNa+8cPZU20y=enGfJQ@mail.gmail.com>
To: Jeremy Spilman <jeremy@taplink.co>
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 <bitcoin-development@lists.sourceforge.net>
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: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
	<mailto:bitcoin-development-request@lists.sourceforge.net?subject=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 <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/