Skip to content

Commit

Permalink
Add NIFSGadgetTrait, implement Mova's NIFSGadget, adapt Nova NIFSGadg…
Browse files Browse the repository at this point in the history
…et into NIFSGadgetTrait

* add new NIFSGadgetTrait

* implement Mova's NIFSGadget

* refactor Nova NIFSGadget to fit into the new NIFSGadgetTrait

* abstract NIFSGadget related tests for all implementors of
  NIFSGadgetTrait to avoid duplicated code in the tests between the
  different Nova variants gadget tests
  • Loading branch information
arnaucube committed Nov 4, 2024
1 parent b812dd6 commit 6dd2cca
Show file tree
Hide file tree
Showing 17 changed files with 782 additions and 394 deletions.
2 changes: 1 addition & 1 deletion examples/full_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl<F: PrimeField> FCircuit<F> for CubicFCircuit<F> {
}

fn main() {
let n_steps = 10;
let n_steps = 2;
// set the initial state
let z_0 = vec![Fr::from(3_u32)];

Expand Down
4 changes: 2 additions & 2 deletions folding-schemes/src/arith/r1cs/circuits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ pub mod tests {
nonnative::uint::NonNativeUintVar,
},
nova::{
circuits::CommittedInstanceVar, decider_eth_circuit::WitnessVar, CommittedInstance,
Witness,
decider_eth_circuit::WitnessVar, nifs::nova_circuits::CommittedInstanceVar,
CommittedInstance, Witness,
},
};
use crate::frontend::{
Expand Down
2 changes: 1 addition & 1 deletion folding-schemes/src/folding/circuits/decider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub mod tests {
use ark_std::UniformRand;

use super::*;
use crate::folding::nova::{circuits::CommittedInstanceVar, CommittedInstance};
use crate::folding::nova::{nifs::nova_circuits::CommittedInstanceVar, CommittedInstance};
use crate::transcript::poseidon::poseidon_canonical_config;

// checks that the gadget and native implementations of the challenge computation match
Expand Down
2 changes: 1 addition & 1 deletion folding-schemes/src/folding/circuits/decider/off_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::{
nonnative::affine::NonNativeAffineVar,
CF1, CF2,
},
nova::{circuits::CommittedInstanceVar, decider_eth_circuit::WitnessVar},
nova::{decider_eth_circuit::WitnessVar, nifs::nova_circuits::CommittedInstanceVar},
traits::{CommittedInstanceOps, CommittedInstanceVarOps, Dummy, WitnessOps, WitnessVarOps},
},
};
Expand Down
Loading

0 comments on commit 6dd2cca

Please sign in to comment.