|
@ -77,7 +77,7 @@ impl CircomBuilder { |
|
|
.wtns
|
|
|
.wtns
|
|
|
.calculate_witness(self.inputs, self.cfg.sanity_check)?;
|
|
|
.calculate_witness(self.inputs, self.cfg.sanity_check)?;
|
|
|
|
|
|
|
|
|
use ark_ff::{PrimeField, FpParameters};
|
|
|
|
|
|
|
|
|
use ark_ff::{FpParameters, PrimeField};
|
|
|
let modulus = <<E::Fr as PrimeField>::Params as FpParameters>::MODULUS;
|
|
|
let modulus = <<E::Fr as PrimeField>::Params as FpParameters>::MODULUS;
|
|
|
|
|
|
|
|
|
// convert it to field elements
|
|
|
// convert it to field elements
|
|
@ -92,7 +92,8 @@ impl CircomBuilder { |
|
|
w.to_biguint().unwrap()
|
|
|
w.to_biguint().unwrap()
|
|
|
};
|
|
|
};
|
|
|
E::Fr::from(w)
|
|
|
E::Fr::from(w)
|
|
|
}).collect::<Vec<_>>();
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
.collect::<Vec<_>>();
|
|
|
circom.witness = Some(witness);
|
|
|
circom.witness = Some(witness);
|
|
|
|
|
|
|
|
|
// sanity check
|
|
|
// sanity check
|
|
|