The Ethereum Foundation (EF) and Mina Foundation (MF) would like to announce a Request for Proposals (RfP) for the design and implementation of a mechanism to verify the Pickles SNARK on Ethereum.
Direct verification of this SNARK on the EVM appears to be too costly. Thus, we are accepting proposals for systems that may perform some preprocessing on the Pickles SNARK (e.g., by computing a STARK that verifies the Pickles SNARK which itself may be efficiently verified on the EVM).
The goal of this is (1) to enable full-verification of the Mina blockchain on Ethereum to enable inter-op between the two chains, and (2) to enable applications more generally to use recursive SNARKs on Ethereum.
Let
\begin{align*} p &= 2^{254} + 45560315531419706090280762371685220353 \\ q &= 2^{254} + 45560315531506369815346746415080538113 \\ \mathbb{G}_1 &= \left\{ (x, y) \in \mathbb{F}_p \mid y^2 = x^3 + 5 \right\} \\ \mathbb{G}_2 &= \left\{ (x, y) \in \mathbb{F}_q \mid y^2 = x^3 + 5 \right\} \\ n_1 = 17 \\ n_2 = 16 \end{align*}
Note that \(|\mathbb{G}_1| = q\) and \(|\mathbb{G}_2| = p\).
The Pickles SNARK verifier as used in Mina has several components
Step 4 is very unlikely to be efficiently computed directly on EVM, unless the computation is split over several blocks. As an alternative, we suggest grant recipients produce an additional proof (e.g., a AIR-based STARK or a BN128-based SNARK) which verifies the computation of that step.
A Rust implementation of the Pickles verifier can be found here. It makes a procedure call to verify the underlying polynomial commitment opening, which code is located here.
As mentioned above, the most expensive part of the verifier, and the part which would likely have to be verified in an auxiliary proof-system outside of EVM, is two MSMs. In this section, we describe these MSMs in more detail. Let \(\mathbb{G}_k\) be one of the two curves defined above and let \(\mathbb{F}\) be its scalar field. Let \(\phi \colon \{ 0, 1 \}^{128} \to \mathbb{F}\) be the algorithm defined by to_field
here.
Given an integer \(i < 2^{n_k}\), define \(\mathsf{bits}(i)\) to be the little-endian bit array of length \(n\) representing the binary expansion of \(i\).
From a given Pickles SNARK, one will derive a sequence of challenges \(c_0, \dots, c_{n_k - 1} \in \{ 0, 1 \}^{128}\). The associated MSM is
\[
\sum_{i = 0}^{2^{n_k} - 1} s_i G_i = H
\]
where
\[
s_i := \prod_{\substack{0 \leq j < n_k \\ \mathsf{bits}(i)[j] = 1}} \phi(c_j)
\]
and where \(G_0, \dots, G_{2^{n_k} - 1} \in \mathbb{G}\) is a fixed sequence of group elements as generated by this algorithm.
The sequence of scalars \(\left\{ s_i \right\}_{0 \leq i < 2^{n - 1}}\) can be reordered in such a way that each term can be obtained by the previous by at most one multiplication and one division. If one also reorders the fixed sequence of bases \(\left\{ {G}_i \right\}_{0 \leq i < 2^{n - 1}}\) accordingly, this makes the MSM \(\sum_i s_i {G}_i\) well suited to verifying with an AIR-based STARK, since the computation can be expressed as a loop in which each iteration is very efficiently expressed as an arithmetic computation (modulo lookups in a fixed lookup table).
The github commit of the code which will serve as the spec will be determined at the beginning of the project. The code is developed in the open at https://github.com/o1-labs/marlin and https://github.com/minaprotocol/mina/.
The entire process can be summarised as follows:
The proposed timeline of the engagement is approximately 6 months.
Members of the EF and the MF will be available at all times to answer questions and comments during planning and implementation in order to make life as easy as possible for the vendor.
Deliverable will take the form of
aux-proof-gen
that takes as input a Mina blockchain-state and associated Pickles SNARK and produces an auxiliary proof. It must be possible to run this program in less than 15 minutes on a cloud instance with at most 16 cores and 32 GB of memory.aux-proof-verify
that has an internal state corresponding to the Mina blockchain state, and which can be set to a new state only if one provides an auxiliary proof that verifies. The contract should use at most 5M gas.aux-proof-gen
that verifies on aux-proof-verify
with state \(s\) if and only if one posseses a Pickles SNARK associated to state \(s\).Based on the timeline of this RfP, the chosen vendor will be expected to submit 2 invoices:
The vendor will be given the option to be paid in Fiat money (via bank transfer), ETH, or MINA.
If the vendor chooses to be paid in ETH, the value of ETH described under the agreement will be the value in USD at NYSE closing time (4 PM EST) on the day prior to the due date (as described at https://www.coingecko.com).
If the vendor chooses to be paid in MINA, the value of MINA described under the agreement will be either:
The selected vendor will have significant expertise in the areas necessary to meet the needs and requirements set forth in this RfP. Particularly:
Upon reception of this request, interested vendors are expected to confirm receipt and intention to bid on the engagement.
In this confirmation, they should explain what they need from us in order to get started. As well as bring attention to areas in which they feel they do not have significant expertise. We will use this information to try to provide appropriate entrance material for the engagement.
Proposals must be submitted before March 31st, 2021 at 5pm PST. We expect to take 1 week to deliberate and respond.
Please send initial confirmations, and proposals (in PDF format) to the following address: rfp@ethereum.org
Feel free to send us any questions you may have: rfp@ethereum.org