Return-Path: Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 787B6C0011 for ; Thu, 24 Feb 2022 10:08:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6DFCF4026B for ; Thu, 24 Feb 2022 10:08:39 +0000 (UTC) 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 Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ULHnEiGqv9aC for ; Thu, 24 Feb 2022 10:08:38 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7E445401D9 for ; Thu, 24 Feb 2022 10:08:38 +0000 (UTC) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-2d62593ad9bso18772917b3.8 for ; Thu, 24 Feb 2022 02:08:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=VPIJ9NQi9zE+4by2lE1VpfPhswuoKr1fkw3xjgJY5/o=; b=c1LSOs1xkh8/7q1LJRmFeSs867LQ8cE8EnzyukQ+F2sUbdTiRrwmfmvTVxPm5taeU8 hoTvLyCE7f+JP0YIpBYl6fUQq2Z1HY71EtiVuE4YQa00QhTYpwo7mtwKZRYez/QR4cmB 7hTeJFsULheN2XOOnNZ+p4xWlhstWjnhGY7rZePukBdx/2Sa7XxH5HR7jjVSV1DoD27x hb/hfHmGEDXgy5Ht+/P8Dd6EhvFI+S9V5xP3OBlrJYjZCLIpY/C0WBbT6nQmb1zY+iTO zew2yEFG5iAG5FmDHFHQiDY0mPeoqmv0tj73j1mVTOt77Am+UcSl5tSFOekFfOiQYtGN FBqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=VPIJ9NQi9zE+4by2lE1VpfPhswuoKr1fkw3xjgJY5/o=; b=tSxhO5X81+VN6gbTYabpYf77YZsZeoGb86Y/Mt+aBirawiw+s/g1xIB+zKEwVdI9OZ FvNDKh3nl03eUKg83ouo6YIPo3xIUeihkPJUfYMMpbWFdRw/Npogc5gGej0EGGUn+L4z aiDe4E30sT2OwGZUNFo6NjViShfSminJ4qzS3yZFJMe6hS5FufEdEUOMBvk0npSmiYdE fKwPDChGXsweXWVlbeQJ/J+5RPGB8p+wHuDSkMVpX76tlFTCJtIOVJWzjqFhvCikwNp+ MX0VRY0RumqEmt/gWfjv8rGLK4IGsp7Ag5SvG9GUPjfFh94PvMhQ0pXRzelAnflXGamZ zOEA== X-Gm-Message-State: AOAM532+TSzR4+NNnvqkXqiBsbaO6Q1BlFuaUXn22Z2ENWwY+8B6dgHW kYzr/KRVoGh9TCbtZFw+rNOIO+kdvC5UBMpWJFRP/8AzzcU= X-Google-Smtp-Source: ABdhPJzZCU0rPDOSTByyCjsu58db1UrZaT3MUuvBcgv7HU6pAcBeUrAXqjDTn0vijj/pM4MMZz9yLNC+n3xWTG2rVwU= X-Received: by 2002:a81:6b86:0:b0:2d6:cb39:7cb6 with SMTP id g128-20020a816b86000000b002d6cb397cb6mr1691104ywc.512.1645697317579; Thu, 24 Feb 2022 02:08:37 -0800 (PST) MIME-Version: 1.0 References: <157744394-3dec42994f1798ce65b00e23b21ea656@pmq2v.m5r2.onet> In-Reply-To: <157744394-3dec42994f1798ce65b00e23b21ea656@pmq2v.m5r2.onet> From: Ruben Somsen Date: Thu, 24 Feb 2022 11:08:22 +0100 Message-ID: To: vjudeu , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="00000000000005acec05d8c0c476" X-Mailman-Approved-At: Thu, 24 Feb 2022 10:09:51 +0000 Subject: Re: [bitcoin-dev] OP_RETURN inside TapScript 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: Thu, 24 Feb 2022 10:08:39 -0000 --00000000000005acec05d8c0c476 Content-Type: text/plain; charset="UTF-8" Note this has always been possible, and is not specifically related to tapscript. As long as you're committing to an ECC point, you can tweak it to commit data inside it (i.e. pay-to-contract). This includes P2PK and P2PKH. Committing to 1.5GB of data has equally been possible with OP_RETURN , or even an entire merkle tree of hashes, as is the case with Todd's opentimestamps. Also, tweaking an ECC point (this includes tapscript) in non-deterministic ways also makes it harder to recover from backup, because you can't recover the key without knowing the full commitment. Furthermore, the scheme is not actually equivalent to op_return, because it requires the user to communicate out-of-band to reveal the commitment, whereas with op_return the data is immediately visible (while not popular, BIP47 and various colored coin protocols rely on this). Cheers, Ruben On Thu, Feb 24, 2022 at 10:19 AM vjudeu via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > Since Taproot was activated, we no longer need separate OP_RETURN outputs > to be pushed on-chain. If we want to attach any data to a transaction, we > can create "OP_RETURN " as a branch in the TapScript. In this > way, we can store that data off-chain and we can always prove that they are > connected with some taproot address, that was pushed on-chain. Also, we can > store more than 80 bytes for "free", because no such taproot branch will be > ever pushed on-chain and used as an input. That means we can use "OP_RETURN > <1.5 GB of data>", create some address having that taproot branch, and > later prove to anyone that such "1.5 GB of data" is connected with our > taproot address. > > Currently in Bitcoin Core we have "data" field in "createrawtransaction". > Should the implementation be changed to place that data in a TapScript > instead of creating separate OP_RETURN output? What do you think? > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > --00000000000005acec05d8c0c476 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Note this has=C2=A0always been possible, and is not specif= ically related to tapscript. As long as you're committing to an ECC poi= nt, you can tweak it to commit data inside it (i.e. pay-to-contract). This = includes P2PK and P2PKH.

Committing to 1.5GB of data has= equally been possible with OP_RETURN <hash>, or even an entire merkl= e tree of hashes, as is the case with Todd's opentimestamps.
<= br>
Also, tweaking an ECC point (this includes tapscript)=C2=A0in= non-deterministic ways also makes it harder to recover from backup, becaus= e you can't recover the key without knowing the full commitment.

Furthermore, the scheme is not actually equivalent to op_r= eturn, because it=C2=A0requires the user to communicate out-of-band to reve= al the commitment, whereas with op_return the data is immediately visible (= while not popular, BIP47 and various colored coin protocols rely on this).<= /div>

Cheers,
Ruben

=

On Thu, Feb 24, 2022 at 10:19 AM vjudeu via bitcoin-dev <bitcoin-dev@lists.lin= uxfoundation.org> wrote:
Since Taproot was activated, we no longer need separat= e OP_RETURN outputs to be pushed on-chain. If we want to attach any data to= a transaction, we can create "OP_RETURN <anything>" as a b= ranch in the TapScript. In this way, we can store that data off-chain and w= e can always prove that they are connected with some taproot address, that = was pushed on-chain. Also, we can store more than 80 bytes for "free&q= uot;, because no such taproot branch will be ever pushed on-chain and used = as an input. That means we can use "OP_RETURN <1.5 GB of data>&q= uot;, create some address having that taproot branch, and later prove to an= yone that such "1.5 GB of data" is connected with our taproot add= ress.
=C2=A0
Currently in Bitcoin Core we have "data" field in "crea= terawtransaction". Should the implementation be changed to place that = data in a TapScript instead of creating separate OP_RETURN output? What do = you think?
_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev
--00000000000005acec05d8c0c476--