fix: add clear error for unsatisfiable ACIR AssertZero opcode#22417
Merged
TomAFrench merged 2 commits intoApr 10, 2026
Merged
Conversation
federicobarbacovi
approved these changes
Apr 10, 2026
federicobarbacovi
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks for adding this! Just a small suggestion
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
BEGIN_COMMIT_OVERRIDE fix: skip heavy recursion tests in debug builds (#22446) fix: add clear error for unsatisfiable ACIR AssertZero opcode (#22417) feat: enforce accumulator_not_empty = 0 at ECCVM lagrange_first row (#22461) fix: skip heavy recursion tests in debug builds, keep one for assertion coverage (#22389) fix: external audit fixes for Pedersen (#22434) chore!: fix BASE off-by-one in create_small_range_constraint in theta step of keccak (#22404) fix: external audit fixes for Keccak (#22436) fix: external audit fixes for BLAKE (#22443) chore: misc hash gadget updates (#22452) END_COMMIT_OVERRIDE
critesjosh
pushed a commit
that referenced
this pull request
Apr 14, 2026
## Summary When an ACIR `AssertZero` opcode has no variables but a non-zero constant, the circuit is fundamentally unsatisfiable (`nonzero == 0` can never hold). Previously this hit a generic assertion about empty gates with no indication of the real problem. Added an early check in `assert_zero_to_quad_constraints` that detects this case and produces a clear error: "circuit is unsatisfiable. An AssertZero opcode contains no variables but has a non-zero constant, which can never equal zero." ## Test plan - All 60 existing quad/big-quad constraint tests pass - Built and ran `dsl_tests` successfully ClaudeBox log: https://claudebox.work/s/bcd66a8253a37704?run=1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When an ACIR
AssertZeroopcode has no variables but a non-zero constant, the circuit is fundamentally unsatisfiable (nonzero == 0can never hold). Previously this hit a generic assertion about empty gates with no indication of the real problem.Added an early check in
assert_zero_to_quad_constraintsthat detects this case and produces a clear error: "circuit is unsatisfiable. An AssertZero opcode contains no variables but has a non-zero constant, which can never equal zero."Test plan
dsl_testssuccessfullyClaudeBox log: https://claudebox.work/s/bcd66a8253a37704?run=1