From d8d18f8f31d110ac4b734fca004d7b80abf5da90 Mon Sep 17 00:00:00 2001 From: mmagician Date: Thu, 18 Jul 2024 09:18:01 +0200 Subject: [PATCH] Rust limitation no longer applies; warning about circom/arkworks diff --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7841cc0..3734199 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,12 @@ Tests require the following installed: - [x] Proof generations and verification using Arkworks - [ ] CLI for common operations -## Known limitations +## Notes -Currently, due to an issue in our upstream (https://github.com/wasmerio/wasmer/issues/4072), this crate works as expected only up to Rust version `1.67.0`; in newer Rust versions, `wasmer` is currently unsound. +The prover key generated by circom differs from the one generated by arkworks' groth16 library. While the format is the same, it represents different values. +Circom 'prepares' the powers of tau by converting them to Lagrange base, i.e. from `s^i.G` -> `L_i(s).G`. This affects the witness generation process, and the caller needs to ensure the correct `R1CSToQAP` implementer is used: +- use [`CircomReduction`](https://github.com/arkworks-rs/circom-compat/blob/b892c62597687c23341cda1e8e89d58bb6428f36/src/circom/qap.rs#L12) for working with circom-generated files, +- use [`LibsnarkReduction`](https://github.com/arkworks-rs/groth16/blob/5272c935bda290a24cd18d0a3f994b0af70d5f27/src/r1cs_to_qap.rs#L101) for setup produced using the arkworks backend. ## Acknowledgements