mirror of
https://github.com/arnaucube/circom-compat.git
synced 2026-01-09 07:21:33 +01:00
Migrate usage from E:Pairing to F:PrimeField when Pairing is not needed
The motivation to do so, is so we can use the witness generation with other curves that don't have pairings (and hence the Pairing trait implemented).
This commit is contained in:
@@ -2,7 +2,7 @@ use ark_circom::{CircomBuilder, CircomConfig};
|
||||
use ark_std::rand::thread_rng;
|
||||
use color_eyre::Result;
|
||||
|
||||
use ark_bn254::Bn254;
|
||||
use ark_bn254::{Bn254, Fr};
|
||||
use ark_crypto_primitives::snark::SNARK;
|
||||
use ark_groth16::Groth16;
|
||||
|
||||
@@ -10,7 +10,7 @@ type GrothBn = Groth16<Bn254>;
|
||||
|
||||
#[test]
|
||||
fn groth16_proof() -> Result<()> {
|
||||
let cfg = CircomConfig::<Bn254>::new(
|
||||
let cfg = CircomConfig::<Fr>::new(
|
||||
"./test-vectors/mycircuit.wasm",
|
||||
"./test-vectors/mycircuit.r1cs",
|
||||
)?;
|
||||
@@ -41,7 +41,7 @@ fn groth16_proof() -> Result<()> {
|
||||
|
||||
#[test]
|
||||
fn groth16_proof_wrong_input() {
|
||||
let cfg = CircomConfig::<Bn254>::new(
|
||||
let cfg = CircomConfig::<Fr>::new(
|
||||
"./test-vectors/mycircuit.wasm",
|
||||
"./test-vectors/mycircuit.r1cs",
|
||||
)
|
||||
@@ -63,7 +63,7 @@ fn groth16_proof_wrong_input() {
|
||||
#[test]
|
||||
#[cfg(feature = "circom-2")]
|
||||
fn groth16_proof_circom2() -> Result<()> {
|
||||
let cfg = CircomConfig::<Bn254>::new(
|
||||
let cfg = CircomConfig::<Fr>::new(
|
||||
"./test-vectors/circom2_multiplier2.wasm",
|
||||
"./test-vectors/circom2_multiplier2.r1cs",
|
||||
)?;
|
||||
@@ -95,7 +95,7 @@ fn groth16_proof_circom2() -> Result<()> {
|
||||
#[test]
|
||||
#[cfg(feature = "circom-2")]
|
||||
fn witness_generation_circom2() -> Result<()> {
|
||||
let cfg = CircomConfig::<Bn254>::new(
|
||||
let cfg = CircomConfig::<Fr>::new(
|
||||
"./test-vectors/circom2_multiplier2.wasm",
|
||||
"./test-vectors/circom2_multiplier2.r1cs",
|
||||
)?;
|
||||
|
||||
@@ -2,7 +2,7 @@ use ark_circom::{ethereum, CircomBuilder, CircomConfig};
|
||||
use ark_std::rand::thread_rng;
|
||||
use color_eyre::Result;
|
||||
|
||||
use ark_bn254::Bn254;
|
||||
use ark_bn254::{Bn254, Fr};
|
||||
use ark_crypto_primitives::snark::SNARK;
|
||||
use ark_groth16::Groth16;
|
||||
|
||||
@@ -16,7 +16,7 @@ use std::{convert::TryFrom, sync::Arc};
|
||||
|
||||
#[tokio::test]
|
||||
async fn solidity_verifier() -> Result<()> {
|
||||
let cfg = CircomConfig::<Bn254>::new(
|
||||
let cfg = CircomConfig::<Fr>::new(
|
||||
"./test-vectors/mycircuit.wasm",
|
||||
"./test-vectors/mycircuit.r1cs",
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user