Skip to content

Commit

Permalink
refactor by adding nova_scotia_types.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
june-in-exile committed Oct 8, 2024
1 parent 4e0aa50 commit 61eab82
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
16 changes: 2 additions & 14 deletions mopro-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub use circom::{
pub use halo2::{Halo2ProveFn, Halo2VerifyFn};

#[cfg(feature = "nova_scotia")]
pub use nova_scotia::{};
// pub use nova_scotia::{};

#[cfg(not(feature = "circom"))]
#[macro_export]
Expand Down Expand Up @@ -77,19 +77,7 @@ macro_rules! halo2_app {
#[macro_export]
macro_rules! nova_scotia_app {
() => {
use std::{collections::HashMap, path::PathBuf};
use serde_json::Value;
use nova_snark::{
traits::{circuit::TrivialTestCircuit, Group},
provider, PublicParams, RecursiveSNARK,
};
use nova_scotia::circom::circuit::{Constraint, R1CS, CircomCircuit};

pub type F<G> = <G as Group>::Scalar;
pub type P1 = provider::bn256_grumpkin::bn256::Point;
pub type P2 = provider::bn256_grumpkin::grumpkin::Point;
pub type C1<G> = CircomCircuit<<G as Group>::Scalar>;
pub type C2<G> = TrivialTestCircuit<<G as Group>::Scalar>;
pub use nova_scotia_types::*;

fn generate_recursive_snark_proof(
witness_generator_file: PathBuf,
Expand Down
8 changes: 0 additions & 8 deletions mopro-ffi/src/nova_scotia/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
// use nova_snark::{
// traits::{circuit::TrivialTestCircuit, Group},
// provider, PublicParams, RecursiveSNARK,
// };
// use ff::PrimeField;
// use std::path::PathBuf;
// use std::collections::HashMap;

#[macro_export]
macro_rules! nova_scotia_app {
() => {
Expand Down
2 changes: 2 additions & 0 deletions test-e2e/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
extern crate core;

mod nova_scotia_types;

// First, configure the Mopro FFI library
mopro_ffi::app!();

Expand Down
13 changes: 13 additions & 0 deletions test-e2e/src/nova_scotia_types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pub use std::{collections::HashMap, path::PathBuf};
pub use serde_json::Value;
pub use nova_snark::{
traits::{circuit::TrivialTestCircuit, Group},
provider, PublicParams, RecursiveSNARK,
};
pub use nova_scotia::circom::circuit::{Constraint, R1CS, CircomCircuit};

pub type F<G> = <G as Group>::Scalar;
pub type P1 = provider::bn256_grumpkin::bn256::Point;
pub type P2 = provider::bn256_grumpkin::grumpkin::Point;
pub type C1<G> = CircomCircuit<<G as Group>::Scalar>;
pub type C2<G> = TrivialTestCircuit<<G as Group>::Scalar>;

0 comments on commit 61eab82

Please sign in to comment.