Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.7.0 #271

Open
8 tasks
seemenkina opened this issue Oct 4, 2024 · 1 comment
Open
8 tasks

Release v0.7.0 #271

seemenkina opened this issue Oct 4, 2024 · 1 comment

Comments

@seemenkina
Copy link
Contributor

seemenkina commented Oct 4, 2024

The scope of features and bugs that will be fixed in the minor v0.6.1 release

Usage of arkzkey

Poseidon

Poseidon Hash

  • Generate Poseidon round parameters and constants:

rln-wasm

  • audit the current implementation to find performance pitfalls.
  • Bump dependencies of wasmer and benchmark against current implementation
  • TBD: results of the rln-wasm audit

Docs

@seemenkina seemenkina changed the title Draft: Release v0.6.1 Release v0.6.1 Nov 18, 2024
@seemenkina seemenkina mentioned this issue Nov 18, 2024
12 tasks
@seemenkina seemenkina changed the title Release v0.6.1 Release v0.7.0 Nov 26, 2024
@AlekseiVambol
Copy link
Contributor

Using the arkzkey witness calculator in zerokit implicitly involves running the corresponding WASM code. This circumstance suggests the possibility of more performant witness computation. Two alternative Circom witness calculators, which does not rely on WASM, were proposed recently:
circom-witness-rs
circom-witnesscalc

Thus, in order to improve the performance of the witness calculation process of zerokit in reasonable amount of time, these two alternatives have been studied in terms of expected performance and convenience for integration into zerokit. The study methods were static code analysis and review of available documentation.

This comparative study has yielded the following results:

  1. Both calculators rely only on Rust code for the witness computation phase, which uses the execution graph. No evidence of parallelization has been found. See https://github.com/philsippl/circom-witness-rs/blob/fed7d591a4a6adfde371d3dac3fde23d755bcd39/src/graph.rs#L124 and https://github.com/iden3/circom-witnesscalc/blob/5cb365b6e4d9052ecc69d4567fcf5bc061c20e94/src/graph.rs#L368
  2. Both calculators use HashMaps with String keys to describe input values for the witness computation process and operate on the Fp<MontBackend<FrConfig, 4>, 4> variables to compute and store the witness data. The later data type is provided by Arkworks.
  3. circom-witnesscalc has been created by iden3 (the creators of Circom) on the basis of circom-witness-rs "as a drop-in replacement for Circom's witness generator" and implements more execution graph operations. See the code references in the point 1.
  4. circom-witness-rs "generates the c++ version of the witness generator through circom and links itself against it." circom-witnesscalc "can calculate the witness for any Circom circuit without ... embedding a C++ binary".
  5. Studying the implementation of the execution graph computation is out of the scope of the work for sake of its time efficiency. However, taking into account the point 3, circom-witnesscalc can be reasonably expected to generate execution graphs providing the average witness computation performance, which is not worse than in the case of circom-witness-rs execution graphs.

The practical conclusion of the study is the advice to prefer circom-witnesscalc as the replacement for the arkzkey witness calculator in zerokit .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants