Skip to content

Commit 378dd60

Browse files
author
AztecBot
committed
fix(performance): Remove redundant slice access check from brillig (noir-lang/noir#7434)
chore(docs): updating tutorials and other nits to beta.2 (noir-lang/noir#7405) feat: LSP hover for integer literals (noir-lang/noir#7368) feat(experimental): Compile match expressions (noir-lang/noir#7312) feat(acir_field): Add little-endian byte serialization for FieldElement (noir-lang/noir#7258) feat: allow unquoting TraitConstraint in trait impl position (noir-lang/noir#7395) feat(brillig): Hoist shared constants across functions to the global space (noir-lang/noir#7216) feat(LSP): auto-import via visible reexport (noir-lang/noir#7409) fix(brillig): Brillig entry point analysis and function specialization through duplication (noir-lang/noir#7277) chore: redo typo PR by maximevtush (noir-lang/noir#7425) fix(ssa): Accurately mark binary ops for hoisting and check Div/Mod against induction variable lower bound (noir-lang/noir#7396) feat!: remove bigint from stdlib (noir-lang/noir#7411) chore: bump aztec-packages commit (noir-lang/noir#7415) chore: deprecate `merkle` module of stdlib (noir-lang/noir#7413) chore(ci): lock aztec-packages commit in CI (noir-lang/noir#7414) feat: while statement (noir-lang/noir#7280)
2 parents 27b5dc2 + cfa62f6 commit 378dd60

File tree

103 files changed

+5131
-2258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+5131
-2258
lines changed

.noir-sync-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
582f56e6b6ea43ab79b08aacfe7f1ba67a097f26
1+
49a095ded5cd33795bcdac60cbd98ce7c5ab9198
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
define: &AZ_COMMIT 6c0b83d4b73408f87acfa080d52a81c411e47336
2+
projects:
3+
private-kernel-inner:
4+
repo: AztecProtocol/aztec-packages
5+
ref: *AZ_COMMIT
6+
path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner
7+
num_runs: 5
8+
compilation-timeout: 2.5
9+
execution-timeout: 0.08
10+
compilation-memory-limit: 300
11+
execution-memory-limit: 250
12+
private-kernel-tail:
13+
repo: AztecProtocol/aztec-packages
14+
ref: *AZ_COMMIT
15+
path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail
16+
num_runs: 5
17+
timeout: 4
18+
compilation-timeout: 1.2
19+
execution-timeout: 0.02
20+
compilation-memory-limit: 250
21+
execution-memory-limit: 200
22+
private-kernel-reset:
23+
repo: AztecProtocol/aztec-packages
24+
ref: *AZ_COMMIT
25+
path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset
26+
num_runs: 5
27+
timeout: 250
28+
compilation-timeout: 8
29+
execution-timeout: 0.35
30+
compilation-memory-limit: 750
31+
execution-memory-limit: 300
32+
rollup-base-private:
33+
repo: AztecProtocol/aztec-packages
34+
ref: *AZ_COMMIT
35+
path: noir-projects/noir-protocol-circuits/crates/rollup-base-private
36+
num_runs: 5
37+
timeout: 15
38+
compilation-timeout: 10
39+
execution-timeout: 0.5
40+
compilation-memory-limit: 1100
41+
execution-memory-limit: 500
42+
rollup-base-public:
43+
repo: AztecProtocol/aztec-packages
44+
ref: *AZ_COMMIT
45+
path: noir-projects/noir-protocol-circuits/crates/rollup-base-public
46+
num_runs: 5
47+
timeout: 15
48+
compilation-timeout: 8
49+
execution-timeout: 0.4
50+
compilation-memory-limit: 1000
51+
execution-memory-limit: 500
52+
rollup-block-root-empty:
53+
repo: AztecProtocol/aztec-packages
54+
ref: *AZ_COMMIT
55+
path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-empty
56+
cannot_execute: true
57+
num_runs: 5
58+
timeout: 60
59+
compilation-timeout: 1.5
60+
compilation-memory-limit: 400
61+
rollup-block-root-single-tx:
62+
repo: AztecProtocol/aztec-packages
63+
ref: *AZ_COMMIT
64+
path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-single-tx
65+
cannot_execute: true
66+
num_runs: 1
67+
timeout: 60
68+
compilation-timeout: 100
69+
compilation-memory-limit: 7000
70+
rollup-block-root:
71+
repo: AztecProtocol/aztec-packages
72+
ref: *AZ_COMMIT
73+
path: noir-projects/noir-protocol-circuits/crates/rollup-block-root
74+
num_runs: 1
75+
timeout: 60
76+
compilation-timeout: 100
77+
execution-timeout: 40
78+
compilation-memory-limit: 7000
79+
execution-memory-limit: 1500
80+
rollup-merge:
81+
repo: AztecProtocol/aztec-packages
82+
ref: *AZ_COMMIT
83+
path: noir-projects/noir-protocol-circuits/crates/rollup-merge
84+
num_runs: 5
85+
timeout: 300
86+
compilation-timeout: 1.5
87+
execution-timeout: 0.01
88+
compilation-memory-limit: 400
89+
execution-memory-limit: 400
90+
rollup-root:
91+
repo: AztecProtocol/aztec-packages
92+
ref: *AZ_COMMIT
93+
path: noir-projects/noir-protocol-circuits/crates/rollup-root
94+
num_runs: 5
95+
timeout: 300
96+
compilation-timeout: 2
97+
execution-timeout: 0.6
98+
compilation-memory-limit: 450
99+
execution-memory-limit: 400

noir/noir-repo/.github/workflows/reports.yml

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ on:
77
pull_request:
88

99
jobs:
10+
benchmark-projects-list:
11+
name: Load benchmark projects list
12+
runs-on: ubuntu-22.04
13+
outputs:
14+
projects: ${{ steps.get_bench_projects.outputs.projects }}
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Build list of projects
21+
id: get_bench_projects
22+
run: |
23+
PROJECTS=$(yq ./.github/benchmark_projects.yml -o json | jq -c '.projects | map(.)')
24+
echo "projects=$PROJECTS"
25+
echo "projects=$PROJECTS" >> $GITHUB_OUTPUT
26+
1027
build-nargo:
1128
runs-on: ubuntu-22.04
1229

@@ -259,25 +276,13 @@ jobs:
259276
overwrite: true
260277

261278
external_repo_compilation_and_execution_report:
262-
needs: [build-nargo]
279+
needs: [build-nargo, benchmark-projects-list]
263280
runs-on: ubuntu-22.04
264281
timeout-minutes: 15
265282
strategy:
266283
fail-fast: false
267284
matrix:
268-
include:
269-
# - project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-contracts, cannot_execute: true }
270-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner, num_runs: 5 }
271-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail, num_runs: 5 }
272-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset, num_runs: 5 }
273-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-private, num_runs: 5 }
274-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-public, num_runs: 5 }
275-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-merge, num_runs: 5 }
276-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-empty, num_runs: 5, cannot_execute: true }
277-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-single-tx, num_runs: 1, flags: "--skip-brillig-constraints-check --skip-underconstrained-check", cannot_execute: true }
278-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root, num_runs: 1, flags: "--skip-brillig-constraints-check --skip-underconstrained-check" }
279-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-merge, num_runs: 5 }
280-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-root, num_runs: 5 }
285+
project: ${{ fromJson( needs.benchmark-projects-list.outputs.projects )}}
281286

