Return-Path: Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8FAF9C002B for ; Thu, 2 Feb 2023 11:22:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6A1B94196E for ; Thu, 2 Feb 2023 11:22:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6A1B94196E Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=WUehJLDp X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.602 X-Spam-Level: X-Spam-Status: No, score=-2.602 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yk0k0unaw-pk for ; Thu, 2 Feb 2023 11:22:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 54A8541920 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by smtp4.osuosl.org (Postfix) with ESMTPS id 54A8541920 for ; Thu, 2 Feb 2023 11:22:28 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 7964D32007E8; Thu, 2 Feb 2023 06:22:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 02 Feb 2023 06:22:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1675336944; x=1675423344; bh=fDRx4Mbt0meFMTCdSbBkMBX/pXzV pI5o80ruBGynL8I=; b=WUehJLDpO9uSVS/sKRgATE3P1Dcn+NJgPClmvl4/Xe9r CvaQciRFKnnl99nruht0EfDu9DSTD1agb6AvfjHqIMDczCi6Yze4X6sEhH58ucXI IK8/AgkaMrF08GwD/w8JikO+xACD60LCF2bVaLOba1pJnw8/NBKNCSQUxdL94M9H FqVHrsCy7A/MyaoVUY5Aut6SbUbEZDDv422iClw9RWkh/JMqyG96gqoZJUmeYfX8 WCNPOwo00lzKHvviO4e1gjNu9Ev872CCVB6dEhxWABK4HtAQ+1huw1BGeRg6h9P5 99pYTxgDw8CAuQMFSi8p2z4Eh1kwQxdUWgIAFacUxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudefkedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgvthgv rhcuvfhougguuceophgvthgvsehpvghtvghrthhouggurdhorhhgqeenucggtffrrghtth gvrhhnpeelvdellefftddukeduffejgfefjeeuheeileeftdfgteduteeggeevueethfej tdenucffohhmrghinhepphgvthgvrhhtohguugdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvgesphgvthgvrhhtohguugdr ohhrgh X-ME-Proxy: Feedback-ID: i525146e8:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Feb 2023 06:22:23 -0500 (EST) Received: by localhost (Postfix, from userid 1000) id B5E895F824; Thu, 2 Feb 2023 06:22:23 -0500 (EST) Date: Thu, 2 Feb 2023 06:22:23 -0500 From: Peter Todd To: Andrew Poelstra Message-ID: References: <764E460B-C0C6-47B8-A97E-F7CBC81FD645@petertodd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="y38CCmU2HZ6kL8N5" Content-Disposition: inline In-Reply-To: Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Debate: 64 bytes in OP_RETURN VS taproot OP_FALSE OP_IF OP_PUSH 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: Thu, 02 Feb 2023 11:22:30 -0000 --y38CCmU2HZ6kL8N5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 01, 2023 at 02:02:41PM +0000, Andrew Poelstra wrote: > On Tue, Jan 31, 2023 at 09:07:16PM -0500, Peter Todd via bitcoin-dev wrot= e: > >=20 > >=20 > > On January 31, 2023 7:46:32 PM EST, Christopher Allen via bitcoin-dev <= bitcoin-dev@lists.linuxfoundation.org> wrote: > > >All other things being equal, which is better if you need to place a > > >64-bytes into the Bitcoin blockchain? A traditional OP_RETURN or a spe= nt > > >taproot transaction such as: > > > > > >OP_FALSE > > >OP_IF > > >OP_PUSH my64bytes > > >OP_ENDIF > >=20 > > What's wrong with OpPush OpDrop? > > >=20 > This is a technical nit, but the reason is that is limited to 520 > bytes (and I believe, 80 bytes by standardness in Taproot), so if you > are pushing a ton of data and need multiple pushes, it's more efficient > to use FALSE IF ... ENDIF since you avoid the repeated DROPs. Yes, for more than 520 bytes you need to wrap the push in an IF/ENDIF so it= 's not executed. But in this example we're just talking about 64 bytes, so that limit isn't relevant and OpPush OpDrop should be sufficient. Specifically for more than 520 bytes you run into the the MAX_SCRIPT_ELEMENT_SIZE check in script/interpreter.cpp, which applies to a= ll scripts regardless of standardness at script execution: // // Read instruction // if (!script.GetOp(pc, opcode, vchPushValue)) return set_error(serror, SCRIPT_ERR_BAD_OPCODE); if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE) return set_error(serror, SCRIPT_ERR_PUSH_SIZE); --=20 https://petertodd.org 'peter'[:-1]@petertodd.org --y38CCmU2HZ6kL8N5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE0RcYcKRzsEwFZ3N5Lly11TVRLzcFAmPbnO0ACgkQLly11TVR LzeTgRAAh4KEOfcl1rst/9v1R2MGReWITXP7hRzZVJwm/ZloG/cNVRxETjnXIfKK SCbW5SDV0PMM2qSBKbOCze1FyrMfmYYeD1Nvh/ExIiBByBdGHbbvfmIuJg75xyZp hHF1+V5g3oyvJSZyhl5nbvfwkhUxpu6WxiLNh7OeoMiWz+yvmtrzaVgCp4FGwcle 1kJnUY50LiVuKVx916vTTVN2QKkfYjz0CQQBZVuWddpt2GVmldXjNucRJk/iAiK+ xKjizjthwRYMDUhfOooFuEf6MobJP2GSMYSJFYXR+6QxxAcz1zvD4oIVF3ISyyRk Q0Apr55sH0U4XQInAAT4LvwZD1WqoZ9v2qw196empAaFPcAK9DnxDEaa66GjXbO1 blUpZdhpcZPbXZid+/0wmpg4RN3BGnRA3SVQ+euPdgqmGZML77icLAq9MB31ftdh 0q/Lpc7JKVdG1kqGzwrioWa0/QnDtk/3OuqAzpBW9/4RSTN50OxqWsuCRtpx2YE5 NeDfrkUFPsYHkpH3D/MBoU/qI2w3kIfWeiQO+v+cjchRpM+33jFpKF7RSyJegdSm dAn74QpqMCJfrfImEtjlTsVIkvajLg478ANbVXpiu/N4L9VkV8uB+N+dyw8jyMEp xt/MZ/eRL3G7ruNh9UHwA0nyvFgMk6j2FyXt0ATxcsgYt1RwZpE= =K8SR -----END PGP SIGNATURE----- --y38CCmU2HZ6kL8N5--