Commit Graph

5 Commits

Author SHA1 Message Date
Georgios Konstantopoulos 06eb0759e0
Bump to latest Ethers (#26)
* chore: bump ethers

* fix: adjust ethers breaking changes

1. Use the abigen'd ::deploy methods
2. Use Anvil instead of Ganache

* silence warning

* fix: replace abi with full verifier artifact

* ci: use anvil instead of the node stack

* chore: remove ethers-solc

* fix: return error instead of raise

17c0834abf
this api got deprecated and would panic instead of generating an error that can behandled

* lints

* minimfy json
2022-08-29 15:06:27 -07:00
oskarth 1a383b6260
Ensure Circom 1 tests pass with experimental Circom 2 support (#18)
* All tests pass under circom-2 feature flag

- Check for version in WASM, default to version 1
- Include Circom1 when Circom 2 feature flag is enabled

Currently a lot of code duplication. Once Circom-2 is more stable and
proven to work in the wild, feature flag can be removed.

* Separate Circom 1 and Circom2 witness calculation

* Cleanup

* WitnessCalculator helpers for Circom 1 and 2

Also make helper fn private

* Move comment

* Fix expression return

* cargo fmt

* Add cargo test circom-2 to ci
2022-01-13 13:30:00 +02:00
oskarth b1daefca96
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>
2021-11-18 12:03:37 +02:00
Georgios Konstantopoulos 11e6d04f3b
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>
2021-08-17 14:45:13 +03:00
Georgios Konstantopoulos b64f038283 initial commit 2021-07-26 17:04:43 +03:00