summaryrefslogtreecommitdiff
path: root/7a/742d2965bad8b855727afed927c59f50d5688f
blob: 95830e595f4f7a043c9d74631bd630ebca43b73c (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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
Return-Path: <vitteaymeric@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id ADC5D38C1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri,  3 May 2019 09:51:30 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com
	[209.85.221.48])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 217BC79
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri,  3 May 2019 09:51:29 +0000 (UTC)
Received: by mail-wr1-f48.google.com with SMTP id a12so7029082wrq.10
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 03 May 2019 02:51:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:to:references:from:openpgp:autocrypt:message-id:date
	:user-agent:mime-version:in-reply-to:content-language;
	bh=p7js6U8xtzCynqcgkrGTClCHmGK+0WQlORWarKhL0u0=;
	b=Hri7zjAcEGg/bQchu/zXSJvL1YjRcn2d3Y1eYGZCuxEW6BK+kVOY/nEU7hLYcWte9h
	+eKV6Qiu0cGqIC3SQRIm3Y/3zkdVBQiuPvGthTc3DiRvCFhxYGJEsBuy/vIK5S2Egfhl
	rXxl96blG2tgsq8eKNhr9QpI4tWKeJnLxk1HGTMxac5A0rAngZM9XrKfwMh3xk1LZKSq
	mtWEAGkAeAcEiYt1SsfXH/vkce0Bf3yxGgpBzL9QmGj1H0ek49XRqHNy6U6CeLdb04xM
	nbwpdOrMMoplUbwDrkcg06Zbs0t3glf11sfWs44Td/jRUInxL6P3y+5hgvs/8mQJoDWv
	lfmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt
	:message-id:date:user-agent:mime-version:in-reply-to
	:content-language;
	bh=p7js6U8xtzCynqcgkrGTClCHmGK+0WQlORWarKhL0u0=;
	b=dN63kHrrWZYVDGgHiRFiI/RR7cRkQlisUiXMJWl6OFdrr2Qmb4fIfFAjaQ1QWGRvnz
	RT+Mk1/l9EAOa9Ewnr7bWnKivB/bcTLeHM77Ojn+psi8CFARFN9bpNOIQrLehDJFkV4b
	+zKtZ2sT4DZu6xBqJFl0c+tSIjTnyNxwxjjbuGR7qohORJkRDUvGdAjrj/Zx2sZSh0zX
	60c8YCh8d7oO7Y5dYCsukOGHXMy/B4EAJY1QiTktfft0I4cl+wAqN7xOpaqEvPqrFHg3
	vTV9kVawwxeFBPVnd8DuWG0QlG0tMDP++u/P13jrh9/UnRyM0U9VtV3pgMN+DttMglVp
	l+Sw==
X-Gm-Message-State: APjAAAWuO3ftgKtA2b15IGRWLzUpOO/pKRvR3zkMaPfkxt6u1hMzMue5
	rGwVQzOFQqawsm0OU5wOkGHI9Am2
X-Google-Smtp-Source: APXvYqw5TfTFrRwyx8SD1v6NVuSOm29xSgZ9z03+OaQg+z8GJYSkfENUcyxFbhZGj+Ob27M2glIRRg==
X-Received: by 2002:adf:e883:: with SMTP id d3mr2603000wrm.232.1556877087411; 
	Fri, 03 May 2019 02:51:27 -0700 (PDT)
Received: from ?IPv6:2a01:cb1d:44:6500:b1e1:fba8:c623:4bdc?
	([2a01:cb1d:44:6500:b1e1:fba8:c623:4bdc])
	by smtp.googlemail.com with ESMTPSA id
	r29sm1531876wra.56.2019.05.03.02.51.26
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Fri, 03 May 2019 02:51:26 -0700 (PDT)
To: James Prestwich <james@prestwi.ch>,
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
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>
	<CAOP2CbwfwnDCRTpsoDyAHemRYu617QeOWinwM8j95m5e7ceRKA@mail.gmail.com>
