summaryrefslogtreecommitdiff
path: root/86/eb5940dd77de3b7ca18425a92fb00d241a99b6
blob: 5d8feb176a079daa905b82111856d3c2bfdfe28e (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
Return-Path: <ebbe52e5@gmail.com>
Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 4B4C0C000E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 02:43:35 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp4.osuosl.org (Postfix) with ESMTP id 281A74023D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 02:43:35 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.849
X-Spam-Level: 
X-Spam-Status: No, score=-1.849 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Authentication-Results: smtp4.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key) header.d=gmail.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 VE-Q2paNy1wm
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 02:43:30 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com
 [IPv6:2607:f8b0:4864:20::430])
 by smtp4.osuosl.org (Postfix) with ESMTPS id 9D82A40204
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Thu, 26 Aug 2021 02:43:30 +0000 (UTC)
Received: by mail-pf1-x430.google.com with SMTP id 2so1407980pfo.8
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 25 Aug 2021 19:43:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:content-transfer-encoding:mime-version:subject:date:references
 :to:in-reply-to:message-id;
 bh=/McbqNESer/k+HMDzqhHk1Ir95GwiVQMwEdRGFofuAY=;
 b=ccmQvpR2I5E33p4KAEiRVZSlh0QDRqe+zakWjSjYSoG4xKXtDsxbnfrDTnNfgN6Oty
 EoY0RgQDbdZy53ln0IyEbaEXgQr2qAnCe2q6WQAf5JH/K+1SMDG7GTsYmy9bRHxw8cDh
 X4kwerCOQKGsao9KiqkO9OEZOT/EWBYnuL1frwYTlPIX9NoJsi1YELHg0sKSmniNBCaR
 e0N6Q8RHsLlJosyejzGQl0f3rZCpDEz8ZFDY6PRZUKMsjVAS7n7rmEWncBvfe2qyX1pQ
 VZt7owlSQfiEz3EWdNOttTpyLUnUXMWe4PcfZQtmJbB0DQfCeiYMIOTK6D206xESSRSq
 TNsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:date:references:to:in-reply-to:message-id;
 bh=/McbqNESer/k+HMDzqhHk1Ir95GwiVQMwEdRGFofuAY=;
 b=luSMQq4NEXN8qiQxtcJQ1SbLQ1pA0I/r8zPnAp2hNb90J1p+N+E+wj88tqNIxEr7+w
 Cwiia8TxYY5v3ZGQDCCz/pMLbHzyjkhfuXtyKnWMMmIW/7kqd87WLW3g+NLew/S2Rcl0
 +NqoA/pqkDdbRj/vwAHkED1mGzlOlcfthFQYXYk8vBMey1NJ7XTgBL5xXciEOxG2RMVN
 BXjqsxdNB/GM+w4qmO/ZzzT0y7V5YO05OsUH+DMBNEzs3R+o+Y5jzECDHOp1IhjL/y/6
 khXEG5IZa1yxUFNyJHhG8N3SCgEPze/B22W/eHU8d1W/iglJr43t6uRCVtcc5D0Tr1W6
 eKhw==
X-Gm-Message-State: AOAM5334Jm3/nvNTFB0DSVsiwQa4BvX1wIKsJ9jaUGvF2au2l21xPtbD
 ZcwRWzEqtPnKbdnRJdQXUbQ=
X-Google-Smtp-Source: ABdhPJw5dz80DHPSClXr4eGo3+KnIbn+B/oG9Ut2ltMYbzQtIOXN4jWg0c1AEagkPdhcApKJ0auCeg==
X-Received: by 2002:aa7:96c3:0:b0:3e2:1cc0:da27 with SMTP id
 h3-20020aa796c3000000b003e21cc0da27mr1465959pfq.65.1629945809995; 
 Wed, 25 Aug 2021 19:43:29 -0700 (PDT)
Received: from [127.0.0.1] ([103.138.75.117])
 by smtp.gmail.com with ESMTPSA id d22sm916592pfq.158.2021.08.25.19.43.28
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 25 Aug 2021 19:43:29 -0700 (PDT)
From: Null Null <ebbe52e5@gmail.com>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
Date: Thu, 26 Aug 2021 10:43:27 +0800
References: <E541FB6E-AB06-4B8D-86CF-530C13AF62DD@gmail.com>
 <CAGB645aYFvxBctxXHwH0bB=qRMTaEW263H5BxpT8b27i9S3B7w@mail.gmail.com>
To: Gijs van Dam <gvandam@gmail.com>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <CAGB645aYFvxBctxXHwH0bB=qRMTaEW263H5BxpT8b27i9S3B7w@mail.gmail.com>
Message-Id: <B6ADF0FE-0FCD-4564-A78E-6FA8310924D0@gmail.com>
X-Mailer: Apple Mail (2.3654.60.0.2.21)
X-Mailman-Approved-At: Thu, 26 Aug 2021 07:53:03 +0000
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 02:43:35 -0000

thanks for you suggestion, Gijs.

I spent some time learning miniscript, and there are some problems that =
need to confirm for me:

1. Is miniscript a brand new Bitcoin scripting language?
2. If I use miniscript, do I need to compile it into a Bitcoin OP_CODE =
script? If so, how to do that ? has someone written a compiler?=20
I found that @sipa has open sourced a compiler implemented in C++ on =
github( https://github.com/sipa/miniscript ). This should translate the =
policy language into miniscript;

> 2021=E5=B9=B48=E6=9C=8824=E6=97=A5 =E4=B8=8B=E5=8D=883:36=EF=BC=8CGijs =
van Dam via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> =
=E5=86=99=E9=81=93=EF=BC=9A
>=20
> Hi,
>=20
>=20
> 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.
>=20
> By the way, this question also has an answer on [Bitcoin =
Stackexchange][5] which is a great resource for questions like this.
>=20
> [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-et=
hereum-evm-at-present-for-bitcoin-script
>=20
> On Tue, Aug 24, 2021 at 2:55 PM Null Null via bitcoin-dev =
<bitcoin-dev@lists.linuxfoundation.org> wrote:
> Hi all,
>=20
> 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.
>=20
> In my opinion=EF=BC=8C Bitcoin script programming is based on reverse =
Polish expression; this is not friendly to programmers;
>=20
> 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.
>=20
> Hope for hearing some voice about this.
>=20
> Best wish.
>=20
> _______________________________________________
> 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