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 EEDBBD5C5 for ; Thu, 7 Mar 2019 15:03:29 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-it1-f177.google.com (mail-it1-f177.google.com [209.85.166.177]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9999D318 for ; Thu, 7 Mar 2019 15:03:29 +0000 (UTC) Received: by mail-it1-f177.google.com with SMTP id v83so16250976itf.1 for ; Thu, 07 Mar 2019 07:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blockstream.io; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Joe8k4ERaiHVxFdBFopDtD6fZtCmgetinhOrGiCrHSg=; b=yEYSwvncnIXKRSZUYxfgyMmIjbg3helCDZSnqqyKJGegt4D+d9tOWL5tKw6aPyIFOl HMhhQUlXBRC/umwGJB4gwZAmCB5QpCBXzev3n+bA/saeSCrz92H9JcPpKlwVrWROA5qx kld6FP3M25IQB7EZzX2TcnXXCyyYXzfHFnaww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Joe8k4ERaiHVxFdBFopDtD6fZtCmgetinhOrGiCrHSg=; b=O1n67GJO4v6KBcnaH2B8PdNdtRHc98aL2ObzJ3+38m0aDZD6BqqdZmAVv+Wmc5KOvi ZWgUeQKvOG8kPxpoHZ4AviVDfIA1vdu7spAMCAaEr/pZahtqfvieFwwH4Nbu4fTn515Q XHoqDUg0o/r3tHNPGboevBvXfDfDAV538+Ca1Qs4hFC4SGqIQ7BDSFMGVzJJHGCBkJYr W0LZyzyB+6F82YahaaiJdAaODFAUWF/sXU1NT+Qd9VceLJwwKe0F9YpJTbhDzrLc8xN5 J4646bU3PRfl382U9qFhqBmpTKDN/Usxv1+2zyT4bakXj6exjwL1sSNTwJ4GqnVPEkr5 4qmw== X-Gm-Message-State: APjAAAVsD1uQpi4eiNm9NDrSdEUzkAjG9qgLGNVZ57UwZEc7Lqhnun1t K+n1K27iRPlspx0W5c4wTiezp56C21Vaw1LkTzgBZoyn X-Google-Smtp-Source: APXvYqwJGySLvuBwTDGeeB5sxcA5owYWfZT8Hicbl3RgaEfNva5a0CX8qBfbeLbQgVHz6bg6Si2YXBQrJjiaGCVEOkc= X-Received: by 2002:a24:3a8b:: with SMTP id m133mr5210817itm.26.1551971008748; Thu, 07 Mar 2019 07:03:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Russell O'Connor" Date: Thu, 7 Mar 2019 10:03:17 -0500 Message-ID: To: Matt Corallo , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000ae2481058382684a" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HTML_MESSAGE, RCVD_IN_DNSWL_NONE 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: Thu, 07 Mar 2019 23:49:26 +0000 Subject: [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: Thu, 07 Mar 2019 15:03:30 -0000 --000000000000ae2481058382684a Content-Type: text/plain; charset="UTF-8" > * OP_CODESEPARATOR in non-BIP 143 scripts fails the script validation. > This includes OP_CODESEPARATORs in unexecuted branches of if statements, > similar to other disabled opcodes, but unlike OP_RETURN. > OP_CODESEPARATOR is the only mechanism available that allows users to sign which particular branch they are authorizing for within scripts that have multiple possible conditions that reuse the same public key. Because of P2SH you cannot know that no one is currently using this feature. Activating a soft-fork as describe above means these sorts of funds would be permanently lost. It is not acceptable to risk people's money like this. I suggest an alternative whereby the execution of OP_CODESEPARATOR increases the transactions weight suitably as to temper the vulnerability caused by it. Alternatively there could be some sort of limit (maybe 1) on the maximum number of OP_CODESEPARATORs allowed to be executed per script, but that would require an argument as to why exceeding that limit isn't reasonable. -- Russell O'Connor --000000000000ae2481058382684a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

* OP_CODESEPARATOR in non-BIP 143 scripts fails the script validation.
This includes OP_CODESEPARATORs in unexecuted branches of if statements, similar to other disabled opcodes, but unlike OP_RETURN.

OP_CODESEPARATOR is the only mechanism available that all= ows users to sign which particular branch they are authorizing for within s= cripts that have multiple possible conditions that reuse the same public ke= y.=C2=A0 Because of P2SH you cannot know that no one is currently using thi= s feature.=C2=A0 Activating a soft-fork as describe above means these sorts= of funds would be permanently lost.=C2=A0 It is not acceptable to risk peo= ple's money like this.

I suggest an alternativ= e whereby the execution of OP_CODESEPARATOR increases the transactions weig= ht suitably as to temper the vulnerability caused by it.=C2=A0 Alternativel= y there could be some sort of limit (maybe 1) on the maximum number of OP_C= ODESEPARATORs allowed to be executed per script, but that would require an = argument as to why exceeding that limit isn't reasonable.
--
Russell O'Connor
--000000000000ae2481058382684a--