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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
Delivery-date: Tue, 19 Nov 2024 09:36:37 -0800
Received: from mail-qt1-f184.google.com ([209.85.160.184])
by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
(Exim 4.94.2)
(envelope-from <bitcoindev+bncBAABBG4Z6O4QMGQEWIY7WVI@googlegroups.com>)
id 1tDS9V-0001Ow-1z
for bitcoindev@gnusha.org; Tue, 19 Nov 2024 09:36:37 -0800
Received: by mail-qt1-f184.google.com with SMTP id d75a77b69052e-4615d80492esf16131121cf.1
for <bitcoindev@gnusha.org>; Tue, 19 Nov 2024 09:36:36 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1732037791; cv=pass;
d=google.com; s=arc-20240605;
b=DzV3QsNF+AMoKwrjml4SovlYqYpsgrhzk/o0gnvor2Ii5eiVkYOOy+vgzzODbTrOD+
giMOAal8NJvnRsPgURBHbS84PDVi86DNCLD62mtZVanFyu5xRVkb619Xmig7xY+NilRK
66nsgC1zxjOwZC4bO6dqsSI2bDhP8SvyqEG/YkvPs9DV05BFde+6qDPNJjUc8lwurPoV
7CGUT12dPZ8NMYVPp42pj8ZD8TGEs9FYknb6UG29lkCLRZEubhJNcIZfi+zXMm73cOne
5n4ff1ud8XnLjmVbhfLhn3zrlRp3qAdPA6X5W7OfTgEeDHM50lghHiuVS+x0Hh2RXr2h
pZNA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:reply-to:mime-version:feedback-id
:references:in-reply-to:message-id:subject:cc:from:to:date
:dkim-signature;
bh=GA+cJZPQcnjWncjfEIMKsZSo7tjvWkfruO406RfurW0=;
fh=DczEB4cONyxgdEGN12cMG2wSjupRQKf2ALH8X2ih0gE=;
b=I7d7nozcEcip6Uq21Du4UMAwpLwSTYOMNENKGjr+KRuqDwuB9x8FZPi0WRhs9ISd+5
sTegSztmkQ33Rj7FgE0em8/6YzZR2G2AFsRtUWUNmHEnCgCsJDpvQwUgIAT/zQj+kieA
Sy11tktqepD73ihq+q99Hi8Rjnnc6gUidtvjeZDAd+wETs4fGNGhcQhvdB1zVleThKfI
ZMA1wkUUhtAHUW2drI56ZuJVQNRyfyHiP58S5aBSgtac+LD+DD1hPyyCsdo2TTJ/aaZP
03Na/g22Xfi4ZYsPna46nwd9oyGE3YgyTsnJ4KLh67NCLidREdhVznQoksjCgIRuLpAp
gt4A==;
darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=xYGzB24T;
spf=pass (google.com: domain of moonsettler@protonmail.com designates 185.70.40.140 as permitted sender) smtp.mailfrom=moonsettler@protonmail.com;
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=20230601; t=1732037791; x=1732642591; darn=gnusha.org;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:reply-to
:x-original-authentication-results:x-original-sender:mime-version
:feedback-id:references:in-reply-to:message-id:subject:cc:from:to
:date:from:to:cc:subject:date:message-id:reply-to;
bh=GA+cJZPQcnjWncjfEIMKsZSo7tjvWkfruO406RfurW0=;
b=psbjkWX0soy6JSAj9vNvR1jme8/AkZCSptXRqw4KXaslLsT6J/ZNwepVAM2cmyD5/B
HzJh+qwExRPZzLqIfuC8f/jGh0snHr3ROH+6IZEXoZA8WLHEDAPO8AyWtpmRNbwlGlcZ
qPZ/lnzRQEzHnAI6i5OknnR7Pwg2e4u6l4PqKapmGBpDpiP9Rmz106ZApPLRDkcG3p0H
+99APAmMlNX6+Wm5i83i6MpRTrUGnVU5SCIove4RKc4NMYFpw5pahBbiuXl1DMWXaOAY
S3/r7zXfySFDzKbdSl0Cwv+PMcsWTzN53KHvH85cEtItCFCfnSKAiRqZXb949IxtKdtW
kgNQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1732037791; x=1732642591;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:reply-to
:x-original-authentication-results:x-original-sender:mime-version
:feedback-id:references:in-reply-to:message-id:subject:cc:from:to
:date:x-beenthere:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=GA+cJZPQcnjWncjfEIMKsZSo7tjvWkfruO406RfurW0=;
b=qEnK7AEK/rIYOc843G4AIy/WbO0+kEEhuW+Ti1sfdyHSxKLXYO8ljaZmiiysPUOVV/
hl/1l9Yk+b6DgyQoSpe6EuFXkWyr2azrwItG46iO22kj5EKbAtEimtYqW/bN4k23Fyqc
unVIUEPIR+ltQpjsszzRdbe6inxwtFxUKnHeclBExED4d8//wXqWlh85bAUAv4JEE2s7
u+CXkZTOxC205IDG/sxIK2I6ZBNjagvQYVNUrb38RQ2aSszqvzAtEgmMq5nn53A4aTN1
HHdkgHO6VFN4bR78dMy4gsdZ+4IUbFFQJO8yFAUoUr+0AtlnsSib6MHUgDgJnKulNDm0
8Z0Q==
X-Forwarded-Encrypted: i=2; AJvYcCXMr7g8VzHY7yq9z8y51Fa7y24MfGxbDk6oOjyclEe6/SFOoL1Tur256q1WQdt2jX0/GwutOMjvVj2t@gnusha.org
X-Gm-Message-State: AOJu0Yz0uSAXDuylhEhQdCbfGmTXw7tc7/ATLfHRB9hhPiRM3UMTjNWR
oPb15xug6nXaoGt58Ey6a3QyLqEO+g73euvQMMTyYDw+RmEWTDwE
X-Google-Smtp-Source: AGHT+IG8g2sjk24k4Fw0bgHvR0VrBobAMeuCHff69c4C2rm86xKvT+cS/U7elWx7LXmmE/ZgJ6559g==
X-Received: by 2002:a05:622a:4815:b0:463:17d2:4b7b with SMTP id d75a77b69052e-46363ec0ab5mr229017121cf.48.1732037790788;
Tue, 19 Nov 2024 09:36:30 -0800 (PST)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:ac8:5912:0:b0:460:89b7:cac5 with SMTP id d75a77b69052e-4639294d3b1ls16250561cf.1.-pod-prod-08-us;
Tue, 19 Nov 2024 09:36:27 -0800 (PST)
X-Forwarded-Encrypted: i=2; AJvYcCWGVMVOni8C29yIpDV1tTdWbRhdY9UwRdm4uehYP/5FdIt4YmwWhuLf8dpA+vcdhhFTIsPArn5tQWmK@googlegroups.com
X-Received: by 2002:a05:620a:2403:b0:7b1:1cc2:8238 with SMTP id af79cd13be357-7b36234f690mr2297353485a.39.1732037787497;
Tue, 19 Nov 2024 09:36:27 -0800 (PST)
Received: by 2002:a37:de0c:0:b0:7b1:452e:2a50 with SMTP id af79cd13be357-7b37b4fae6ems85a;
Tue, 19 Nov 2024 08:38:29 -0800 (PST)
X-Forwarded-Encrypted: i=2; AJvYcCXRIuZhTaysK5W/rC8R+rrofsApnpyvnAN/VBFKWyo4JwLmsYrbnqx45ROFKV7Y1IbnDUlwqroscAsB@googlegroups.com
X-Received: by 2002:a05:600c:a4a:b0:432:d735:cc71 with SMTP id 5b1f17b1804b1-432df78f3b6mr181057345e9.25.1732034307671;
Tue, 19 Nov 2024 08:38:27 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1732034307; cv=none;
d=google.com; s=arc-20240605;
b=YIhyJ112HTGHg9aoHaeZAq+RNd3beyGYp6IMDy2MMoyrNpVIkQNXKfBB+DiGFOjxqp
PFxM1nQa6DyZ/AcynNUyJ4zN9kItk2VqUHt5ooUhvgogkynu3+klf0UvbsoQdaXp2cP2
xAv96iVGXyKZo2wLbkTch7IHDbTb1f2Dejf0mELEfav7EEPsfYqwCnzRnH7cazGu6iEf
nehYf7oRhzi/9iNYUZ2FrGOyrEXqH0S9VX7tSTy4vQCSH1Lf81PrZy6Z/AvfT4KRLgst
ItIzGf/G6LPKbMj28qASn5V98io22EypbKzx4SamkeSrQ4fBw2B9/eHoaZzaM5FL1aSN
rTKA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
h=content-transfer-encoding:mime-version:feedback-id:references
:in-reply-to:message-id:subject:cc:from:to:date:dkim-signature;
bh=b5Ti/a++hv3mw/AzntGdHchSY7EIkyekM1EFDlRCmlg=;
fh=6+dbzFR2S8inooYySS84NqNhJWvecQIy4INlAjH42jA=;
b=XQJZ9ysYMVZRVCLBPIDRlX4ZRkiLkMjFTL3ynFAgIP7DpvLli0IIm5obv5oa/AX7en
dwb9WwfgAmMBhAI07o6YtH3oujkNbRXQ9JMK7O0jnjPQ7Pxc0pWqq8N3gf3ewrg6/FwM
EcoFBTcGIZIMil7fgZBo7COQWaYfpNRfymNhnqyGy2r+g4tReVIzuIWe84LmXyDjPEJW
EG9SEMQMFAePlV9hEdCLfqupBpr5JxUTVd44CdOaoFRF6cIQNBU59Pbgbdw2T0kVvWsY
8V1xnYUx12aBKQcz5w0pFLw0P2+Y/HpStbSzUwDPXT2prGaCBsZfrLQV+2FhjXiSxRjj
H3JA==;
dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=xYGzB24T;
spf=pass (google.com: domain of moonsettler@protonmail.com designates 185.70.40.140 as permitted sender) smtp.mailfrom=moonsettler@protonmail.com;
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
Received: from mail-40140.protonmail.ch (mail-40140.protonmail.ch. [185.70.40.140])
by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-432f6508e59si1513415e9.1.2024.11.19.08.38.27
for <bitcoindev@googlegroups.com>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 19 Nov 2024 08:38:27 -0800 (PST)
Received-SPF: pass (google.com: domain of moonsettler@protonmail.com designates 185.70.40.140 as permitted sender) client-ip=185.70.40.140;
Date: Tue, 19 Nov 2024 16:38:21 +0000
To: Brandon Black <freedom@reardencode.com>
From: "'moonsettler' via Bitcoin Development Mailing List" <bitcoindev@googlegroups.com>
Cc: Weikeng Chen <weikeng.chen@l2iterative.com>, Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: Re: [bitcoindev] Multi-byte opcodes
Message-ID: <E95uz4uyQgikJKtximyueqFTRs7cTJfpcdVvkrYEkfZ__DTpvwlsm0MSsX8BaqKg6KnONx6eQ5VueijeMqWQ8uI4iFKA--irKATjN1K4Fbg=@protonmail.com>
In-Reply-To: <Zzt2OCE6Aj9H3DiY@console>
References: <4235f7d2-8e09-428a-813d-9034cb21f48an@googlegroups.com> <Zzt2OCE6Aj9H3DiY@console>
Feedback-ID: 38540639:user:proton
X-Pm-Message-ID: 178b920ce8b3d37df91ad43d5fc196b09068ae45
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Original-Sender: moonsettler@protonmail.com
X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass
header.i=@protonmail.com header.s=protonmail3 header.b=xYGzB24T;
spf=pass (google.com: domain of moonsettler@protonmail.com designates
185.70.40.140 as permitted sender) smtp.mailfrom=moonsettler@protonmail.com;
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
X-Original-From: moonsettler <moonsettler@protonmail.com>
Reply-To: moonsettler <moonsettler@protonmail.com>
Precedence: list
Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com
List-ID: <bitcoindev.googlegroups.com>
X-Google-Group-Id: 786775582512
List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com>
List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/bitcoindev
List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com>
List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>,
<https://groups.google.com/group/bitcoindev/subscribe>
X-Spam-Score: -1.0 (-)
Hi All,
I think we should discuss back-porting tapscript instead of coming up with a further divergent set of opcodes.
To sum up earlier discussion with Brandon, we could:
* Use a single upgradeable NOP for OP_TAPSCRIPTVERIFY
* <s1> .. <sn> | <faux-control-block> <tapscript> CTAPV
* Isolated execution environment
* Gets the entire stack below the top 2 elements
* Fails if it fails, does nothing if internal script succeeds.
* Require the last opcode executed by the script interpreter to be a push opcode, fails otherwise
The faux control block can be just a few bytes mainly for tapscript version.
BR,
moonsettler
Sent with Proton Mail secure email.
On Monday, November 18th, 2024 at 6:15 PM, Brandon Black <freedom@reardencode.com> wrote:
> Hi Weikeng, thanks for your thoughts on this!
>
> > We can, however, solve that by allowing multi-byte opcodes.
> >
> > Say, for example, we can have:
> > OP_OP { 0x1521 }
> > which will set the current opcode to be the one with the assigned number
> > 0x1521.
> >
> > Another idea is maybe OP_OP takes a stack element as the opcode.
> > { 0x1521 } OP_OP
>
>
> Another option that works for many cases is to have opcode families
> where an argument is augmented with flags to determine the behavior. We
> can consider this to already be the case for OP_CHECKSIG* where the
> signature determines the behavior of the hashing portion of the opcode.
>
> This is also how OP_CHECKTEMPLATEVERIFY is designed, and how
> OP_CHECKSIGFROMSTACKVERIFY as currently spec'd in the PR is designed.
> CTV and CSFSV only constrain 32-byte first arguments, but not other
> lengths leaving open extensions using any other length, including using
> other lengths of either opcode as OP_OP, or as variants on CTV and CSFSV
> respectively.
>
> The benefit of this approach is that it doesn't "waste" the length byte
> only to specify the opcode behavior, but enables it to do double duty as
> specifying the total length of the first argument including both flags
> and data.
>
> Best,
>
> --Brandon
>
> --
> You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/Zzt2OCE6Aj9H3DiY%40console.
--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/E95uz4uyQgikJKtximyueqFTRs7cTJfpcdVvkrYEkfZ__DTpvwlsm0MSsX8BaqKg6KnONx6eQ5VueijeMqWQ8uI4iFKA--irKATjN1K4Fbg%3D%40protonmail.com.
|