From: Aymeric Vitte <vitteaymeric@gmail.com>
Openpgp: preference=signencrypt
Autocrypt: addr=vitteaymeric@gmail.com; prefer-encrypt=mutual; keydata=
	mQINBFdW8uABEAC7HJScbB2d/lmYoY5Cn9loEjJwfLs1LC3om030bWFGiH3Ceo5XeHUT94rw
	Pi+HaHU8ea94425SXIFsnqp/ouoT/8Ffn6vED0OoRmK0jE4fqDApXSpoL2mHX9PAGdUItMtD
	YrxBiBZNfMkctEsm4NrQ4TCvB3Yrm6Fc69inXJjUoYgPw5tHafEeI8Qwh0j99JZZDKcAqIra
	JF3MPc59rATz0qOJtRP9EpsPVFwjJe13zN6CHILwiVgrL8EtT5WKCVO6ATxh60LHi8+MwPxV
	V31zp/NNI5Hck+XocEMO98ZvUu9X8ZxmnOk/+9pBxXEwUqSGUNWdmPJLncpI23Usce3u/MOo
	M2C4T4rD4J0XrXiyBvbeTvwq4qVNlyggeWzlBH+YpEYgDctPq4gNh4eoTtAkf8URtBeke5bQ
	CGdaZt/jxv8nvmxs9V/iSyg5ldJLQktHStXOo0OZ7FEB2C6Ggtymm4hm2MHYg07Q1MGJrFLa
	oJZkJ3JeXnVsZMam7ypQtld6rRa96CvH+llXwux6aQ5hKdzmBB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T7bIvNeyicVBZFipXqPcKL
	VFduO2c5Ubc2npMWLUF1k9JJc9tH75l3+F/0RbYVTzGAZ+zSaudwR6h8YiCN2DBZGZkJEZbh
	3X/l6jtijMN/W9sPHyyKvm/TmeEC27S3TqZPZ8PUQLxZC70V6gMbenh01JdSQsn5t8Ru0RNh
	Blt0g7IyZyIKCE9b+TyzbYpX6qgqEBUHia5b0vyPtQacWQlZ8uqnghAqNkLluEsy7Q/7xG6M
	wXUYEDsFOmB9dKOzcAOIhpxlVjSKu5mzXJ11sEtE8nyF5NJ/riCA7FGcjlki3zIpzQUNo9v7
	vXl2h6Tivlk=
Message-ID: <37e3f1ee-a3c6-2670-f0e0-4b939bf8e396@gmail.com>
Date: Fri, 3 May 2019 11:51:25 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:60.0) Gecko/20100101
	Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <CAOP2CbwfwnDCRTpsoDyAHemRYu617QeOWinwM8j95m5e7ceRKA@mail.gmail.com>
Content-Type: multipart/alternative;
	boundary="------------3F1120A0D3BC06ECC8A3415B"
Content-Language: fr
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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:56:20 +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: Fri, 03 May 2019 09:51:30 -0000

This is a multi-part message in MIME format.
--------------3F1120A0D3BC06ECC8A3415B
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Great doc, thanks, then my previous summarized conclusion was wrong,
trying on my side to write a "demistifying (simply) once for all bitcoin
scripting", not sure that "simply" can stay in the title at the end...

So my multisig modification is non standard, now I am still puzzled by
something, mainly the fact that we have op_pushdata inside op_pushdata,
maybe I am misreading the specs, but in case of p2sh only the last
op_pushdata (called {serialized script} (or redeem script) is executed,
then if succesfull it comes back onto the stack and scriptpubkey is executed

So, let's take again the BCH recovery example, scriptSig was OP_PUSHDATA
0014<hash160 of pubkey>, and scriptPubKey OP_HASH160 <hash160 of
0014<hash160 of pubkey> OP_EQUAL, then scriptSig executes pushing
nothing and <hash160 of pubkey> into the stack, then scriptSig is pushed
again and executed with scriptPubKey, at the end we get nothing +
<hash160 of pubkey> + 1 in the stack, then cleanstack (maybe among
others, I have to read in more details your doc) says it is a correct
transaction but non standard, is this correct?

Le 03/05/2019 à 01:33, James Prestwich a écrit :
> 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
> <mailto: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 à 02:10, ZmnSCPxj a écrit :
>     > Good morning Aymeric,
>     >
>     >
>     > Sent with ProtonMail Secure Email.
>     >
>     > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>     > On Tuesday, April 30, 2019 5:43 PM, Aymeric Vitte
>     <vitteaymeric@gmail.com <mailto: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 redeem
>     >>     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 with a miner) with a modified `witness` stack
>     or `scriptSig` to claim your UTXO.
>     > (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 claimed)
>     >
>     > 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 some 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
>     <mailto:bitcoin-dev@lists.linuxfoundation.org>
>     https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
-- 
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://www.github.com/Ayms/node-Tor
GitHub : https://www.github.com/Ayms


