From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7C74CC0032 for ; Tue, 24 Oct 2023 19:47:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 524566FC21 for ; Tue, 24 Oct 2023 19:47:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 524566FC21 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=roose.io header.i=@roose.io header.a=rsa-sha256 header.s=default header.b=mPiBpU9c X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.8 X-Spam-Level: X-Spam-Status: No, score=-2.8 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URI_DOTEDU=0.001] autolearn=ham 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 jC_jQGxWukyw for ; Tue, 24 Oct 2023 19:47:28 +0000 (UTC) Received: from hosted.mailcow.de (hosted.mailcow.de [5.1.76.202]) by smtp3.osuosl.org (Postfix) with ESMTPS id 442D76FAAA for ; Tue, 24 Oct 2023 19:47:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 442D76FAAA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=roose.io; s=default; t=1698176844; h=from:subject:date:message-id:to:mime-version:content-type:in-reply-to: references; bh=xv1Ry3lqratoGCL33g7LGpovU36AuG9FTX2+bB3hbrE=; b=mPiBpU9cxI5ueEeXSDFfZpB1W0VTL3yQJ/WuxVQI4NueajpSH4IcT/Nnmhws8NfQoIr764 MY1dHj4Pn1D8uXlJsHWSWtXyrFVebLKJJ8+IQpkt94StC1ib3pCefP2WP+C9bImUlZueOX VQRKnJX8z/qSz58kHi70GhclXABKc+4AmrFGj/lt3wS8vox51flA5+oagfmNwyV3vf15eM Ea+CcqJzKjU81Di2QW1/US4IjjLazLDUytuR5SJWNTm3Iveot4zN25sGoK74vrQUhnKUBc RiFE+MQf7U7PFwuMC7YtKOMhuG7ca9foPG4k1lZf55c8Or2Tu5Xmp1WFG5fJlw== Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C77955C726C for ; Tue, 24 Oct 2023 21:47:23 +0200 (CEST) Content-Type: multipart/alternative; boundary="------------fHJJ53i5Fm04sahOML7vJS73" Message-ID: Date: Tue, 24 Oct 2023 20:47:23 +0100 MIME-Version: 1.0 Content-Language: en-US To: vjudeu via bitcoin-dev References: <194372901-852eeb9299035adb7fdfc7fe5aa21080@pmq3v.m5r2.onet> From: Steven Roose In-Reply-To: <194372901-852eeb9299035adb7fdfc7fe5aa21080@pmq3v.m5r2.onet> X-Mailman-Approved-At: Tue, 24 Oct 2023 20:12:18 +0000 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: Tue, 24 Oct 2023 19:47:30 -0000 This is a multi-part message in MIME format. --------------fHJJ53i5Fm04sahOML7vJS73 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SSBhZ3JlZSB0aGF0IHRoZXJlIGlzIG5vIHJlYXNvbiBub3QgdG8gdXNlIE9QX1NVQ0NFU1Mx MjYsIGkuZS4gdGhlIA0Kb3JpZ2luYWwgT1BfQ0FUIG9wY29kZSAweDdlL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W4vbGlzdGluZm8v Yml0Y29pbi1kZXYNCj4NCj4NCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX18NCj4gYml0Y29pbi1kZXYgbWFpbGluZyBsaXN0DQo+IGJpdGNvaW4t ZGV2QGxpc3RzLmxpbnV4Zm91bmRhdGlvbi5vcmcNCj4gaHR0cHM6Ly9saXN0cy5saW51eGZv dW5kYXRpb24ub3JnL21haWxtYW4vbGlzdGluZm8vYml0Y29pbi1kZXYNCg== --------------fHJJ53i5Fm04sahOML7vJS73 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I agree that there is no reason not to use OP_SUCCESS126, i.e. the original OP_CAT opcode 0x7e. In many codebases, for example in Core, there might be two OP_CAT constants than which might be confusing.

On 10/22/23 09:58, vjudeu via bitcoin-dev wrote:
> This opcode would be activated via a soft fork by redefining the opcode OP_SUCCESS80.
=C2=A0
Why OP_SUCCESS80, and not OP_SUCCESS126? When there is some existing opcode, it should be reused. And if OP_RESERVED will ever be re-enabled, I think it should behave in the same way, as in pre-Taproot, so it should "Mark transaction as invalid unless occuring in an unexecuted OP_IF branch". Which means, "<condition> OP_VERIFY" should be equivalent to "<condition> OP_NOTIF OP_RESERVED OP_ENDIF".


=C2=A0
On 2023-10-21 07:09:13 user Ethan Heilman via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>= wrote:
Hi everyone,

We've posted a draft BIP to propose enabling OP_CAT as Tapscript opcode.
https://github.com/EthanHeilman/o=
p_cat_draft/blob/main/cat.mediawiki

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

=3D=3DAbstract=3D=3D

This BIP defines OP_CAT a new tapscript opcode which allows the
concatenation of two values on the stack. This opcode would be
activated via a soft fork by redefining the opcode OP_SUCCESS80.

When evaluated the OP_CAT instruction:
# Pops the top two values off the stack,
# concatenate the popped values together,
# and then pushes the concatenated value on the top of the stack.

OP_CAT fails if there are less than two values on the stack or if a
concatenated value would have a combined size of greater than the
maximum script element size of 520 Bytes.

=3D=3DMotivation=3D=3D
Bitcoin tapscript lacks a general purpose way of combining objects on
the stack restricting the expressiveness and power of tapscript. For
instance this prevents among many other things the ability to
construct and evaluate merkle trees and other hashed data structures
in tapscript. OP_CAT by adding a general purpose way to concatenate
stack values would overcome this limitation and greatly increase the
functionality of tapscript.

OP_CAT aims to expand the toolbox of the tapscript developer with a
simple, modular and useful opcode in the spirit of Unix[1]. To
demonstrate the usefulness of OP_CAT below we provide a non-exhaustive
list of some usecases that OP_CAT would enable:

* Tree Signatures provide a multisignature script whose size can be
logarithmic in the number of public keys and can encode spend
conditions beyond n-of-m. For instance a transaction less than 1KB in
size could support tree signatures with a thousand public keys. This
also enables generalized logical spend conditions. [2]
* Post-Quantum Lamport Signatures in Bitcoin transactions. Lamport
signatures merely requires the ability to hash and concatenate values
on the stack. [3]
* Non-equivocation contracts [4] in tapscript provide a mechanism to
punish equivocation/double spending in Bitcoin payment channels.
OP_CAT enables this by enforcing rules on the spending transaction's
nonce. The capability is a useful building block for payment channels
and other Bitcoin protocols.
* Vaults [5] which are a specialized covenant that allows a user to
block a malicious party who has compromised the user's secret key from
stealing the funds in that output. As shown in A. Poelstra, "CAT
and Schnorr Tricks II", 2021,
https://www.wpsoftware.net/andre=
w/blog/cat-and-schnorr-tricks-ii.html
OP_CAT is sufficent to build vaults in Bitcoin.
* Replicating CheckSigFromStack  A. Poelstra, "CAT and Schnorr
Tricks I", 2021,
https://medium.com/blockstream/ca=
t-and-schnorr-tricks-i-faf1b59bd298
 which would allow the creation of simple covenants and other
advanced contracts without having to presign spending transactions,
possibly reducing complexity and the amount of data that needs to be
stored. Originally shown to work with Schnorr signatures, this result
has been extended to ECDSA signatures. [6]

The opcode OP_CAT was available in early versions of Bitcoin. However
OP_CAT was removed because it enabled the construction of a script for
which an evaluation could have memory usage exponential in the size of
the script.
For instance a script which pushed an 1 Byte value on the stack then
repeated the opcodes OP_DUP, OP_CAT 40 times would result in a stack
value whose size was greater than 1 Terabyte. This is no longer an
issue because tapscript enforces a maximum stack element size of 520
Bytes.

=3D=3DSpecification=3D=3D

Implementation
  if (stack.size() < 2)
    return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
  valtype vch1 =3D stacktop(-2);
  valtype vch2 =3D stacktop(-1);

  if (vch1.size() + vch2.size() > MAX_SCRIPT_ELEMENT_SIZE)
      return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);

  valtype vch3;
  vch3.reserve(vch1.size() + vch2.size());
  vch3.insert(vch3.end(), vch1.begin(), vch1.end());
  vch3.insert(vch3.end(), vch2.begin(), vch2.end());

  popstack(stack);
  popstack(stack);
  stack.push_back(vch3);
The value of MAX_SCRIPT_ELEMENT_SIZE is 520 Bytes =3D=3D Ref=
erence Implementation =3D=3D [Elements](https://github.com/ElementsProject/elements/bl=
ob/master/src/script/interpreter.cpp#L1043) =3D=3DReferences=3D=3D [1=
]: R. Pike and B. Kernighan, "Program design in the UNIX environment", 19=
83, https://harmful.cat-v.org/cat-v/unix_prog_des=
ign.pdf [2]: P. Wuille, "Multisig on steroids using tree signatures",=
 2015, https://lists.lin=
uxfoundation.org/pipermail/bitcoin-dev/2021-July/019233.html [3]: J. =
Rubin, "[bitcoin-dev] OP_CAT Makes Bitcoin Quantum Secure [was CheckSigFr=
omStack for Arithmetic Values]", 2021, https://lists.linuxfoundation.org/pipermail/bitcoin-dev/20=
21-July/019233.html [4]: T. Ruffing, A. Kate, D. Schr=C3=B6der, "Liar=
, Liar, Coins on Fire: Penalizing Equivocation by Loss of Bitcoins", 2015=
, h=
ttps://citeseerx.ist.psu.edu/viewdoc/download?doi=3D10.1.1.727.6262&r=
ep=3Drep1&type=3Dpdf [5]: M. Moser, I. Eyal, and E. G. Sirer, Bit=
coin Covenants, http://fc16.ifca.ai/bitcoin/papers/MES16.=
pdf [6]: R. Linus, "Covenants with CAT and ECDSA", 2023, https://gist.githu=
b.com/RobinLinus/9a69f5552be94d13170ec79bf34d5e85#file-covenants_cat_ecds=
a-md _______________________________________________ bitcoin-dev mail=
ing list bitcoin-dev@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/=
listinfo/bitcoin-dev

____________________________=
___________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailm=
an/listinfo/bitcoin-dev
--------------fHJJ53i5Fm04sahOML7vJS73--