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

Download JoinSplit Groth16 verification parameters and load them from disk #3037

Closed
5 tasks
dconnolly opened this issue Nov 8, 2021 · 4 comments · Fixed by #3085
Closed
5 tasks

Download JoinSplit Groth16 verification parameters and load them from disk #3037

dconnolly opened this issue Nov 8, 2021 · 4 comments · Fixed by #3085
Assignees
Labels
A-consensus Area: Consensus rule updates NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) NU-1 Sapling Network Upgrade: Sapling specific tasks

Comments

@dconnolly
Copy link
Contributor

dconnolly commented Nov 8, 2021

Motivation

In order to verify Sprout JoinSplit-on-Groth16 proofs, we need to load the public verification parameters, which are several hundred MB in size.

Specifications

Designs

Design Questions

Where do we store the parameters?

  • Zebra already has a cache directory for its database

How do we avoid loading them in tests that don't need them?

How do we test this code without downloading 500 MB?

Related Work

#3038

@dconnolly dconnolly added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Nov 8, 2021
@dconnolly dconnolly added this to the 2021 Sprint 23 milestone Nov 8, 2021
@dconnolly dconnolly added A-consensus Area: Consensus rule updates NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) NU-1 Sapling Network Upgrade: Sapling specific tasks P-Medium and removed C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Nov 8, 2021
@dconnolly
Copy link
Contributor Author

@teor2345 teor2345 changed the title Load JoinSplit Groth16 verification parameters from disk Download JoinSplit Groth16 verification parameters and load them from disk Nov 8, 2021
@str4d
Copy link
Contributor

str4d commented Nov 15, 2021

Where do we store the parameters?

If you look for / use the same folder as zcashd then you may be able to avoid downloading anything at all: ~/.zcash-params. Likewise, if you download to there, then zcashd will also Just Work without any downloading.

I had grand plans to also enable zcashd to find the parameters at other predictable locations (so e.g. providing the parameters as a separate Debian package for Debian installs, that could be shared between projects), but never got around to it; we could pick this back up.

@str4d
Copy link
Contributor

str4d commented Nov 15, 2021

The issue I was thinking of is zcash/zcash#3147

@teor2345
Copy link
Contributor

Where do we store the parameters?

If you look for / use the same folder as zcashd then you may be able to avoid downloading anything at all: ~/.zcash-params. Likewise, if you download to there, then zcashd will also Just Work without any downloading.

This is the solution I settled on in PR #3057.

I had grand plans to also enable zcashd to find the parameters at other predictable locations (so e.g. providing the parameters as a separate Debian package for Debian installs, that could be shared between projects), but never got around to it; we could pick this back up.

This is out of scope for our current sprints - we're focused on validating Sprout before NU5 mainnet activation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Consensus rule updates NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) NU-1 Sapling Network Upgrade: Sapling specific tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants