Return-Path: Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7BA41C0029 for ; Tue, 13 Jun 2023 10:38:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4969B40492 for ; Tue, 13 Jun 2023 10:38:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4969B40492 Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=pd3+y8Mm X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.098 X-Spam-Level: X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KurTeZpw1om0 for ; Tue, 13 Jun 2023 10:38:44 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org DF94740223 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by smtp2.osuosl.org (Postfix) with ESMTPS id DF94740223 for ; Tue, 13 Jun 2023 10:38:43 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-97454836448so762518166b.2 for ; Tue, 13 Jun 2023 03:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686652722; x=1689244722; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=F15Cu05Gr+0pyBhFOaJzNSyETN2tAt7oqdHyswPWrSM=; b=pd3+y8MmqzAOsCbXimkmpqy/XGY1Iumku3elF6qx1gE6KhLkEmLIYX3GBJ9WpdJ6In ZL8WhJvwH4TOfST85x3r930DFGrxNkpfPKyywNn0yApplpfWj8OD2Gv3lLIRglyULP15 I/2BAWsOHe+pTFkePaBsfmRwO+6WyfYgIgMl5bs2wQGhY/fxeThGmQ3HM+tLwMYYZyOo drCOt+CQnT/K1HAgoUeMnoZlHwHygo+RqiA81mq1EFlomIffZYpsjqS//dMWH+ORqL5D 4U3iZBSX94enYgn0H2Mgc7wjNoFmemTMGvHA0+G6jCeqMPKJ8i050OwqbyJF0qyOrz1P yKQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686652722; x=1689244722; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F15Cu05Gr+0pyBhFOaJzNSyETN2tAt7oqdHyswPWrSM=; b=HQvV/SxyUbXTVcB07STrnm/2psu/UG14gDKUGdxB23XF1RJB+cKTYrOhxjltTgpdnV Nfpa2y9NzkGt4nCYKKek8Ysl7E9twUCSoNJ203rnTo7V3Y77aFSvqaarlU14CXa5RZhd TAWfdfPF+DpEjchVWDyUdR6CCecOoszn9bsQseK9H3u6BmtTtnKcqA/N2fpdIP0M46JH TNf5PvRU4Z5JX/cz215WER0A/Z0Oe4czM6Js1us2xS/38pHHlUb4DczSBKJDNsXCg0oH vsxR5q8kwz7ROR09vLai3gLrcNdqqsm/u1NA1I7FqWKY0JnwZvE384o3VrZcOLIyXeYq hJFw== X-Gm-Message-State: AC+VfDz6d/BK+IQRv2s8ITAopJarMeY6BnT21VrqbnkGwz7uFt0/omB5 1+b8DAlg6LFJMNC3GcUbu5abmGSalm8Bw6+938U= X-Google-Smtp-Source: ACHHUZ6s7CsDTG1iTWmGuywvapkz1zik+IBQ72rqzrDIBfLHhBksiFLkQM75FWdqlVTAecEcaNB2FQBRWdJujeEz5d4= X-Received: by 2002:a17:907:807:b0:94f:3b07:a708 with SMTP id wv7-20020a170907080700b0094f3b07a708mr11540121ejb.29.1686652721707; Tue, 13 Jun 2023 03:38:41 -0700 (PDT) MIME-Version: 1.0 References: <211fef60bb46fae7f69e8e5882ff27cb@dtrt.org> In-Reply-To: <211fef60bb46fae7f69e8e5882ff27cb@dtrt.org> From: Joost Jager Date: Tue, 13 Jun 2023 12:38:05 +0200 Message-ID: To: "David A. Harding" Content-Type: multipart/alternative; boundary="000000000000563fb105fe007061" X-Mailman-Approved-At: Tue, 13 Jun 2023 11:32:21 +0000 Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Standardisation of an unstructured taproot annex X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2023 10:38:45 -0000 --000000000000563fb105fe007061 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 13, 2023 at 10:51=E2=80=AFAM David A. Harding w= rote: > > I am really looking for a bitcoin-native solution to leverage > > bitcoin's robustness and security properties. > > I understand. I would briefly point out that there are other advantages > to not storing a signature for an ephemeral key in the annex. For > example, if you want to generate multiple different potential spending > transactions, you need to store one signature for each potential > transaction. The more data you store in the annex, the less scalable > the vault protocol becomes; by comparison, it's possible to cheaply > store a very large amount of data offchain with high robustness. > Each byte on-chain indeed has a cost. Though for practical vault usage, you may only need two spend paths - one for the unvaulting transaction and another for an emergency transaction. Also, depending on construction of the vault, a possible advantage of a > presigned vault (without using the annex) over a solution like OP_VAULT > is that all actions might be able to use keypath spends. That would be > highly efficient, increasing the usability of vaults. It would also be > more private, which may be important to certain classes of vault users. > Even if OP_VAULT was added to Bitcoin, it would be interesting to have > an alternative vault protocol that offered different tradeoffs. > It would indeed be interesting to compare the on-chain footprint of both vault protocols. The main downside of presigned transactions of course is the requirement for an ephemeral signer and key deletion. I am not sure if a potentially smaller on-chain footprint is able to compensate for that. But the landscape of tradeoffs is complicated, and hard to say what users prefer if both options would be available to them. > > That years-long timeline that you sketch for witness replacement (or > > any other policy change I presume?) to become effective is perhaps > > indicative of the need to have an alternative way to relay > > transactions to miners besides the p2p network? > > The speed depends on the policy change. In this case, I think there's a > reasonable argument to be made that a mitigation for the problems of > annex relay should be widely deployed before we enable annex relay. > On the other hand, maybe we are inside a window of opportunity where the annex can still be enabled without mitigating this problem fully. Taproot is still young and you could argue that there are not that many applications that would be affected by this yet. By clearly communicating the lack of witness replacement by commonly used node software now, developers may want to hold off on implementing these applications, rather than giving them a false sense of security offered by policy. But we've covered that in this thread before. > To be specific towards this proposal, if an alternative relay network > naively implemented annex relay, any miners who used that network could > receive a coinjoin-style transaction with a large annex that > significantly reduced the transaction's feerate. By comparison, any > miners who continued to only receive transactions from the P2P network > of Bitcoin Core (or similar) nodes would have received the transaction > without an annex at its original (higher) feerate, allowing them to to > receive greater revenue if they mined it. If, instead, the alternative > relay network implemented the witness replacement proposal you've linked > to, those miners could still receive up to 4.99% less revenue than > Bitcoin Core-based miners Perhaps way to fix this is to combine the 5% (or whatever constant is chosen) with Greg's proposal above to also always allow replacement by an empty annex? That way it's always possible to put in an annex-less transaction that is part of an annex-less protocol, regardless of how few extra bytes the annex was inflated with in a previous version of that tx. > and the operators of the alternative relay > network might have had to pay extra costs for the replacement relays. > You can tweak the proposal to tweak those ratios, but I'm not sure > there's a case where an alternative relay network comes up as a clear > winner over the existing network for general purpose transactions. > Instead, like many things, it's a matter of tradeoffs. > It is the question whether those 5% replacement DoS attacks are powerful enough to make it worthwhile for an attacker. And in the case for example the nostr proposal, there could be anti DoS on a different level as well. > > I agree though that it would be ideal if there is a good solution that > > doesn't require any protocol changes or upgrade path. > > Apologies for the salt, but there is a good solution: don't use the > block chain to store backup data. > Any auxiliary system that is required for operating a vault adds risk. Whether it is still good enough is debatable, but I expect some users to hold the opinion that it isn't. Joost --000000000000563fb105fe007061 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Jun 13, 2023 at 10:51=E2=80=AFAM = David A. Harding <dave@dtrt.org>= wrote:
> I am really looking for a bitcoin-native solution t= o leverage
> bitcoin's robustness and security properties.

