Open AllFi opened 1 year ago
I've tried to apply this optimization to the relayer. Here are the results:
Ready, waiting for https://github.com/zkBob/zeropool-relayer/issues/176 to test on staging
@vadimnikonov1 Could you perform regression testing on the stage to confirm that everything is functioning properly?
The regression testing was successful
I have profiled our proving process and discovered that a significant portion of the process involves decompressing and parsing gates.
We can decompress and parse the gates during the parameters initialization phase, which means we can move this process from the proving phase to the initialization phase. Since parameter initialization now takes place in the background, preprocessing will mostly be finished before the first proving in most cases.
I've tried to implement it, and here are some results of the decreased proving time:
But the size of the decompressed gates is huge, it's about 260 MB. Here are some potential drawbacks of this modification:
I think that this optimization makes sense for delegated prover and cloud environments, and may also make sense for PC. However, it is definitely not viable for mobile devices due to their limited memory capacity.
Related PRs:
Note: It is necessary to update
zkbob-cloud
andzkbob-prover
to include the changes introduced in this PR.