Return-Path: Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6BBB1C000E for ; Wed, 7 Jul 2021 13:13:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5997140627 for ; Wed, 7 Jul 2021 13:13:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=blockstream-com.20150623.gappssmtp.com 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 hAvNSSpbwOeS for ; Wed, 7 Jul 2021 13:13:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by smtp4.osuosl.org (Postfix) with ESMTPS id 27E6A4061E for ; Wed, 7 Jul 2021 13:13:11 +0000 (UTC) Received: by mail-qk1-x730.google.com with SMTP id t19so1831943qkg.7 for ; Wed, 07 Jul 2021 06:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blockstream-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G/krRmz4IM5AhCpmQxX3K9tN/RwP33//AnBPz8y2MpY=; b=Ji4njjuHJeKE7jhf4g31WZZPksAvisdSEuGcMbnR3ohS+vwRqKRIxG0w/PQbE9TDP3 /C0cf9H3HvdhAMMAPjEV8kCAkaJVMdVCg5nx9KXwnb4NfV8+/g4FFQjVarz+sLG811VI YF2PdhyVG/ttvh6tA3/cGEuy+C9TlB4t+/xPI641N6c1TyXQKQlsgDjIMFGBX5qbsRvG 1nloRhwcH8uHYVvUHXSqBhQRdh7PmPR0w2h0dkizmgRR4isN17G7nZQUdq71RA2yTNHm /VYavkTquGxnd1UNTiYSBE70SdZOPM5lpixOGE3J6Io5wX9cVtYm5L0e+Xpn1go2y0Ar OdTg== 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:cc; bh=G/krRmz4IM5AhCpmQxX3K9tN/RwP33//AnBPz8y2MpY=; b=Ir18G1UL7UyECLOVgsoYI2wd4m4Pc7MO8QjZYFCNUOZ/ydvwomazxJ41MdOz/YNeAO 2mjYvbh7B9TINa5fYKqoTPJTTJZ6DEAOC/3yswn6Oj/fPu866q3OI0mkqP9T4PKyLCXG P7tIoTI76fgPhyQJc8qXOdjOp/Fhui8s1VROyQnstXWs4kYP6knNbLm0mITg82hV3g35 A+UZqEwMQKcRKXGn69vsfHMY2XK25p0bPTprQA1FqAScA4M6/CXVrhkpg6NyHZqb5nPG Fj6rubPLs5vcXr0bCXNqVbeL0vyAYOUG06FxvfjIwhTCugjDIUp6I/SmMvlYd23uriQ9 KUdA== X-Gm-Message-State: AOAM530Yic+BdKbTz4jFtKez4553TBYq5Bimr1zGPSxqQXfLA5aU/tYM 08ZuIxJIIWq4NBG+8brAlWuhb2JgTWMstcsX3T2+Ig== X-Google-Smtp-Source: ABdhPJwlCIqLX7tedWGpNdfyhtvZDXYIctnelBshiW6tVrXEfR+2GQ17SxXgnpD2B21/6//phB5Xc/NNR0mN9MQ89Pk= X-Received: by 2002:a05:620a:d42:: with SMTP id o2mr25307101qkl.233.1625663589817; Wed, 07 Jul 2021 06:13:09 -0700 (PDT) MIME-Version: 1.0 References: <20210704011341.ddbiruuomqovrjn6@ganymede> <20210704203230.37hlpdyzr4aijiet@ganymede> <5keA_aPvmCO5yBh_mBQ6Z5SwnnvEW0T-3vahesaDh57f-qv4FbG1SFAzDvT3rFhre6kFl282VsxV_pynwn_CdvF7fzH2q9NW1ZQHPH1pmdo=@protonmail.com> In-Reply-To: From: "Russell O'Connor" Date: Wed, 7 Jul 2021 09:12:58 -0400 Message-ID: To: ZmnSCPxj Content-Type: multipart/alternative; boundary="000000000000cbb21c05c6884ce2" Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] Unlimited covenants, was Re: CHECKSIGFROMSTACK/{Verify} BIP for Bitcoin 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: Wed, 07 Jul 2021 13:13:13 -0000 --000000000000cbb21c05c6884ce2 Content-Type: text/plain; charset="UTF-8" On Wed, Jul 7, 2021 at 12:26 AM ZmnSCPxj wrote: > Good morning Russell, > > > Hi ZmnSCPxj, > > > > I don't believe we need to ban Turing completeness for the sake of > banning Turing completeness. > > Well I believe we should ban partial Turing-completeness, but allow total > Turing-completeness. > Unfortunately, when it comes to cross-transaction computations, it is infeasible to ban non-terminating computation. The nature of recursive covenants is that the program "writes" the *source code* next step of the computation to the scriptPubKey to one of the outputs of its transaction. Technically speaking it verifies that the scriptPubKey is a commitment to the source code of the next step of the program, but morally that is the same as writing the source code. Then the next step of the computation is invoked by someone "evaluating* that next step's source code by creating a valid transaction that spends the generated output. The point is this ability to create new source code and then evaluate it leads to the ability to write universal (i.e non-terminating) computations. The only way to prevent it is to ban source code manipulation, but since Bitcoin Script source code is just a string of bytes, it would mean banning the manipulation of strings of bytes. But the entire Bitcoin Script language works by manipulating strings of bytes within a stack machine. Indeed the most trivial of non-terminating programs can be implemented by extracting the current input's scriptPubKey from the sighash and "writing" the identical scriptPubKey to one of its outputs. That example hardly takes any manipulation at all to implement. --000000000000cbb21c05c6884ce2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Jul 7, 2021 at 12:26 AM ZmnSCPxj = <ZmnSCPxj@protonmail.com&= gt; wrote:
Good = morning Russell,

> Hi ZmnSCPxj,
>
> I don't believe we need to ban Turing completeness for the sake of= banning Turing completeness.

Well I believe we should ban partial Turing-completeness, but allow total T= uring-completeness.

Unfortunately, when= it comes to cross-transaction computations, it is infeasible to ban non-te= rminating computation.

The nature of recursive cov= enants is that the program "writes" the *source code* next step o= f the computation to the scriptPubKey to one of the outputs of its transact= ion. Technically speaking it verifies that the scriptPubKey is a commitment= to the source code of the next step of the program, but morally that is th= e same as writing the source code.=C2=A0 Then the next step of the computat= ion is invoked by someone "evaluating* that next step's source cod= e by creating a valid transaction that spends the generated output.

The point is this ability to create new source code a= nd then evaluate it leads to the ability to write universal (i.e non-termin= ating) computations.=C2=A0 The only way to prevent it is to ban source code= manipulation, but since Bitcoin Script source code is just a string of byt= es, it would mean banning the manipulation of strings of bytes.=C2=A0 But t= he entire Bitcoin Script language works by manipulating strings of bytes wi= thin a stack machine.=C2=A0 Indeed the most trivial of non-terminating prog= rams can be implemented by extracting the current input's scriptPubKey = from the sighash and "writing" the identical scriptPubKey to one = of its outputs.=C2=A0 That example hardly takes any manipulation at all to = implement.
--000000000000cbb21c05c6884ce2--