-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
You can change the commit to point to acvm 0.11 -- Is this ready for review? If not, then I can push a new PR with the fallible traits but has the same behaviour as without the fallible traits. Main goal here is to get Keccak upstreamed -- Alternatively, I can add Keccak into the pwg for now by copying this code into here. Then removing it once we use acvm > 0.11 |
Promoting from draft because acvm 0.11 was released but we still need to workshop the errors and stuff. |
I've completed my Besides error variant naming and error messages, I think this should be good-to-go. Will wait on @TomAFrench to do a full review and give feedback on those. |
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.
A couple of these error types don't need to exist in my mind (comments below).
We've also bundled in a change which changes WASMValue
to cover not just return values but all arguments as well. I'm going to split off this change so I can review errors in isolation.
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.
I think that we can remove a number of errors which are included here. I don't think we should expose these as users never need to be concerned with them. I don't think it's worth blocking over however as we don't have semver set up yet so every release is breaking and we can just remove them progressively.
Some thoughts on error variants
|
I looked through the compiler and we currently aren't preventing them at compile time so we should leave them for this to land sooner. We need to fix things in bb-sys to ensure this at compile time.
I'm fine joining these into one error, but these are the
I'm going to leave this because it's easier to not have to grep for all the different types of ways to panic.
We can leave them as-is then. |
I think this PR is good-to-go and we should hold any other changes/PRs until it lands. We need to get this stuff upstreamed. |
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.
This is great! Thank You!
* master: feat!: Update to ACVM v0.11.0 (#151)
* acvm-0.12.0: fix bad rebase chore: Release 0.1.2 (#183) fix: Remove star dependencies to allow publishing (#182) chore: Release 0.1.1 (#181) fix: Add description so crate can be published (#180) chore: update readme to new name and add contract note (#177) feat!: update to acvm with non-homogeneous bb calls (#169) update to latest changes chore: Release 0.1.0 (#173) use patch syntax chore: update to use new black box solver interface feat!: update to target acvm-84b5d18d chore(ci): Update tokens (#174) chore: Add release-please and publish workflows to project (#172) feat!: Update to ACVM v0.11.0 (#151) chore: remove usage of `std::mem::forget` (#164) chore: Enforce proper conversion of memory into fixed length array (#163) chore: Add test for Keccak256 constraint (#158) chore: use `WASMValue` for wasm arguments as well as return values (#157) feat!: Add Keccak constraints (#150)
This reworks the backend to leverage the changes for fallible functions. It introduces an error enum with admittedly bad variant names and uses them to map error cases throughout the codebase so panic and/or unwrap isn't used to handle most values.
There are still some TODOs to cleanup even moreunwrap
cases and it relies on something like noir-lang/acvm#251, but this should be a solid skeleton for how a backend can surface errors to nargo.Closes #159