I understand.=C2=A0 I would briefly point out that there are other advantag= es
to not storing a signature for an ephemeral key in the annex.=C2=A0 For
example, if you want to generate multiple different potential spending
transactions, you need to store one signature for each potential
transaction.=C2=A0 The more data you store in the annex, the less scalable<= br> the vault protocol becomes; by comparison, it's possible to cheaply
store a very large amount of data offchain with high robustness.

Each byte on-chain indeed has a cost. Though for = practical vault usage, you may only need two spend paths - one for the unva= ulting transaction and another for an emergency transaction.

=
Also, depending on construction of the vault, a possible advantage of a
presigned vault (without using the annex) over a solution like OP_VAULT
is that all actions might be able to use keypath spends.=C2=A0 That would b= e
highly efficient, increasing the usability of vaults.=C2=A0 It would also b= e
more private, which may be important to certain classes of vault users.
Even if OP_VAULT was added to Bitcoin, it would be interesting to have
an alternative vault protocol that offered different tradeoffs.

It would indeed be interesting to compare the on-c= hain footprint of both vault protocols. The main downside of presigned tran= sactions of course is the requirement for an ephemeral signer and key delet= ion. I am not sure if a potentially smaller on-chain footprint is able to c= ompensate for that. But the landscape of tradeoffs is complicated, and hard= to say what users prefer if both options would be available to them.
=
=C2=A0
> That years-long timeline that you sketch for witness replacement (or > any other policy change I presume?) to become effective is perhaps
> indicative of the need to have an alternative way to relay
> transactions to miners besides the p2p network?

