forked from arkworks-rs/snark
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Algebra OCL integration #81
Closed
Closed
Changes from 64 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
c0aa61f
Integration with ginger-algebra-ocl: MSM
phoinic ac3368e
FFT GPU integration
phoinic 338827d
GPU FFT bugfix
phoinic 83ae8f7
Change FFT test to BLS
phoinic 3f6facc
GPU unit-tests adjusted
phoinic ab4e5fe
Bellperson renamed to algenra-cl-gen
phoinic 4899a3f
Bellperson renamed to algenra-cl-gen
phoinic 9073e3f
Polycommit module implemented
phoinic e6bb468
Panic messaging fixed
phoinic 4b86eff
Templating approach changed for polycommit reduce
phoinic e98e2ff
Set min limit to invoke GPU
phoinic 9973807
Linking packages to GIT
phoinic 612aa96
Dependency import bugfix
phoinic 82a54c1
Tweedle curve added
phoinic e7f7e91
Tweedle implementation bugfixes
phoinic 2edeafc
Benches migrated from Zexe
phoinic 6e5b3e2
ASM feature added to algebra-utils
phoinic 59c804e
Benches bugfix
phoinic d64045e
Add tweedle to r1cs-std
phoinic 0a1937c
log2 function added
phoinic 5069ae1
Merge with 'all'
phoinic 30bc437
log2_floor call bugfix
phoinic 8c58de7
Dependency usage bugfix
phoinic d04c424
Polycommit removed from ginger-lib
phoinic dc5dd2a
Reduce groth16 bench to 2^22 max
phoinic 44826d5
MSM switched to affine
phoinic 8d33e68
Call parameter bugfix
2b31a1f
Curves features updated
phoinic 606a9c0
Merge branch 'algebra_ocl' of github.com:HorizenOfficial/ginger-lib i…
phoinic f87de26
algebra utils path bugfix
phoinic 04e59f0
algebra utils path bugfix
phoinic df06696
Implementation of Poseidon Hash for Tweedle
mkaihara 08b63b3
ginger-algebra-ocl branch switched
phoinic 2344d88
Updated dependencies
DanieleDiBenedetto 3afbdf2
Merge branch 'all' into algebra_ocl
DanieleDiBenedetto e9b317d
Merge branch 'all' into algebra_ocl
DanieleDiBenedetto 9849e49
Reverted algebra dependencies to be specified in git form
DanieleDiBenedetto fa67f2a
AlgebraicSponge primitive and gadgets for Poseidon + tests refactoring
DanieleDiBenedetto 35d8113
Merge branch 'all' into algebra_ocl
DanieleDiBenedetto 5df4e63
Changed squeeze logic
DanieleDiBenedetto a0b423f
Merge branch 'all' into algebra_ocl
DanieleDiBenedetto fb60c47
Unit-tests and small bugfixes
phoinic de55c1c
Merge branch 'algebra_ocl' of github.com:HorizenOfficial/ginger-lib i…
phoinic 7b6376c
Local development cargo settings
phoinic 7a491d1
msm for cpu with optimized window sizes
mkaihara 52ee7bc
Affine feature typo fixed and same curve for GPU and CPU tests is used
phoinic f756ac4
Removing crossbeam dependency
phoinic 4865d36
Separate tests for CPU and GPU
phoinic c71c48f
Tweedle fields unit-tests: base
phoinic 93e29df
Tweedle unit-tests
phoinic 4bacbe9
Revert "Merge branch 'all' into algebra_ocl"
DanieleDiBenedetto d5d44f2
Revert "Merge branch 'all' into algebra_ocl"
DanieleDiBenedetto e2cfa15
Revert "Merge branch 'all' into algebra_ocl"
DanieleDiBenedetto 649337c
Revert "Merge branch 'all' into algebra_ocl"
DanieleDiBenedetto 464969d
Resolved conflicts after merging with msm_cpu
mkaihara 171f101
Resolved conflicts from merging poseidon_tweedle
mkaihara 683462b
Minor correction on variable_base
mkaihara a18ce2f
Changed benches for msm
mkaihara a2f7488
Changed benches MSM
mkaihara 77bd942
MSM issues bugfix
phoinic 4052bf4
Refactored MSM tests
DanieleDiBenedetto 03bcf6b
Disabled multi_scalar_mul_affine_sd_c function
DanieleDiBenedetto 691ad91
Added MHT parameters for TweedleFr.
942f678
Added MHT parameters for TweedleFq.
5c59592
Remove custom definition for MSM
phoinic 5666b47
Add tweedle to r1cs
phoinic c0764d4
ToConstraintFieldGadget trait implementation for SWAffineGadget
phoinic ba0e2d7
ToBytes / FromBytes implementation for polynomials
phoinic a1d2f0e
Parameters converted to hex representation
phoinic 47a86da
Added get_leaves() function to InMemoryOptimizedMHT
DanieleDiBenedetto 35d5bf6
Change visibility of get_leaves() function
DanieleDiBenedetto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
/.vscode | ||
|
||
target | ||
Cargo.lock | ||
*.idea | ||
*.iml | ||
*.orig | ||
primitives/src/merkle_tree/field_based_mht/smt/rocksdb_storage/* | ||
|
||
coeffs_* | ||
msm_bases_* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
[package] | ||
name = "algebra-utils" | ||
version = "0.1.0" | ||
authors = [ | ||
"Sean Bowe", | ||
"Alessandro Chiesa", | ||
"Matthew Green", | ||
"Ian Miers", | ||
"Pratyush Mishra", | ||
"Howard Wu", | ||
"Daniele Di Benedetto <[email protected]>", | ||
"Marcelo Kaihara <[email protected]>", | ||
"Ulrich Haboeck <[email protected]>" | ||
] | ||
description = "A library for finite fields, elliptic curves and FFTs evaluation over prime finite fields" | ||
include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] | ||
license = "MIT/Apache-2.0" | ||
edition = "2018" | ||
|
||
################################# Dependencies ################################ | ||
|
||
[dependencies] | ||
algebra = { git = "https://github.com/HorizenOfficial/ginger-lib", branch = "algebra_ocl", features = [ "parallel" ] } | ||
|
||
rand = { version = "0.7" } | ||
|
||
rayon = { version = "1", optional = true } | ||
|
||
# gpu feature | ||
algebra-kernels = { git = "https://github.com/HorizenOfficial/ginger-algebra-ocl", branch = "ginger_ocl", optional = true } | ||
algebra-cl-gen = { git = "https://github.com/HorizenOfficial/ginger-algebra-ocl", branch = "ginger_ocl", optional = true } | ||
|
||
[dev-dependencies] | ||
blake2 = "0.7" | ||
criterion = "0.3.3" | ||
rand_xorshift = { version = "0.2" } | ||
paste = "1.0" | ||
bench-utils = { path = "../bench-utils" } | ||
algebra-utils = { path = "../algebra-utils", features = ["dev"] } | ||
|
||
[features] | ||
default = [ "parallel", "fft", "msm_affine" ] | ||
dev = [ "bls12_381", "bn_382", "tweedle", "mnt4_753", "mnt6_753" ] | ||
|
||
parallel = [ "rayon" ] | ||
fft = [] | ||
msm_affine = [] | ||
gpu = [ "parallel", "algebra-kernels", "algebra-cl-gen" ] | ||
llvm_asm = [ "algebra/llvm_asm" ] | ||
|
||
bls12_377 = [ "algebra-kernels/bls12_377", "algebra/bls12_377" ] | ||
bls12_381 = [ "algebra-kernels/bls12_381", "algebra/bls12_381" ] | ||
edwards_bls12 = [ "algebra-kernels/edwards_bls12", "algebra/edwards_bls12" ] | ||
edwards_sw6 = [ "algebra-kernels/edwards_sw6", "algebra/edwards_sw6" ] | ||
jubjub = [ "algebra-kernels/jubjub", "algebra/jubjub" ] | ||
sw6 = [ "algebra-kernels/sw6", "algebra/sw6" ] | ||
mnt4_753 = [ "algebra-kernels/mnt4_753", "algebra/mnt4_753" ] | ||
mnt6_298 = [ "algebra-kernels/mnt6_298", "algebra/mnt6_298" ] | ||
mnt6_753 = [ "algebra-kernels/mnt6_753", "algebra/mnt6_753" ] | ||
bn_382 = [ "algebra-kernels/bn_382", "algebra/bn_382" ] | ||
tweedle = [ "algebra-kernels/tweedle", "algebra/tweedle" ] | ||
|
||
[build-dependencies] | ||
rustc_version = "0.2" | ||
|
||
[[bench]] | ||
name = "fft_bn382" | ||
path = "benches/fft/fft_bn382.rs" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "fft_tweedle" | ||
path = "benches/fft/fft_tweedle.rs" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "variable_msm_bn382" | ||
path = "benches/msm/variable_msm_bn382.rs" | ||
harness = false | ||
|
||
[[bench]] | ||
name = "variable_msm_tweedle" | ||
path = "benches/msm/variable_msm_tweedle.rs" | ||
harness = false |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we put the URLs in each Cargo.toml of the project, so we can as well delete this.
Weren't you able to find any other solution ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually what you see in Cargo.toml now - is the only "solution" I found for more effective development. I am uncommenting these lines in all repos, and local folders instead of GIT urls are used. In case of mixing local paths and GIT urls I am getting the incompatibility error in all combinations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add some instructions on the readme.MD to explain this and open an issue