mirror of
https://github.com/arnaucube/Nova.git
synced 2026-01-10 16:11:29 +01:00
Update crate versions (#119)
* update crate versions * fix clippy issues * cargo fmt
This commit is contained in:
11
Cargo.toml
11
Cargo.toml
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nova-snark"
|
||||
version = "0.8.1"
|
||||
version = "0.9.0"
|
||||
authors = ["Srinath Setty <srinath@microsoft.com>"]
|
||||
edition = "2021"
|
||||
description = "Recursive zkSNARKs without trusted setup"
|
||||
@@ -11,7 +11,7 @@ license-file = "LICENSE"
|
||||
keywords = ["zkSNARKs", "cryptography", "proofs"]
|
||||
|
||||
[dependencies]
|
||||
bellperson = { version = "0.22", default-features = false }
|
||||
bellperson = { version = "0.24", default-features = false }
|
||||
ff = "0.12.0"
|
||||
merlin = "2.0.0"
|
||||
rand = "0.8.4"
|
||||
@@ -24,9 +24,9 @@ itertools = "0.9.0"
|
||||
subtle = "2.4"
|
||||
pasta_curves = { version = "0.4.0", features = ["repr-c"] }
|
||||
pasta-msm = "0.1.3"
|
||||
neptune = { version = "7.2.0", default-features = false }
|
||||
neptune = { version = "8.1.0", default-features = false }
|
||||
generic-array = "0.14.4"
|
||||
bellperson-nonnative = { version = "0.3.1", default-features = false, features = ["wasm"] }
|
||||
bellperson-nonnative = { version = "0.4.0", default-features = false }
|
||||
num-bigint = { version = "0.4", features = ["serde", "rand"] }
|
||||
num-traits = "0.2"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
@@ -46,5 +46,4 @@ name = "compressed-snark"
|
||||
harness = false
|
||||
|
||||
[features]
|
||||
default = [ "bellperson/default", "bellperson-nonnative/default", "neptune/default" ]
|
||||
wasm = [ "bellperson/wasm", "bellperson-nonnative/wasm", "neptune/wasm" ]
|
||||
default = [ "bellperson/default", "bellperson-nonnative/default", "neptune/default" ]
|
||||
@@ -147,7 +147,7 @@ where
|
||||
let negone = -<G::Scalar>::one();
|
||||
|
||||
let powers_of_two = (0..G::Scalar::NUM_BITS)
|
||||
.map(|i| G::Scalar::from(2u64).pow_vartime(&[u64::from(i)]))
|
||||
.map(|i| G::Scalar::from(2u64).pow_vartime([u64::from(i)]))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let pp = |s: &mut String, lc: &LinearCombination<G::Scalar>| {
|
||||
|
||||
10
src/r1cs.rs
10
src/r1cs.rs
@@ -191,13 +191,7 @@ impl<G: Group> R1CSShape<G> {
|
||||
assert_eq!(Cz.len(), self.num_cons);
|
||||
|
||||
let res: usize = (0..self.num_cons)
|
||||
.map(|i| {
|
||||
if Az[i] * Bz[i] == U.u * Cz[i] + W.E[i] {
|
||||
0
|
||||
} else {
|
||||
1
|
||||
}
|
||||
})
|
||||
.map(|i| usize::from(Az[i] * Bz[i] != U.u * Cz[i] + W.E[i]))
|
||||
.sum();
|
||||
|
||||
res == 0
|
||||
@@ -235,7 +229,7 @@ impl<G: Group> R1CSShape<G> {
|
||||
assert_eq!(Cz.len(), self.num_cons);
|
||||
|
||||
let res: usize = (0..self.num_cons)
|
||||
.map(|i| if Az[i] * Bz[i] == Cz[i] { 0 } else { 1 })
|
||||
.map(|i| usize::from(Az[i] * Bz[i] != Cz[i]))
|
||||
.sum();
|
||||
|
||||
res == 0
|
||||
|
||||
@@ -98,7 +98,7 @@ impl<G: Group> RelaxedR1CSSNARKTrait<G> for RelaxedR1CSSNARK<G> {
|
||||
|
||||
let (num_rounds_x, num_rounds_y) = (
|
||||
(pk.S.num_cons as f64).log2() as usize,
|
||||
((pk.S.num_vars as f64).log2() as usize + 1) as usize,
|
||||
((pk.S.num_vars as f64).log2() as usize + 1),
|
||||
);
|
||||
|
||||
// outer sum-check
|
||||
@@ -264,7 +264,7 @@ impl<G: Group> RelaxedR1CSSNARKTrait<G> for RelaxedR1CSSNARK<G> {
|
||||
|
||||
let (num_rounds_x, num_rounds_y) = (
|
||||
(vk.S.num_cons as f64).log2() as usize,
|
||||
((vk.S.num_vars as f64).log2() as usize + 1) as usize,
|
||||
((vk.S.num_vars as f64).log2() as usize + 1),
|
||||
);
|
||||
|
||||
// outer sum-check
|
||||
|
||||
@@ -20,7 +20,7 @@ impl<Scalar: PrimeField> EqPolynomial<Scalar> {
|
||||
|
||||
pub fn evals(&self) -> Vec<Scalar> {
|
||||
let ell = self.r.len();
|
||||
let mut evals: Vec<Scalar> = vec![Scalar::zero(); (2_usize).pow(ell as u32) as usize];
|
||||
let mut evals: Vec<Scalar> = vec![Scalar::zero(); (2_usize).pow(ell as u32)];
|
||||
let mut size = 1;
|
||||
evals[0] = Scalar::one();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user