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

chore: Toggle underconstrained check #5724

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

vezenovm
Copy link
Contributor

Description

Problem*

Resolves

No issue as discovered when experimenting with https://github.com/iAmMichaelConnor/blob-lib/tree/domain-size-4096.

When compiling the circuit on the branch linked above using Noir master this was the result of timing nargo compile:

nargo compile --force --benchmark-codegen --silence-warnings  383.30s user 148.34s system 131% cpu 6:44.03 total

with under constrained check taking 200ms (about half the compilation time).

The check returned no bugs. If the developer wants to iterate more quickly and knows they are not changing unconstrained code or simply wishes to check for under constrained bugs later they should have the ability.

Summary*

This PR simply adds a flag --skip-underconstrained-check that skips calling ssa.check_for_underconstrained_values().

The blob-lib linked above compiled in half the time with the underconstrained check off:

nargo compile --force --skip-underconstrained-check --benchmark-codegen  192.15s user 295.27s system 220% cpu 3:41.33 total

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

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

@TomAFrench TomAFrench added this pull request to the merge queue Aug 22, 2024
Merged via the queue into master with commit eb54614 Aug 22, 2024
45 checks passed
@TomAFrench TomAFrench deleted the mv/toggle-underconstrained-check branch August 22, 2024 13:55
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 23, 2024
…ents (noir-lang/noir#5795)

feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 23, 2024
…ang/noir#5795)

feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
Aristotelis2002 added a commit to blocksense-network/noir that referenced this pull request Aug 23, 2024
 Conflicts:
	compiler/noirc_driver/src/lib.rs
	compiler/noirc_evaluator/src/ssa.rs

The upstream have added an underconstrained check which was in conflict
with our changes on SsaEvaluatorOptions. In short they have changed the
struct by adding an extra field data to it.

I accepted both changes. All tests pass.

The upstream PR which added those changes:
noir-lang#5724
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 24, 2024
…5802)

chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 24, 2024
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 25, 2024
…5802)

chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 25, 2024
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 26, 2024
…5802)

chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 26, 2024
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 27, 2024
feat: Improve "type annotations needed" errors (noir-lang/noir#5830)
chore: enum dummy ID for `FuncId` in monomorphizer and docstring fixes (noir-lang/noir#5421)
chore: delete wip fuzzing files that got accidentally added  (noir-lang/noir#5829)
chore: test ACVM `BigInt` (noir-lang/noir#5559)
fix(docs): Fix file paths for metaprogramming docs (noir-lang/noir#5826)
fix: bit shifting type checking (noir-lang/noir#5824)
feat: add Expr::as_method_call (noir-lang/noir#5822)
chore: Fix docs typo (noir-lang/noir#5821)
feat: add `UnresolvedType::is_field` and `Expr::as_assign` (noir-lang/noir#5804)
chore: Add docs for each comptime method (noir-lang/noir#5802)
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
AztecBot added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 27, 2024
feat: Improve "type annotations needed" errors (noir-lang/noir#5830)
chore: enum dummy ID for `FuncId` in monomorphizer and docstring fixes (noir-lang/noir#5421)
chore: delete wip fuzzing files that got accidentally added  (noir-lang/noir#5829)
chore: test ACVM `BigInt` (noir-lang/noir#5559)
fix(docs): Fix file paths for metaprogramming docs (noir-lang/noir#5826)
fix: bit shifting type checking (noir-lang/noir#5824)
feat: add Expr::as_method_call (noir-lang/noir#5822)
chore: Fix docs typo (noir-lang/noir#5821)
feat: add `UnresolvedType::is_field` and `Expr::as_assign` (noir-lang/noir#5804)
chore: Add docs for each comptime method (noir-lang/noir#5802)
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution after metadata deduplication (noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization (noir-lang/noir#5810)
fix: honor function visibility in LSP completion (noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents (noir-lang/noir#5795)
feat: Explicit Associated Types & Constants (noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field` (noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue (noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check (noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon` (noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates (noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution (noir-lang/noir#5783)
chore: sanitize url's to only allow github (noir-lang/noir#5776)
chore: enable constant inputs for more blackbox (noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module (noir-lang/noir#5768)
sirasistant added a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 27, 2024
Automated pull of development from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: crypto blackbox tests
(noir-lang/noir#5614)
feat: Improve "type annotations needed" errors
(noir-lang/noir#5830)
chore: enum dummy ID for `FuncId` in monomorphizer and docstring fixes
(noir-lang/noir#5421)
chore: delete wip fuzzing files that got accidentally added
(noir-lang/noir#5829)
chore: test ACVM `BigInt` (noir-lang/noir#5559)
fix(docs): Fix file paths for metaprogramming docs
(noir-lang/noir#5826)
fix: bit shifting type checking
(noir-lang/noir#5824)
feat: add Expr::as_method_call
(noir-lang/noir#5822)
chore: Fix docs typo (noir-lang/noir#5821)
feat: add `UnresolvedType::is_field` and `Expr::as_assign`
(noir-lang/noir#5804)
chore: Add docs for each comptime method
(noir-lang/noir#5802)
chore: Add comptime docs (noir-lang/noir#5800)
fix: Handle multiple entry points for Brillig call stack resolution
after metadata deduplication
(noir-lang/noir#5788)
fix(acir_gen): Nested dynamic array initialization
(noir-lang/noir#5810)
fix: honor function visibility in LSP completion
(noir-lang/noir#5809)
feat: LSP completion now works better in the middle of idents
(noir-lang/noir#5795)
feat: Explicit Associated Types & Constants
(noir-lang/noir#5739)
feat: add `Expr::as_cast` and `UnresolvedType::is_field`
(noir-lang/noir#5801)
feat: add `Expr` methods: as_comptime, as_unsafe, is_break, is_continue
(noir-lang/noir#5799)
fix: do not use predicate for index in array operation, when the index
is safe (noir-lang/noir#5779)
chore: Toggle underconstrained check
(noir-lang/noir#5724)
feat: Add `Expr::as_block` and `Expr::has_semicolon`
(noir-lang/noir#5784)
feat: LSP hover and go-to-definition for crates
(noir-lang/noir#5786)
fix(acvm): Clear ACIR call stack after successful circuit execution
(noir-lang/noir#5783)
chore: sanitize url's to only allow github
(noir-lang/noir#5776)
chore: enable constant inputs for more blackbox
(noir-lang/noir#5647)
chore: move sha2 functions into the `hash` module
(noir-lang/noir#5768)
END_COMMIT_OVERRIDE

---------

Co-authored-by: sirasistant <sirasistant@gmail.com>
Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants