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 ) 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 ; 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 ; 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 To: Weikeng Chen Cc: Bitcoin Development Mailing List Subject: Re: [bitcoindev] Difficulty in emulating "weaker" OP_SUCCESS and why it should be a real opcode Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Y5YQOTfDJyCBwcB0" Content-Disposition: inline In-Reply-To: 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: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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. > > 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--