summaryrefslogtreecommitdiff
path: root/b1/6a332a672df67f0df2dba94c7f8bf72d20f0c9
blob: 57c1bf722bec0545a876b9e5593ba5c0c84efb8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
Return-Path: <roconnor@blockstream.com>
Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 6BBB1C000E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 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 <bitcoin-dev@lists.linuxfoundation.org>;
 Wed,  7 Jul 2021 13:13:11 +0000 (UTC)
Received: by mail-qk1-x730.google.com with SMTP id t19so1831943qkg.7
 for <bitcoin-dev@lists.linuxfoundation.org>;
 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: <CAD5xwhjmu-Eee47Ho5eA6E6+aAdnchLU0OVZo=RTHaXnN17x8A@mail.gmail.com>
 <20210704011341.ddbiruuomqovrjn6@ganymede>
 <CAD5xwhimPBEV_tLpSPxs9B+XGUhvPx_dnhok=8=hyksyi4=B6g@mail.gmail.com>
 <20210704203230.37hlpdyzr4aijiet@ganymede>
 <5keA_aPvmCO5yBh_mBQ6Z5SwnnvEW0T-3vahesaDh57f-qv4FbG1SFAzDvT3rFhre6kFl282VsxV_pynwn_CdvF7fzH2q9NW1ZQHPH1pmdo=@protonmail.com>
 <CAMZUoKnuRXNG1pyupHrL+Wo80TXTbADVrexoB=+BKC633v-qMw@mail.gmail.com>
 <u2ETzW2-k7sjRKEz48C2n2QJvmWPVdhZIqtva_KvDNvxNDTVnR2zzYCL2Q8RUVkLm93OMJ2S2GOfUOxmdvNTaCIK1liebb4yvCCBBFB75f0=@protonmail.com>
In-Reply-To: <u2ETzW2-k7sjRKEz48C2n2QJvmWPVdhZIqtva_KvDNvxNDTVnR2zzYCL2Q8RUVkLm93OMJ2S2GOfUOxmdvNTaCIK1liebb4yvCCBBFB75f0=@protonmail.com>
From: "Russell O'Connor" <roconnor@blockstream.com>
Date: Wed, 7 Jul 2021 09:12:58 -0400
Message-ID: <CAMZUoK=rRDV4F7j64gTUqEB9EiBpwhZW6LP-FMR0FxR2Bc4iBw@mail.gmail.com>
To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Content-Type: multipart/alternative; boundary="000000000000cbb21c05c6884ce2"
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=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 <ZmnSCPxj@protonmail.com> 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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 7, 2021 at 12:26 AM ZmnSCPxj =
&lt;<a href=3D"mailto:ZmnSCPxj@protonmail.com">ZmnSCPxj@protonmail.com</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Good =
morning Russell,<br>
<br>
&gt; Hi ZmnSCPxj,<br>
&gt;<br>
&gt; I don&#39;t believe we need to ban Turing completeness for the sake of=
 banning Turing completeness.<br>
<br>
Well I believe we should ban partial Turing-completeness, but allow total T=
uring-completeness.<br></blockquote><div><br></div><div>Unfortunately, when=
 it comes to cross-transaction computations, it is infeasible to ban non-te=
rminating computation.</div><div><br></div><div>The nature of recursive cov=
enants is that the program &quot;writes&quot; 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 &quot;evaluating* that next step&#39;s source cod=
e by creating a valid transaction that spends the generated output.<br></di=
v><div><br></div><div>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&#39;s scriptPubKey =
from the sighash and &quot;writing&quot; the identical scriptPubKey to one =
of its outputs.=C2=A0 That example hardly takes any manipulation at all to =
implement.<br></div></div></div>

--000000000000cbb21c05c6884ce2--