The speed depends on the policy change.=C2=A0 In this case, I think there&#= 39;s a
reasonable argument to be made that a mitigation for the problems of
annex relay should be widely deployed before we enable annex relay.

On the other hand, maybe we are inside a windo= w of opportunity where the annex can still be enabled without mitigating th= is problem fully. Taproot is still young and you could argue that there are= not that many applications that would be affected by this yet. By clearly = communicating the lack of witness replacement by commonly used node softwar= e now, developers may want to hold off on implementing these applications, = rather than giving them a false sense of security offered by policy. But we= 've covered that in this thread before.
=C2=A0
To be specific towards this proposal, if an alternative relay network
naively implemented annex relay, any miners who used that network could
receive a coinjoin-style transaction with a large annex that
significantly reduced the transaction's feerate.=C2=A0 By comparison, a= ny
miners who continued to only receive transactions from the P2P network
of Bitcoin Core (or similar) nodes would have received the transaction
without an annex at its original (higher) feerate, allowing them to to
receive greater revenue if they mined it.=C2=A0 If, instead, the alternativ= e
relay network implemented the witness replacement proposal you've linke= d
to, those miners could still receive up to 4.99% less revenue than
Bitcoin Core-based miners

Perhaps way to f= ix this is to combine the 5% (or whatever constant is chosen) with Greg'= ;s proposal above to also always allow replacement by an empty annex? That = way it's always possible to put in an annex-less transaction that is pa= rt of an annex-less protocol, regardless of how few extra bytes the annex w= as inflated with in a previous version of that tx.
=C2=A0
and the operators of the al= ternative relay
network might have had to pay extra costs for the replacement relays.
You can tweak the proposal to tweak those ratios, but I'm not sure
there's a case where an alternative relay network comes up as a clear winner over the existing network for general purpose transactions.
Instead, like many things, it's a matter of tradeoffs.
=

It is the question whether those 5% replacement DoS att= acks are powerful enough to make it worthwhile for an attacker. And in the = case for example the nostr proposal, there could be anti DoS on a different= level as well.
=C2=A0
> I agree though that it would be ideal if there is a good solution that=
> doesn't require any protocol changes or upgrade path.

Apologies for the salt, but there is a good solution: don't use the
block chain to store backup data.

Any a= uxiliary system that is required for operating a vault adds risk. Whether i= t is still good enough is debatable, but I expect some users to hold the op= inion that it isn't.

Joost
--000000000000563fb105fe007061--