Skip to content

Commit b998be6

Browse files
eigmaxibmp33
andauthored
feat: wrap g16 api (#145)
* chore: change curve naming to uppercase format (#142) * feat: move api from zkit to g16 --------- Co-authored-by: ibmp33 <[email protected]>
1 parent fa36961 commit b998be6

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

zkit/src/groth16_api.rs renamed to groth16/src/api.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
use algebraic::{
2-
bellman_ce::Engine,
3-
circom_circuit::CircomCircuit,
4-
errors::{EigenError, Result},
5-
reader::load_r1cs,
6-
witness::{load_input_for_witness, WitnessCalculator},
7-
Field, PrimeField,
8-
};
9-
use groth16::{
1+
use crate::{
102
bellman_ce::{
113
groth16::{Parameters, Proof, VerifyingKey},
124
pairing::{
@@ -17,6 +9,14 @@ use groth16::{
179
groth16::Groth16,
1810
json_utils::*,
1911
};
12+
use algebraic::{
13+
bellman_ce::Engine,
14+
circom_circuit::CircomCircuit,
15+
errors::{EigenError, Result},
16+
reader::load_r1cs,
17+
witness::{load_input_for_witness, WitnessCalculator},
18+
Field, PrimeField,
19+
};
2020
use num_traits::Zero;
2121
use rand;
2222

groth16/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod api;
12
pub mod groth16;
23
pub mod json_utils;
34

test/recursive_proof_to_snark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ if [ "$GENERATE_PROOF_TYPE" = "stark" ]; then
6868
../target/release/eigen-zkit stark_prove -s ../starky/data/c12.starkStruct.json \
6969
-p $WORKSPACE/$C12_VERIFIER.pil.json \
7070
--o $WORKSPACE/$C12_VERIFIER.const \
71-
--m $WORKSPACE/$C12_VERIFIER.cm -c $WORKSPACE/circuits/$RECURSIVE1_VERIFIER.circom --i $WORKSPACE/aggregation/$RECURSIVE1_VERIFIER/input.zkin.json --norm_stage
71+
--m $WORKSPACE/$C12_VERIFIER.cm -c $WORKSPACE/circuits/$RECURSIVE1_VERIFIER.circom --i $WORKSPACE/aggregation/$RECURSIVE1_VERIFIER/input.zkin.json --norm_stage --agg_stage
7272

7373
else
7474
echo "Generate snark proof"

zkit/src/lib.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

zkit/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extern crate clap;
22
use clap::{command, Parser};
33
use dsl_compile::circom_compiler;
4-
use eigen_zkit::groth16_api::*;
4+
use groth16::api::*;
55
use plonky::api::{
66
aggregation_check, aggregation_prove, aggregation_verify, analyse, calculate_witness,
77
export_aggregation_verification_key, export_verification_key, generate_aggregation_verifier,
@@ -297,7 +297,7 @@ pub struct Groth16ProveOpt {
297297
#[arg(long = "r1cs", required = true)]
298298
circuit_file: String,
299299
#[arg(short, required = true)]
300-
wtns_file: String,
300+
wasm_file: String,
301301
#[arg(short, required = true, default_value = "g16.zkey")]
302302
pk_file: String,
303303
#[arg(short, required = true)]
@@ -484,7 +484,7 @@ fn main() {
484484
Command::Groth16Prove(args) => groth16_prove(
485485
&args.curve_type,
486486
&args.circuit_file,
487-
&args.wtns_file,
487+
&args.wasm_file,
488488
&args.pk_file,
489489
&args.input_file,
490490
&args.public_input_file,

0 commit comments

Comments
 (0)