282287
name: External repo compilation and execution reports - ${{ matrix.project.repo }}/${{ matrix.project.path }}
283288
steps:
@@ -322,7 +327,7 @@ jobs:
322327
- name: Check compilation time limit
323328
run: |
324329
TIME=$(jq '.[0].value' ./test-repo/${{ matrix.project.path }}/compilation_report.json)
325-
TIME_LIMIT=80
330+
TIME_LIMIT=${{ matrix.project.compilation-timeout }}
326331
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "$TIME_LIMIT"; then
327332
# Don't bump this timeout without understanding why this has happened and confirming that you're not the cause.
328333
echo "Failing due to compilation exceeding timeout..."
@@ -343,7 +348,7 @@ jobs:
343348
if: ${{ !matrix.project.cannot_execute }}
344349
run: |
345350
TIME=$(jq '.[0].value' ./test-repo/${{ matrix.project.path }}/execution_report.json)
346-
TIME_LIMIT=60
351+
TIME_LIMIT=${{ matrix.project.execution-timeout }}
347352
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "$TIME_LIMIT"; then
348353
# Don't bump this timeout without understanding why this has happened and confirming that you're not the cause.
349354
echo "Failing due to execution exceeding timeout..."
@@ -388,28 +393,15 @@ jobs:
388393
overwrite: true
389394

