From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B8EBD34A6 for ; 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 ; Thu, 2 May 2019 23:33:21 +0000 (UTC) Received: by mail-yw1-f48.google.com with SMTP id l8so59374ywm.4 for ; 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> <1019ea57-7240-2dc7-8357-970223278e3d@gmail.com> <6b8f2a91-af73-4d66-1b90-51acd4ce217c@gmail.com> In-Reply-To: <6b8f2a91-af73-4d66-1b90-51acd4ce217c@gmail.com> From: James Prestwich Date: Thu, 2 May 2019 16:33:09 -0700 Message-ID: To: Aymeric Vitte , Bitcoin Protocol Discussion 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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://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
Hi Aymeric,=C2=A0

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=A0https://prestwi.ch/the-bitcoin-nonsta= ndard/=C2=A0

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

Best,
James
<= /div>
O= n Thu, May 2, 2019 at 4:29 PM Aymeric Vitte via bitcoin-dev <bitcoin-dev@lists.linuxfounda= tion.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=C2=A0:
> 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 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> > 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 no= t
>> exist finally), the question is indeed whether nodes will relay no= n
>> usual transactions or not and how to know what they will accept or= not:
>>
>> -=C2=A0 =C2=A0my modified multisig 2 of 3: I did put OP_2 out of t= he usual redeem
>>=C2=A0 =C2=A0 =C2=A0script, the redeem script still matches scriptp= ubkey and scriptsig will
>>=C2=A0 =C2=A0 =C2=A0execute succesfully, that's a normal legacy= P2SH or segwit P2WSH
>>
>> -=C2=A0 =C2=A0bch segwit recovery: it's a p2sh transaction wit= hout any signature
>>=C2=A0 =C2=A0 =C2=A0verification, as far as I remember there was a = story that it could not
>>=C2=A0 =C2=A0 =C2=A0propagate in the network (even taking the risk = to be stolen) and that
>>=C2=A0 =C2=A0 =C2=A0people had to contact a (honest) miner
>>
>> -=C2=A0 =C2=A0sha bounties: same as above, p2sh transactions witho= ut signatures
>>
>>=C2=A0 =C2=A0 =C2=A0etc
>>
>>=C2=A0 =C2=A0 =C2=A0Will all of those transactions propagate normal= ly? And then the rule is
>>=C2=A0 =C2=A0 =C2=A0just that it matches the P2PKH, P2WPKH, P2SH, o= r P2WSH templates
>>=C2=A0 =C2=A0 =C2=A0whatever scripts you put inside?
> P2PKH and P2WPKH cannot have custom script.
> However, yes, any custom script can be wrapped in P2SH and P2WSH and i= t will be propagated.
> The P2SH/P2WSH hides the details of your custom script so cannot be fi= ltered based on your custom script.
> 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.
> (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)
>
> I cannot answer for BCH; arguably that is off-topic here.
>
> The old SHA bounty transactions were propagated in the days before `is= Standard` 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 P= 2SH or P2WSH, but you have to publish the `redeemScript` yourself in some o= ther 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/Aym= s/bitcoin-transactions
Zcash wallets made simple: https://github.com/Ayms/zcash-wallet= s
Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-= wallets
Get the torrent dynamic blocklist: http://peersm.com/getblocklist<= br> 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

_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev
--0000000000002ed41d0587f00ff8--