-
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 #38
Merged
feat!: fflonk #38
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
previously approved these changes
Oct 24, 2024
saitima
previously approved these changes
Oct 29, 2024
robik75
force-pushed
the
rr/fflonk
branch
5 times, most recently
from
October 30, 2024 07:44
d17af9e
to
300d736
Compare
saitima
previously approved these changes
Oct 30, 2024
saitima
approved these changes
Oct 31, 2024
robik75
pushed a commit
that referenced
this pull request
Oct 31, 2024
🤖 I have created a release *beep* *boop* --- ## [0.152.0](v0.151.1...v0.152.0) (2024-10-31) ### ⚠ BREAKING CHANGES * fflonk ([#38](#38)) ### Features * fflonk ([#38](#38)) ([33ed62a](33ed62a)) --- 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]>
saitima
added a commit
that referenced
this pull request
Oct 31, 2024
# What ❔ Implements fflonk protocol for the cuda. ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. ## Prerequisites - [PR matter-labs/zksync-crypto#11](matter-labs/zksync-crypto#11) - [PR #38 ] --------- Co-authored-by: Michael Carilli <[email protected]> Co-authored-by: zksync-era-bot <[email protected]> Co-authored-by: zksync-era-bot <[email protected]> Co-authored-by: Robert Remen <[email protected]> Co-authored-by: Daniyar Itegulov <[email protected]>
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.
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
andVerificationKey
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, thegpu_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
cargo fmt
and linted viacargo clippy
.