390395
external_repo_memory_report:
391-
needs: [build-nargo]
396+
needs: [build-nargo, benchmark-projects-list]
392397
runs-on: ubuntu-22.04
393398
timeout-minutes: 30
394399
strategy:
395400
fail-fast: false
396401
matrix:
397-
include:
398-
# TODO: Bring this report back under a flag. The `noir-contracts` report takes just under 30 minutes.
399-
# - project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-contracts }
400-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner }
401-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail }
402-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset }
403-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-private }
404-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-public }
405-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-merge }
406-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-empty, cannot_execute: true }
407-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root-single-tx, flags: "--skip-brillig-constraints-check --skip-underconstrained-check", cannot_execute: true }
408-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-block-root, flags: "--skip-brillig-constraints-check --skip-underconstrained-check" }
409-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-merge }
410-
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-root }
411-
412-
name: External repo memory report - ${{ matrix.project.repo }}/${{ matrix.project.path }}
402+
include: ${{ fromJson( needs.benchmark-projects-list.outputs.projects )}}
403+
404+
name: External repo memory report - ${{ matrix.repo }}/${{ matrix.path }}
413405
steps:
414406
- uses: actions/checkout@v4
415407
with:
@@ -426,20 +418,32 @@ jobs:
426418
- name: Checkout
427419
uses: actions/checkout@v4
428420
with:
429-
repository: ${{ matrix.project.repo }}
421+
repository: ${{ matrix.repo }}
430422
path: test-repo
431-
ref: ${{ matrix.project.ref }}
423+
ref: ${{ matrix.ref }}
432424

433425
- name: Generate compilation memory report
434-
working-directory: ./test-repo/${{ matrix.project.path }}
426+
working-directory: ./test-repo/${{ matrix.path }}
435427
run: |
436428
mv /home/runner/work/noir/noir/scripts/test_programs/memory_report.sh ./memory_report.sh
437429
mv /home/runner/work/noir/noir/scripts/test_programs/parse_memory.sh ./parse_memory.sh
438430
./memory_report.sh 1
439431
# Rename the memory report as the execution report is about to write to the same file
440432
cp memory_report.json compilation_memory_report.json
441433
env:
442-
FLAGS: ${{ matrix.project.flags }}
434+
FLAGS: ${{ matrix.flags }}
435+
436+
- name: Check compilation memory limit
437+
run: |
438+
MEMORY=$(jq '.[0].value' ./test-repo/${{ matrix.path }}/compilation_memory_report.json)
439+
MEMORY_LIMIT=${{ matrix.compilation-memory-limit }}
440+
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$MEMORY" "$MEMORY_LIMIT"; then
441+
# Don't bump this limit without understanding why this has happened and confirming that you're not the cause.
442+
echo "Failing due to compilation exceeding memory limit..."
443+
echo "Limit: "$MEMORY_LIMIT"MB"
444+
echo "Compilation took: "$MEMORY"MB".
445+
exit 1
446+
fi
443447
444448
- name: Check compilation memory limit
445449
run: |
@@ -454,16 +458,16 @@ jobs:
454458
fi
455459
456460
- name: Generate execution memory report
457-
working-directory: ./test-repo/${{ matrix.project.path }}
458-
if: ${{ !matrix.project.cannot_execute }}
461+
working-directory: ./test-repo/${{ matrix.path }}
462+
if: ${{ !matrix.cannot_execute }}
459463
run: |
460464
./memory_report.sh 1 1
461465
462466
- name: Check execution memory limit
463-
if: ${{ !matrix.project.cannot_execute }}
467+
if: ${{ !matrix.cannot_execute }}
464468
run: |
465-
MEMORY=$(jq '.[0].value' ./test-repo/${{ matrix.project.path }}/memory_report.json)
466-
MEMORY_LIMIT=1300
469+
MEMORY=$(jq '.[0].value' ./test-repo/${{ matrix.path }}/memory_report.json)
470+
MEMORY_LIMIT=${{ matrix.execution-memory-limit }}
467471
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$MEMORY" "$MEMORY_LIMIT"; then
468472
# Don't bump this limit without understanding why this has happened and confirming that you're not the cause.
469473
echo "Failing due to execution exceeding memory limit..."
@@ -476,9 +480,9 @@ jobs:
476480
id: compilation_mem_report
477481
shell: bash
478482
run: |
479-
PACKAGE_NAME=${{ matrix.project.path }}
483+
PACKAGE_NAME=${{ matrix.path }}
480484
PACKAGE_NAME=$(basename $PACKAGE_NAME)
481-
mv ./test-repo/${{ matrix.project.path }}/compilation_memory_report.json ./memory_report_$PACKAGE_NAME.json
485+
mv ./test-repo/${{ matrix.path }}/compilation_memory_report.json ./memory_report_$PACKAGE_NAME.json
482486
echo "memory_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
483487
484488
- name: Upload compilation memory report
@@ -491,11 +495,11 @@ jobs:
491495

492496
- name: Move execution report
493497
id: execution_mem_report
494-
if: ${{ !matrix.project.cannot_execute }}
498+
if: ${{ !matrix.cannot_execute }}
495499
run: |
496-
PACKAGE_NAME=${{ matrix.project.path }}
500+
PACKAGE_NAME=${{ matrix.path }}
497501
PACKAGE_NAME=$(basename $PACKAGE_NAME)
498-
mv ./test-repo/${{ matrix.project.path }}/memory_report.json ./memory_report_$PACKAGE_NAME.json
502+
mv ./test-repo/${{ matrix.path }}/memory_report.json ./memory_report_$PACKAGE_NAME.json
499503
echo "memory_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
500504
501505
- name: Upload execution memory report

