This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
feat!: Remove solve
from PWG trait & introduce separate solvers for each blackbox
#257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue(s)
Works towards a resolution of the conversation at https://github.com/noir-lang/acvm/pull/247/files#r1180617953 and puts ACVM in a better position for self-implementing all of the opcodes (one by one).
Description
Summary of changes
This removes the
solve
function on the PartialWitnessGenerator trait and moves it into thepwg
module as a standalone function that takes a backend. It also replacessolve_black_box_function_call
with individual functions for each black box function being solved. This will allow us to systematically implement the blackbox function calls in ACVM and then remove them from the PWG interface for backends. Until (eventually) they are all gone and the backend doesn't need to implement anything for PWG; instead, just conforming to the ACVM implementation.I've split these out into separate functions because leaking the BlackBoxFunc enum to a backend is misleading after #247 lands and keccak is handled by ACVM. However, it seems like we'll need pedersen for quite some time (probably as the only one?).
Dependency additions / changes
(If applicable.)
Test additions / changes
(If applicable.)
Checklist
cargo fmt
with default settings.Additional context
(If applicable.)