Skip to content

Commit 7555586

Browse files
committed
Change the dependency on bellperson to ironfish-bellperson
1 parent db2dd3e commit 7555586

File tree

15 files changed

+45
-45
lines changed

15 files changed

+45
-45
lines changed

ironfish-proofs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories = ["cryptography::cryptocurrencies"]
1515
all-features = true
1616

1717
[dependencies]
18-
bellperson = { git = "https://github.com/iron-fish/bellperson.git", branch = "blstrs", features = ["groth16"] }
18+
ironfish-bellperson = { version = "0.1.0", features = ["groth16"] }
1919
blake2b_simd = "1"
2020
blstrs = { version = "0.6.0", features = ["__private_bench"] }
2121
byteorder = "1"

ironfish-proofs/src/circuit/ecc.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
33
use std::ops::{AddAssign, MulAssign, Neg, SubAssign};
44

5-
use bellperson::{ConstraintSystem, SynthesisError};
5+
use ironfish_bellperson::{ConstraintSystem, SynthesisError};
66

7-
use bellperson::gadgets::Assignment;
7+
use ironfish_bellperson::gadgets::Assignment;
88

9-
use bellperson::gadgets::num::{AllocatedNum, Num};
9+
use ironfish_bellperson::gadgets::num::{AllocatedNum, Num};
1010

11-
use bellperson::gadgets::lookup::lookup3_xy;
11+
use ironfish_bellperson::gadgets::lookup::lookup3_xy;
1212

13-
use bellperson::gadgets::boolean::Boolean;
13+
use ironfish_bellperson::gadgets::boolean::Boolean;
1414

1515
use ff::Field;
1616
use group::Curve;
@@ -620,17 +620,17 @@ impl MontgomeryPoint {
620620

621621
#[cfg(test)]
622622
mod test {
623-
use bellperson::ConstraintSystem;
623+
use ironfish_bellperson::ConstraintSystem;
624624
use ff::{Field, PrimeField, PrimeFieldBits};
625625
use group::{Curve, Group};
626626
use rand_core::{RngCore, SeedableRng};
627627
use rand_xorshift::XorShiftRng;
628628

629-
use bellperson::gadgets::test::*;
629+
use ironfish_bellperson::gadgets::test::*;
630630

631631
use super::{fixed_base_multiplication, AllocatedNum, EdwardsPoint, MontgomeryPoint};
632632
use crate::constants::{to_montgomery_coords, NOTE_COMMITMENT_RANDOMNESS_GENERATOR};
633-
use bellperson::gadgets::boolean::{AllocatedBit, Boolean};
633+
use ironfish_bellperson::gadgets::boolean::{AllocatedBit, Boolean};
634634

635635
#[test]
636636
#[allow(clippy::many_single_char_names)]

ironfish-proofs/src/circuit/pedersen_hash.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Gadget for Zcash's Pedersen hash.
22
33
use super::ecc::{EdwardsPoint, MontgomeryPoint};
4-
use bellperson::gadgets::boolean::Boolean;
5-
use bellperson::gadgets::lookup::*;
6-
use bellperson::{ConstraintSystem, SynthesisError};
4+
use ironfish_bellperson::gadgets::boolean::Boolean;
5+
use ironfish_bellperson::gadgets::lookup::*;
6+
use ironfish_bellperson::{ConstraintSystem, SynthesisError};
77
pub use ironfish_primitives::sapling::pedersen_hash::Personalization;
88

99
use crate::constants::PEDERSEN_CIRCUIT_GENERATORS;
@@ -105,8 +105,8 @@ where
105105
#[cfg(test)]
106106
mod test {
107107
use super::*;
108-
use bellperson::gadgets::boolean::{AllocatedBit, Boolean};
109-
use bellperson::gadgets::test::*;
108+
use ironfish_bellperson::gadgets::boolean::{AllocatedBit, Boolean};
109+
use ironfish_bellperson::gadgets::test::*;
110110
use ff::PrimeField;
111111
use group::Curve;
112112
use rand_core::{RngCore, SeedableRng};

ironfish-proofs/src/circuit/sapling.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use ff::Field;
44
use ff::PrimeField;
55
use group::Curve;
66

7-
use bellperson::{Circuit, ConstraintSystem, SynthesisError};
7+
use ironfish_bellperson::{Circuit, ConstraintSystem, SynthesisError};
88

99
use ironfish_primitives::constants;
1010

@@ -19,11 +19,11 @@ use crate::constants::{
1919
PROOF_GENERATION_KEY_GENERATOR, SPENDING_KEY_GENERATOR, VALUE_COMMITMENT_RANDOMNESS_GENERATOR,
2020
VALUE_COMMITMENT_VALUE_GENERATOR,
2121
};
22-
use bellperson::gadgets::blake2s;
23-
use bellperson::gadgets::boolean;
24-
use bellperson::gadgets::multipack;
25-
use bellperson::gadgets::num;
26-
use bellperson::gadgets::Assignment;
22+
use ironfish_bellperson::gadgets::blake2s;
23+
use ironfish_bellperson::gadgets::boolean;
24+
use ironfish_bellperson::gadgets::multipack;
25+
use ironfish_bellperson::gadgets::num;
26+
use ironfish_bellperson::gadgets::Assignment;
2727

2828
#[cfg(test)]
2929
use ff::PrimeFieldBits;
@@ -517,7 +517,7 @@ impl Circuit<blstrs::Scalar> for Output {
517517

518518
#[test]
519519
fn test_input_circuit_with_blstrs() {
520-
use bellperson::gadgets::test::*;
520+
use ironfish_bellperson::gadgets::test::*;
521521
use ff::Field;
522522
use group::Group;
523523
use rand_core::{RngCore, SeedableRng};
@@ -661,7 +661,7 @@ fn test_input_circuit_with_blstrs() {
661661

662662
#[test]
663663
fn test_input_circuit_with_blstrs_external_test_vectors() {
664-
use bellperson::gadgets::test::*;
664+
use ironfish_bellperson::gadgets::test::*;
665665
use ff::Field;
666666
use group::Group;
667667
use rand_core::{RngCore, SeedableRng};
@@ -839,7 +839,7 @@ fn test_input_circuit_with_blstrs_external_test_vectors() {
839839

840840
#[test]
841841
fn test_output_circuit_with_blstrs() {
842-
use bellperson::gadgets::test::*;
842+
use ironfish_bellperson::gadgets::test::*;
843843
use ff::Field;
844844
use group::Group;
845845
use rand_core::{RngCore, SeedableRng};

ironfish-proofs/src/circuit/sprout/commitment.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use bellperson::gadgets::boolean::Boolean;
2-
use bellperson::gadgets::sha256::sha256;
3-
use bellperson::{ConstraintSystem, SynthesisError};
1+
use ironfish_bellperson::gadgets::boolean::Boolean;
2+
use ironfish_bellperson::gadgets::sha256::sha256;
3+
use ironfish_bellperson::{ConstraintSystem, SynthesisError};
44
use ff::PrimeField;
55

66
pub fn note_comm<Scalar, CS>(

ironfish-proofs/src/circuit/sprout/input.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use bellperson::gadgets::boolean::{AllocatedBit, Boolean};
2-
use bellperson::gadgets::sha256::sha256_block_no_padding;
3-
use bellperson::{ConstraintSystem, SynthesisError};
1+
use ironfish_bellperson::gadgets::boolean::{AllocatedBit, Boolean};
2+
use ironfish_bellperson::gadgets::sha256::sha256_block_no_padding;
3+
use ironfish_bellperson::{ConstraintSystem, SynthesisError};
44
use ff::PrimeField;
55

66
use super::commitment::note_comm;

ironfish-proofs/src/circuit/sprout/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
//! [`libsnark`]: https://github.com/scipr-lab/libsnark
1111
//! [BCTV14]: https://eprint.iacr.org/2013/879
1212
13-
use bellperson::gadgets::boolean::{AllocatedBit, Boolean};
14-
use bellperson::gadgets::multipack::pack_into_inputs;
15-
use bellperson::{Circuit, ConstraintSystem, LinearCombination, SynthesisError};
13+
use ironfish_bellperson::gadgets::boolean::{AllocatedBit, Boolean};
14+
use ironfish_bellperson::gadgets::multipack::pack_into_inputs;
15+
use ironfish_bellperson::{Circuit, ConstraintSystem, LinearCombination, SynthesisError};
1616
use ff::PrimeField;
1717

1818
mod commitment;
@@ -336,7 +336,7 @@ where
336336
#[test]
337337
#[ignore]
338338
fn test_sprout_constraints() {
339-
use bellperson::gadgets::test::*;
339+
use ironfish_bellperson::gadgets::test::*;
340340
use blstrs::Scalar;
341341

342342
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
@@ -460,7 +460,7 @@ fn test_sprout_constraints() {
460460
.write_u64::<LittleEndian>(vpub_new.unwrap())
461461
.unwrap();
462462

463-
use bellperson::gadgets::multipack;
463+
use ironfish_bellperson::gadgets::multipack;
464464

465465
let expected_inputs = multipack::bytes_to_bits(&expected_inputs);
466466
let expected_inputs = multipack::compute_multipacking(&expected_inputs);

ironfish-proofs/src/circuit/sprout/output.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use bellperson::gadgets::boolean::Boolean;
2-
use bellperson::{ConstraintSystem, SynthesisError};
1+
use ironfish_bellperson::gadgets::boolean::Boolean;
2+
use ironfish_bellperson::{ConstraintSystem, SynthesisError};
33
use ff::PrimeField;
44

55
use super::commitment::note_comm;

ironfish-proofs/src/circuit/sprout/prfs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use bellperson::gadgets::boolean::Boolean;
2-
use bellperson::gadgets::sha256::sha256_block_no_padding;
3-
use bellperson::{ConstraintSystem, SynthesisError};
1+
use ironfish_bellperson::gadgets::boolean::Boolean;
2+
use ironfish_bellperson::gadgets::sha256::sha256_block_no_padding;
3+
use ironfish_bellperson::{ConstraintSystem, SynthesisError};
44
use ff::PrimeField;
55

66
#[allow(clippy::many_single_char_names)]

ironfish-proofs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Temporary until we have addressed all Result<T, ()> cases.
1010
#![allow(clippy::result_unit_err)]
1111

12-
use bellperson::groth16::{prepare_verifying_key, Parameters, PreparedVerifyingKey, VerifyingKey};
12+
use ironfish_bellperson::groth16::{prepare_verifying_key, Parameters, PreparedVerifyingKey, VerifyingKey};
1313
use blstrs::Bls12;
1414
use std::fs::File;
1515
use std::io::{self, BufReader};

0 commit comments

Comments
 (0)