Skip to content

Commit

Permalink
feat: Dynamic assertion payloads v2 (#5949)
Browse files Browse the repository at this point in the history
This PR implements this proposal:
noir-lang/noir#4239 (comment)
 - Removes legacy dynamic assertions via calling brillig + oracle
 - Removes legacy oracle handling for assertions
- Frontend adds the HirType in the ConstrainError instead of embedding
metadata about it in the program logic.
 - Constrain instruction in SSA now has `Values` for payload
 - SSA gen generates an error selector from the payload type
- ACIR gen and Brillig gen handle the payload ValueIds and error
selector
 - ABI has now error_types for non-string errors
 - ACVM now resolves the payload for non-constant AssertionPayloads
- Nargo decodes the error for non-string errors using the ABI, allowing
use in nargo tests
 
 Things to do in a followup PR:
- Add an entry point in noirc_abi_wasm that allows decoding a given
`Raw` (non-string) using the ABI in the same way that nargo does.
  • Loading branch information
sirasistant authored and AztecBot committed Apr 27, 2024
1 parent 35ad1a6 commit a889d18
Showing 1 changed file with 343 additions and 11 deletions.
Loading

0 comments on commit a889d18

Please sign in to comment.