1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
Return-Path: <apoelstra@wpsoftware.net>
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
by lists.linuxfoundation.org (Postfix) with ESMTP id 718E8C0032
for <bitcoin-dev@lists.linuxfoundation.org>;
Sat, 21 Oct 2023 15:10:22 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 3FBF561385
for <bitcoin-dev@lists.linuxfoundation.org>;
Sat, 21 Oct 2023 15:10:22 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3FBF561385
Authentication-Results: smtp3.osuosl.org;
dkim=pass (2048-bit key) header.d=mail.wpsoftware.net
header.i=@mail.wpsoftware.net header.a=rsa-sha256 header.s=default
header.b=wmZg80TK
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: 0.792
X-Spam-Level:
X-Spam-Status: No, score=0.792 tagged_above=-999 required=5
tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=no autolearn_force=no
Received: from smtp3.osuosl.org ([127.0.0.1])
by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id iQE2oMF1mPbx
for <bitcoin-dev@lists.linuxfoundation.org>;
Sat, 21 Oct 2023 15:10:18 +0000 (UTC)
X-Greylist: delayed 429 seconds by postgrey-1.37 at util1.osuosl.org;
Sat, 21 Oct 2023 15:10:18 UTC
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1EBB76136B
Received: from mail.wpsoftware.net (unknown [66.183.0.205])
by smtp3.osuosl.org (Postfix) with ESMTP id 1EBB76136B
for <bitcoin-dev@lists.linuxfoundation.org>;
Sat, 21 Oct 2023 15:10:18 +0000 (UTC)
Received: from camus (camus-andrew.lan [192.168.0.190])
by mail.wpsoftware.net (Postfix) with ESMTPSA id B7A9140099;
Sat, 21 Oct 2023 15:03:08 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.wpsoftware.net;
s=default; t=1697900588;
bh=9s5HYya4bKZUES3ayZge+hKxTWzVYyBGUgkaidoZuYo=;
h=Date:From:To:Subject:References:In-Reply-To;
b=wmZg80TK992HvroxDDj4KuQmzp46FXKc9fmGgCnjmE6CJc88eir1iEoGnOvb89oqG
qaN1bUJZzbUIIxsqghS7pZKzAiibuHuW2h3miWkau0wJefYz/5mrvd6FHjxzQxoED9
pbUPAl3bik5rHrWk2rgtYDbdJ/+N0Abr2wZoV975pffjPzjpKsm/xLMOvARgMcp0fO
44lxQodgWf3iOQBazxgeCJycPwFZXLbBxCGkYQfy/rCtqDaJ506Y//R2R/K6Dk6UNK
KOBxwsrBdANBB6YYY5XdwQdyygpI7VKcectpqt1iUutYicQpvbWQkf1VGBhKntXG8g
svJ1NMTUAK1LA==
Date: Sat, 21 Oct 2023 15:03:07 +0000
From: Andrew Poelstra <apoelstra@wpsoftware.net>
To: Ethan Heilman <eth3rs@gmail.com>,
Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Message-ID: <ZTPoK3aD8kFyhy3T@camus>
References: <CAEM=y+XDB7GGa5BTAWrQHqTqQHBE2VRyd7VWjEb+zCOMzRP+Lg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="vdF/D/rAOCe016CG"
Content-Disposition: inline
In-Reply-To: <CAEM=y+XDB7GGa5BTAWrQHqTqQHBE2VRyd7VWjEb+zCOMzRP+Lg@mail.gmail.com>
Subject: Re: [bitcoin-dev] Proposed BIP for OP_CAT
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: Sat, 21 Oct 2023 15:10:22 -0000
--vdF/D/rAOCe016CG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sat, Oct 21, 2023 at 01:08:03AM -0400, Ethan Heilman via bitcoin-dev wro=
te:
> Hi everyone,
>=20
> We've posted a draft BIP to propose enabling OP_CAT as Tapscript opcode.
> https://github.com/EthanHeilman/op_cat_draft/blob/main/cat.mediawiki
>=20
> OP_CAT was available in early versions of Bitcoin. It was disabled as
> it allowed the construction of a script whose evaluation could create
> stack elements exponential in the size of the script. This is no
> longer an issue in the current age as tapscript enforces a maximum
> stack element size of 520 Bytes.
>
Thanks, Ethan! This is really great, thank you for pushing forward and
writing up the BIP text.
In addition to the usecases listed in the text, I think CAT would open
up a wide range of Bitcoin script research and let us test nontrivial
things, in perhaps inefficient ways, in real life, befoer proposing
dedicated opcodes. When spitballing about ways to do cool stuff with
Bitcoin Script, I'd say about 90% of the time it ends with "we could do
this if only we had CAT". And the remaining 10% usually don't need much
more.
As evidenced by the short text and short implementation code, CAT is
very simple but provides a ton of value. There is a temptation to try
to bundle other opcodes in with this (for example, rolling SHA256
opcodes to allow hashing more than 520 bytes of data) but I think:
* There is no logical end to the list of opcodes we'd like to add, so
this will invite an interminable amount of bikeshedding.
* No single opcode comes close to the power of CAT (except super
general-purpose opcodes like OP_ZKP_VERIFY :))
* Most everything is more controversial than we expect. You can find
Matt's "consensus cleanup" BIP from a couple years ago which did 4
small things and I think that all 4 got a bunch of pushback.
So I think we should stick with "just CAT" :).
--=20
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
--vdF/D/rAOCe016CG
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEkPnKPD7Je+ki35VexYjWPOQbl8EFAmUz6CkACgkQxYjWPOQb
l8G8Egf/bnV3AQKC8brU/QDpSQcaaDTut/swCxCQ0orWaEX6eEkzKfuFSIsI4MHB
ADYJEIUFHXIkCx6/bf1MghBxTic63RvssQ/mgFo0P8Qbkzz7vADcR47huVPm8HTW
dS82ka4JxnhNflTUzcIlSk39d8GX+oCdOpdmPW1RnkygxKJkaO4jdNUxH8RLO0SP
KumHRA1LCNPY1ZhBwVkzIsKH8ketRsQqH6mfZVQ0Vx/WzFSQJwVozEqJiBOd97Kz
KbpUa5MMM/3xalwikxLlNKdPad+HGgTz7QcR5y8TB2I4TSwUkqgBRvuB+cGHNgWg
GxxU7D+IGNlxz3AvzLECvGemvT88Yw==
=iWnj
-----END PGP SIGNATURE-----
--vdF/D/rAOCe016CG--
|