--------------3F1120A0D3BC06ECC8A3415B
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Great doc, thanks, then my previous summarized conclusion was
      wrong, trying on my side to write a "demistifying (simply) once
      for all bitcoin scripting", not sure that "simply" can stay in the
      title at the end...</p>
    <p>So my multisig modification is non standard, now I am still
      puzzled by something, mainly the fact that we have op_pushdata
      inside op_pushdata, maybe I am misreading the specs, but in case
      of p2sh only the last op_pushdata (called {serialized script} (or
      redeem script) is executed, then if succesfull it comes back onto
      the stack and scriptpubkey is executed<br>
    </p>
    <p>So, let's take again the BCH recovery example, scriptSig was
      OP_PUSHDATA 0014&lt;hash160 of pubkey&gt;, and scriptPubKey
      OP_HASH160 &lt;hash160 of 0014&lt;hash160 of pubkey&gt; OP_EQUAL,
      then scriptSig executes pushing nothing and &lt;hash160 of
      pubkey&gt; into the stack, then scriptSig is pushed again and
      executed with scriptPubKey, at the end we get nothing +
      &lt;hash160 of pubkey&gt; + 1 in the stack, then cleanstack (maybe
      among others, I have to read in more details your doc) says it is
      a correct transaction but non standard, is this correct?<br>
    </p>
    <div class="moz-cite-prefix">Le 03/05/2019 à 01:33, James Prestwich
      a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOP2CbwfwnDCRTpsoDyAHemRYu617QeOWinwM8j95m5e7ceRKA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Aymeric, 
        <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_NONSTANDARD policies in v0.18, which can be found here: <a
            href="https://prestwi.ch/the-bitcoin-nonstandard/"
            moz-do-not-send="true">https://prestwi.ch/the-bitcoin-nonstandard/</a> </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="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, May 2, 2019 at 4:29 PM
          Aymeric Vitte via bitcoin-dev &lt;<a
            href="mailto:bitcoin-dev@lists.linuxfoundation.org"
            moz-do-not-send="true">bitcoin-dev@lists.linuxfoundation.org</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left: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's related since based on
          bitcoin<br>
          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 à 02:10, ZmnSCPxj a écrit :<br>
          &gt; Good morning Aymeric,<br>
          &gt;<br>
          &gt;<br>
          &gt; Sent with ProtonMail Secure Email.<br>
          &gt;<br>
          &gt; ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br>
          &gt; On Tuesday, April 30, 2019 5:43 PM, Aymeric Vitte &lt;<a
            href="mailto:vitteaymeric@gmail.com" target="_blank"
            moz-do-not-send="true">vitteaymeric@gmail.com</a>&gt; wrote:<br>
          &gt;<br>
          &gt;&gt; I must badly explain my point (or just wondering
          things that do not<br>
          &gt;&gt; exist finally), the question is indeed whether nodes
          will relay non<br>
          &gt;&gt; usual transactions or not and how to know what they
          will accept or not:<br>
          &gt;&gt;<br>
          &gt;&gt; -   my modified multisig 2 of 3: I did put OP_2 out
          of the usual redeem<br>
          &gt;&gt;     script, the redeem script still matches
          scriptpubkey and scriptsig will<br>
          &gt;&gt;     execute succesfully, that's a normal legacy P2SH
          or segwit P2WSH<br>
          &gt;&gt;<br>
          &gt;&gt; -   bch segwit recovery: it's a p2sh transaction
          without any signature<br>
          &gt;&gt;     verification, as far as I remember there was a
          story that it could not<br>
          &gt;&gt;     propagate in the network (even taking the risk to
          be stolen) and that<br>
          &gt;&gt;     people had to contact a (honest) miner<br>
          &gt;&gt;<br>
          &gt;&gt; -   sha bounties: same as above, p2sh transactions
          without signatures<br>
          &gt;&gt;<br>
          &gt;&gt;     etc<br>
          &gt;&gt;<br>
          &gt;&gt;     Will all of those transactions propagate
          normally? And then the rule is<br>
          &gt;&gt;     just that it matches the P2PKH, P2WPKH, P2SH, or
          P2WSH templates<br>
          &gt;&gt;     whatever 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 it will be propagated.<br>
          &gt; The P2SH/P2WSH hides the details of your custom script so
          cannot be filtered based on your custom script.<br>
          &gt; 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 with a miner) with a modified
          `witness` stack or `scriptSig` to claim your UTXO.<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 claimed)<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 `isStandard` 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 P2SH or P2WSH, but you have to publish the
          `redeemScript` yourself in some other 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="https://peersm.com/wallet" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://peersm.com/wallet</a><br>
          Bitcoin transactions made simple: <a
            href="https://github.com/Ayms/bitcoin-transactions"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/Ayms/bitcoin-transactions</a><br>
          Zcash wallets made simple: <a
            href="https://github.com/Ayms/zcash-wallets"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/Ayms/zcash-wallets</a><br>
          Bitcoin wallets made simple: <a
            href="https://github.com/Ayms/bitcoin-wallets"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/Ayms/bitcoin-wallets</a><br>
          Get the torrent dynamic blocklist: <a
            href="http://peersm.com/getblocklist" rel="noreferrer"
            target="_blank" moz-do-not-send="true">http://peersm.com/getblocklist</a><br>
          Check the 10 M passwords list: <a
            href="http://peersm.com/findmyass" rel="noreferrer"
            target="_blank" moz-do-not-send="true">http://peersm.com/findmyass</a><br>
          Anti-spies and private torrents, dynamic blocklist: <a
            href="http://torrent-live.org" rel="noreferrer"
            target="_blank" moz-do-not-send="true">http://torrent-live.org</a><br>
          Peersm : <a href="http://www.peersm.com" rel="noreferrer"
            target="_blank" moz-do-not-send="true">http://www.peersm.com</a><br>
          torrent-live: <a
            href="https://github.com/Ayms/torrent-livenode-Tor"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/Ayms/torrent-live<br>
            node-Tor</a> : <a
            href="https://www.github.com/Ayms/node-Tor" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://www.github.com/Ayms/node-Tor</a><br>
          GitHub : <a href="https://www.github.com/Ayms"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.github.com/Ayms</a><br>
          <br>
          _______________________________________________<br>
          bitcoin-dev mailing list<br>
          <a href="mailto:bitcoin-dev@lists.linuxfoundation.org"
            target="_blank" moz-do-not-send="true">bitcoin-dev@lists.linuxfoundation.org</a><br>
          <a
            href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Move your coins by yourself (browser version): <a class="moz-txt-link-freetext" href="https://peersm.com/wallet">https://peersm.com/wallet</a>
