-
Notifications
You must be signed in to change notification settings - Fork 204
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
Epic: Expose black box function solvers into TS #2811
Comments
Should we also provide helper functions for Noir stdlib functions? For example: EdDSA where a Noir dev mentioned on Discord the difficulty to compute a Noir-stdlib-compatible version of it in JavaScript. Not sure if this should spin out into a separate issue / repo. Happy to hear thoughts! |
Exposing Noir stdlib functions is outside of the scope of this package as it's purely concerned with ACIR/ACVM. i.e. A change in the Noir stdlib shouldn't require ACVM to change. That said, a Noir package can compile down its stdlib functions into ACIR snippets and act as a wrapper around acvm_js to execute and decode the return values. |
It would be preferable to wait for improved Pedersen implementation to help others being implmented more easily. |
@kobyhallx for the Pedersen-based ones you meant (e.g. Merkle verification)? Or everything |
Assigning |
@TomAFrench do you foresee #3079 being able to execute the remaining black box functions / fully deprecate how we used to execute black box functions? If yes, we can close this as superseded. If not, we might want to prioritize works accordingly. |
Closing as will be replaced with usage of bb.js in the short term |
@TomAFrench is that something bb.js already or should offer? |
It does. |
Problem
Suggested by @Savio-Sou.
Developers who are making use of ACVM.js are often going to want to make use of the blackbox functions inside of their business logic. For instance pedersen commitments are used in applications such as mastermind-noir and must be calculated in TS to feed into the circuit while matching a value calculated inside the circuit.
It's then important to provide an implementation which is guaranteed to be consistent with ACVM.
Proposed solution
The ACVM.js can expose the implementations of black box functions as helper functions to allow developers query the result of these will be. They can then easily calculate any black box function like hashes (e.g. pedersen, keccak256) and verify signatures (schnorr, ecdsa).
This will be guaranteed to match the ACVM and prevent developers from having to hunt down TS implementations.
Tasks
Rust solvers are available for
hash_to_field_128_security
andfixed_base_scalar_mul
atm, so they should require less work thanpedersen
andschnorr
to expose.The text was updated successfully, but these errors were encountered: