Skip to content

ACIR != Brillig: shl with overflow on u64 #9765

@aakoshh

Description

@aakoshh

Aim

Replicate nightly failure from https://github.com/noir-lang/noir/actions/runs/17554730948/job/49855802906

The following program fails to execute ACIR but succeeds in Brillig

fn main(b: u8) -> pub u64 {
    (15877946327378367777 << (b as u64))
}

Prover.toml:

b = 10

Expected Behavior

They should agree.

Bug

cargo run -q -p nargo_cli -- execute --force --silence-warnings
For more information about this error, try `rustc --explain E0602`.
error: Failed constraint
  ┌─ src/main.nr:2:6

2 │     (15877946327378367777 << (b as u64))
  │      ----------------------------------

  = Call stack:
    1. src/main.nr:2:6

Failed to solve program: 'Cannot satisfy constraint'
cargo run -q -p nargo_cli -- execute --force --silence-warnings --force-brillig

For more information about this error, try `rustc --explain E0602`.
[fuzz_testing] Circuit witness successfully solved
[fuzz_testing] Witness saved to target/fuzz_testing.gz
[fuzz_testing] Circuit output: 7435510297333629952

To Reproduce

NOIR_AST_FUZZER_SEED=0x60dbd0af00100000 cargo test -q -p noir_ast_fuzzer_fuzz acir_vs_brillig

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

nargo version = 1.0.0-beta.12 noirc version = 1.0.0-beta.12+55afd6f787eb29daaec0236db80a8279b4df3e89 (git version hash: 55afd6f, is dirty: true)

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingssa

Type

No type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions