Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id B76A4C0032 for ; Mon, 23 Oct 2023 05:14:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8C6E360F1E for ; Mon, 23 Oct 2023 05:14:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8C6E360F1E Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=gazeta.pl header.i=@gazeta.pl header.a=rsa-sha256 header.s=2013 header.b=BU0k2vSv X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.096 X-Spam-Level: X-Spam-Status: No, score=-2.096 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 0JW0QoWe8QSN for ; Mon, 23 Oct 2023 05:13:59 +0000 (UTC) Received: from smtpo94.poczta.onet.pl (smtpo94.poczta.onet.pl [213.180.149.147]) by smtp3.osuosl.org (Postfix) with ESMTPS id BF66F60F19 for ; Mon, 23 Oct 2023 05:13:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org BF66F60F19 Received: from pmq3v.m5r2.onet (pmq3v.m5r2.onet [10.174.32.69]) by smtp.poczta.onet.pl (Onet) with ESMTP id 4SDNdV0YKnzgc2; Mon, 23 Oct 2023 07:13:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gazeta.pl; s=2013; t=1698038030; bh=6CaGEicOBo6ucnERtuJV9x1ZsEU3Vta7o524RxKLGk0=; h=From:To:Date:Subject:From; b=BU0k2vSvaveRkm9tKVRwCOtEK6ths0fGkpPXjsmYW8uFKARPuI7LlEkRmxRlFssY9 bmORsGwITXurt8eYfYuWqE33M+xxZm6nmkNBJl1bgx0Y8slYOWZNp3IhO57Ytp8LZs IMT+d+a2OZmex5AftKuMLq1sBVUpEpl5XPW4kIj4= Content-Type: multipart/alternative; boundary="===============8910380127139815667==" MIME-Version: 1.0 Received: from [5.173.233.22] by pmq3v.m5r2.onet via HTTP id ; Mon, 23 Oct 2023 07:13:50 +0200 From: vjudeu@gazeta.pl X-Priority: 3 To: Rusty Russell , Bitcoin Protocol Discussion , Ethan Heilman , Bitcoin Protocol Discussion , Bitcoin Dev Date: Mon, 23 Oct 2023 07:13:48 +0200 Message-Id: <194405691-79e11acd8b1dc1e2cdafc878b45b15c8@pmq3v.m5r2.onet> X-Mailer: onet.poczta X-Onet-PMQ: ;5.173.233.22;PL;3 X-Mailman-Approved-At: Mon, 23 Oct 2023 08:23:24 +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: Mon, 23 Oct 2023 05:14:00 -0000 This is a multi-part message in MIME format. --===============8910380127139815667== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable > I think if A is top of stack, we get BA, not AB? =C2=A0 Good question. I always thought "0x01234567 0x89abcdef OP_CAT 0x0123456789a= bcdef OP_EQUAL" is correct, but it could be reversed as well. If we want to= stay backward-compatible, we can dig into the past, and test the old imple= mentation of OP_CAT, before it was disabled. But anyway, any of those two c= hoices will lead to similar consequences. Because you can always turn the f= ormer into the latter by using "OP_SWAP OP_CAT", instead of "OP_CAT". =C2=A0 > 520 feels quite small for script templates =C2=A0 It will be easier to start with that, when it comes to reaching consensus f= or a new soft-fork. But yes, I am very surprised, because I thought we will= never see things like that, and I assumed the path to OP_CAT is just perma= nently closed. So, I am surprised this BIP reached a positive reaction, but= well, that kind of proposal was not battle-tested, so maybe it could succe= ed. =C2=A0 > 10k is the current script limit, can we get closer to that? =C2=A0 We will get there anyway. Even if OP_CAT would allow concatenating up to 52= 0-bit Schnorr signature (not to confuse 520-bit with 520-byte), people woul= d chain it, to reach arbitrary size. If you can concatenate secp256k1 publi= c keys with signatures, you can create a chain of OP_CATs, that will handle= arbitrary size. The only limitation is then blockchain speed, which is som= ething around 4 MB/10 min, and that is your only limit in this case. =C2=A0 And yes, if I can see that some people try to build logical gates like NAND= with Bitcoin Script, then I guess all paths will be explored anyway. Which= means, even if we will take more conservative approach, and switch from 52= 0-byte proposal into 520-bit proposal, then still, people will do exactly t= he same things. Now, it is all about the cost of pushing data, because some= people noticed, that everything can be executed on Script. I knew we will = get there, but I expected it would just happen later than it happened. =C2=A0 > Of course, we can increase this limit in future tapscript versions, too, = so it's not completely set in stone. =C2=A0 Judging by the last misuse of Ordinals, I think it may happen before anyone= will propose some official future version. Which means, nothing is really = set in stone anymore, because now people know, how to activate new features= , without any soft-fork, and some no-forks will probably be done by newbies= , without careful designing and testing, as it is done here. --===============8910380127139815667== Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
> I think if A is top of stack, we get BA, not AB?
 
Good question. I always thought "0x01234567 0x89abcdef OP_CAT 0x012345= 6789abcdef OP_EQUAL" is correct, but it could be reversed as well. If we wa= nt to stay backward-compatible, we can dig into the past, and test the old = implementation of OP_CAT, before it was disabled. But anyway, any of those = two choices will lead to similar consequences. Because you can always turn = the former into the latter by using "OP_SWAP OP_CAT", instead of "OP_CAT".<= /div>
 
> 520 feels quite small for script templates
 
It will be easier to start with that, when it comes to reaching consen= sus for a new soft-fork. But yes, I am very surprised, because I thought we= will never see things like that, and I assumed the path to OP_CAT is just = permanently closed. So, I am surprised this BIP reached a positive reaction= , but well, that kind of proposal was not battle-tested, so maybe it could = succeed.
 
> 10k is the current script limit, can we get closer to that?
 
We will get there anyway. Even if OP_CAT would allow concatenating up = to 520-bit Schnorr signature (not to confuse 520-bit with 520-byte), people= would chain it, to reach arbitrary size. If you can concatenate secp256k1 = public keys with signatures, you can create a chain of OP_CATs, that will h= andle arbitrary size. The only limitation is then blockchain speed, which i= s something around 4 MB/10 min, and that is your only limit in this case.
 
And yes, if I can see that some people try to build logical gates like= NAND with Bitcoin Script, then I guess all paths will be explored anyway. = Which means, even if we will take more conservative approach, and switch fr= om 520-byte proposal into 520-bit proposal, then still, people will do exac= tly the same things. Now, it is all about the cost of pushing data, because= some people noticed, that everything can be executed on Script. I knew we = will get there, but I expected it would just happen later than it happened.=
 
> Of course, we can increase this limit in future tapscript version= s, too, so it's not completely set in stone.
 
Judging by the last misuse of Ordinals, I think it may happen before a= nyone will propose some official future version. Which means, nothing is re= ally set in stone anymore, because now people know, how to activate new fea= tures, without any soft-fork, and some no-forks will probably be done by ne= wbies, without careful designing and testing, as it is done here.
--===============8910380127139815667==--