summaryrefslogtreecommitdiff
path: root/6f/d19e396efd8e64c8ae985d302a972ad9c4de48
blob: 68c8ea9e4bdc2132432ff8ecd040ccf212d00766 (plain)
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
210
211
212
213
214
215
216
Delivery-date: Mon, 09 Dec 2024 11:10:08 -0800
Received: from mail-ot1-f64.google.com ([209.85.210.64])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBAABBCEB3W5AMGQELV52VPQ@googlegroups.com>)
	id 1tKj8y-0007hL-9t
	for bitcoindev@gnusha.org; Mon, 09 Dec 2024 11:10:08 -0800
Received: by mail-ot1-f64.google.com with SMTP id 46e09a7af769-71df0018239sf1120929a34.1
        for <bitcoindev@gnusha.org>; Mon, 09 Dec 2024 11:10:08 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1733771402; cv=pass;
        d=google.com; s=arc-20240605;
        b=f24IC0PCSve1qAu+ObwgejRNHkKja6gnzwaVeFfYbA9xKlMMAylrUJGuGCWGIvESga
         uDDfyy9NBtBnxa/7wwNRTUVNF3qEkWTrU1aWmwRbHzpUKiJIWbnRQesEuuRWtn/cGEuW
         OUU7Sr7HJfECkBClU6zpTKQGdZaTCT0x9PZrq8C5KQQrBZp5zjkb82Xg+yJhRYQHkltP
         IEBHpgdS0//pXOcyHlSHw8ANUoJNhQP2G/ruZWyBMIw6FwKu8olbIEBdbEuSTGlTF6wt
         U88t2yPPVE+Z7OBqP1RJC7RCmwEX34qc3C18GzglOrBTFjNViUTVfPF82sWgZ92J/S2a
         IVtg==
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:in-reply-to:content-disposition
         :mime-version:references:message-id:subject:cc:to:from:date:sender
         :dkim-signature;
        bh=9WmTsbE5BZrq8Xsd9ApPeSGx8Jhbr1Kr51bFLY0bDcw=;
        fh=s8Z0bzjivnW/LAclgtTycf9MsZu5ANSIWAzqcz6W/7E=;
        b=dI4iOStuLSg1gHyLU+xaAsdCJkwH12wuCnVOIJyXdal8wL0OpgSN/16djHEYh3MAAm
         hGJ9WscUFDMJ3iTkjYISs/VTZ6tHFRJb8dqQFRjDDNGEXl0C6XkttKxcgXzVqdOJzOB8
         EUpeGfe/UJhujlV4UcOSiUvsxaJIVKiGK0OxqOqyA3YcSfso8k3bVKUJm95k+ELL/G/T
         xpKnGiidQHZZZkp881AdeSjYPRLOgTVrhISX2YyQ2+omVVM3ttFzfJkTkD0GfIGQDUR6
         D4XTeR3oPaqTUVantUHCIRfFrm6zGJ9X68njVUqMAm/qng75cqcf8frvvAwspphs5WYS
         OpbA==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@mail.wpsoftware.net header.s=default header.b=UEXDhx7U;
       spf=pass (google.com: domain of apoelstra@wpsoftware.net designates 66.183.0.127 as permitted sender) smtp.mailfrom=apoelstra@wpsoftware.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wpsoftware.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1733771402; x=1734376202; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:in-reply-to:content-disposition:mime-version
         :references:message-id:subject:cc:to:from:date:sender:from:to:cc
         :subject:date:message-id:reply-to;
        bh=9WmTsbE5BZrq8Xsd9ApPeSGx8Jhbr1Kr51bFLY0bDcw=;
        b=Ux7mFqYfnrGtECgC+kiQqoO/n3oS0Ev07EBL4RovkPvh3Fc8lr+T0v+ksZ7IxAl1Ai
         9zSQGechmBSZgXOGmsWnMpucK1nASrP0HcLeDDIDAHivd1ikQXskaUoDpTMWn6EJgMEF
         p6VoK5pA6WfSym8x3Td5gvG9NJegYa+eSCwiHsG6IMqTt4nFxBpPD5Pk2JxrnEAid/Cl
         UDTKmFnzHElfVyliNcI0/zw7Iy5PimAoPBRFkY/NNqnHY6KnVH7xGjzwEVqaIGoBrwNm
         Ug62U6bwE/BdBYuUuxvDzIgZiJ9tX2w0HhfukP7y+jGSleY/1d+cQhH6ZVYvK05X9kqV
         sYRg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1733771402; x=1734376202;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:in-reply-to:content-disposition:mime-version
         :references:message-id:subject:cc:to:from:date:x-beenthere
         :x-gm-message-state:sender:from:to:cc:subject:date:message-id
         :reply-to;
        bh=9WmTsbE5BZrq8Xsd9ApPeSGx8Jhbr1Kr51bFLY0bDcw=;
        b=ibjYoy8k6WAPPOjayHdcBpRiJnMSdcCIUs/6xIrPU1RARLc8aK5NsvhCH+CozcOJf/
         1h514Yvxd33KuXJdv4Ta+Qmk9jpbMVTjHpANv6VZJHaTK5HWgUgFUycPCttxyLlJWJ8A
         BldUNB4CF+IQa8ztR0YuOfL8Haovz4YDtvSncqzHNdcyizz+kGpGSvTA+CuitOC3Bmlu
         u3KWOR5VZGcrNbOj1vRIPXTqBfHSvPB20VvD6sawKU54ywSfLZAf2VBP894gNQbsAHVm
         xArQ5GWBTUua1GUhmOnsCQkwW0zhMEZ3vyJbhv55Jk6Gdaty/9rovigGm9JWncDGbPLg
         2ZfA==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCWcycm0uDRIiCQRAndVcz710zpIUF2QMD1y5qpJFZBsnuNycxMA+Mz+G9yUlVFp1j6YvjqzlU1NWUqM@gnusha.org
