summaryrefslogtreecommitdiff
path: root/8c/e00ee294839259754f397656e9838b6fc7321b
blob: 15bc6942deb5666ae7c87c496bde0e95ddda7e48 (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
Return-Path: <james@prestwi.ch>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id B8EBD34A6
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu,  2 May 2019 23:33:22 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-yw1-f48.google.com (mail-yw1-f48.google.com
	[209.85.161.48])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6DC30756
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu,  2 May 2019 23:33:21 +0000 (UTC)
Received: by mail-yw1-f48.google.com with SMTP id l8so59374ywm.4
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu, 02 May 2019 16:33:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=prestwi-ch.20150623.gappssmtp.com; s=20150623;
	h=mime-version:references:in-reply-to:from:date:message-id:subject:to; 
	bh=1svjk2/qfr8lvQz1Y04+1D+5iXoYGVnnpWSDtRJm/uw=;
	b=N8RjLQlF/Jkof48v3aL46YA1PFywDb7kNN8b+x+QHLtLQeRgoBWihleaWci6QOqAll
	Q0hDMYSjkdHCPfA8H5nrbNSZRsdE1MTi3UAeCFZXjrNH3fXQDzQx2Oh4DUK6avCGTi/5
	KMdIP4oWeawrahyeVMwvCDoiBEwWCm2xmDSsUnXUBOAzapdb6mcKMXZJ2bN/j3Dml1Pn
	e1JenICnHmDhLZp0srAVtgIyp9GWBiUYKGmQrQm2WWGWENlSh3O6vD+Zu2fSWUy3QLBF
	P9WRmrkKdLC3HOK7zKuaaTGEIbwmXElCMA4RSQLV/Fg2P66WcBby2PKuf0QouKu43Pr0
	ysSw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:references:in-reply-to:from:date
	:message-id:subject:to;
	bh=1svjk2/qfr8lvQz1Y04+1D+5iXoYGVnnpWSDtRJm/uw=;
	b=hIAOSwz+0sEJmmiRiIhCeIrtpKbuRALhSh+jPzsDZkg2oFyrWq+XiuT1AitoJHReN7
	Cs8UDNX4MKkjdBNYdxhxsvR/j4ONXK2tCDyrvPhGc+nGrNQZrLEVJy6P2hCFCdqfaiMY
	R7fbJn38h+ZjPbDabL+VGFL/A8V5jsVrEdFAUKKZbYD204MlRZtNPfnaZPxjobGDLUrT
	u2j5WWVE2VS1QpL16z4J1lZZlfpdDdXuvNqM8B2cYQ3L1zb+Q3uWREOlLsYRQffP8lZk
	vW8xxPo/XzpP/wqt5Qf7Ah0PpThsw7f55bPHb71VvTfscLvCTt8u+Aj/3oR1vm7zYMGk
	2HHw==
X-Gm-Message-State: APjAAAVn2dvs/NoAmN0ZMAL3Bj89CwPaBDhBib/KkMCoY8BU0i287wbF
	CehvfvHE7Eq/B61mSwoDKUAVOMNAZvBXRTzPI3ljPw==
X-Google-Smtp-Source: APXvYqyAZVuWi2ENofRU7f2O0gdefFjDMq3NlXwWMnJNyOViVkgojVXdSvO/LIO5+3AHLikdG5NBQJkVzxdy/Ky0mvA=
X-Received: by 2002:a0d:e295:: with SMTP id l143mr5885390ywe.141.1556840000175;
	Thu, 02 May 2019 16:33:20 -0700 (PDT)
MIME-Version: 1.0
References: <21346b3c-dad5-c666-9234-8916aa5a56e4@gmail.com>
	<201904290301.43459.luke@dashjr.org>
	<56b67b57-dc11-183a-1f4e-5a8c296b64cc@gmail.com>
	<aglJm4Zqda4W5Lrq33myL085DPnxjQTY1Eg6ANYFOe10nXeW8NvBOUUckAF4ASsZIO00xB8KoZ6wOQPPFB9g-uOl8A4gwZ10MYYZzZ2BjU0=@protonmail.com>
	<1019ea57-7240-2dc7-8357-970223278e3d@gmail.com>
	<UjO5iL0rbqOeo-nhFpOQSnVX7B4EHToLspAjUNFevNahTrU5O650U0shNQEOwSMCUxs90LZOtl5OuX9VawOXtGTTaW1Wl0gEQF0gv_jtb6w=@protonmail.com>
	<6b8f2a91-af73-4d66-1b90-51acd4ce217c@gmail.com>
In-Reply-To: <6b8f2a91-af73-4d66-1b90-51acd4ce217c@gmail.com>
From: James Prestwich <james@prestwi.ch>
Date: Thu, 2 May 2019 16:33:09 -0700
Message-ID: <CAOP2CbwfwnDCRTpsoDyAHemRYu617QeOWinwM8j95m5e7ceRKA@mail.gmail.com>
To: Aymeric Vitte <vitteaymeric@gmail.com>, 
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000002ed41d0587f00ff8"
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Fri, 03 May 2019 15:55:52 +0000
Subject: Re: [bitcoin-dev] IsStandard
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Thu, 02 May 2019 23:33:22 -0000

--0000000000002ed41d0587f00ff8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Aymeric,

As Luke and ZmnSCPxj have pointed out, documenting standardness is
sisyphean, as it varies from version to version. I recently put together a
reference for default TX_NONSTANDARD policies in v0.18, which can be found
here: https://prestwi.ch/the-bitcoin-nonstandard/

It applies only to v0.18, and may already be outdated.

Best,
James

On Thu, May 2, 2019 at 4:29 PM Aymeric Vitte via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> Thanks for the answer, indeed for the redeem script and someone
> attempting a 0/1 of 3, good example
>
> So to summarize everything is standard as long as it matches P2PKH,
> P2SH, P2WPKH or P2WSH , the redeem scripts for the sha bounties are in
> op_return
>
> Still the case of bch is unclear (it's related since based on bitcoin
> code unless they changed the policy), was the story that nodes would not
> propagate the fix or that people did not want to take the risk to
> propagate it? And why a non segwit old bitcoin node would not accept it
> either?
>
> Le 02/05/2019 =C3=A0 02:10, ZmnSCPxj a =C3=A9crit :
> > Good morning Aymeric,
> >
> >
> > Sent with ProtonMail Secure Email.
> >
> > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Origina=
l Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
> > On Tuesday, April 30, 2019 5:43 PM, Aymeric Vitte <
> vitteaymeric@gmail.com> wrote:
> >
> >> I must badly explain my point (or just wondering things that do not
> >> exist finally), the question is indeed whether nodes will relay non
> >> usual transactions or not and how to know what they will accept or not=
:
> >>
> >> -   my modified multisig 2 of 3: I did put OP_2 out of the usual redee=
m
> >>     script, the redeem script still matches scriptpubkey and scriptsig
> will
> >>     execute succesfully, that's a normal legacy P2SH or segwit P2WSH
> >>
> >> -   bch segwit recovery: it's a p2sh transaction without any signature
> >>     verification, as far as I remember there was a story that it could
> not
> >>     propagate in the network (even taking the risk to be stolen) and
> that
> >>     people had to contact a (honest) miner
> >>
> >> -   sha bounties: same as above, p2sh transactions without signatures
> >>
> >>     etc
> >>
> >>     Will all of those transactions propagate normally? And then the
> rule is
> >>     just that it matches the P2PKH, P2WPKH, P2SH, or P2WSH templates
> >>     whatever scripts you put inside?
> > P2PKH and P2WPKH cannot have custom script.
> > However, yes, any custom script can be wrapped in P2SH and P2WSH and it
> will be propagated.
> > The P2SH/P2WSH hides the details of your custom script so cannot be
> filtered based on your custom script.
> > Do realize that once a claim on your modified x-of-3 is propagated your
> `redeemScript` is known and someone can attempt to RBF (or coordinate wit=
h
> a miner) with a modified `witness` stack or `scriptSig` to claim your UTX=
O.
> > (I do not know if `OP_CHECKMULTISIG` supports 0-of-3 but at least one o=
f
> your signatories could make it a 1-of-3 and bribe a miner to get it claim=
ed)
> >
> > I cannot answer for BCH; arguably that is off-topic here.
> >
> > The old SHA bounty transactions were propagated in the days before
> `isStandard` I think.
> > Either that or they were put in by miners.
> > An SHA bounty can still be propagated today if they are wrapped in a
> P2SH or P2WSH, but you have to publish the `redeemScript` yourself in som=
e
> other method.
> > Or bribe a miner if the transaction is not time-sensitive (for an SHA
> bounty, unlikely to be time-sensitive).
> >
> > Regards,
> > ZmnSCPxj
>
> --
> Move your coins by yourself (browser version): https://peersm.com/wallet
> Bitcoin transactions made simple:
> https://github.com/Ayms/bitcoin-transactions
> Zcash wallets made simple: https://github.com/Ayms/zcash-wallets
> Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets
> Get the torrent dynamic blocklist: http://peersm.com/getblocklist
> Check the 10 M passwords list: http://peersm.com/findmyass
> Anti-spies and private torrents, dynamic blocklist:
> http://torrent-live.org
> Peersm : http://www.peersm.com
> torrent-live: https://github.com/Ayms/torrent-live
> node-Tor <https://github.com/Ayms/torrent-livenode-Tor> :
> https://www.github.com/Ayms/node-Tor
> GitHub : https://www.github.com/Ayms
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--0000000000002ed41d0587f00ff8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Aymeric,=C2=A0<div><br></div><div>As Luke and ZmnSCPxj =
have pointed out, documenting standardness is sisyphean, as it varies from =
version to version. I recently put together a reference for default TX_NONS=
TANDARD policies in v0.18, which can be found here:=C2=A0<a href=3D"https:/=
/prestwi.ch/the-bitcoin-nonstandard/">https://prestwi.ch/the-bitcoin-nonsta=
ndard/</a>=C2=A0</div><div><br></div><div>It applies only to v0.18, and may=
 already be outdated.</div><div><br></div><div>Best,</div><div>James</div><=
/div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">O=
n Thu, May 2, 2019 at 4:29 PM Aymeric Vitte via bitcoin-dev &lt;<a href=3D"=
mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfounda=
tion.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D=
"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le=
ft:1ex">Thanks for the answer, indeed for the redeem script and someone<br>
attempting a 0/1 of 3, good example<br>
<br>
So to summarize everything is standard as long as it matches P2PKH,<br>
P2SH, P2WPKH or P2WSH , the redeem scripts for the sha bounties are in<br>
op_return<br>
<br>
Still the case of bch is unclear (it&#39;s related since based on bitcoin<b=
r>
code unless they changed the policy), was the story that nodes would not<br=
>
propagate the fix or that people did not want to take the risk to<br>
propagate it? And why a non segwit old bitcoin node would not accept it<br>
either?<br>
<br>
Le 02/05/2019 =C3=A0 02:10, ZmnSCPxj a =C3=A9crit=C2=A0:<br>
&gt; Good morning Aymeric,<br>
&gt;<br>
&gt;<br>
&gt; Sent with ProtonMail Secure Email.<br>
&gt;<br>
&gt; =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Origin=
al Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90<=
br>
&gt; On Tuesday, April 30, 2019 5:43 PM, Aymeric Vitte &lt;<a href=3D"mailt=
o:vitteaymeric@gmail.com" target=3D"_blank">vitteaymeric@gmail.com</a>&gt; =
wrote:<br>
&gt;<br>
&gt;&gt; I must badly explain my point (or just wondering things that do no=
t<br>
&gt;&gt; exist finally), the question is indeed whether nodes will relay no=
n<br>
&gt;&gt; usual transactions or not and how to know what they will accept or=
 not:<br>
&gt;&gt;<br>
&gt;&gt; -=C2=A0 =C2=A0my modified multisig 2 of 3: I did put OP_2 out of t=
he usual redeem<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0script, the redeem script still matches scriptp=
ubkey and scriptsig will<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0execute succesfully, that&#39;s a normal legacy=
 P2SH or segwit P2WSH<br>
&gt;&gt;<br>
&gt;&gt; -=C2=A0 =C2=A0bch segwit recovery: it&#39;s a p2sh transaction wit=
hout any signature<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0verification, as far as I remember there was a =
story that it could not<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0propagate in the network (even taking the risk =
to be stolen) and that<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0people had to contact a (honest) miner<br>
&gt;&gt;<br>
&gt;&gt; -=C2=A0 =C2=A0sha bounties: same as above, p2sh transactions witho=
ut signatures<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0etc<br>
&gt;&gt;<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0Will all of those transactions propagate normal=
ly? And then the rule is<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0just that it matches the P2PKH, P2WPKH, P2SH, o=
r P2WSH templates<br>
&gt;&gt;=C2=A0 =C2=A0 =C2=A0whatever scripts you put inside?<br>
&gt; P2PKH and P2WPKH cannot have custom script.<br>
&gt; However, yes, any custom script can be wrapped in P2SH and P2WSH and i=
t will be propagated.<br>
&gt; The P2SH/P2WSH hides the details of your custom script so cannot be fi=
ltered based on your custom script.<br>
&gt; Do realize that once a claim on your modified x-of-3 is propagated you=
r `redeemScript` is known and someone can attempt to RBF (or coordinate wit=
h a miner) with a modified `witness` stack or `scriptSig` to claim your UTX=
O.<br>
&gt; (I do not know if `OP_CHECKMULTISIG` supports 0-of-3 but at least one =
of your signatories could make it a 1-of-3 and bribe a miner to get it clai=
med)<br>
&gt;<br>
&gt; I cannot answer for BCH; arguably that is off-topic here.<br>
&gt;<br>
&gt; The old SHA bounty transactions were propagated in the days before `is=
Standard` I think.<br>
&gt; Either that or they were put in by miners.<br>
&gt; An SHA bounty can still be propagated today if they are wrapped in a P=
2SH or P2WSH, but you have to publish the `redeemScript` yourself in some o=
ther method.<br>
&gt; Or bribe a miner if the transaction is not time-sensitive (for an SHA =
bounty, unlikely to be time-sensitive).<br>
&gt;<br>
&gt; Regards,<br>
&gt; ZmnSCPxj<br>
<br>
-- <br>
Move your coins by yourself (browser version): <a href=3D"https://peersm.co=
m/wallet" rel=3D"noreferrer" target=3D"_blank">https://peersm.com/wallet</a=
><br>
Bitcoin transactions made simple: <a href=3D"https://github.com/Ayms/bitcoi=
n-transactions" rel=3D"noreferrer" target=3D"_blank">https://github.com/Aym=
s/bitcoin-transactions</a><br>
Zcash wallets made simple: <a href=3D"https://github.com/Ayms/zcash-wallets=
" rel=3D"noreferrer" target=3D"_blank">https://github.com/Ayms/zcash-wallet=
s</a><br>
Bitcoin wallets made simple: <a href=3D"https://github.com/Ayms/bitcoin-wal=
lets" rel=3D"noreferrer" target=3D"_blank">https://github.com/Ayms/bitcoin-=
wallets</a><br>
Get the torrent dynamic blocklist: <a href=3D"http://peersm.com/getblocklis=
t" rel=3D"noreferrer" target=3D"_blank">http://peersm.com/getblocklist</a><=
br>
Check the 10 M passwords list: <a href=3D"http://peersm.com/findmyass" rel=
=3D"noreferrer" target=3D"_blank">http://peersm.com/findmyass</a><br>
Anti-spies and private torrents, dynamic blocklist: <a href=3D"http://torre=
nt-live.org" rel=3D"noreferrer" target=3D"_blank">http://torrent-live.org</=
a><br>
Peersm : <a href=3D"http://www.peersm.com" rel=3D"noreferrer" target=3D"_bl=
ank">http://www.peersm.com</a><br>
torrent-live: <a href=3D"https://github.com/Ayms/torrent-livenode-Tor" rel=
=3D"noreferrer" target=3D"_blank">https://github.com/Ayms/torrent-live<br>
node-Tor</a> : <a href=3D"https://www.github.com/Ayms/node-Tor" rel=3D"nore=
ferrer" target=3D"_blank">https://www.github.com/Ayms/node-Tor</a><br>
GitHub : <a href=3D"https://www.github.com/Ayms" rel=3D"noreferrer" target=
=3D"_blank">https://www.github.com/Ayms</a><br>
<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>

--0000000000002ed41d0587f00ff8--