Skip to content

Commit

Permalink
migrate to versioned bellman
Browse files Browse the repository at this point in the history
  • Loading branch information
shamatar committed Mar 5, 2019
1 parent 6f143b8 commit 6ac48e2
Show file tree
Hide file tree
Showing 51 changed files with 764 additions and 131 deletions.
9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ homepage = "https://github.com/matterinc/sapling-crypto"
license = "MIT/Apache-2.0"
name = "sapling-crypto"
repository = "https://github.com/matterinc/sapling-crypto"
version = "0.0.3"
version = "0.0.4"

[lib]
crate-type = ["lib", "staticlib"]
Expand All @@ -17,9 +17,10 @@ digest = "0.7"
byteorder = "1"
serde = "1.0.80"
serde_derive = "1.0.80"
ff = { git = 'https://github.com/matterinc/ff', features = ["derive"] }
pairing = { git = 'https://github.com/matterinc/pairing', features = ["expose-arith"] }
bellman = { git = 'https://github.com/matterinc/bellman'}
tiny-keccak = "1.4.2"

bellman = { git = 'https://github.com/matterinc/bellman', tag = "0.2.0"}
#bellman = { path = "../bellman"}

[dependencies.blake2-rfc]
git = "https://github.com/gtank/blake2-rfc"
Expand Down
4 changes: 2 additions & 2 deletions benches/baby_pedersen_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

extern crate rand;
extern crate test;
extern crate pairing;
extern crate bellman;
extern crate sapling_crypto;

use rand::{Rand, thread_rng};
use pairing::bn256::Bn256;
use bellman::pairing::bn256::Bn256;
use sapling_crypto::alt_babyjubjub::AltJubjubBn256;
use sapling_crypto::pedersen_hash::{pedersen_hash, Personalization};

Expand Down
4 changes: 2 additions & 2 deletions benches/pedersen_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

extern crate rand;
extern crate test;
extern crate pairing;
extern crate bellman;
extern crate sapling_crypto;

use rand::{Rand, thread_rng};
use pairing::bls12_381::Bls12;
use bellman::pairing::bls12_381::Bls12;
use sapling_crypto::jubjub::JubjubBls12;
use sapling_crypto::pedersen_hash::{pedersen_hash, Personalization};

Expand Down
4 changes: 2 additions & 2 deletions examples/bench.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
extern crate sapling_crypto;
extern crate bellman;
extern crate rand;
extern crate pairing;

use std::time::{Duration, Instant};
use sapling_crypto::jubjub::{
Expand All @@ -17,9 +16,10 @@ use sapling_crypto::primitives::{
ProofGenerationKey,
ValueCommitment
};

use bellman::groth16::*;
use rand::{XorShiftRng, SeedableRng, Rng};
use pairing::bls12_381::{Bls12, Fr};
use bellman::pairing::bls12_381::{Bls12, Fr};

const TREE_DEPTH: usize = 32;

Expand Down
6 changes: 3 additions & 3 deletions src/alt_babyjubjub/fs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use byteorder::{ByteOrder, LittleEndian};
use ff::{adc, sbb, mac_with_carry};
use ff::{BitIterator, Field, PrimeField, SqrtField, PrimeFieldRepr, PrimeFieldDecodingError, LegendreSymbol};
use ff::LegendreSymbol::*;
use bellman::pairing::ff::{adc, sbb, mac_with_carry};
use bellman::pairing::ff::{BitIterator, Field, PrimeField, SqrtField, PrimeFieldRepr, PrimeFieldDecodingError, LegendreSymbol};
use bellman::pairing::ff::LegendreSymbol::*;
use super::ToUniform;

// s = 2736030358979909402780800718157159386076813972158567259200215660948447373041
Expand Down
Loading

0 comments on commit 6ac48e2

Please sign in to comment.