summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdán Sánchez de Pedro Crespo <adan@stampery.co>2017-11-03 17:42:38 +0100
committerbitcoindev <bitcoindev@gnusha.org>2017-11-03 16:42:44 +0000
commit22c50bd375c301ef619aab3029aa5ff08cfda0ef (patch)
tree8fc2f3ba8bf77bdb3fdc5f63c6079de7d4902cf9
parentbfdcfef9a73754437ee8fb561347c310318afb0b (diff)
downloadpi-bitcoindev-22c50bd375c301ef619aab3029aa5ff08cfda0ef.tar.gz
pi-bitcoindev-22c50bd375c301ef619aab3029aa5ff08cfda0ef.zip
Re: [bitcoin-dev] Simplicity proposal - Jets?
-rw-r--r--ef/7e054f1662ba3d7769e4a15e7898c0ccf0bc67208
1 files changed, 208 insertions, 0 deletions
diff --git a/ef/7e054f1662ba3d7769e4a15e7898c0ccf0bc67 b/ef/7e054f1662ba3d7769e4a15e7898c0ccf0bc67
new file mode 100644
index 000000000..adb65d624
--- /dev/null
+++ b/ef/7e054f1662ba3d7769e4a15e7898c0ccf0bc67
@@ -0,0 +1,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
+