From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 718E8C0032 for ; 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 ; 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 ; 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 ; 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 To: Ethan Heilman , Bitcoin Protocol Discussion Message-ID: References: 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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--