noir/noir-repo/.github/workflows/test-js-packages.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,9 @@ jobs:
492492
strategy:
493493
fail-fast: false
494494
matrix:
495-
project: ${{ fromJson( needs.critical-library-list.outputs.libraries )}}
495+
include: ${{ fromJson( needs.critical-library-list.outputs.libraries )}}
496496

497-
name: Check external repo - ${{ matrix.project.repo }}/${{ matrix.project.path }}
497+
name: Check external repo - ${{ matrix.repo }}/${{ matrix.path }}
498498
steps:
499499
- name: Checkout
500500
uses: actions/checkout@v4
@@ -504,9 +504,9 @@ jobs:
504504
- name: Checkout
505505
uses: actions/checkout@v4
506506
with:
507-
repository: ${{ matrix.project.repo }}
507+
repository: ${{ matrix.repo }}
508508
path: test-repo
509-
ref: ${{ matrix.project.ref }}
509+
ref: ${{ matrix.ref }}
510510

511511
- name: Download nargo binary
512512
uses: ./noir-repo/.github/actions/download-nargo
@@ -520,14 +520,14 @@ jobs:
520520
521521
- name: Run nargo test
522522
id: test_report
523-
working-directory: ./test-repo/${{ matrix.project.path }}
523+
working-directory: ./test-repo/${{ matrix.path }}
524524
run: |
525-
output_file=${{ github.workspace }}/noir-repo/.github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.actual.jsonl
525+
output_file=${{ github.workspace }}/noir-repo/.github/critical_libraries_status/${{ matrix.repo }}/${{ matrix.path }}.actual.jsonl
526526
BEFORE=$SECONDS
527-
nargo test --silence-warnings --skip-brillig-constraints-check --format json ${{ matrix.project.nargo_args }} | tee $output_file
527+
nargo test --silence-warnings --skip-brillig-constraints-check --format json ${{ matrix.nargo_args }} | tee $output_file
528528
TIME=$(($SECONDS-$BEFORE))
529529
530-
NAME=${{ matrix.project.repo }}/${{ matrix.project.path }}
530+
NAME=${{ matrix.repo }}/${{ matrix.path }}
531531
# Replace any slashes with underscores
532532
NAME=${NAME//\//_}
533533
TEST_REPORT_NAME=test_report_$NAME
@@ -544,25 +544,25 @@ jobs:
544544

545545
- name: Check test time limit
546546
run: |
547-
TIME=$(jq '.[0].value' ./test-repo/${{ matrix.project.path }}/${{ steps.test_report.outputs.test_report_name }}.json)
548-
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "${{ matrix.project.timeout }}"; then
547+
TIME=$(jq '.[0].value' ./test-repo/${{ matrix.path }}/${{ steps.test_report.outputs.test_report_name }}.json)
548+
if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "${{ matrix.timeout }}"; then
549549
# Don't bump this timeout without understanding why this has happened and confirming that you're not the cause.
550550
echo "Failing due to test suite exceeding timeout..."
551-
echo "Timeout: ${{ matrix.project.timeout }}"
551+
echo "Timeout: ${{ matrix.timeout }}"
552552
echo "Test suite took: $TIME".
553553
exit 1
554554
fi
555555
556556
- name: Compare test results
557557
working-directory: ./noir-repo
558-
run: .github/scripts/check_test_results.sh .github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.failures.jsonl .github/critical_libraries_status/${{ matrix.project.repo }}/${{ matrix.project.path }}.actual.jsonl
558+
run: .github/scripts/check_test_results.sh .github/critical_libraries_status/${{ matrix.repo }}/${{ matrix.path }}.failures.jsonl .github/critical_libraries_status/${{ matrix.repo }}/${{ matrix.path }}.actual.jsonl
559559

560560
- name: Upload test report
561-
if: ${{ matrix.project.timeout > 10 }} # We want to avoid recording benchmarking for a ton of tiny libraries, these should be covered with aggressive timeouts
561+
if: ${{ matrix.timeout > 10 }} # We want to avoid recording benchmarking for a ton of tiny libraries, these should be covered with aggressive timeouts
562562
uses: actions/upload-artifact@v4
563563
with:
564564
name: ${{ steps.test_report.outputs.test_report_name }}
565-
path: ./test-repo/${{ matrix.project.path }}/${{ steps.test_report.outputs.test_report_name }}.json
565+
path: ./test-repo/${{ matrix.path }}/${{ steps.test_report.outputs.test_report_name }}.json
566566
retention-days: 3
567567
overwrite: true
568568

noir/noir-repo/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)