forked from kobigurk/phase2-bn254
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parallelize Phase2 Contributions and Preparation (#41)
* feat(utils/groth16): read the groth16 parameters in parallel this is useful to reduce the time required to generate the Phase 2 step * feat(utils/groth16): run FFTs in parallel * chore: adjust rest of codebase to use slices for phase2 * feat(phase2): contribute H and L in parallel * feat(bls-snark-setup): contribute in parallel * fix(bls-snark-setup): extend the file by 1 pubkey Due to passing a slice to the contribute function, we need to manually adjust the size of the file (and as a result of the mmap) to include 1 more pubkey (this would not be needed if we just passed the file itself, but then we would not be able to parallelize as well) * fix: use correct pubkey size Previously we used a constant pubkey size which is wrong, since it depends on the curve being used * fix(bls-snark-setup): use the correct phase2 size Previously we were using just the number of constraints, while the required number is the sum of constraints, public inputs and private inputs * chore: deduplicate crossbeam import
- Loading branch information
Showing
14 changed files
with
270 additions
and
153 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ rand = "0.7.3" | |
thiserror = "1.0.11" | ||
hex = "0.4.2" | ||
tracing-subscriber = "0.2.3" | ||
memmap = "0.7.0" |
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.