Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
- name: Install Nargo
uses: noir-lang/noirup@v0.1.4
with:
toolchain: 1.0.0-beta.7
toolchain: nightly-2025-08-15

- name: Install bb
run: |
curl -L https://bbup.aztec.network | bash
~/.bb/bbup -nv 1.0.0-beta.7
~/.bb/bbup -nv 1.0.0-beta.9
sudo apt install libc++-dev

- name: Build Noir benchmark programs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always
MINIMUM_NOIR_VERSION: v1.0.0-beta.7
MINIMUM_NOIR_VERSION: nightly-2025-08-15

jobs:
noir-version-list:
Expand Down
14 changes: 7 additions & 7 deletions src/fns/unconstrained_helpers.nr
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,10 @@ pub(crate) unconstrained fn __shr<let N: u32>(input: [u128; N], shift: u32) -> [
let mut result: [u128; N] = [0; N];

let num_shifted_limbs = shift / 120;
let limb_shift = (shift % 120) as u8;
let remainder_shift = (120 - limb_shift) as u8;
let limb_shift = (shift % 120) as u128;
let remainder_shift = (120 - limb_shift);
let mask: u128 = (((1 as u128) << limb_shift) - 1) << remainder_shift;
result[0] = (input[0 + num_shifted_limbs] >> limb_shift);
result[0] = (input[0 + num_shifted_limbs] >> (limb_shift));
for i in 1..(N - num_shifted_limbs) {
let value = input[i + num_shifted_limbs];
result[i] = value >> limb_shift;
Expand All @@ -383,8 +383,8 @@ pub(crate) unconstrained fn __shl<let N: u32>(input: [u128; N], shift: u32) -> [
let mut result: [u128; N] = [0; N];

let num_shifted_limbs = shift / 120;
let limb_shift = (shift % 120) as u8;
let remainder_shift: u8 = 120 - limb_shift as u8;
let limb_shift = (shift % 120) as u128;
let remainder_shift = 120 - limb_shift;

// 83
// limb shift = 1
Expand Down Expand Up @@ -460,9 +460,9 @@ pub(crate) unconstrained fn __get_msb<let N: u32>(val: [u128; N]) -> u32 {

pub(crate) fn __get_bit<let N: u32>(input: [u128; N], bit: u32) -> bool {
let segment_index: u32 = bit / 120;
let uint_index = bit % 120;
let uint_index = (bit % 120) as u128;
let limb: u128 = input[segment_index];
let value = (limb >> uint_index as u8) & 1;
let value = (limb >> uint_index) & 1;
value == 1
}

Expand Down
Loading