-
Notifications
You must be signed in to change notification settings - Fork 16
feat!: Remove backend solvable methods from the interface and solve them in ACVM #264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much happier with this compared to original proposal as now we've defined a proper interface. This PR is leaving a lot of dead code on the PWG trait however which needs to be cleaned up.
This PR is still leaving dead code on the |
Yes, the idea is to remove this in another PR when this one is merged, we will be able to remove corresponding solves in the backend safely since they will not be called after this PR is merged. |
I think we could rename the PR to |
Since we want to have small PRs, I think it makes sense to have this one which does not call the backend and implement the solve methods, but does not break anything (and so it is a chore), and then have another one which will be a feat! and will break the interface, but it will only do that. This way there is no confusion between implementing the solvers and modifying the PWG trait. |
Agreed with renaming PR, I don't really see the logic in doing this in two steps. We should only have one implementation of the black box functions in use at any one time. |
I don't think this PR is non-breaking. If a backend was relying on their implementation of |
No they are not be broken if I switch-in this PR, the schnorr verification should work for both implementations, if not that means their implementation was already broken. |
Another example would be |
If a backend was not doing the correct behavior for functions like hash_to_field etc, then I think thats on them -- and us for not having a spec. I'm impartial as to this PR being breaking, but we should not release a version without the accompanying breaking change which removes the duplicates. |
Related issue(s)
(If it does not already exist, first create a GitHub issue that describes the problem this Pull Request (PR) solves before creating the PR and link it here.)
Resolves (link to issue)
Description
Summary of changes
Use ACVM instead of calling the backend for solving blackbox functions, for the bb functions which do not use barretenberg for solving (the low hanging fruits).
Checklist
cargo fmt
with default settings.Additional context
Once this PR is merged, I will remove the related solve traits from pwg so that backends do not need to implement these solvers.