arnaucube
/
arnaucube
/
circom-compat
Public
Self-hosted repository
Code
Commits
Branches & tags
Commit history
bf2b439fae990d86c8154f72283c59a3732ea11b
o
Improve r1cs_reader for Circom 2 (#13) * Improve r1cs_reader for Circom 2 Shamelessly taken from https://github.com/poma/zkutil/pull/7/files by @lispc * Document Seek type restriction * Doc linter: use automatic links * Use iter for iterating over sections * Better error handling with ok_or_else * Revert "Use iter for iterating over sections" This reverts commit bc88c726590e250c2e042e9d4b74b77e294e32ec.
oskarth
committed on Dec 1, 2021
bf2b439
o
Initial Circom 2 support (#10) * Import circom-2 test vectors * Add failing test under feature flag * Add exceptionHandler * Add showSharedRWMemory * Add getFieldNumLen32 and disable getFrLen * Add getVersion Also print version, n32 * Add getRawPrime - Disable getPtrRawPrime - Write as conditional cfg code blocks * Refactor cfg code blocks * Add readSharedRWMemory and get prime from WASM mem - Add fromArray32 convenience function * WIP: Debug R1CSfile header field_size in header is 1, not 32 as expected Don't see anything recently changed here: https://github.com/iden3/r1csfile/blob/master/src/r1csfile.js (used by snarkjs) But this seems new: https://github.com/iden3/circom/blob/0149dc0643c3842635fb758efc9ebc102f170a38/constraint_writers/src/r1cs_writer.rs * Add CircomVersion struct to Wasm * XXX: Enum test * Trait version * Move traits to Circom, CircomBase, Circom2 * Simplify Wasm struct and remove version * Feature gate Circom1/Circom2 traits * Use cfg_if for witness calculation Make normal dependency * Fix visibilty for both test paths * Remove println Can introduce tracing separately * refactor * Make clippy happy with imports, unused variables
oskarth
committed on Nov 29, 2021
64e0ee9
o
Early exit in error callback from Wasm (#9) * Early exit in error callback from Wasm This avoids Wasm execution hanging due to problems such as wrong public input. Mimics circom_runtime behaviour with less detailed debug information. See https://github.com/iden3/circom_runtime/blob/master/js/witness_calculator.js#L52-L64 Adds test for wrong public input. Without early exit, the test stalls. With it, the Circom build step fails as expected. * chore: clean up error handling * ci: add caching Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
oskarth
committed on Nov 18, 2021
b1daefc
G
feat: benchmarks (#3) * add benchmark * chore: add complex circuit * feat: enable parallel / asm * bench: use pre-calculated matrices/constraints * chore: bump ethers-rs * chore: fmt * feat: add benches for differently sized circuits (#6) * feat: update bench circuit * feat: add benches for many sizes * fix: adjust bench parameters * fix: remove sym * chore: fmt * fix: point to correct commit of groth16 * fix: update function names to upstream * fix: update function names to upstream Co-authored-by: Kobi Gurkan <kobigurk@gmail.com>
Georgios Konstantopoulos
committed on Sep 8, 2021
bb0f542
G
Feat: Use pre-calculated ConstraintMatrices (#2) * feat: add function for calculating the coefficients * fix tests / debug coeffs * feat: use groth16 with configurable matrices * test: add no r1cs test * test: add a test to check matrices values * scaffold of the matrix calculation * feat: correctly load and use matrices in the without_r1cs variant * chore: cargo fmt * chore: cargo fmt / lints * ci: do not double run tests * fix: calculate correctly points at inf * test: use correct abicoder v2 types Co-authored-by: Kobi Gurkan <kobigurk@gmail.com>
Georgios Konstantopoulos
committed on Aug 17, 2021
11e6d04
G
chore: cargo fmt
Georgios Konstantopoulos
committed on Aug 13, 2021
4e2c2d3
G
fix: use correct fn prover name in tests
Georgios Konstantopoulos
committed on Aug 13, 2021
0dd126b
G
perf: enable parallel on ark packages
Georgios Konstantopoulos
committed on Aug 13, 2021
a85b99e
G
perf: enable asm on ark-ff
Georgios Konstantopoulos
committed on Aug 13, 2021
3c11c94
G
chore: use latest upstream gro16
Georgios Konstantopoulos
committed on Aug 13, 2021
f316f6a
G
chore: cargo fmt
Georgios Konstantopoulos
committed on Aug 11, 2021
293314f
G
feat: add deserialize_field2 function
Georgios Konstantopoulos
committed on Aug 11, 2021
29de734
G
chore: expose Proof a/b/c
Georgios Konstantopoulos
committed on Aug 11, 2021
cf22524
G
fix: negate negative witness elements
Georgios Konstantopoulos
committed on Aug 10, 2021
de9af5b
G
fix: use latest names for groth16 traits/types
Georgios Konstantopoulos
committed on Aug 10, 2021
c32270a
G
chore: trim deps
Georgios Konstantopoulos
committed on Jul 26, 2021
c03ae84
G
docs: add readme
Georgios Konstantopoulos
committed on Jul 26, 2021
be99d3a
G
refactor: rename circuit -> circom
Georgios Konstantopoulos
committed on Jul 26, 2021
72c533a
G
zkey: expose only 1 method - everything else private
Georgios Konstantopoulos
committed on Jul 26, 2021
29a7555
G
refactor: rename circom_wasm to witness
Georgios Konstantopoulos
committed on Jul 26, 2021
8ff7f3c
G
initial commit
Georgios Konstantopoulos
committed on Jul 26, 2021
b64f038