zkBob / libzkbob-rs

Apache License 2.0
1 stars 3 forks source link

Add ability to preparse gates #60

Closed AllFi closed 1 year ago

AllFi commented 1 year ago

This pull request adds the feature to decompress and parse gates prior to the proving process. The reason why this can be useful is described in the https://github.com/zkBob/fawkes-crypto/issues/12.

libzkbob-rs-wasm This PR adds an extra flag called precompute to the existing Params.fromBinary and Params.fromBinaryExtended methods. If the precompute flag is set to true, the fromBinary and fromBinaryExtended methods will decompress and parse the gates, which can lead to a faster proving process. However, this also means that the application will consume an additional 260 MB of RAM.

libzkbob-rs-node This PR adds an extra flag called precompute to the existing Params.fromBinary and Params.fromFile methods. If the precompute flag is set to true, the fromBinary and fromFile methods will decompress and parse the gates, which can lead to a faster proving process. However, this also means that the application will consume an additional 1100 MB of RAM (direct deposit circuit is ten times as large).