X-Gm-Message-State: AOJu0Yyn7McivGW754LQaiMS81g1mFYOR2O83F3EMP+UkGgVlfoLXrKk
	zy9DvS89BHG9QpmsaWHMg0RRYsPWfIdpuFq2jV8AmAGIbLEht40U
X-Google-Smtp-Source: AGHT+IGSitW16mHnNbMfWue783gIqRt3wJ+LwCnD1WOJL5roIh6nK04LFzDfcGKybhooob2zxXneSw==
X-Received: by 2002:a05:6830:6215:b0:71d:4b55:ae20 with SMTP id 46e09a7af769-71dcf4b7218mr12816810a34.6.1733771402129;
        Mon, 09 Dec 2024 11:10:02 -0800 (PST)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:a05:6820:810c:b0:5f2:fcc:a18c with SMTP id
 006d021491bc7-5f277150cb7ls888318eaf.0.-pod-prod-08-us; Mon, 09 Dec 2024
 11:09:59 -0800 (PST)
X-Received: by 2002:a05:6808:1442:b0:3ea:4bcc:4d9b with SMTP id 5614622812f47-3eb19c7f8a9mr11961676b6e.18.1733771399837;
        Mon, 09 Dec 2024 11:09:59 -0800 (PST)
Received: by 2002:a05:6808:368c:b0:3ea:461c:7cab with SMTP id 5614622812f47-3eb18ea1ebamsb6e;
        Mon, 9 Dec 2024 11:08:54 -0800 (PST)
X-Received: by 2002:a05:6808:1802:b0:3ea:519e:cc92 with SMTP id 5614622812f47-3eb19e0a875mr11048934b6e.37.1733771333726;
        Mon, 09 Dec 2024 11:08:53 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1733771333; cv=none;
        d=google.com; s=arc-20240605;
        b=EwA6XxFMNUxn+77LQhwNou0/izsqgeX7+6uB+lDS+QUrzpP4OylnbJAwAyoRj+sK/j
         Z9+WbFxduVQpHPD2gzFO+qv0NQlbvuySb0wR2kofW45a4dNkoApcyOJnv3J4xc9es9kl
         JYSjIOcgZqxY30elw1OWJAUs9VuW9GPjSXzUPcRXWKVZywnF+H8Okyz7zX0V4hepDtU5
         9cK+DjKWIrWPOnvE+NawFelgs9rLiL4pLBLNKzh0onTznI6BSxBznFEO8CTnfjS8OVU2
         qCpWvrc9lG+wn0t35LxJztVJe98qzbhMM2CBtb/kQJbgjuquqQP8Tz+EE0PnU9Qlj1yE
         psGw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
        h=in-reply-to:content-disposition:mime-version:references:message-id
         :subject:cc:to:from:date:dkim-signature;
        bh=XNI0spzYVaboel9CdWPUTAskPUIzerO4HMcmoshirBQ=;
        fh=l2PY1G398ajio4qyQwxEGOPwP8x/gfFd/1h2ck8j9ZA=;
        b=I1XhIEc+qO06NUQr44TTpreY9umRIRkugypSOMoiHddWCn7t4O0u7ojOsP2BTUYQcJ
         eA2hasnQRxZbTv6DGBDKSMIFOseWu61GMuFDAT9D7P+QxVqnPvy/mJZY7khQyTfOoY0s
         AKMmFNKwmXfLUMXMHSgvaGmn0+I9yC9XHwVWD2IQAUDQCsy/c7A3Z/NE6kLbugLX30Uk
         g337e2NIkV03CXbatiEazUjef2oGdkluaSbh9TusDj0QPvKVqVPqEJCjXICBZJD2HDMD
         om1hJtPJRO9uVfEPfYyCuXEHU/g8vITAl4mIR0WHH7jrvGUcQ+z14fqU52JlBC6UD69i
         G5oQ==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@mail.wpsoftware.net header.s=default header.b=UEXDhx7U;
       spf=pass (google.com: domain of apoelstra@wpsoftware.net designates 66.183.0.127 as permitted sender) smtp.mailfrom=apoelstra@wpsoftware.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wpsoftware.net
Received: from mail.wpsoftware.net (s66-183-0-127.wpsoftware.net. [66.183.0.127])
        by gmr-mx.google.com with ESMTP id 5614622812f47-3eb078c4fa9si371379b6e.3.2024.12.09.11.08.53
        for <bitcoindev@googlegroups.com>;
        Mon, 09 Dec 2024 11:08:53 -0800 (PST)
Received-SPF: pass (google.com: domain of apoelstra@wpsoftware.net designates 66.183.0.127 as permitted sender) client-ip=66.183.0.127;
Received: from camus (camus-andrew.lan [192.168.0.190])
	by mail.wpsoftware.net (Postfix) with ESMTPSA id 6A274400AB;
	Mon,  9 Dec 2024 19:08:52 +0000 (UTC)
Date: Mon, 9 Dec 2024 19:08:51 +0000
From: Andrew Poelstra <apoelstra@wpsoftware.net>
To: Weikeng Chen <weikeng.chen@l2iterative.com>
Cc: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: Re: [bitcoindev] Difficulty in emulating "weaker" OP_SUCCESS and why
 it should be a real opcode
Message-ID: <Z1dAQ8pSIqn8XA56@camus>
References: <ebd77d82-96ab-4530-909a-d085378b9868n@googlegroups.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="Y5YQOTfDJyCBwcB0"
Content-Disposition: inline
In-Reply-To: <ebd77d82-96ab-4530-909a-d085378b9868n@googlegroups.com>
X-Original-Sender: apoelstra@wpsoftware.net
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@mail.wpsoftware.net header.s=default header.b=UEXDhx7U;
       spf=pass (google.com: domain of apoelstra@wpsoftware.net designates
 66.183.0.127 as permitted sender) smtp.mailfrom=apoelstra@wpsoftware.net;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wpsoftware.net
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: -0.8 (/)


--Y5YQOTfDJyCBwcB0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline

On Mon, Dec 09, 2024 at 05:27:54AM -0800, Weikeng Chen wrote:
> When I am implementing fraud proofs in Bitcoin script, I find it useful to 
> have an opcode "OP_SUCCESS" that will mark the execution to be successful 
> without running the rest of the script, if this opcode is being executed. 
> This is useful for writing code for fraud proofs such as BitVM, where the 
> verifier wins if it finds one mismatch, and the verifier does not need to 
> show the other mismatches.
> 
> This OP_SUCCESS is weaker version of the OP_SUCCESSx in the Taproot 
> upgrade, which marks the execution as successful for the mere presence of 
> OP_SUCCESSx anywhere in the script. Rusty Russell in a 2023 article, 
> "Covenants: Examining ScriptPubkeys in Bitcoin Script", also mentioned 
> about the usefulness of such an opcode. 
> 
> Of course, this opcode can be emulated, and one can rewrite the existing 
> script in a way to realize the same functionality without adding a new 
> opcode to Bitcoin.
> 
> The problem is that such rewriting is indeed fairly complicated. For 
> example, say that we have the following program.
>
> <snip>

I raised the question on IRC about why the existing SUCCESSx codes work
the way they do, and got several good anwsers that you can read here

https://gnusha.org/bitcoin-wizards/2024-12-09.log

In short, for purpose of softforking upgrade mechanism, the existing
SUCCESS codes give us way more freedom of action.

But it sounds like you want a "weak SUCCESS" opcode in order to use the
success semantics, not as an upgrade mechanism. Maybe it makes sense to
propose that one of the existing OP_SUCCESSx opcodes should be
softforked to become OP_WEAK_SUCCESS?

-- 
Andrew Poelstra
Director, Blockstream Research
Email: apoelstra at wpsoftware.net
Web:   https://www.wpsoftware.net/andrew

The sun is always shining in space
    -Justin Lewis-Webster

-- 
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/Z1dAQ8pSIqn8XA56%40camus.

--Y5YQOTfDJyCBwcB0
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEkPnKPD7Je+ki35VexYjWPOQbl8EFAmdXQEIACgkQxYjWPOQb
l8F4Egf/fP0GgPYiv85lzdEjSK2kZUzGMAtmhzceLrXhiDP1rOsHaPe/MP2/DivF
K/EVPzna/uy4W4Jms1d/8CWJEd/RRJKmZKS5WJlt6mdCTlMVoUpT204oOxHuE2Dh
aoqMeOE/91kT/obxYz8PgblhDACZIqkJRgwF4ImWwB8e38Ppa6CpTzYH+ryiCtgC
c5ndCZ/p2B/U22KhfXWOF2B0H0eFCbjVNdXjRG5cv6RHyw9ZR8os45PCYusPhs7M
ggXI4tOJFBFM/rcKfyq5u9lP/VWpmlUOsWMUvHo97RN+61R/ObB+c2Lo5hFPpcWV
tewfnYpTPQ/GHrxheNaDbsecFXsj/A==
=gKi0
-----END PGP SIGNATURE-----

--Y5YQOTfDJyCBwcB0--