public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Russell O'Connor" <roconnor@blockstream•com>
To: Andrew Poelstra <apoelstra@wpsoftware•net>,
	 Bitcoin Protocol Discussion
	<bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] Unenforceable fee obligations in multiparty protocols with Taproot inputs
Date: Tue, 7 Feb 2023 13:35:12 -0500	[thread overview]
Message-ID: <CAMZUoK=u2114uv0Uc0u_RVMBv-cq-gJiNxiyOk_T_xxTYO0Ghw@mail.gmail.com> (raw)
In-Reply-To: <Y+KUAlsPc8ohPecb@camus>

[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]

There is a bug in Taproot that allows the same Tapleaf to be repeated
multiple times in the same Taproot, potentially at different Taplevels
incurring different Tapfee rates.

The countermeasure is that you should always know the entire Taptree when
interacting with someone's Tapspend.


On Tue, Feb 7, 2023 at 1:10 PM Andrew Poelstra via bitcoin-dev <
bitcoin-dev@lists•linuxfoundation.org> wrote:

>
> Some people highlighted some minor problems with my last email:
>
> On Tue, Feb 07, 2023 at 01:46:22PM +0000, Andrew Poelstra via bitcoin-dev
> wrote:
> >
> > <snip>
> >
> > [1] https://bitcoin.sipa.be/miniscript/
> > [2] In Taproot, if you want to prevent signatures migrating to another
> >     branch or within a branch, you can use the CODESEPARATOR opcode
> >     which was redisegned in Taproot for exactly this purpose... we
> >     really did about witness malleation in its design!
>
> In Taproot the tapleaf hash is always covered by the signature (though
> not in some ANYONECANPAY proposals) so you can never migrate signatures
> between tapbranches.
>
> I had thought this was the case, but then I re-confused myself by
> reading BIP 341 .... which has much of the sighash specified, but not
> all of it! The tapleaf hash is added in BIP 342.
>
> >
> >     If you want to prevent signatures from moving around *within* a
> >     branch,
> >
>
> And this sentence I just meant to delete :)
>
>
> --
> Andrew Poelstra
> Director of Research, Blockstream
> Email: apoelstra at wpsoftware.net
> Web:   https://www.wpsoftware.net/andrew
>
> The sun is always shining in space
>     -Justin Lewis-Webster
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists•linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

[-- Attachment #2: Type: text/html, Size: 2782 bytes --]

  reply	other threads:[~2023-02-07 18:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  2:49 Yuval Kogman
2023-02-07  4:38 ` Lloyd Fournier
2023-02-07  9:36 ` Nadav Ivgi
2023-02-07 12:50   ` Peter Todd
2023-02-07 13:46 ` Andrew Poelstra
2023-02-07 18:10   ` Andrew Poelstra
2023-02-07 18:35     ` Russell O'Connor [this message]
2023-02-07 19:04       ` Peter Todd
2023-02-08  9:34       ` Michael Folkson
2023-02-08 14:00         ` Andrew Poelstra
2023-02-08 14:04         ` Russell O'Connor
2023-02-11  5:14           ` Anthony Towns
2023-02-11 14:40             ` Russell O'Connor
2023-02-12  6:47               ` Anthony Towns
2023-02-07 18:12   ` Peter Todd
2023-02-08  0:56 ` Antoine Riard
2023-02-10 19:35   ` Yuval Kogman
2023-02-15  3:33     ` Antoine Riard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMZUoK=u2114uv0Uc0u_RVMBv-cq-gJiNxiyOk_T_xxTYO0Ghw@mail.gmail.com' \
    --to=roconnor@blockstream$(echo .)com \
    --cc=apoelstra@wpsoftware$(echo .)net \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox