diff --git a/src/cyclefold/circuit.rs b/src/cyclefold/circuit.rs index bcf0ba7ad..71caa4c0c 100644 --- a/src/cyclefold/circuit.rs +++ b/src/cyclefold/circuit.rs @@ -6,10 +6,7 @@ use ff::PrimeField; use crate::{ constants::NUM_CHALLENGE_BITS, - gadgets::{ - ecc::AllocatedPoint, - utils::{alloc_constant, le_bits_to_num}, - }, + gadgets::{alloc_constant, le_bits_to_num, AllocatedPoint}, traits::{commitment::CommitmentTrait, Engine}, Commitment, }; diff --git a/src/cyclefold/gadgets.rs b/src/cyclefold/gadgets.rs index 460c1f487..8e15e05bf 100644 --- a/src/cyclefold/gadgets.rs +++ b/src/cyclefold/gadgets.rs @@ -1,10 +1,7 @@ use super::nova_circuit::FoldingData; use crate::{ - gadgets::{ - ecc::AllocatedPoint, - r1cs::{AllocatedR1CSInstance, AllocatedRelaxedR1CSInstance}, - }, + gadgets::{AllocatedPoint, AllocatedR1CSInstance, AllocatedRelaxedR1CSInstance}, traits::{commitment::CommitmentTrait, Engine, ROCircuitTrait}, }; @@ -64,11 +61,8 @@ pub mod emulated { use crate::{ constants::{NUM_CHALLENGE_BITS, NUM_FE_IN_EMULATED_POINT}, gadgets::{ - nonnative::{bignat::BigNat, util::f_to_nat}, - utils::{ - alloc_zero, conditionally_select, conditionally_select_allocated_bit, - conditionally_select_bignat, le_bits_to_num, - }, + alloc_zero, conditionally_select, conditionally_select_allocated_bit, + conditionally_select_bignat, f_to_nat, le_bits_to_num, BigNat, }, traits::{Group, ROConstantsCircuit}, RelaxedR1CSInstance, diff --git a/src/cyclefold/nifs.rs b/src/cyclefold/nifs.rs index 5f17d6245..6a4627576 100644 --- a/src/cyclefold/nifs.rs +++ b/src/cyclefold/nifs.rs @@ -7,10 +7,7 @@ use ff::Field; use crate::{ constants::{BN_LIMB_WIDTH, BN_N_LIMBS, NUM_CHALLENGE_BITS, NUM_FE_IN_EMULATED_POINT}, errors::NovaError, - gadgets::{ - nonnative::{bignat::nat_to_limbs, util::f_to_nat}, - utils::scalar_as_base, - }, + gadgets::{f_to_nat, nat_to_limbs, scalar_as_base}, r1cs::{R1CSInstance, R1CSShape, R1CSWitness, RelaxedR1CSInstance, RelaxedR1CSWitness}, traits::{commitment::CommitmentTrait, /*AbsorbInROTrait,*/ Engine, ROConstants, ROTrait}, CommitmentKey, CompressedCommitment, diff --git a/src/cyclefold/nova_circuit.rs b/src/cyclefold/nova_circuit.rs index 402bd56f6..f7826aaa1 100644 --- a/src/cyclefold/nova_circuit.rs +++ b/src/cyclefold/nova_circuit.rs @@ -6,10 +6,8 @@ use crate::{ /*NUM_FE_WITHOUT_IO_FOR_CRHF,*/ NUM_HASH_BITS, }, gadgets::{ - r1cs::{AllocatedR1CSInstance, AllocatedRelaxedR1CSInstance}, - utils::{ - alloc_num_equals, alloc_scalar_as_base, alloc_zero, conditionally_select_vec, le_bits_to_num, - }, + alloc_num_equals, alloc_scalar_as_base, alloc_zero, conditionally_select_vec, le_bits_to_num, + AllocatedR1CSInstance, AllocatedRelaxedR1CSInstance, }, r1cs::{R1CSInstance, RelaxedR1CSInstance}, traits::{ diff --git a/src/cyclefold/snark.rs b/src/cyclefold/snark.rs index 6b1a4729f..132b8cfec 100644 --- a/src/cyclefold/snark.rs +++ b/src/cyclefold/snark.rs @@ -13,7 +13,7 @@ use crate::{ }, cyclefold::circuit::CyclefoldCircuit, errors::NovaError, - gadgets::utils::scalar_as_base, + gadgets::scalar_as_base, nifs::NIFS, r1cs::{ self, CommitmentKeyHint, R1CSInstance, R1CSResult, R1CSWitness, RelaxedR1CSInstance, diff --git a/src/gadgets/mod.rs b/src/gadgets/mod.rs index 926d1ba46..ccb29d881 100644 --- a/src/gadgets/mod.rs +++ b/src/gadgets/mod.rs @@ -3,7 +3,7 @@ mod ecc; pub(crate) use ecc::AllocatedPoint; mod nonnative; -pub(crate) use nonnative::{bignat::nat_to_limbs, util::f_to_nat}; +pub(crate) use nonnative::{bignat::nat_to_limbs, bignat::BigNat, util::f_to_nat}; mod r1cs; pub(crate) use r1cs::{ @@ -15,6 +15,7 @@ mod utils; #[cfg(test)] pub(crate) use utils::alloc_one; pub(crate) use utils::{ - alloc_num_equals, alloc_scalar_as_base, alloc_zero, conditionally_select_vec, le_bits_to_num, - scalar_as_base, + alloc_constant, alloc_num_equals, alloc_scalar_as_base, alloc_zero, conditionally_select, + conditionally_select_allocated_bit, conditionally_select_bignat, conditionally_select_vec, + le_bits_to_num, scalar_as_base, };