Closed vlopes11 closed 1 year ago
Merging #752 (4c24a8e) into master (0487cc4) will decrease coverage by
0.26%
. The diff coverage is85.91%
.:exclamation: Current head 4c24a8e differs from pull request most recent head c4fda09. Consider uploading reports for the commit c4fda09 to get more accurate results
This commit introduces
Compiler::compress
andCompiler::decompress
, two functions that will create a compressed representation of a circuit that can be used to generate prover and verifier keys.The compression strategy takes advantage of the fact that circuit representations are sparse; meaning, most of the scalars are zeroes. We also have a higher incidence of
1
and-1
, so any value that is equivalent to ai8
is compressed into a single byte, instead of the regular32
bytes of a bls12-381.This will result in expressive gains in terms of storage. For instance, a
2^12
circuit can be compressed into roughly 100Kb.