Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show call stacks for failing constraints in all functions #1815

Closed
Tracked by #1224
sirasistant opened this issue Aug 25, 2023 · 1 comment · Fixed by #1997
Closed
Tracked by #1224

Show call stacks for failing constraints in all functions #1815

sirasistant opened this issue Aug 25, 2023 · 1 comment · Fixed by #1997
Assignees

Comments

@sirasistant
Copy link
Contributor

sirasistant commented Aug 25, 2023

Currently, when an assertion is not met we print a call stack that is resolved at compile time. Since constrained functions are completely inlined, this callstack is complete for constrained functions, but unconstrained functions are not inlined during compilation to allow for recursion.

This makes the callstacks for unconstrained functions incomplete, since we need runtime information of the callstack when an opcode fails.

We'll have to modify the ACVM to report on brillig execution errors not a singular OpcodeLocation, but a vector of OpcodeLocations representing the [...callStack, failingConstraint].

We'll have to adapt the code in acir-simulator to create a complete CallStack with this list of opcode locations.

@sirasistant
Copy link
Contributor Author

Corresponding noir issue noir-lang/noir#2550

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant