Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

feat!: Provide runtime callstacks for brillig failures and return errors in acvm_js #523

Merged
merged 10 commits into from
Sep 4, 2023

Conversation

sirasistant
Copy link
Contributor

@sirasistant sirasistant commented Sep 4, 2023

Description

Problem*

ACVM part of noir-lang/noir#2550

  • Brillig errors were never emitted from the ACVM, they were changed to an unsatisfied constraint error. Now they are emitted and they contain a call stack instead of a failing opcode, to be able to provide call stacks for brillig functions which are not inlined.
  • Also, the acvm_js was throwing strings instead of errors. Now it throws JS errors and in the case of an execution failure, an error with a call stack property.
  • Since the acvm_js now returns the failing opcode locations in a structured way, we can remove insertion of indices in OpcodeResolutionError

Summary*

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

brillig_vm/src/lib.rs Outdated Show resolved Hide resolved
@kevaundray kevaundray added this pull request to the merge queue Sep 4, 2023
Merged via the queue into master with commit 7ab7cff Sep 4, 2023
15 checks passed
@kevaundray kevaundray mentioned this pull request Sep 4, 2023
TomAFrench added a commit that referenced this pull request Sep 15, 2023
* master: (40 commits)
  chore: make acvm_js publish trigger on release-please (#550)
  chore(ci): add `cargo deny` workflow (#549)
  fix: use the exact version for the hex crate (#546)
  chore: Release 0.26.1 (#542)
  fix: Implements handling of the high limb during fixed base scalar multiplication (#535)
  chore: fix acvm publishing (#539)
  chore: fix wasm build on macos (#541)
  chore(ci): install `wasm-bindgen-cli` through prebuilt binary (#536)
  chore: add manual trigger to acvm_js publishing (#534)
  chore: acvm_js publishing (#529)
  chore: Release 0.26.0 (#533)
  chore!: Add a low and high limb to scalar mul opcode (#532)
  chore: Release 0.25.0 (#526)
  fix: initialize recursive proof output to zero (#524)
  chore(ci): update to actions/checkout@v4 (#525)
  feat!: Provide runtime callstacks for brillig failures and return errors in acvm_js (#523)
  chore: add ci for acvmjs rust test (#516)
  chore: Release 0.24.1 (#519)
  fix: Add WASI 20 `_initialize` call to `acvm_backend.wasm` binary (#518)
  chore: Release 0.24.0 (#512)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants