Skip to content

Commit

Permalink
Updating arkworks and to latest nightly madness.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaker committed Dec 20, 2023
1 parent 2c62479 commit b8558ab
Show file tree
Hide file tree
Showing 8 changed files with 315 additions and 260 deletions.
541 changes: 295 additions & 246 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ name = "verifier_bench"

[patch.crates-io]
ark-std = {git = "https://github.com/arkworks-rs/utils"}
ark-ec = {git = "https://github.com/mmaker/algebra", branch = "feature/additive-groups"}
ark-ff = {git = "https://github.com/mmaker/algebra", branch = "feature/additive-groups"}
ark-test-curves = {git = "https://github.com/mmaker/algebra", branch = "feature/additive-groups"}
ark-serialize = {git = "https://github.com/mmaker/algebra", branch = "feature/additive-groups"}
ark-serialize-derive = {git = "https://github.com/mmaker/algebra", branch = "feature/additive-groups"}
ark-poly = {git = "https://github.com/mmaker/algebra", branch = "feature/additive-groups"}
ark-bls12-381 = {git = "https://github.com/arkworks-rs/curves"}
ark-ec = {git = "https://github.com/arkworks-rs/algebra"}
ark-ff = {git = "https://github.com/arkworks-rs/algebra"}
ark-test-curves = {git = "https://github.com/arkworks-rs/algebra"}
ark-serialize = {git = "https://github.com/arkworks-rs/algebra"}
ark-serialize-derive = {git = "https://github.com/arkworks-rs/algebra"}
ark-poly = {git = "https://github.com/arkworks-rs/algebra"}
ark-bls12-381 = {git = "https://github.com/arkworks-rs/algebra"}
ark-relations = {git = "https://github.com/arkworks-rs/snark"}

[dependencies]
Expand Down
1 change: 0 additions & 1 deletion src/herring/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use crate::herring::prover::SumcheckMsg;
use crate::herring::time_prover::Witness;
use crate::herring::TimeProver;
use crate::misc::powers;
use crate::subprotocols::sumcheck;
use crate::transcript::GeminiTranscript;
use ark_ec::CurveGroup;
use ark_ec::{pairing::Pairing, PrimeGroup, VariableBaseMSM};
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
#![deny(unused_comparisons, bare_trait_objects, unused_must_use)]
// #![forbid(unsafe_code)]
#![deny(trivial_numeric_casts)]
#![deny(private_in_public)]
#![deny(unused_allocation)]

// Lints disable from other arkworks packages:
Expand Down
4 changes: 3 additions & 1 deletion src/psnark/streams/hadamard_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use core::num::NonZeroUsize;

use ark_ff::Field;
use ark_std::borrow::Borrow;
use ark_std::marker::PhantomData;
Expand Down Expand Up @@ -40,7 +42,7 @@ where
Some(*first.borrow() * second.borrow())
}

fn advance_by(&mut self, n: usize) -> Result<(), usize> {
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> {
self.0.advance_by(n).and_then(|()| self.1.advance_by(n))
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/psnark/streams/intofield_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use core::num::NonZeroUsize;

use ark_ff::Field;
use ark_std::borrow::Borrow;
use ark_std::marker::PhantomData;
Expand Down Expand Up @@ -28,7 +30,7 @@ where
self.it.next().map(|x| F::from(*x.borrow() as u64))
}

fn advance_by(&mut self, n: usize) -> Result<(), usize> {
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> {
self.it.advance_by(n)
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/psnark/streams/lookup_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use core::num::NonZeroUsize;

use ark_std::borrow::Borrow;

use crate::iterable::Iterable;
Expand Down Expand Up @@ -87,7 +89,7 @@ where
}
}

fn advance_by(&mut self, n: usize) -> Result<(), usize> {
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> {
self.index_stream.advance_by(n)
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/psnark/streams/tensor_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use core::num::NonZeroUsize;

use ark_ff::{BitIteratorLE, Field};
use ark_std::borrow::Borrow;
use ark_std::vec::Vec;
Expand Down Expand Up @@ -62,7 +64,7 @@ impl<F: Field> Iterator for TensorIter<F> {
})
}

fn advance_by(&mut self, n: usize) -> Result<(), usize> {
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> {
// XXX:throw the error appropriatedly
self.current_index -= n as u64;
self.current = BitIteratorLE::new(&[self.current_index])
Expand Down Expand Up @@ -182,7 +184,7 @@ where
Some(value)
}

fn advance_by(&mut self, n: usize) -> Result<(), usize> {
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> {
self.index.advance_by(n)
}
}
Expand Down

0 comments on commit b8558ab

Please sign in to comment.