-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: fflonk #28
Merged
feat!: fflonk #28
Conversation
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
saitima
approved these changes
Oct 10, 2024
Merged
0xVolosnikov
pushed a commit
that referenced
this pull request
Oct 18, 2024
🤖 I have created a release *beep* *boop* --- ## [0.151.0](v0.150.9...v0.151.0) (2024-10-18) ### ⚠ BREAKING CHANGES * fflonk ([#28](#28)) ### Features * Bump `zksync-protocol` to 0.150.6 ([#34](#34)) ([43704f3](43704f3)) * enable compilation without Bellman CUDA ([#31](#31)) ([39860f5](39860f5)) * fflonk ([#28](#28)) ([acd71d8](acd71d8)) ### Bug Fixes * Attempt to pin github runner to 22.04.1 ([#36](#36)) ([ddb7311](ddb7311)) ### Reverts * "feat!: fflonk" ([#33](#33)) ([dccaaa6](dccaaa6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <[email protected]>
robik75
added a commit
that referenced
this pull request
Oct 31, 2024
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`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.Why ❔
fflonk proofs are cheaper to verify on L1.
Checklist
cargo fmt
and linted viacargo clippy
.