Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a re-do of #28. # What ❔ This PR implements all the functionality necessary to prove the fflonk compression chain on a GPU, taking the scheduler proof as input and producing a compression proof for the fflonk wrapper. A new method for generating the `GpuSetup` and `VerificationKey` structures using a GPU is also implemented. The fflonk compression chain is made up of 5 circuit proofs, last proof in the chain is the compression proof for the wrapper and uses poseidon 2 over BN254 scalar field for commitment. Proving of the whole chain can be tested with the `run_proof_compression_by_schedule` test. Measurements of proving times on the L4 GPU: compression circuit 1: 0.5 s compression circuit 2: 2.2 s compression circuit 3: 5.8 s compression circuit 4: 22.7 s compression for wrapper circuit: 192.1 s End to end, including loading setup data from disk, producing witnesses etc., the chain can be proven in ~230 seconds. The highest GPU memory requirement is 14.2 GB. **This PR changes shivini's proving API and the `GpuSetup` structure, dependent code will need to be adjusted and serialized gpu setup files will need to be recreated. `GpuSetup::from_setup_and_hints` function was removed, the `gpu_setup_and_vk_from_base_setup_vk_params_and_hints` function was implemented as a replacement.** ## Why ❔ fflonk proofs are cheaper to verify on L1. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `cargo fmt` and linted via `cargo clippy`.
- Loading branch information