-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Remove VK computation Pg prover flow; improve benchmark to …
…reflect possible optimization (#4639) Closes AztecProtocol/barretenberg#833. Properly separate prover and verifier information in the implemented Protogalaxy protocol according to the paper. The prover now returns a folded `ProverInstance` and the verifier a folded `VerifierInstance`. Previously the structure of the `ProverInstance` contained also information only relevant for the `VerifierInstance` (i.e. the verification key). With this separation, the prover doesn't need to send the previous verifier accumulator through the transcript anymore. Furthermore, this PR refactors the ClientIVC to work with this change (enabling precomputation of verification keys) as well as the recursive folding and decider verifiers. The latter required creating a stdlib counterpart of `VeriferInstance` since the previous verifier accumulator (\phi*) is now received from the previous folding iteration. The PR also implements an optimization that is possible in the application client IVC scheme that was not previously reflected in our benchmarks. Namely, it is possible for the IVC provers first fold to be a function circuit-function circuit fold. This means that we can remove one kernel iteration (including the construction of the kernel's witnesses and the protgalaxy prover execution). Bechmarks follow. Note: looking at just the difference in commitment times, we have observed that the commitment cost was reduced by 4s. # Benchmarks ## Before ``` Benchmarking lock created at ~/BENCHMARK_IN_PROGRESS. ivc_bench 100% 16MB 65.3MB/s 00:00 2024-02-23T15:02:49+00:00 Running ./ivc_bench Run on (16 X 3000 MHz CPU s) CPU Caches: L1 Data 32 KiB (x8) L1 Instruction 32 KiB (x8) L2 Unified 1024 KiB (x8) L3 Unified 36608 KiB (x1) Load Average: 5.87, 2.74, 1.08 ---------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------- IvcBench/Full/6 39833 ms 37395 ms 1 Benchmarking lock deleted. ``` ## After ``` ivc_bench 100% 16MB 61.5MB/s 00:00 2024-02-23T15:00:54+00:00 Running ./ivc_bench Run on (16 X 3000 MHz CPU s) CPU Caches: L1 Data 32 KiB (x8) L1 Instruction 32 KiB (x8) L2 Unified 1024 KiB (x8) L3 Unified 36608 KiB (x1) Load Average: 0.17, 0.36, 0.17 ---------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------- IvcBench/Full/6 32817 ms 31790 ms 1 ``` --------- Co-authored-by: ludamad <[email protected]> Co-authored-by: codygunton <[email protected]>
- Loading branch information
1 parent
b0bc772
commit c1709b3
Showing
43 changed files
with
930 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.