summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2023-02-17 22:49:41 +1000
committerbitcoindev <bitcoindev@gnusha.org>2023-02-17 12:49:54 +0000
commitc4a34275f7af3dea7a9aaeabab0393590aa42636 (patch)
tree55ab5dedcb0e7c4deb1be3932166dafa3447fb54
parent9557b4c6da69164171ff53e2e16a01de663e7964 (diff)
downloadpi-bitcoindev-c4a34275f7af3dea7a9aaeabab0393590aa42636.tar.gz
pi-bitcoindev-c4a34275f7af3dea7a9aaeabab0393590aa42636.zip
Re: [bitcoin-dev] Debate: 64 bytes in OP_RETURN VS taproot OP_FALSE OP_IF OP_PUSH
-rw-r--r--f3/746cfadbe946e102210a7de8e35e685b61cc10113
1 files changed, 113 insertions, 0 deletions
diff --git a/f3/746cfadbe946e102210a7de8e35e685b61cc10 b/f3/746cfadbe946e102210a7de8e35e685b61cc10
new file mode 100644
index 000000000..89e787fa7
--- /dev/null
+++ b/f3/746cfadbe946e102210a7de8e35e685b61cc10
@@ -0,0 +1,113 @@
+Return-Path: <aj@erisian.com.au>
+Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])
+ by lists.linuxfoundation.org (Postfix) with ESMTP id 44545C002B
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Fri, 17 Feb 2023 12:49:54 +0000 (UTC)
+Received: from localhost (localhost [127.0.0.1])
+ by smtp2.osuosl.org (Postfix) with ESMTP id 1F6764016B
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Fri, 17 Feb 2023 12:49:54 +0000 (UTC)
+DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1F6764016B
+X-Virus-Scanned: amavisd-new at osuosl.org
+X-Spam-Flag: NO
+X-Spam-Score: -1.902
+X-Spam-Level:
+X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5
+ tests=[BAYES_00=-1.9, SPF_HELO_PASS=-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 L7uSK7Fuyexy
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Fri, 17 Feb 2023 12:49:53 +0000 (UTC)
+X-Greylist: from auto-whitelisted by SQLgrey-1.8.0
+DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F1BC04011D
+Received: from cerulean.erisian.com.au (azure.erisian.com.au [172.104.61.193])
+ by smtp2.osuosl.org (Postfix) with ESMTPS id F1BC04011D
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Fri, 17 Feb 2023 12:49:52 +0000 (UTC)
+Received: from 60.42.96.58.static.exetel.com.au ([58.96.42.60]
+ helo=sapphire.erisian.com.au)
+ by cerulean.erisian.com.au with esmtpsa (TLS1.3) tls
+ TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2)
+ (envelope-from <aj@erisian.com.au>)
+ id 1pT0BN-0003vL-Bf; Fri, 17 Feb 2023 22:49:47 +1000
+Received: by sapphire.erisian.com.au (sSMTP sendmail emulation);
+ Fri, 17 Feb 2023 22:49:41 +1000
+Date: Fri, 17 Feb 2023 22:49:41 +1000
+From: Anthony Towns <aj@erisian.com.au>
+To: Russell O'Connor <roconnor@blockstream.com>,
+ Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
+Message-ID: <Y+935dALZxEEVMmc@erisian.com.au>
+References: <ca8622cb-445e-4258-bbac-b3ee1ce95f4c@protonmail.com>
+ <57f780b1-f262-9394-036c-70084320e9cf@peersm.com>
+ <CACrqygCNf3Gv8+VjhyqS4GTb3Epo8qXEKGtQB6sqyR6ib44-fA@mail.gmail.com>
+ <CABE6yHtM2Dqc63_eURSr7dMirJti5sYnqvHj7vQ_Ab9FC_d04g@mail.gmail.com>
+ <3d00aacb-585d-f875-784d-34352860d725@peersm.com>
+ <CACrqygB_FbsRGWYPSUEFTnP15y94Hmo4JtAuv6bH1D3YtbAw9Q@mail.gmail.com>
+ <b292d887-cbd5-165c-de01-793df2b5e8f3@peersm.com>
+ <CACrqygAv842ucN7PLYMENXFiSwAZJy2Y+FziJXrWjyCcOXmL3g@mail.gmail.com>
+ <230265ee-c3f8-dff3-9192-f0c8dc4d913c@peersm.com>
+ <CAMZUoKkAdQ9TSMm4vPJOrThu_h6VbqwPhOQQR7-Yr+WZ0DMBYw@mail.gmail.com>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+In-Reply-To: <CAMZUoKkAdQ9TSMm4vPJOrThu_h6VbqwPhOQQR7-Yr+WZ0DMBYw@mail.gmail.com>
+X-Spam_score: -1.0
+X-Spam_bar: -
+Subject: Re: [bitcoin-dev] Debate: 64 bytes in OP_RETURN VS taproot OP_FALSE
+ OP_IF OP_PUSH
+X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
+X-Mailman-Version: 2.1.15
+Precedence: list
+List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
+List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
+ <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
+List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
+List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
+List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
+List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
+ <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
+X-List-Received-Date: Fri, 17 Feb 2023 12:49:54 -0000
+
+On Sat, Feb 04, 2023 at 07:11:35PM -0500, Russell O'Connor via bitcoin-dev wrote:
+> Since bytes in the witness are cheaper than bytes in the script pubkey,
+> there is a crossover point in data size where it will simply be cheaper to
+> use witness data.
+
+Given today's standardness constraints, that's true (because you first
+need to construct a p2wsh/tapscript output that commits to the data,
+then you have to spend it), but it needn't stay that way. Allowing a data
+carrier entry in the annex (as contemplated for eltoo [0]) would allow
+you to publish the data with a single transaction, with malleability
+prevented because the annex content is committed to by the signature.
+
+[0] https://github.com/bitcoin-inquisition/bitcoin/pull/22
+
+I think the cost for publishing data via the witness today is roughly:
+
+ 115 vb - for the commitment tx
+ 115 vb + datalen/4 - for the publication tx
+
+versus
+
+ 125 vb + datalen - for a tx with an OP_RETURN output
+
+so the crossover point is at a datalen of about 140 bytes. Perhaps
+slightly more or less depending on how much you can combine these
+inputs/outputs with other txs you would have made anyway.
+
+With a datacarrier in the annex that has similar or higher limits than
+OP_RETURN, I don't think OP_RETURN would ever be cheaper.
+
+The other advantage to using the witness for random data compared to
+OP_RETURN is that the txid commits to OP_RETURN output, so you must
+download all OP_RETURN data to validate a block's merkle tree, whereas
+you can partially validate a block (in particular, you can validate the
+spendable utxo set) without downloading witness data [1].
+
+[1] https://github.com/bitcoin/bitcoin/pull/27050
+
+Cheers,
+aj
+