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: test unexpected panic [DO NOT MERGE] #3739

Closed
wants to merge 2 commits into from
Closed

Conversation

kevaundray
Copy link
Contributor

Description

This is a bug that @vezenovm found. Just testing to ensure that it is reproducible in CI

Problem*

Resolves

Summary*

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [Exceptional Case] 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.

Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
@kevaundray kevaundray closed this Dec 9, 2023
@TomAFrench TomAFrench deleted the kw/maxims-bug branch December 9, 2023 11:41
github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2023
…ts (#3740)

…ffects

# Description

## Problem\*

Resolves the error that occurs in this PR
(#3739)

No issue as was discovered and fixed quickly.

## Summary\*

Using an array as an argument in a side effectual constrain statement
will cause this panic:
```
Message:  internal error: entered unreachable code: Can only cast to a numeric
Location: compiler/noirc_evaluator/src/ssa/acir_gen/mod.rs:1652
```

Here is an example program which would previously fail that is included
as a regression test:
```
struct Bar {
    inner: [u32; 3],
}

fn main(y: pub u32) {
    let bar = Bar { inner: [100, 101, 102] };

    // The assert inside the if should be hit
    if y < 10 {
        assert(bar.inner ==  [100, 101, 102]);
    }

    // The assert inside the if should not be hit
    if y > 10 {
        assert(bar.inner == [0, 1, 2]);
    }
}
```

Without this fix it is not possible to constrain arrays inside of if
statements based upon witness conditions.

## Additional Context



## Documentation\*

Check one:
- [X] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [X] I have tested the changes locally.
- [X] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
AztecBot pushed a commit that referenced this pull request Dec 19, 2023
This PR adds a variant of the base rollup that is a circuit. This makes
sure that PRs don't break compilation as a circuit of the base rollup
and tracks its constraint count.
After the last noir pull, thanks to @TomAFrench compilation is now much
faster, allowing to compile the base rollup as a circuit in a reasonable
time (prev. it took 5 minutes, now some seconds)
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.

1 participant