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
|
Return-Path: <adan@stampery.co>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 9970B92B
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 3 Nov 2017 16:42:44 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E1EE3E3
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 3 Nov 2017 16:42:43 +0000 (UTC)
Received: by mail-wm0-f41.google.com with SMTP id b9so2817372wmh.0
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 03 Nov 2017 09:42:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stampery.co; s=google;
h=from:reply-to:subject:to:references:organization:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=OLEonmRBRpMk/g2kg1Bq+lOOPPlNbNkKe+/+EOdXmFA=;
b=tGmobpu+C/n0cjA5CURr3KesutUWcTCt1OKEJ+4ITg0uDHBWQDNWKCGmBI0716k4kw
jGVw4hFkgDHEXC1fJWQfK2ciwcrP6ABiTI4SLEvQi60KdRXszn42/tPJ0ibnM38lBHDW
bSq6xYa5CftPr3lvQlcFfIYE3U/BhwD+NXVaI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:reply-to:subject:to:references:organization
:message-id:date:user-agent:mime-version:in-reply-to
:content-language:content-transfer-encoding;
bh=OLEonmRBRpMk/g2kg1Bq+lOOPPlNbNkKe+/+EOdXmFA=;
b=WckouDEr0Iflh5b7UJdNu31JL5dB8aicle9IEEb9g8RF1knloX07O32NLmzGdIq6MZ
bLsecP1PzCePb75Kd5zvtZ2Ml652EDE5hr7FNGcudCI2ugKwsBRDsiPQ5Sd0Ho5eLGnm
tPSxh+FYunSMDWmlrTP6ACSIAGVVvzySY9CkPUhqpEw1F786tCq64JO6fZHYF0WaXJEm
yUB/XEZNFR4QQApagqTChtPK0Pb8Bdl6MfiWOAPuLQWWFwhlXSkSksxOIsG1D60+u4DQ
30NoCowbsin4fbe72uVL1v3YgKRknOszrN3/RmZfdlWgDGi+6OrqlICWuccfwi3AHBSb
ZJsA==
X-Gm-Message-State: AJaThX7qBCZ/CYIRzPx9PiIs4u09aWgp0xvoEL22HvVZSKGbPxUFYwnr
VSHa4mi6Pog7J9VksI7v7LLmHCQyM7c=
X-Google-Smtp-Source: ABhQp+Qo4VDQH/VNTq8FxeDcU/75wJCfBn6QuHfYuAAB8fivLDXS5kspjGAy1ek2c4W4jpVo+mcrFQ==
X-Received: by 10.28.215.194 with SMTP id o185mr290276wmg.105.1509727361270;
Fri, 03 Nov 2017 09:42:41 -0700 (PDT)
Received: from [192.168.1.42] (32.red-83-45-227.dynamicip.rima-tde.net.
[83.45.227.32]) by smtp.gmail.com with ESMTPSA id
k69sm3760616wmg.45.2017.11.03.09.42.39
for <bitcoin-dev@lists.linuxfoundation.org>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 03 Nov 2017 09:42:40 -0700 (PDT)
From: "=?UTF-8?Q?Ad=c3=a1n_S=c3=a1nchez_de_Pedro_Crespo?=" <adan@stampery.co>
X-Google-Original-From: =?UTF-8?Q?Ad=c3=a1n_S=c3=a1nchez_de_Pedro_Crespo?=
<adan@stampery.com>
Reply-To: adan@stampery.com
To: bitcoin-dev@lists.linuxfoundation.org
References: <mailman.5469.1509483670.27509.bitcoin-dev@lists.linuxfoundation.org>
<052D6E20-7194-4645-B628-1B7B7FECF330@gmail.com>
<CAMZUoKk+8MFLywQB3jQFkk7BYZ4Rw3Paj=ErQe8pZ0beGwu0RA@mail.gmail.com>
<CAFMkqK_rXb9fAiGC_qNf5nj_cShJgAB4qTUsCM+R07DSAau2TA@mail.gmail.com>
Organization: Stampery
Message-ID: <8540b26e-d6a9-3e3c-2ff6-6edb7e1e03df@stampery.com>
Date: Fri, 3 Nov 2017 17:42:38 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <CAFMkqK_rXb9fAiGC_qNf5nj_cShJgAB4qTUsCM+R07DSAau2TA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
X-Mailman-Approved-At: Fri, 03 Nov 2017 17:01:22 +0000
Subject: Re: [bitcoin-dev] Simplicity proposal - Jets?
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
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: Fri, 03 Nov 2017 16:42:44 -0000
If I did understand it right, you don't need to publish the Simplicity
code for the "jetable" expression.
That's the whole point of MAST. Each Simplicity expression can be
identified by its MAST root (the Merkle root of all branches in its
Abstract Syntax Tree).
Imagine you want to write a Simplicity script that is roughly equivalent
to P2PKH. Regardless of directly writing such script or using a higher
level smart contract language, you won't likely write for yourself the
part in which you compute the hash of the public key. Instead, you are
expected to include some external library providing hash functions or at
least copy and paste such function into your code.
As everyone is expected to use the same, let's say, RIPEMD160
implementation, it doesn't matter how you included such function in your
program. The point is that once you build the MAST for your program,
such function will be completely replaced by its MAST root---which is
nothing but a hash.
This way, when the Simplicity interpreter (the BitMachine) bumps into
the hash, it can look for it in a predefined jets dictionary and find
the binary for a precompiled, formally proven implementation of a
function that is perfectly equivalent to the original Simplicity code.
On 03.11.2017 13:59, Hampus Sjöberg via bitcoin-dev wrote:
> Thank you for your answer, Russel.
>
> When a code path takes advantage of a jet, does the Simplicity code
> still need to be publicly available/visible in the blockchain? I imagine
> that for big algorithms (say for example EDCA verification/SHA256
> hashing etc), it would take up a lot of space in the blockchain.
> Is there any way to mitigate this?
>
> I guess in a softfork for a jet, the Simplicity code for a jet could be
> defined as "consensus", instead of needed to be provided within every
> script output.
> When the Simplicity interpretor encounters an expression that has a jet,
> it would run the C/Assembly code instead of interpreting the Simplicity
> code. By formal verification we would be sure they match.
>
> Greetings
> Hampus
>
> 2017-11-03 2:10 GMT+01:00 Russell O'Connor via bitcoin-dev
> <bitcoin-dev@lists.linuxfoundation.org
> <mailto:bitcoin-dev@lists.linuxfoundation.org>>:
>
> Hi Jose,
>
> Jets are briefly discussed in section 3.4 of
> https://blockstream.com/simplicity.pdf
> <https://blockstream.com/simplicity.pdf>
>
> The idea is that we can recognize some set of popular Simplicity
> expressions, and when the Simplicity interpreter encounters one of
> these expressions it can skip over the Simplicity interpreter and
> instead directly evaluate the function using specialized C or
> assembly code.
>
> For example, when the Simplicity interpreter encounters the
> Simplicity expression for ECDSA verification, it might directly call
> into libsecp rather than continuing the ECDSA verification using
> interpreted Simplicity.
>
> HTH.
>
>
> On Nov 2, 2017 18:35, "JOSE FEMENIAS CAÑUELO via bitcoin-dev"
> <bitcoin-dev@lists.linuxfoundation.org
> <mailto:bitcoin-dev@lists.linuxfoundation.org>> wrote:
>
> Hi,
>
> I am trying to follow this Simplicity proposal and I am seeing
> all over references to ‘jets’, but I haven’t been able to find
> any good reference to it.
> Can anyone give me a brief explanation and or a link pointing to
> this feature?
> Thanks
>
>> On 31 Oct 2017, at 22:01,
>> bitcoin-dev-request@lists.linuxfoundation.org
>> <mailto:bitcoin-dev-request@lists.linuxfoundation.org> wrote:
>>
>> The plan is that discounted jets will be explicitly labeled as
>> jets in the
>> commitment. If you can provide a Merkle path from the root to
>> a node that
>> is an explicit jet, but that jet isn't among the finite number
>> of known
>> discounted jets,
>
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> <mailto:bitcoin-dev@lists.linuxfoundation.org>
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>
>
>
>
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> <mailto:bitcoin-dev@lists.linuxfoundation.org>
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> <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
>
--
Adán Sánchez de Pedro Crespo
CTO, Stampery Inc.
San Francisco - Madrid
|