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

Reduce memory consumption due to proving key #1966

Closed
tromer opened this issue Dec 23, 2016 · 4 comments
Closed

Reduce memory consumption due to proving key #1966

tromer opened this issue Dec 23, 2016 · 4 comments
Labels
I-performance Problems and improvements with respect to performance memory management special to Daira
Projects

Comments

@tromer
Copy link
Contributor

tromer commented Dec 23, 2016

The proving key currently occupies a a large amount of RAM. Let's figure out exactly how much, and evaluate options for reducing this (possibly at some tradeoff with time). The latter include:

  • mmapping the key into memory (Consider mmap'ping the proving key into memory #890)
  • Just-in-time serialization (and then forgetting) of proving key data
  • Avoiding duplicate allocations
  • Tighter in-memory representation
  • Using EC point compression for in-memory representation

This is in addition, and mostly orthogonal, to changes in the zk-SNARK algorithm (e.g., switching to the Groth'16 construction) or constraints (e.g., hash function).

Related to #416 (on-disk parameter compression).

@tromer
Copy link
Contributor Author

tromer commented Feb 27, 2017

Also related to #647, "single pour input, value commitment scheme", which would reduce the constraint system size and thus proving key size (to roughly half, if the Merkle hash remains SHA256Compress).

@tromer
Copy link
Contributor Author

tromer commented Mar 3, 2017

Other potential constraint-system changes that will reduce the proving key size: #40, #2134, #705, #829.

@tromer
Copy link
Contributor Author

tromer commented Mar 13, 2017

#2171 would reduce the size of the proving key that needs to be loaded into memory at any given execution of the SNARK prover. If the different stages use the same NP statement (see #2171 (comment)) then it would also reduce the total proving key size.

@arielgabizon arielgabizon added this to Big Picture, ongoing, not specific code changes in Performance Jul 3, 2017
@daira
Copy link
Contributor

daira commented Dec 5, 2018

This is much better with Sapling, to the extent that I think this ticket can just be closed.

@daira daira closed this as completed Dec 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-performance Problems and improvements with respect to performance memory management special to Daira
Projects
No open projects
Performance
  
Big Picture, ongoing, not specific co...
Development

No branches or pull requests

3 participants