zerokit
zerokit copied to clipboard
Remove the ark-circom dependency completely
Background
Currently, ark-circom is used for three primary purposes:
- Zkey reading and parsing
- Witness calculation
- Groth16 proof calculation
Current Status
- We've already switched to calculating proofs using iden3
- Key parsing can be accomplished with alternative libraries. For now use ark-zkey approach, but it requires changes
- Witness calculation still needs to be addressed (example of usage: https://github.com/vacp2p/zerokit/blob/8a3e33be418ca6f66fa041c3fda475e24bb82268/rln/src/protocol.rs#L562-L570
Why Remove ark-circom?
The dependency introduces significant compatibility issues:
- We can't use version 0.1.0 due to outdated dependencies
- We can't use version 0.5.0 because it conflicts with newer versions of other ark libraries
- Our current approach (using master branch with loosened dependencies) depends on
wasmer-wasix
which lacks x32 system support. See their open issue : https://github.com/wasmerio/wasmer/issues/4227
Proposed Solution
Replace all remaining ark-circom functionality with alternative implementations:
- [x] Witness calculation: Already migrated to iden3 (see #273)
- [ ] Key parsing: Research and implement alternative libraries
- [ ] Proof calculation: Identify and implement replacement