summaryrefslogtreecommitdiff
path: root/14/381e328c883f7458f36fb52ac425ed52ee8f42
blob: 327bca5cdb741b3fbc7e5aae52e73c1c5fbc9f71 (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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
Return-Path: <jlrubin@mit.edu>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id DFEC8C000E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 10:26:42 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp1.osuosl.org (Postfix) with ESMTP id DC52B81BF4
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 10:26:42 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level: 
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from smtp1.osuosl.org ([127.0.0.1])
 by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id w5oyNvypdDhX
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 10:26:38 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
 by smtp1.osuosl.org (Postfix) with ESMTPS id 1908980DAD
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 10:26:37 +0000 (UTC)
Received: from mail-il1-f176.google.com (mail-il1-f176.google.com
 [209.85.166.176]) (authenticated bits=0)
 (User authenticated as jlrubin@ATHENA.MIT.EDU)
 by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 17QAQZA5031761
 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT)
 for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 26 Aug 2021 06:26:36 -0400
Received: by mail-il1-f176.google.com with SMTP id u7so2738662ilk.7
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 03:26:35 -0700 (PDT)
X-Gm-Message-State: AOAM532+TMt4OXxxY9WdSi2GgLt/jF5mhnscqY1YYjZpd2rLQECoAqtq
 G14Z321p2RI57HBQNWFtnJ62nOunlhhX4NyySpE=
X-Google-Smtp-Source: ABdhPJykRXRDPLXuFP3ZBXEV1wUao0VZdk67Yv5TPQjnvuhNf16mxY4bA0l89xkKXBOKWKDcQnExIQfGbo6hQHUTTRA=
X-Received: by 2002:a92:cf0d:: with SMTP id c13mr2132920ilo.49.1629973595065; 
 Thu, 26 Aug 2021 03:26:35 -0700 (PDT)
MIME-Version: 1.0
References: <E541FB6E-AB06-4B8D-86CF-530C13AF62DD@gmail.com>
 <CAGB645aYFvxBctxXHwH0bB=qRMTaEW263H5BxpT8b27i9S3B7w@mail.gmail.com>
 <YSTvYSEdDYVQhukr@camus>
In-Reply-To: <YSTvYSEdDYVQhukr@camus>
From: Jeremy <jlrubin@mit.edu>
Date: Thu, 26 Aug 2021 03:26:23 -0700
X-Gmail-Original-Message-ID: <CAD5xwhgmAepA4jW3tK7nihMFsMEdgs0Z6UEs3k=3J1soDea0QQ@mail.gmail.com>
Message-ID: <CAD5xwhgmAepA4jW3tK7nihMFsMEdgs0Z6UEs3k=3J1soDea0QQ@mail.gmail.com>
To: Andrew Poelstra <apoelstra@wpsoftware.net>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="00000000000020943605ca73cd1b"
Subject: Re: [bitcoin-dev] Is there a tool like Ethereum EVM at present for
 Bitcoin script?
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: Thu, 26 Aug 2021 10:26:43 -0000

--00000000000020943605ca73cd1b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

This has actually never been true (Sapio assumes extensions).

If the extensions are not present, you can stub them out with a signing
federation instead, configurable as flags, and you can also write many
contracts that do not use the ctv based components at all.

The protocol for emulation is a bit clever (if I do say so myself) since it
ensures that contract compilation is completely offline and the oracles are
completely stateless.

Relevant links:

https://learn.sapio-lang.org/ch05-01-ctv-emulator.html
https://learn.sapio-lang.org/ch03-02-finish.html

Cheers,

Jeremy

On Tue, Aug 24, 2021, 6:19 AM Andrew Poelstra via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

>
> Simplicity does not compile to Bitcoin Script, and Sapio assumes extensio=
ns
> to Bitcoin Script that are not currently part of the consensus code.
>
>
> On Tue, Aug 24, 2021 at 03:36:29PM +0800, Gijs van Dam via bitcoin-dev
> wrote:
> > Hi,
> >
> >
> > Bitcoin does not have a virtual machine. But you do have [Miniscript][1=
],
> > [Min.sc][2], [Simplicity][3] and [Sapio][4]. These are all higher level
> > languages that compile to Bitcoin Script. Sapio is "just" Rust, so that
> > might fit your setting best.
> >
> > By the way, this question also has an answer on [Bitcoin
> Stackexchange][5]
> > which is a great resource for questions like this.
> >
> > [1]: http://bitcoin.sipa.be/miniscript/
> > [2]: https://min.sc/
> > [3]: https://github.com/ElementsProject/simplicity
> > [4]: https://learn.sapio-lang.org/
> > [5]:
> >
> https://bitcoin.stackexchange.com/questions/108261/is-there-a-tool-like-e=
thereum-evm-at-present-for-bitcoin-script
> >
> > On Tue, Aug 24, 2021 at 2:55 PM Null Null via bitcoin-dev <
> > bitcoin-dev@lists.linuxfoundation.org> wrote:
> >
> > > Hi all,
> > >
> > > Is there a tool like Ethereum EVM at present? Users can write bitcoin
> > > scripts in a syntax just like python(or like other programming
> language);
> > > through this tool, they can be translated into bitcoin original
> scripts; it
> > > sounds like a new programming language has been invented.
> > >
> > > In my opinion=EF=BC=8C Bitcoin script programming is based on reverse=
 Polish
> > > expression; this is not friendly to programmers;
> > >
> > > In fact, Bitcoin's opcode expression ability is very rich, and it may
> be
> > > unfriendly, which has affected the promotion of Bitcoin in the
> technical
> > > community.
> > >
> > > Hope for hearing some voice about this.
> > >
> > > Best wish.
> > >
> > > _______________________________________________
> > > bitcoin-dev mailing list
> > > bitcoin-dev@lists.linuxfoundation.org
> > > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> > >
>
> > _______________________________________________
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>
> --
> Andrew Poelstra
> Director of Research, Blockstream
> Email: apoelstra at wpsoftware.net
> Web:   https://www.wpsoftware.net/andrew
>
> The sun is always shining in space
>     -Justin Lewis-Webster
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--00000000000020943605ca73cd1b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div>This has actually never been true (Sapio assumes ext=
ensions).</div><div dir=3D"auto"><br></div><div dir=3D"auto">If the extensi=
ons are not present, you can stub them out with a signing federation instea=
d, configurable as flags, and you can also write many contracts that do not=
 use the ctv based components at all.=C2=A0</div><div dir=3D"auto"><br></di=
v><div dir=3D"auto">The protocol for emulation is a bit clever (if I do say=
 so myself) since it ensures that contract compilation is completely offlin=
e and the oracles are completely stateless.</div><div dir=3D"auto"><br></di=
v><div dir=3D"auto">Relevant links:</div><div dir=3D"auto"><br></div><div d=
ir=3D"auto"><a href=3D"https://learn.sapio-lang.org/ch05-01-ctv-emulator.ht=
ml">https://learn.sapio-lang.org/ch05-01-ctv-emulator.html</a></div><div di=
r=3D"auto"><a href=3D"https://learn.sapio-lang.org/ch03-02-finish.html">htt=
ps://learn.sapio-lang.org/ch03-02-finish.html</a></div><div dir=3D"auto"><b=
r></div><div dir=3D"auto">Cheers,</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">Jeremy<br><br><div class=3D"gmail_quote" dir=3D"auto"><div dir=3D=
"ltr" class=3D"gmail_attr">On Tue, Aug 24, 2021, 6:19 AM Andrew Poelstra vi=
a bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">=
bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><br>
Simplicity does not compile to Bitcoin Script, and Sapio assumes extensions=
<br>
to Bitcoin Script that are not currently part of the consensus code.<br>
<br>
<br>
On Tue, Aug 24, 2021 at 03:36:29PM +0800, Gijs van Dam via bitcoin-dev wrot=
e:<br>
&gt; Hi,<br>
&gt; <br>
&gt; <br>
&gt; Bitcoin does not have a virtual machine. But you do have [Miniscript][=
1],<br>
&gt; [Min.sc][2], [Simplicity][3] and [Sapio][4]. These are all higher leve=
l<br>
&gt; languages that compile to Bitcoin Script. Sapio is &quot;just&quot; Ru=
st, so that<br>
&gt; might fit your setting best.<br>
&gt; <br>
&gt; By the way, this question also has an answer on [Bitcoin Stackexchange=
][5]<br>
&gt; which is a great resource for questions like this.<br>
&gt; <br>
&gt; [1]: <a href=3D"http://bitcoin.sipa.be/miniscript/" rel=3D"noreferrer =
noreferrer" target=3D"_blank">http://bitcoin.sipa.be/miniscript/</a><br>
&gt; [2]: <a href=3D"https://min.sc/" rel=3D"noreferrer noreferrer" target=
=3D"_blank">https://min.sc/</a><br>
&gt; [3]: <a href=3D"https://github.com/ElementsProject/simplicity" rel=3D"=
noreferrer noreferrer" target=3D"_blank">https://github.com/ElementsProject=
/simplicity</a><br>
&gt; [4]: <a href=3D"https://learn.sapio-lang.org/" rel=3D"noreferrer noref=
errer" target=3D"_blank">https://learn.sapio-lang.org/</a><br>
&gt; [5]:<br>
&gt; <a href=3D"https://bitcoin.stackexchange.com/questions/108261/is-there=
-a-tool-like-ethereum-evm-at-present-for-bitcoin-script" rel=3D"noreferrer =
noreferrer" target=3D"_blank">https://bitcoin.stackexchange.com/questions/1=
08261/is-there-a-tool-like-ethereum-evm-at-present-for-bitcoin-script</a><b=
r>
&gt; <br>
&gt; On Tue, Aug 24, 2021 at 2:55 PM Null Null via bitcoin-dev &lt;<br>
&gt; <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_bl=
ank" rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote=
:<br>
&gt; <br>
&gt; &gt; Hi all,<br>
&gt; &gt;<br>
&gt; &gt; Is there a tool like Ethereum EVM at present? Users can write bit=
coin<br>
&gt; &gt; scripts in a syntax just like python(or like other programming la=
nguage);<br>
&gt; &gt; through this tool, they can be translated into bitcoin original s=
cripts; it<br>
&gt; &gt; sounds like a new programming language has been invented.<br>
&gt; &gt;<br>
&gt; &gt; In my opinion=EF=BC=8C Bitcoin script programming is based on rev=
erse Polish<br>
&gt; &gt; expression; this is not friendly to programmers;<br>
&gt; &gt;<br>
&gt; &gt; In fact, Bitcoin&#39;s opcode expression ability is very rich, an=
d it may be<br>
&gt; &gt; unfriendly, which has affected the promotion of Bitcoin in the te=
chnical<br>
&gt; &gt; community.<br>
&gt; &gt;<br>
&gt; &gt; Hope for hearing some voice about this.<br>
&gt; &gt;<br>
&gt; &gt; Best wish.<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; bitcoin-dev mailing list<br>
&gt; &gt; <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=
=3D"_blank" rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a><br=
>
&gt; &gt; <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bit=
coin-dev" rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.lin=
uxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; bitcoin-dev mailing list<br>
&gt; <a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_bl=
ank" rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a><br>
&gt; <a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-=
dev" rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.linuxfou=
ndation.org/mailman/listinfo/bitcoin-dev</a><br>
<br>
<br>
-- <br>
Andrew Poelstra<br>
Director of Research, Blockstream<br>
Email: apoelstra at <a href=3D"http://wpsoftware.net" rel=3D"noreferrer nor=
eferrer" target=3D"_blank">wpsoftware.net</a><br>
Web:=C2=A0 =C2=A0<a href=3D"https://www.wpsoftware.net/andrew" rel=3D"noref=
errer noreferrer" target=3D"_blank">https://www.wpsoftware.net/andrew</a><b=
r>
<br>
The sun is always shining in space<br>
=C2=A0 =C2=A0 -Justin Lewis-Webster<br>
<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank" =
rel=3D"noreferrer">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.linuxfoundati=
on.org/mailman/listinfo/bitcoin-dev</a><br>
</blockquote></div></div></div>

--00000000000020943605ca73cd1b--