From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id ADAFED10C for ; Fri, 8 Mar 2019 20:14:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bluematt.me (mail.bluematt.me [192.241.179.72]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8160412E for ; Fri, 8 Mar 2019 20:14:05 +0000 (UTC) Received: from [26.130.103.24] (unknown [208.54.35.203]) by mail.bluematt.me (Postfix) with ESMTPSA id E571612035A; Fri, 8 Mar 2019 20:14:03 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Matt Corallo X-Mailer: iPhone Mail (16D57) In-Reply-To: Date: Fri, 8 Mar 2019 15:14:02 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <6bb308f5-f478-d5ec-064f-e4972709f29c@mattcorallo.com> To: Sjors Provoost X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MIME_QP_LONG_LINE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Sat, 09 Mar 2019 18:27:55 +0000 Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] OP_CODESEPARATOR Re: BIP Proposal: The Great Consensus Cleanup X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 20:14:06 -0000 Aside from the complexity issues here, note that for a user to be adversely a= ffect, they probably have to have pre-signed lock-timed transactions. Otherw= ise, in the crazy case that such a user exists, they should have no problem c= laiming the funds before activation of a soft-fork (and just switching to th= e swgwit equivalent, or some other equivalent scheme). Thus, adding addition= al restrictions like tx size limits will equally break txn. > On Mar 8, 2019, at 14:12, Sjors Provoost wrote: >=20 >=20 >> (1) It has been well documented again and again that there is desire to r= emove OP_CODESEPARATOR, (2) it is well-documented OP_CODESEPARATOR in non-se= gwit scripts represents a rather significant vulnerability in Bitcoin today,= and (3) lots of effort has gone into attempting to find practical use-cases= for OP_CODESEPARATOR's specific construction, with no successes as of yet. I= strongly, strongly disagree that the highly-unlikely remote possibility tha= t someone created something before which could be rendered unspendable is su= fficient reason to not fix a vulnerability in Bitcoin today. >>=20 >>> I suggest an alternative whereby the execution of OP_CODESEPARATOR incre= ases the transactions weight suitably as to temper the vulnerability caused b= y it. Alternatively there could be some sort of limit (maybe 1) on the maxi= mum number of OP_CODESEPARATORs allowed to be executed per script, but that w= ould require an argument as to why exceeding that limit isn't reasonable. >>=20 >> You could equally argue, however, that any such limit could render some m= oderately-large transaction unspendable, so I'm somewhat skeptical of this a= rgument. Note that OP_CODESEPARATOR is non-standard, so getting them mined i= s rather difficult in any case. >=20 > Although I'm not a fan of extra complicity, just to explore these two idea= s a bit further. >=20 > What if such a transaction: >=20 > 1. must have one input; and > 2. must be smaller than 400 vbytes; and > 3. must spend from a UTXO older than fork activation >=20 > Adding such a contextual check seems rather painful, perhaps comparable to= nLockTime. Anything more specific than the above, e.g. counting the number o= f OP_CODESEPARATOR calls, seems like guess work. >=20 > Transaction weight currently doesn't consider OP codes, it only considers i= f bytes are part of the witness. Changing that to something more akin to Eth= ereums gas pricing sounds too complicated to even consider. >=20 >=20 > I would also like to believe that whoever went through the trouble of usin= g OP_CODESEPARATOR reads this list. >=20 > Sjors >=20