There is no commentSelect some text and then click Comment, or simply add a comment to this page from below to start a discussion.
The Halo Effect
The purpose of this note is to explain (also to myself) the main idea in the Halo recursive SNARK construction of Bowe, Grigg and Hopwood https://eprint.iacr.org/2019/1021. In fact, my understanding of the protocol heavily relies on the new paper of Bünz, Chiesa, Mishra and Spooner [BCMS] which fills in many details and generalizes the approach to achieve "Proof Carrying Data Via Accumulation Schemes".
It was known that a special case of this inner product argument gave a polynomial commitment scheme (by taking the second vector to be a power vector of the form ).
Let us call this scheme for brevity the BP-PCS. For the purpose of this note it is not needed to understand the inner workings of BP-PCS. Here are its main good and bad properties:
As opposed to the very popular KZG scheme, it does not require a trusted setup;
and as opposed to the FRI-style schemes it is additively homomorphic, meaning that the sum of commitments to some polynomials is a commitment to the sum of those polynomials, we shall see later that this is very convenient.
On the negative side - The big drawback of BP-PCS is that verification time is linear in the degree .
Halo can be viewed as a partial mitigation of its verification time drawback.
The crucial observation of Halo is:
Lemma: The BP-PCS verifier can be split into two algorithms such that:
runs in time and on top of rejecting or accepting, outputs a pair ; Such that is a polynomial that can be computed in time for any .
consists of solely checking, for the pair output by , whether is the BP-PCS commitment to .
A useful consequence of this lemma is that several BP opening claims can be "compressed into one", as we now explain. By an "opening claim" we mean a tuple that is interpreted as the claim "The prover knows a polynomial such that is the BP commitment to and " (We informally think here of one prover in the background, and all claims being claims of knowledge pertaining to them - see [BCMS] for more formal treatment) By an "opening proof" we mean a proof that can convince the BP-PCS verifier such an opening claim is correct. Corollary:(based on [BCMS]) There is an algorithm that runs in time that given opening claims with opening proofs constructs a new opening claim such that
If are both correct then is correct. Moreover, an opening proof for can be constructed in quasilinear time in , given only .
If one of is not correct then except with neglgible probability is incorrect.
Proof: starts by running the part of the BP verifier on and . If rejects one of the claims outputs . Otherwise, it obtains outputs from 's runs. Now, obtains Fiat-Shamir challenges , e.g. by hashing . Next, it computes where - recall that guarantees to output such that this can indeed be computed in polylogarithmic time. It now computes . outputs the claim . Note that if both claims were true, is a BP commitment to and so is true (as we have explicitly computed as ). Moreover, since the polynomial is explicitly derived just from , a prover can in time quasilinear in the degree , compute a BP proof that is correct.
For the soundness direction, see [BCMS] for a formal proof that when or are incorrect, the prover has negligible chance to come up with a proof that is correct. The basic idea is that, for example, if is false but accepted, is not a commitment to and so is very unlikely to be a commitment to . Thus the prover can only convince us of if he luckily finds some other polynomial whose commitment is, such that happens to agree with on the randomly chosen .
Efficient recursion using deferral/accumulation
Let's see how the above corollary helps us obtain recursive SNARKs. What is usually needed for recursion is the ability to verify claims of the form "There is a valid SNARK proof for statement ". Expressing this statement involves expressing the SNARK verification algorithm operating on the proof . In the recent line of work on SNARKs based on polynomial commitment schemes (Sonic, Marlin, Plonk), the heavy part of the verification algorithm consists of checking opening claims. This would be especially costly to express in a circuit in the BP-PCS case, as the verification time is linear. In fact, the BP-PCS verification circuit will be larger by some constant factor than the circuit it is verifying a claim about - and so recursing by expressing the verifier as a circuit would lead to an explosion in circuit size as recursion depth grows.
The idea in Halo, is instead that the verifier in the middle of the recursive chain will only check that a certain opening claim given as public input, is the right claim to be checked to verify the recursion so far, and defer the actual checking to the final verifier at the end of the recursive chain. The method will ensure the number of checks being deferred stays at a constant (some constant depending on the base SNARK construction used in the recursion), and does not grow with recursion depth.
The advantage is that this verifier, as we shall see below, will only require an application of and thus expressing it in a circuit will be cheap. Let us assume for simplicity that the base SNARK verification only involves checking one opening claim. We thus have that the Halo verifier has to verify an opening claim given to it as public input, and some other opening claim - showing that the SNARK proof for the current circuit is correct (the exact circuit that was verifying is the correct claim to check for the recursion so far) If this is another verifier in the middle of the recursive chain, they will not verify the claims but rather simply run to obtain a new claim they will send to the next verifier down the line. The prover, will in turn compute and send to the next verifier the proof that the claim is indeed correct.