Skip to content

Commit

Permalink
Merge branch 'master' into release-0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagician committed Oct 28, 2024
2 parents 2e8051d + 7f80002 commit 8fa65f0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
37 changes: 19 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ark-circom"
version = "0.5.0-alpha"
edition = "2018"
edition = "2021"
description = "Arkworks bindings to Circom's R1CS, for Groth16 Proof and Witness generation in Rust"
homepage = "https://arkworks.rs"
repository = "https://github.com/arkworks-rs/circom-compat"
Expand All @@ -13,12 +13,12 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
# WASM operations
wasmer = { version = "4.3.0", default-features = false }
wasmer-wasix = { version = "0.27", default-features = false }
fnv = { version = "=1.0.7", default-features = false }
num = { version = "=0.4.0" }
num-traits = { version = "=0.2.15", default-features = false }
num-bigint = { version = "=0.4.3", default-features = false, features = ["rand"] }
wasmer = { version = "4.4.0", default-features = false }
wasmer-wasix = { version = "0.28.0", default-features = false }
fnv = { version = "1.0.7", default-features = false }
num = { version = "0.4.3" }
num-traits = { version = "0.2.16", default-features = false }
num-bigint = { version = "0.4.3", default-features = false, features = ["rand"] }

# ZKP Generation
ark-crypto-primitives = { version = "0.5.0-alpha" }
Expand All @@ -31,25 +31,26 @@ ark-poly = { version = "0.5.0-alpha", default-features = false, features = ["par
ark-relations = { version = "0.5.0-alpha", default-features = false }
ark-serialize = { version = "0.5.0-alpha", default-features = false }


# decoding of data
hex = "=0.4.3"
byteorder = "=1.4.3"
hex = "0.4.3"
byteorder = "1.4.3"

# ethereum compat
ethers-core = { version = "=2.0.7", default-features = false, optional = true }
ethers-core = { version = "2.0.7", default-features = false, optional = true }

# error handling
thiserror = "=1.0.39"
color-eyre = "=0.6.2"
criterion = "=0.3.6"
thiserror = "1.0.39"
color-eyre = "0.6.2"

cfg-if = "=1.0.0"
cfg-if = "1.0.0"

[dev-dependencies]
hex-literal = "=0.2.2"
tokio = { version = "=1.29.1", features = ["macros"] }
serde_json = "=1.0.94"
ethers = "=2.0.7"
criterion = "0.5.1"
hex-literal = "0.4.1"
tokio = { version = "1.29.1", features = ["macros"] }
serde_json = "1.0.94"
ethers = "2.0.7"

[[bench]]
name = "groth16"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ assert!(verified);
## Running the tests

Tests require the following installed:

1. [`solc`](https://solidity.readthedocs.io/en/latest/installing-solidity.html). We also recommend using [solc-select](https://github.com/crytic/solc-select) for more flexibility.
2. [`ganache-cli`](https://github.com/trufflesuite/ganache-cli#installation)

Expand All @@ -75,6 +76,7 @@ Circom 'prepares' the powers of tau by converting them to Lagrange base, i.e. fr
## Acknowledgements

This library would not have been possibly without the great work done in:

- [`zkutil`](https://github.com/poma/zkutil/)
- [`snarkjs`](https://github.com/iden3/snarkjs/)

Expand Down
11 changes: 4 additions & 7 deletions src/circom/builder.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use std::{fs::File, path::Path};
use wasmer::Store;

use ark_ff::PrimeField;
use num_bigint::BigInt;
use std::{collections::HashMap, fs::File, io::BufReader, path::Path};
use wasmer::Store;

use super::{CircomCircuit, R1CS};

use num_bigint::BigInt;
use std::collections::HashMap;

use crate::{
circom::R1CSFile,
witness::{Wasm, WitnessCalculator},
Expand All @@ -33,7 +30,7 @@ impl<F: PrimeField> CircomConfig<F> {
pub fn new(wtns: impl AsRef<Path>, r1cs: impl AsRef<Path>) -> Result<Self> {
let mut store = Store::default();
let wtns = WitnessCalculator::new(&mut store, wtns).unwrap();
let reader = File::open(r1cs)?;
let reader = BufReader::new(File::open(r1cs)?);
let r1cs = R1CSFile::new(reader)?.into();
Ok(Self {
wtns,
Expand Down

0 comments on commit 8fa65f0

Please sign in to comment.