Bitcoin transactions made simple: <a class="moz-txt-link-freetext" href="https://github.com/Ayms/bitcoin-transactions">https://github.com/Ayms/bitcoin-transactions</a>
Zcash wallets made simple: <a class="moz-txt-link-freetext" href="https://github.com/Ayms/zcash-wallets">https://github.com/Ayms/zcash-wallets</a>
Bitcoin wallets made simple: <a class="moz-txt-link-freetext" href="https://github.com/Ayms/bitcoin-wallets">https://github.com/Ayms/bitcoin-wallets</a>
Get the torrent dynamic blocklist: <a class="moz-txt-link-freetext" href="http://peersm.com/getblocklist">http://peersm.com/getblocklist</a>
Check the 10 M passwords list: <a class="moz-txt-link-freetext" href="http://peersm.com/findmyass">http://peersm.com/findmyass</a>
Anti-spies and private torrents, dynamic blocklist: <a class="moz-txt-link-freetext" href="http://torrent-live.org">http://torrent-live.org</a>
Peersm : <a class="moz-txt-link-freetext" href="http://www.peersm.com">http://www.peersm.com</a>
torrent-live: <a class="moz-txt-link-freetext" href="https://github.com/Ayms/torrent-live">https://github.com/Ayms/torrent-live</a>
node-Tor : <a class="moz-txt-link-freetext" href="https://www.github.com/Ayms/node-Tor">https://www.github.com/Ayms/node-Tor</a>
GitHub : <a class="moz-txt-link-freetext" href="https://www.github.com/Ayms">https://www.github.com/Ayms</a></pre>
  </body>
</html>

--------------3F1120A0D3BC06ECC8A3415B--