Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate the compression functionality into the prover and network crates #29

Closed
4 tasks
tess-eract opened this issue Jan 4, 2024 · 2 comments
Closed
4 tasks
Assignees

Comments

@tess-eract
Copy link
Contributor

Building from PR #28, we need to add features to the nexus-zkvm prover and network crates to use the compression features in the supernova repo.

PR #28 adds a compressible option to the parameter generation methods which changes the way Nova's public parameters are set up: instead of sampling them, they are processed using a polynomial commitment scheme SRS which is loaded from file. This is required if we want to use compression later for the proof (we might want to make this behavior the default at some point, but it's optional for now to allow flexibility with testing and benchmarking).

Here's a rough outline of what needs to be done to complete this issue:

  • Add a compress command to the top-level CLI (/the network API). This should do two tasks:
    • Handle the parameter setup and r1cs matrix preprocessing for Spartan, using the SNARK::setup() function from supernova. This takes both the Nova public parameters and the PCS's SRS as input, and both of these should be read from file, and creates a SNARKKey object, which should be saved to file.
    • read a proof from file, along with the Spartan parameters generated in the above step, then compress it using the SNARK::compress() function from supernova. Save the result to file: e.g. as an enum which is either a PCDNode or a CompressedPCDProof.
  • Add logic to the prover's verify command to detect whether the proof is compressed or not, and if so, verify it using SNARK::verify(). This uses the SNARKKey object created in the first step above.

Note that only the parallel (PCD) version of Nova supports compression right now.

Note: (as of 1.4.24) we're in the process of merging together the supernova, spartan, and nexus-zkvm repos, and this will be cleaner to work on once that is completed. At the moment, the integration with spartan is done inside of supernova's PR #33, so this is the version of supernova that we need to use here. The integration is behind the spartan feature-flag. Working with the various private repos at the same time causes some headaches. In particular, the version of the committed-relaxed-spartan repo used here needs to match the version used in supernova. We don't yet have the ssh keys for the spartan repo saved in the secret store here, which means that for this to build, we need to point the Cargo.toml here to rev 92e884c of supernova rather than the head of the dorebell-spartan-integration branch. Once the repos (and the integration pr) are merged, we won't need to worry about this anymore. However, it should be safe to work on this issue locally before we finish merging if you can get it to build.

@tess-eract tess-eract linked a pull request Jan 4, 2024 that will close this issue
govereau pushed a commit that referenced this issue Jan 5, 2024
* pull ark-linear-sumcheck

* clippy

* absorb challenges

* make sumcheck::prove infallible

* add list len to verifier key

* comment
@tess-eract tess-eract reopened this Jan 8, 2024
govereau pushed a commit that referenced this issue Jan 9, 2024
* pull ark-linear-sumcheck

* clippy

* absorb challenges

* make sumcheck::prove infallible

* add list len to verifier key

* comment
Copy link

linear bot commented Jan 25, 2024

NEX-54 Integrate the compression functionality into the prover and network crates

Upgrade the CLI tools to support compression with appropriate flags

@slumber
Copy link
Contributor

slumber commented Jun 6, 2024

Implemented

@slumber slumber closed this as completed Jun 6, 2024
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants