Skip to content

Commit

Permalink
chore: track more critical libraries (noir-lang/noir#7604)
Browse files Browse the repository at this point in the history
chore!: bump bb version to v0.77.0 (noir-lang/noir#7599)
chore: bump external pinned commits (noir-lang/noir#7601)
feat(cli): Log and replay oracle transcript (noir-lang/noir#7417)
chore: some SSA improvements (noir-lang/noir#7588)
chore(profiler): Add option to only get the total sample count for the `execution-opcodes` command (noir-lang/noir#7578)
feat(experimental): Issue errors for unreachable match branches (noir-lang/noir#7556)
fix: Log to `stderr` (noir-lang/noir#7585)
chore!: remove merkle module from stdlib (noir-lang/noir#7582)
fix: Display causes but not stack trace in CLI error report (noir-lang/noir#7584)
chore: bump `light-poseidon` (noir-lang/noir#7568)
chore: bump external pinned commits (noir-lang/noir#7581)
chore!: remove deprecated hash functions from stdlib (noir-lang/noir#7477)
fix(frontend)!: Restrict capturing mutable variable in lambdas (noir-lang/noir#7488)
feat: perform constant sha256 compressions at compile-time (noir-lang/noir#7566)
chore: bump external pinned commits (noir-lang/noir#7565)
chore(ssa): Turn the Brillig constraints check back on by default (noir-lang/noir#7404)
chore: bump external pinned commits (noir-lang/noir#7561)
chore: address some frontend tests TODOs (noir-lang/noir#7554)
fix: shift right overflow in ACIR with unknown var now returns zero (noir-lang/noir#7509)
chore(cli): Forward `nargo execute` to `noir_artifact_cli` (noir-lang/noir#7406)
feat: Support `<Type as Trait>::method` in expressions (noir-lang/noir#7551)
chore: remove FileDiagnostic (noir-lang/noir#7546)
chore: add some extra tests (noir-lang/noir#7544)
fix: fix a few cases where safety comment wasn't correctly identified (noir-lang/noir#7548)
chore!: remove U128 struct from stdlib (noir-lang/noir#7529)
feat: simplify simple conditionals for brillig (noir-lang/noir#7205)
chore: put RcTracker as part of the DIE context (noir-lang/noir#7309)
  • Loading branch information
AztecBot committed Mar 6, 2025
2 parents b0329cb + 54c6e8c commit fd6dcfe
Show file tree
Hide file tree
Showing 74 changed files with 1,422 additions and 407 deletions.
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
46e8043c19cf721acb4a9cdd0f792ea280347f41
5a3d2bc0e13a12b039c793c73d7817924c13e159
2 changes: 1 addition & 1 deletion noir/bb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.72.1
0.77.1
18 changes: 18 additions & 0 deletions noir/noir-repo/.github/actions/download-noir-execute/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Download noir-execute
description: Downloads the noir-execute binary from an artifact and adds it to the path

runs:
using: composite
steps:
- name: Download noir-execute binary
uses: actions/download-artifact@v4
with:
name: noir-execute
path: ./noir-execute

- name: Set noir-execute on PATH
shell: bash
run: |
noir_binary="${{ github.workspace }}/noir-execute/noir-execute"
chmod +x $noir_binary
echo "$(dirname $noir_binary)" >> $GITHUB_PATH
6 changes: 3 additions & 3 deletions noir/noir-repo/.github/benchmark_projects.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define: &AZ_COMMIT 5f141167d16f1450348a4bbe55d94a462b5b62eb
define: &AZ_COMMIT 3b981f9217f9b859bdfbcdba2f5c080392c98da6
projects:
private-kernel-inner:
repo: AztecProtocol/aztec-packages
Expand All @@ -16,7 +16,7 @@ projects:
num_runs: 5
timeout: 4
compilation-timeout: 1.2
execution-timeout: 0.02
execution-timeout: 0.04
compilation-memory-limit: 250
execution-memory-limit: 230
private-kernel-reset:
Expand Down Expand Up @@ -47,7 +47,7 @@ projects:
timeout: 15
compilation-timeout: 15
execution-timeout: 0.75
compilation-memory-limit: 1300
compilation-memory-limit: 1500
execution-memory-limit: 500
rollup-block-root-empty:
repo: AztecProtocol/aztec-packages
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/scripts/integration-test-node.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu

apt-get install libc++-dev -y
apt-get install libc6 libstdc++6 -y
yarn workspace integration-tests test:node
4 changes: 2 additions & 2 deletions noir/noir-repo/.github/workflows/deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: EmbarkStudios/cargo-deny-action@8d73959fce1cdc8989f23fdf03bec6ae6a6576ef
with:
command: check all
command: check all
2 changes: 1 addition & 1 deletion noir/noir-repo/.github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
compare_gates_reports:
name: Circuit sizes
needs: [build-nargo]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
pull-requests: write

Expand Down
48 changes: 45 additions & 3 deletions noir/noir-repo/.github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,39 @@ jobs:
path: ./dist/*
retention-days: 3

build-noir-execute:
runs-on: ubuntu-22.04
timeout-minutes: 30

steps:
- name: Checkout Noir repo
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.85.0

- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}

- name: Build noir-execute
run: cargo build --package noir_artifact_cli --release

- name: Package artifacts
run: |
mkdir dist
cp ./target/release/noir-execute ./dist/noir-execute
7z a -ttar -so -an ./dist/* | 7z a -si ./noir-execute-x86_64-unknown-linux-gnu.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: noir-execute
path: ./dist/*
retention-days: 3

build-noirc-abi:
runs-on: ubuntu-22.04
timeout-minutes: 30
Expand Down Expand Up @@ -361,7 +394,7 @@ jobs:

test-integration-node:
name: Integration Tests (Node)
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [build-acvm-js, build-noir-wasm, build-nargo, build-noirc-abi]
timeout-minutes: 30

Expand All @@ -373,6 +406,7 @@ jobs:
run: |
./scripts/install_bb.sh
echo "$HOME/.bb/" >> $GITHUB_PATH
sudo apt-get install libc6 libstdc++6 -y
- name: Download nargo binary
uses: ./.github/actions/download-nargo
Expand Down Expand Up @@ -456,8 +490,8 @@ jobs:
test-examples:
name: Example scripts
runs-on: ubuntu-22.04
needs: [build-nargo]
runs-on: ubuntu-24.04
needs: [build-nargo, build-noir-execute]
timeout-minutes: 30

steps:
Expand All @@ -473,10 +507,14 @@ jobs:
run: |
./scripts/install_bb.sh
echo "$HOME/.bb/" >> $GITHUB_PATH
sudo apt-get install libc6 libstdc++6 -y
- name: Download nargo binary
uses: ./.github/actions/download-nargo

- name: Download noir-execute binary
uses: ./.github/actions/download-noir-execute

- name: Run `prove_and_verify`
working-directory: ./examples/prove_and_verify
run: ./test.sh
Expand All @@ -485,6 +523,10 @@ jobs:
working-directory: ./examples/codegen_verifier
run: ./test.sh

- name: Run `oracle_transcript`
working-directory: ./examples/oracle_transcript
run: ./test.sh

external-repo-checks:
needs: [build-nargo, critical-library-list]
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions noir/noir-repo/CRITICAL_NOIR_LIBRARIES
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ https://github.com/noir-lang/noir_string_search
https://github.com/noir-lang/sparse_array
https://github.com/noir-lang/noir_rsa
https://github.com/noir-lang/noir_json_parser
https://github.com/noir-lang/sha256
https://github.com/noir-lang/sha512
https://github.com/noir-lang/keccak256
10 changes: 4 additions & 6 deletions noir/noir-repo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion noir/noir-repo/EXTERNAL_NOIR_LIBRARIES.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define: &AZ_COMMIT 5f141167d16f1450348a4bbe55d94a462b5b62eb
define: &AZ_COMMIT 3b981f9217f9b859bdfbcdba2f5c080392c98da6
libraries:
noir_check_shuffle:
repo: noir-lang/noir_check_shuffle
Expand Down Expand Up @@ -45,6 +45,12 @@ libraries:
sha256:
repo: noir-lang/sha256
timeout: 3
sha512:
repo: noir-lang/sha512
timeout: 30
keccak256:
repo: noir-lang/keccak256
timeout: 3
aztec_nr:
repo: AztecProtocol/aztec-packages
ref: *AZ_COMMIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ KEYS=$(mktemp -d)
# Codegen verifier contract for 1_mul
mul_dir=$repo_root/test_programs/execution_success/1_mul
nargo --program-dir $mul_dir compile
$NARGO_BACKEND_PATH write_vk -b $mul_dir/target/1_mul.json -o $KEYS/1_mul
$NARGO_BACKEND_PATH contract -k $KEYS/1_mul -o $contracts_dir/1_mul.sol
$NARGO_BACKEND_PATH OLD_API write_vk -b $mul_dir/target/1_mul.json -o $KEYS/1_mul
$NARGO_BACKEND_PATH OLD_API contract -k $KEYS/1_mul -o $contracts_dir/1_mul.sol

# Codegen verifier contract for assert_statement
assert_statement_dir=$repo_root/test_programs/execution_success/assert_statement
nargo --program-dir $assert_statement_dir compile
$NARGO_BACKEND_PATH write_vk -b $assert_statement_dir/target/assert_statement.json -o $KEYS/assert_statement
$NARGO_BACKEND_PATH contract -k $KEYS/assert_statement -o $contracts_dir/assert_statement.sol
$NARGO_BACKEND_PATH OLD_API write_vk -b $assert_statement_dir/target/assert_statement.json -o $KEYS/assert_statement
$NARGO_BACKEND_PATH OLD_API contract -k $KEYS/assert_statement -o $contracts_dir/assert_statement.sol

# Codegen verifier contract for recursion
recursion_dir=$repo_root/compiler/integration-tests/circuits/recursion
nargo --program-dir $recursion_dir compile
$NARGO_BACKEND_PATH write_vk -b $recursion_dir/target/recursion.json -o $KEYS/recursion
$NARGO_BACKEND_PATH contract -k $KEYS/recursion ./ -o $contracts_dir/recursion.sol
$NARGO_BACKEND_PATH OLD_API write_vk -b $recursion_dir/target/recursion.json -o $KEYS/recursion
$NARGO_BACKEND_PATH OLD_API contract -k $KEYS/recursion -o $contracts_dir/recursion.sol

rm -rf $KEYS
rm -rf $KEYS
12 changes: 11 additions & 1 deletion noir/noir-repo/compiler/noirc_evaluator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@ pub(crate) fn trim_leading_whitespace_from_lines(src: &str) -> String {
while first_line.is_empty() {
first_line = lines.next().unwrap();
}
let first_line_original_length = first_line.len();
let mut result = first_line.trim_start().to_string();
let first_line_trimmed_length = result.len();

// Try to see how many spaces we chopped off the first line
let difference = first_line_original_length - first_line_trimmed_length;
for line in lines {
result.push('\n');
result.push_str(line.trim_start());
// Try to remove just `difference` spaces to preserve indents
if line.len() - line.trim_start().len() >= difference {
result.push_str(&line.chars().skip(difference).collect::<String>());
} else {
result.push_str(line.trim_start());
}
}
result
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ mod multi_scalar_mul {
fn full_constant_folding() {
let src = r#"
acir(inline) fn main f0 {
b0():
b0():
v0 = make_array [Field 2, Field 3, Field 5, Field 5] : [Field; 4]
v1 = make_array [Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0, Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0] : [Field; 6]
v2 = call multi_scalar_mul (v1, v0) -> [Field; 3]
Expand All @@ -377,7 +377,7 @@ mod multi_scalar_mul {

let expected_src = r#"
acir(inline) fn main f0 {
b0():
b0():
v3 = make_array [Field 2, Field 3, Field 5, Field 5] : [Field; 4]
v7 = make_array [Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0, Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0] : [Field; 6]
v10 = make_array [Field 1478523918288173385110236399861791147958001875200066088686689589556927843200, Field 700144278551281040379388961242974992655630750193306467120985766322057145630, Field 0] : [Field; 3]
Expand All @@ -392,7 +392,7 @@ mod multi_scalar_mul {
fn simplify_zero() {
let src = r#"
acir(inline) fn main f0 {
b0(v0: Field, v1: Field):
b0(v0: Field, v1: Field):
v2 = make_array [v0, Field 0, Field 0, Field 0, v0, Field 0] : [Field; 6]
v3 = make_array [
Field 0, Field 0, Field 1, v0, v1, Field 0, Field 1, v0, Field 0] : [Field; 9]
Expand All @@ -405,7 +405,7 @@ mod multi_scalar_mul {
//First point is zero, second scalar is zero, so we should be left with the scalar mul of the last point.
let expected_src = r#"
acir(inline) fn main f0 {
b0(v0: Field, v1: Field):
b0(v0: Field, v1: Field):
v3 = make_array [v0, Field 0, Field 0, Field 0, v0, Field 0] : [Field; 6]
v5 = make_array [Field 0, Field 0, Field 1, v0, v1, Field 0, Field 1, v0, Field 0] : [Field; 9]
v6 = make_array [v0, Field 0] : [Field; 2]
Expand All @@ -422,7 +422,7 @@ mod multi_scalar_mul {
fn partial_constant_folding() {
let src = r#"
acir(inline) fn main f0 {
b0(v0: Field, v1: Field):
b0(v0: Field, v1: Field):
v2 = make_array [Field 1, Field 0, v0, Field 0, Field 2, Field 0] : [Field; 6]
v3 = make_array [
Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0, v0, v1, Field 0, Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0] : [Field; 9]
Expand All @@ -433,7 +433,7 @@ mod multi_scalar_mul {
//First and last scalar/point are constant, so we should be left with the msm of the middle point and the folded constant point
let expected_src = r#"
acir(inline) fn main f0 {
b0(v0: Field, v1: Field):
b0(v0: Field, v1: Field):
v5 = make_array [Field 1, Field 0, v0, Field 0, Field 2, Field 0] : [Field; 6]
v7 = make_array [Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0, v0, v1, Field 0, Field 1, Field 17631683881184975370165255887551781615748388533673675138860, Field 0] : [Field; 9]
v8 = make_array [v0, Field 0, Field 1, Field 0] : [Field; 4]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ mod tests {
// Regression test for https://github.com/noir-lang/noir/issues/7451
let src = "
acir(inline) predicate_pure fn main f0 {
b0(v0: u8):
b0(v0: u8):
v1 = and u8 255, v0
return v1
}
Expand All @@ -220,7 +220,7 @@ mod tests {

let expected = "
acir(inline) fn main f0 {
b0(v0: u8):
b0(v0: u8):
return v0
}
";
Expand Down
Loading

0 comments on commit fd6dcfe

Please sign in to comment.