-
Notifications
You must be signed in to change notification settings - Fork 85
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
Upgrade to v0.4.0 #94
Open
TakodaS
wants to merge
40
commits into
arkworks-rs:master
Choose a base branch
from
TakodaS:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2e93ba9
updated deps
TakodaS a4b81ef
implemented canonical serialization
TakodaS c7ae172
moved sponge and fiat shamir in
TakodaS 4d616f4
changed dependencies to ark_r1cs lib and fixes
TakodaS 5d6d7d0
checkin
TakodaS aa666b5
serialize mostly done
TakodaS 9bdd8a2
readd old rng mod
TakodaS 71a603b
remove pedanticerrors temporarily
TakodaS c3dbc05
updated realtive to poly-commit-v0.4
TakodaS cbf5a4a
implemented poseidon as rng
TakodaS d860a91
added default and spong methods
TakodaS 66a6786
LabelledCommitment does not implement CanonicalSerialize
TakodaS 9ab0b3e
builds!
TakodaS e85c8fc
tests building
TakodaS d805506
to unlabeled commit
TakodaS 1df70b3
outlinign test pass
TakodaS 8a91943
revert to ark poly commit
TakodaS d1b8e51
bench building
TakodaS b5071fc
fmt and fix
TakodaS fed7d03
imports
TakodaS 0c57285
unmodified .gitignore
TakodaS f07a64d
updated changelog
TakodaS 8b55468
removed unnecessary r1cs-std dependency
TakodaS a976a89
removed extraneous tracing dep
TakodaS 0e07083
changed order of generics for consistency
TakodaS f03a658
easy changes
TakodaS 127dc2f
refactor RNG initialization
TakodaS 6f11b89
before test
TakodaS 2a70370
removed some hardcoded poseidon config parameters
TakodaS a2c56bf
semi implemented sponge methods
TakodaS cfefa0f
native absorption of field elements
TakodaS f2152b3
tests passing
TakodaS 6b18bba
benches running
TakodaS a3d9ba6
removed to_bytes!
TakodaS 3f886a9
cargo fix+fmt
TakodaS 11bd766
removed unnecessary trait
TakodaS c5ab30b
reintroduce optimization of tests after debugging
TakodaS 788a34e
update changelog
TakodaS 093fdcc
added fast_prove and verify methods
TakodaS 6a071f7
added test of fast_proof and fast_verify
TakodaS 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
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,6 @@ | ||
[package] | ||
name = "ark-marlin" | ||
version = "0.3.0" | ||
version = "0.4.0" | ||
authors = [ | ||
"Alessandro Chiesa <[email protected]>", | ||
"Mary Maller <[email protected]>", | ||
|
@@ -17,28 +17,31 @@ keywords = ["cryptography", "commitments", "zkSNARK"] | |
categories = ["cryptography"] | ||
include = ["Cargo.toml", "src", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] | ||
license = "MIT/Apache-2.0" | ||
edition = "2018" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
ark-serialize = { version = "^0.3.0", default-features = false, features = [ "derive" ] } | ||
ark-ff = { version = "^0.3.0", default-features = false } | ||
ark-std = { version = "^0.3.0", default-features = false } | ||
ark-poly = { version = "^0.3.0", default-features = false } | ||
ark-relations = { version = "^0.3.0", default-features = false } | ||
ark-poly-commit = { version = "^0.3.0", default-features = false } | ||
ark-serialize = { version = "^0.4.0", default-features = false, features = [ "derive" ] } | ||
ark-ff = { version = "^0.4.0", default-features = false } | ||
ark-ec = { version = "^0.4.0", default-features = false } | ||
ark-std = { version = "^0.4.0", default-features = false } | ||
ark-poly = { version = "^0.4.0", default-features = false } | ||
ark-relations = { version = "^0.4.0", default-features = false } | ||
ark-poly-commit = { version = "^0.4.0", default-features = false } | ||
ark-crypto-primitives = { version = "^0.4.0", default-features = false, features = [ "r1cs" ] } | ||
|
||
rayon = { version = "1", optional = true } | ||
digest = { version = "0.9" } | ||
derivative = { version = "2", features = ["use_core"] } | ||
itertools = "0.11.0" | ||
|
||
[dev-dependencies] | ||
rand_chacha = { version = "0.3.0", default-features = false } | ||
rand_chacha = { version = "^0.3.0", default-features = false } | ||
blake2 = { version = "0.9", default-features = false } | ||
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = [ "curve" ] } | ||
ark-mnt4-298 = { version = "^0.3.0", default-features = false, features = ["r1cs", "curve"] } | ||
ark-mnt6-298 = { version = "^0.3.0", default-features = false, features = ["r1cs"] } | ||
ark-mnt4-753 = { version = "^0.3.0", default-features = false, features = ["r1cs", "curve"] } | ||
ark-mnt6-753 = { version = "^0.3.0", default-features = false, features = ["r1cs"] } | ||
ark-bls12-381 = { version = "^0.4.0", default-features = false, features = [ "curve" ] } | ||
ark-mnt4-298 = { version = "^0.4.0", default-features = false, features = ["r1cs", "curve"] } | ||
ark-mnt6-298 = { version = "^0.4.0", default-features = false, features = ["r1cs"] } | ||
ark-mnt4-753 = { version = "^0.4.0", default-features = false, features = ["r1cs", "curve"] } | ||
ark-mnt6-753 = { version = "^0.4.0", default-features = false, features = ["r1cs"] } | ||
|
||
[profile.release] | ||
opt-level = 3 | ||
|
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 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,11 +6,8 @@ use crate::BTreeMap; | |||||||||||||||||||
use ark_ff::{Field, PrimeField}; | ||||||||||||||||||||
use ark_poly::{EvaluationDomain, Evaluations as EvaluationsOnDomain, GeneralEvaluationDomain}; | ||||||||||||||||||||
use ark_relations::{lc, r1cs::ConstraintSystemRef}; | ||||||||||||||||||||
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, SerializationError}; | ||||||||||||||||||||
use ark_std::{ | ||||||||||||||||||||
cfg_iter_mut, | ||||||||||||||||||||
io::{Read, Write}, | ||||||||||||||||||||
}; | ||||||||||||||||||||
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize}; | ||||||||||||||||||||
use ark_std::cfg_iter_mut; | ||||||||||||||||||||
use derivative::Derivative; | ||||||||||||||||||||
|
||||||||||||||||||||
/* ************************************************************************* */ | ||||||||||||||||||||
|
@@ -291,13 +288,18 @@ pub(crate) fn make_matrices_square_for_prover<F: PrimeField>(cs: ConstraintSyste | |||||||||||||||||||
|
||||||||||||||||||||
#[cfg(test)] | ||||||||||||||||||||
mod tests { | ||||||||||||||||||||
use crate::SimplePoseidonRng; | ||||||||||||||||||||
|
||||||||||||||||||||
use super::*; | ||||||||||||||||||||
use ark_crypto_primitives::sponge::CryptographicSponge; | ||||||||||||||||||||
use ark_relations::r1cs::Matrix; | ||||||||||||||||||||
use ark_std::{collections::BTreeMap, UniformRand}; | ||||||||||||||||||||
use ark_std::collections::BTreeMap; | ||||||||||||||||||||
|
||||||||||||||||||||
use ark_bls12_381::Fr as F; | ||||||||||||||||||||
use ark_ff::{One, Zero}; | ||||||||||||||||||||
use ark_poly::EvaluationDomain; | ||||||||||||||||||||
use itertools::Itertools; | ||||||||||||||||||||
use rand_chacha::rand_core::RngCore; | ||||||||||||||||||||
|
||||||||||||||||||||
fn entry(matrix: &Matrix<F>, row: usize, col: usize) -> F { | ||||||||||||||||||||
matrix[row] | ||||||||||||||||||||
|
@@ -372,10 +374,15 @@ mod tests { | |||||||||||||||||||
.zip(output_domain.batch_eval_unnormalized_bivariate_lagrange_poly_with_same_inputs()) | ||||||||||||||||||||
.collect(); | ||||||||||||||||||||
|
||||||||||||||||||||
let mut rng = ark_std::test_rng(); | ||||||||||||||||||||
let eta_a = F::rand(&mut rng); | ||||||||||||||||||||
let eta_b = F::rand(&mut rng); | ||||||||||||||||||||
let eta_c = F::rand(&mut rng); | ||||||||||||||||||||
let mut rng_seed = ark_std::test_rng(); | ||||||||||||||||||||
let mut rng: SimplePoseidonRng<F> = SimplePoseidonRng::default(); | ||||||||||||||||||||
rng.absorb(&rng_seed.next_u64()); | ||||||||||||||||||||
let (eta_a, eta_b, eta_c) = rng | ||||||||||||||||||||
.squeeze_field_elements(3) | ||||||||||||||||||||
.iter() | ||||||||||||||||||||
.map(|x: &F| x.to_owned()) | ||||||||||||||||||||
.collect_tuple() | ||||||||||||||||||||
.unwrap(); | ||||||||||||||||||||
Comment on lines
+380
to
+385
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
for (k_index, k) in interpolation_domain.elements().enumerate() { | ||||||||||||||||||||
let row_val = joint_arith.row.evaluate(&k); | ||||||||||||||||||||
let col_val = joint_arith.col.evaluate(&k); | ||||||||||||||||||||
|
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.
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.
I will probably have to remove this to pass the no-std test.