Return-Path: Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8124BC0011 for ; Thu, 24 Feb 2022 21:41:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7086983E7A for ; Thu, 24 Feb 2022 21:41:09 +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: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xgK-1jjqcsjz for ; Thu, 24 Feb 2022 21:41:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8AAF1827FD for ; Thu, 24 Feb 2022 21:41:08 +0000 (UTC) Received: by mail-io1-xd32.google.com with SMTP id s1so4354856iob.9 for ; Thu, 24 Feb 2022 13:41:08 -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=geXJRzKMAdtwWQuu8FKC/fllgU0UOE6s+TsX+J2iGao=; b=WCM55zaoq+9pk/FRPh4BZ0hP4nl6CILIKWQlo0F9QIcfYI5EDIhzL87Q2j/Vtb3Bu/ Zx/3jU5g7ev3ZE+mC5Rpdss3twnt2FkHh9aYH9Qwt83ru5hgH2GSH5pweFsXx7vR2iVO TUK1N3pDX7ol9NrQhiwhJp4PkCahBVzmleVw9MMl8hWiLStiGHPqcBeXAyzVuzOp0mxT L/UR5mnV8TdO8uDbF50L0zwhQsRNkqDt+QjyTtLqPYtciQCXwLJqCwRzbJ8ocWCxkIU3 Pqa76hRyl9twaq5TQI8Xd9sCLLWfGolg0m5Ude4c0FHMkUwsHAQrkx6b5ExcPlwrB2V/ f6Jg== 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=geXJRzKMAdtwWQuu8FKC/fllgU0UOE6s+TsX+J2iGao=; b=xzZkMgNBZ05ar6ZWWhmOaAPSz7D7Fy1nAtfPl6845mpqelNLDGl9qhq4QgVVO2hVS/ Y6nUTun4wScrhVJVfevWjgsbi8kP5jkqefb+RLgVHBsLdzMI8f+hy5vat8NffPuTccQg R2Ncs+3LuLvUWekXJGF8ieRCuqUdDvNAwA0Y5dSCCw5WTUTG20DOz5JqXayL8xvF8mhj LcejuU5Yg1DbfoFSn309nsQTfnmaXh9jbhPmsgVWnPtVYGkoHBkNNHq9qSn7nWJ5CQoi zYK84nUuWoWa8SbGaRUI+iH8x7oTxa1UPMcGWd261EEYXpquvP4c7qiEfmkWEwg4wvDb umng== X-Gm-Message-State: AOAM531mFEGjy9pgoIAONOhyCG6aFYvIC+Z48RY6afHYJKHdzbuRxlBK y2LwbV1I82PSLRJkdZpYvYdGwDXdZR0Cso9/n8PIinED X-Google-Smtp-Source: ABdhPJxqYR8JeswSWDprAlThM06hbz+qu/x8xpBG02fzJeM8PYQ7Ki9FiIcdoS4TDMjCv3u4Sl/APe4sN5iwPxZaOp4= X-Received: by 2002:a02:852b:0:b0:315:3aaa:dbad with SMTP id g40-20020a02852b000000b003153aaadbadmr3152722jai.309.1645738867638; Thu, 24 Feb 2022 13:41:07 -0800 (PST) MIME-Version: 1.0 References: <157744394-3dec42994f1798ce65b00e23b21ea656@pmq2v.m5r2.onet> In-Reply-To: <157744394-3dec42994f1798ce65b00e23b21ea656@pmq2v.m5r2.onet> From: Zac Greenwood Date: Thu, 24 Feb 2022 22:40:57 +0100 Message-ID: To: Bitcoin Protocol Discussion , vjudeu@gazeta.pl Content-Type: multipart/alternative; boundary="00000000000099470205d8ca7059" X-Mailman-Approved-At: Thu, 24 Feb 2022 21:44:39 +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 21:41:09 -0000 --00000000000099470205d8ca7059 Content-Type: text/plain; charset="UTF-8" Reducing the footprint of storing data on-chain might better be achieved by *supporting* it. Currently storing data is wasteful because it is embedded inside an OP_RETURN within a transaction structure. As an alternative, by supporting storing of raw data without creating a transaction, waste can be reduced. Storing data in this way must only be marginally cheaper per on-chain byte than the current method using OP_RETURN by applying the appropriate weight-per-byte for on-chain data. The intended result is a smaller footprint for on-chain data without making it cheaper (except marginally in order to disincentivize the use of OP_RETURN). Zac On Thu, 24 Feb 2022 at 10:19, 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 > --00000000000099470205d8ca7059 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Reducing the footprint of storing data on-chain might bet= ter be achieved by *supporting* it.

Currently storing data is wasteful because it is embedded insid= e an OP_RETURN within a transaction structure. As an alternative, by suppor= ting storing of raw data without creating a transaction, waste can be reduc= ed.

Storing data in this= way must only be marginally cheaper per on-chain byte than the current met= hod =C2=A0using OP_RETURN by applying the appropriate weight-per-byte for o= n-chain data.

The intend= ed result is a smaller footprint for on-chain data without making it cheape= r (except marginally in order to disincentivize the use of OP_RETURN).=C2= =A0

Zac


On Thu, 24 F= eb 2022 at 10:19, vjudeu via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wr= ote:
Since Tapro= ot 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 &q= uot;OP_RETURN <anything>" 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 ca= n store more than 80 bytes for "free", because no such taproot br= anch will be ever pushed on-chain and used as an input. That means we can u= se "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 d= ata" is connected with our taproot address.
=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
--00000000000099470205d8ca7059--