Skip to content

Commit

Permalink
Release v0.3.0 (#80)
Browse files Browse the repository at this point in the history
* Release v0.3.0

* fmt
  • Loading branch information
weikengchen authored Jun 7, 2021
1 parent 3b88b97 commit 93afc99
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 23 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# CHANGELOG

## Pending
- MarlinPC's `supported_degree` fix.

### Breaking changes

Expand All @@ -8,3 +9,19 @@
### Improvements

### Bug fixes

## v0.3.0

### Breaking changes

- [\#78](https://github.com/arkworks-rs/poly-commit/pull/78) Fix MarlinPC's CommitterKey to return the correct `supported_degree`.

### Features

### Improvements

### Bug fixes

## v0.2.0

- initial release of `ark-poly-commit`.
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ark-poly-commit"
version = "0.2.0"
version = "0.3.0"
authors = [
"Alessandro Chiesa <[email protected]>",
"Mary Maller <[email protected]>",
Expand All @@ -21,15 +21,15 @@ license = "MIT/Apache-2.0"
edition = "2018"

[dependencies]
ark-serialize = { version = "^0.2.0", default-features = false, features = [ "derive" ] }
ark-ff = { version = "^0.2.0", default-features = false }
ark-ec = { version = "^0.2.0", default-features = false }
ark-poly = {version = "^0.2.0", default-features = false }
ark-serialize = { version = "^0.3.0", default-features = false, features = [ "derive" ] }
ark-ff = { version = "^0.3.0", default-features = false }
ark-ec = { version = "^0.3.0", default-features = false }
ark-poly = {version = "^0.3.0", default-features = false }

ark-std = { version = "^0.2.0", default-features = false }
ark-relations = { version = "^0.2.0", default-features = false, optional = true }
ark-r1cs-std = { version = "^0.2.0", default-features = false, optional = true }
ark-nonnative-field = { version = "^0.2.0", default-features = false, optional = true }
ark-std = { version = "^0.3.0", default-features = false }
ark-relations = { version = "^0.3.0", default-features = false, optional = true }
ark-r1cs-std = { version = "^0.3.0", default-features = false, optional = true }
ark-nonnative-field = { version = "^0.3.0", default-features = false, optional = true }
hashbrown = { version = "0.9", optional = true }

digest = "0.9"
Expand All @@ -39,9 +39,9 @@ derivative = { version = "2", features = [ "use_core" ] }
tracing = { version = "0.1", default-features = false, features = [ "attributes" ] }

[dev-dependencies]
ark-ed-on-bls12-381 = { version = "^0.2.0", default-features = false }
ark-bls12-381 = { version = "^0.2.0", default-features = false, features = [ "curve" ] }
ark-bls12-377 = { version = "^0.2.0", default-features = false, features = [ "curve" ] }
ark-ed-on-bls12-381 = { version = "^0.3.0", default-features = false }
ark-bls12-381 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
ark-bls12-377 = { version = "^0.3.0", default-features = false, features = [ "curve" ] }
blake2 = { version = "0.9", default-features = false }

[profile.release]
Expand Down
3 changes: 2 additions & 1 deletion src/ipa_pc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ impl<G: AffineCurve, D: Digest, P: UVPolynomial<G::ScalarField>> InnerProductArg

let h_prime = vk.h.mul(round_challenge);

let mut round_commitment_proj = combined_commitment_proj + &h_prime.mul(combined_v.into());
let mut round_commitment_proj =
combined_commitment_proj + &h_prime.mul(&combined_v.into_repr());

let l_iter = proof.l_vec.iter();
let r_iter = proof.r_vec.iter();
Expand Down
4 changes: 2 additions & 2 deletions src/kzg10/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ where
if let Some(random_v) = proof.random_v {
gamma_g_multiplier += &(randomizer * &random_v);
}
total_c += &c.mul(randomizer.into());
total_w += &w.mul(randomizer);
total_c += &c.mul(randomizer.into_repr());
total_w += &w.mul(randomizer.into_repr());
// We don't need to sample randomizers from the full field,
// only from 128-bit strings.
randomizer = u128::rand(rng).into();
Expand Down
8 changes: 4 additions & 4 deletions src/marlin/marlin_pst13_pc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ where
.collect();
let beta_h: Vec<_> = betas
.iter()
.map(|b| h.mul((*b).into()).into_affine())
.map(|b| h.mul(&(*b).into_repr()).into_affine())
.collect();
let h = h.into_affine();
let prepared_h = h.into();
Expand Down Expand Up @@ -628,16 +628,16 @@ where
if let Some(random_v) = proof.random_v {
gamma_g_multiplier += &(randomizer * &random_v);
}
total_c += &c.mul(randomizer.into());
total_c += &c.mul(&randomizer.into_repr());
ark_std::cfg_iter_mut!(total_w)
.enumerate()
.for_each(|(i, w_i)| *w_i += &w[i].mul(randomizer));
// We don't need to sample randomizers from the full field,
// only from 128-bit strings.
randomizer = u128::rand(rng).into();
}
total_c -= &g.mul(g_multiplier.into());
total_c -= &gamma_g.mul(gamma_g_multiplier.into());
total_c -= &g.mul(&g_multiplier.into_repr());
total_c -= &gamma_g.mul(&gamma_g_multiplier.into_repr());
end_timer!(combination_time);

let to_affine_time = start_timer!(|| "Converting results to affine for pairing");
Expand Down
6 changes: 3 additions & 3 deletions src/sonic_pc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{LabeledCommitment, LabeledPolynomial, LinearCombination};
use crate::{PCRandomness, PCUniversalParams, PolynomialCommitment};

use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve};
use ark_ff::{One, UniformRand, Zero};
use ark_ff::{One, PrimeField, UniformRand, Zero};
use ark_std::rand::RngCore;
use ark_std::{convert::TryInto, marker::PhantomData, ops::Div, vec};

Expand Down Expand Up @@ -60,7 +60,7 @@ impl<E: PairingEngine, P: UVPolynomial<E::Fr>> SonicKZG10<E, P> {
let mut comm_with_challenge: E::G1Projective = comm.0.mul(curr_challenge);

if let Some(randomizer) = randomizer {
comm_with_challenge = comm_with_challenge.mul(randomizer.into());
comm_with_challenge = comm_with_challenge.mul(&randomizer.into_repr());
}

// Accumulate values in the BTreeMap
Expand All @@ -80,7 +80,7 @@ impl<E: PairingEngine, P: UVPolynomial<E::Fr>> SonicKZG10<E, P> {

if let Some(randomizer) = randomizer {
witness = proof.w.mul(randomizer);
adjusted_witness = adjusted_witness.mul(randomizer.into());
adjusted_witness = adjusted_witness.mul(&randomizer.into_repr());
}

*combined_witness += &witness;
Expand Down

0 comments on commit 93afc99

Please sign in to comment.