Skip to content

Commit

Permalink
Merge pull request #11 from AleoHQ/feat/circuits-int64
Browse files Browse the repository at this point in the history
Gadgets for signed and unsigned integers
  • Loading branch information
howardwu authored Feb 27, 2022
2 parents 324f969 + f16e453 commit 2491ca9
Show file tree
Hide file tree
Showing 105 changed files with 34,480 additions and 2,179 deletions.
21 changes: 18 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,32 @@ jobs:

circuits:
docker:
- image: cimg/rust:1.56.1
- image: cimg/rust:1.59
resource_class: 2xlarge
parallelism: 50
steps:
- checkout
- setup_environment:
cache_key: snarkvm-circuits-cache
- run_parallel:
workspace_member: circuits
- clear_environment:
cache_key: snarkvm-circuits-cache

circuits-environment:
docker:
- image: cimg/rust:1.59
resource_class: 2xlarge
steps:
- checkout
- setup_environment:
cache_key: snarkvm-circuits-environment-cache
- run:
name: Build and run tests
no_output_timeout: 35m
command: cd circuits && RUST_MIN_STACK=67108864 cargo test
command: cd circuits/environment && RUST_MIN_STACK=67108864 cargo test
- clear_environment:
cache_key: snarkvm-circuits-cache
cache_key: snarkvm-circuits-environment-cache

curves:
docker:
Expand Down Expand Up @@ -262,6 +276,7 @@ workflows:
- integration-testnet2
- algorithms
- circuits
- circuits-environment
- curves
- derives
- dpc
Expand Down
2 changes: 1 addition & 1 deletion .integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ version = "0.7.5"
default-features = false

[dependencies.aleo-std]
version = "0.1.10"
version = "0.1.12"
optional = true

[dependencies.anyhow]
Expand Down
80 changes: 37 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ edition = "2021"
members = [
"algorithms",
"circuits",
"circuits/environment",
"curves",
"derives", # excluded from [features], for internal use primarily
"dpc",
Expand Down
2 changes: 1 addition & 1 deletion algorithms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ version = "0.7.5"
default-features = false

[dependencies.aleo-std]
version = "0.1.10"
version = "0.1.12"

[dependencies.anyhow]
version = "1.0"
Expand Down
10 changes: 7 additions & 3 deletions algorithms/src/polycommit/data_structures/polynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ use crate::fft::{
Evaluations as EvaluationsOnDomain,
SparsePolynomial,
};
use hashbrown::HashMap;
#[cfg(feature = "parallel")]
use rayon::prelude::*;
use snarkvm_fields::{Field, PrimeField};
use snarkvm_utilities::{cfg_iter, cfg_iter_mut, CanonicalDeserialize, CanonicalSerialize};

use hashbrown::HashMap;
use std::borrow::Cow;

#[cfg(not(feature = "parallel"))]
use itertools::Itertools;
#[cfg(feature = "parallel")]
use rayon::prelude::*;

/// A polynomial along with information about its degree bound (if any), and the
/// maximum number of queries that will be made to it. This latter number determines
/// the amount of protection that will be provided to a commitment for this polynomial.
Expand Down
5 changes: 4 additions & 1 deletion algorithms/src/snark/marlin/ahp/ahp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,12 @@ impl<F: PrimeField> UnnormalizedBivariateLagrangePoly<F> for EvaluationDomain<F>
x: F,
domain: &EvaluationDomain<F>,
) -> Vec<F> {
use snarkvm_utilities::{cfg_iter, cfg_iter_mut};

#[cfg(not(feature = "parallel"))]
use itertools::Itertools;
#[cfg(feature = "parallel")]
use rayon::prelude::*;
use snarkvm_utilities::{cfg_iter, cfg_iter_mut};

let vanish_x = self.evaluate_vanishing_polynomial(x);
let elements = domain.elements().collect::<Vec<_>>();
Expand Down
Loading

0 comments on commit 2491ca9

Please sign in to comment.