Skip to content

Commit 379145a

Browse files
AztecBotTomAFrench
andauthored
feat: Sync from noir (#9711)
Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE feat: nargo command to generate shell completions (noir-lang/noir#6413) feat: ensure that generated ACIR is solvable (noir-lang/noir#6415) fix: fix Alias and Error kinds (noir-lang/noir#6426) fix: type-check turbofish in trait before function call (noir-lang/noir#6416) chore: create a regression test for #6420 (noir-lang/noir#6421) chore: Release Noir(0.37.0) (noir-lang/noir#6321) chore: update variable names in stdlib tests to be more correct (noir-lang/noir#6419) feat!: remove mimc from stdlib (noir-lang/noir#6402) chore: Replace dead link with updated route in README (noir-lang/noir#6392) feat(ci): Add report of Brillig opcodes executed (noir-lang/noir#6396) feat: improve malformed test attribute error (noir-lang/noir#6414) fix: aliases in path (noir-lang/noir#6399) feat(profiler): Add Brillig procedure info to debug artifact for more informative profiling (noir-lang/noir#6385) chore(lsp): Remove profile code lens (noir-lang/noir#6411) chore(nargo): Remove old profile as part of info cmd (noir-lang/noir#6406) fix: distinguish TypePath with and without turbofish (noir-lang/noir#6404) fix: numeric generic doesn't have a default type (noir-lang/noir#6405) feat: Sync from aztec-packages (noir-lang/noir#6403) chore: add regression tests for #4372 (noir-lang/noir#6401) chore: add regression tests for #6314 (noir-lang/noir#6381) END_COMMIT_OVERRIDE --------- Co-authored-by: Tom French <tom@tomfren.ch> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
1 parent 470d274 commit 379145a

235 files changed

Lines changed: 15253 additions & 744 deletions

File tree

Some content is hidden

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

.noir-sync-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
075c3d32481314d900cbdea0d277de83444747ab
1+
13856a121125b1ccca15919942081a5d157d280e

avm-transpiler/Cargo.lock

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

noir-projects/aztec-nr/aztec/src/context/public_context.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ unconstrained fn avm_return<let N: u32>(returndata: [Field; N]) {
295295
// to do rethrows, where the revert data is the same as the original revert data.
296296
// For normal reverts, use Noir's `assert` which, on top of reverting, will also add
297297
// an error selector to the revert data.
298-
unconstrained fn avm_revert<let N: u32>(revertdata: [Field]) {
298+
unconstrained fn avm_revert(revertdata: [Field]) {
299299
revert_opcode(revertdata)
300300
}
301301

noir/bb-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.60.0
1+
0.61.0
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Report Brillig opcodes executed diff
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build-nargo:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
target: [x86_64-unknown-linux-gnu]
15+
16+
steps:
17+
- name: Checkout Noir repo
18+
uses: actions/checkout@v4
19+
20+
- name: Setup toolchain
21+
uses: dtolnay/rust-toolchain@1.74.1
22+
23+
- uses: Swatinem/rust-cache@v2
24+
with:
25+
key: ${{ matrix.target }}
26+
cache-on-failure: true
27+
save-if: ${{ github.event_name != 'merge_group' }}
28+
29+
- name: Build Nargo
30+
run: cargo build --package nargo_cli --release
31+
32+
- name: Package artifacts
33+
run: |
34+
mkdir dist
35+
cp ./target/release/nargo ./dist/nargo
36+
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-x86_64-unknown-linux-gnu.tar.gz
37+
38+
- name: Upload artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: nargo
42+
path: ./dist/*
43+
retention-days: 3
44+
45+
compare_brillig_execution_reports:
46+
needs: [build-nargo]
47+
runs-on: ubuntu-latest
48+
permissions:
49+
pull-requests: write
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Download nargo binary
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: nargo
58+
path: ./nargo
59+
60+
- name: Set nargo on PATH
61+
run: |
62+
nargo_binary="${{ github.workspace }}/nargo/nargo"
63+
chmod +x $nargo_binary
64+
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
65+
export PATH="$PATH:$(dirname $nargo_binary)"
66+
nargo -V
67+
68+
- name: Generate Brillig execution report
69+
working-directory: ./test_programs
70+
run: |
71+
chmod +x gates_report_brillig_execution.sh
72+
./gates_report_brillig_execution.sh
73+
mv gates_report_brillig_execution.json ../gates_report_brillig_execution.json
74+
75+
- name: Compare Brillig execution reports
76+
id: brillig_execution_diff
77+
uses: noir-lang/noir-gates-diff@d88f7523b013b9edd3f31c5cfddaef87a3fe1b48
78+
with:
79+
report: gates_report_brillig_execution.json
80+
header: |
81+
# Changes to number of Brillig opcodes executed
82+
brillig_report: true
83+
summaryQuantile: 0.9 # only display the 10% most significant bytecode size diffs in the summary (defaults to 20%)
84+
85+
- name: Add bytecode size diff to sticky comment
86+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
87+
uses: marocchino/sticky-pull-request-comment@v2
88+
with:
89+
header: brillig_execution
90+
# delete the comment in case changes no longer impact brillig bytecode sizes
91+
delete: ${{ !steps.brillig_execution_diff.outputs.markdown }}
92+
message: ${{ steps.brillig_execution_diff.outputs.markdown }}

noir/noir-repo/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tooling/noir_js/lib
3434

3535
gates_report.json
3636
gates_report_brillig.json
37+
gates_report_brillig_execution.json
3738

3839
# Github Actions scratch space
3940
# This gives a location to download artifacts into the repository in CI without making git dirty.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
".": "0.36.0",
3-
"acvm-repo": "0.52.0"
2+
".": "0.37.0",
3+
"acvm-repo": "0.53.0"
44
}

noir/noir-repo/CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,73 @@
11
# Changelog
22

3+
## [0.37.0](https://github.com/noir-lang/noir/compare/v0.36.0...v0.37.0) (2024-10-31)
4+
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* remove mimc from stdlib ([#6402](https://github.com/noir-lang/noir/issues/6402))
9+
* **avm/brillig:** revert/rethrow oracle (https://github.com/AztecProtocol/aztec-packages/pull/9408)
10+
* use Brillig opcode when possible for less-than operations on fields (https://github.com/AztecProtocol/aztec-packages/pull/9416)
11+
* remove noir_js_backend_barretenberg (https://github.com/AztecProtocol/aztec-packages/pull/9338)
12+
* replace usage of vector in keccakf1600 input with array (https://github.com/AztecProtocol/aztec-packages/pull/9350)
13+
* **profiler:** New flamegraph command that profiles the opcodes executed ([#6327](https://github.com/noir-lang/noir/issues/6327))
14+
15+
### Features
16+
17+
* Add capacities to brillig vectors and use them in slice ops ([#6332](https://github.com/noir-lang/noir/issues/6332)) ([c9ff9a3](https://github.com/noir-lang/noir/commit/c9ff9a392f6142c04a3a512722ef6c9f9a7c3439))
18+
* **avm/brillig:** Revert/rethrow oracle (https://github.com/AztecProtocol/aztec-packages/pull/9408) ([321a493](https://github.com/noir-lang/noir/commit/321a493216e19a2f077007c3447a3030db0df0d0))
19+
* Better LSP hover for functions ([#6376](https://github.com/noir-lang/noir/issues/6376)) ([e92b519](https://github.com/noir-lang/noir/commit/e92b519bdfbd2a149a46745ad2ecffdd0e91f3f1))
20+
* Check trait where clause ([#6325](https://github.com/noir-lang/noir/issues/6325)) ([0de3241](https://github.com/noir-lang/noir/commit/0de3241bd290b1737ff831c30e5a2a0633a53eb3))
21+
* **ci:** Add report of Brillig opcodes executed ([#6396](https://github.com/noir-lang/noir/issues/6396)) ([e04b026](https://github.com/noir-lang/noir/commit/e04b02621e3651ddbb8e314563d614171a8a9933))
22+
* Do not increment reference counts on arrays through references ([#6375](https://github.com/noir-lang/noir/issues/6375)) ([60c770f](https://github.com/noir-lang/noir/commit/60c770f5f2594eea31ac75c852980edefa40d9eb))
23+
* Improve malformed test attribute error ([#6414](https://github.com/noir-lang/noir/issues/6414)) ([8f516d7](https://github.com/noir-lang/noir/commit/8f516d73d2d33988f6cdb9367244c11bc36ede22))
24+
* Let LSP suggest traits in trait bounds ([#6370](https://github.com/noir-lang/noir/issues/6370)) ([e909dcb](https://github.com/noir-lang/noir/commit/e909dcbb06c7b0043ffc79d5b8af99835b0096e5))
25+
* Let the formatter remove lambda block braces for single-statement blocks ([#6335](https://github.com/noir-lang/noir/issues/6335)) ([52f7c0b](https://github.com/noir-lang/noir/commit/52f7c0b67fa2f70848512c87fabcefc4c5426dd1))
26+
* Let the LSP import code action insert into existing use statements ([#6358](https://github.com/noir-lang/noir/issues/6358)) ([308717b](https://github.com/noir-lang/noir/commit/308717b6c44db4b206ad371cd6322478ce68746b))
27+
* LSP auto-import will try to add to existing use statements ([#6354](https://github.com/noir-lang/noir/issues/6354)) ([647f6a4](https://github.com/noir-lang/noir/commit/647f6a4bd3d00fd3b3b3e4ff17dce512287ee5b4))
28+
* Merge and sort imports ([#6322](https://github.com/noir-lang/noir/issues/6322)) ([07ab515](https://github.com/noir-lang/noir/commit/07ab5150857ec6719b132ec91d5f90af0564a046))
29+
* **perf:** Use [u32;16] for message block in sha256 ([#6324](https://github.com/noir-lang/noir/issues/6324)) ([81c612f](https://github.com/noir-lang/noir/commit/81c612f281cddf41d12ea62d9f610eab05ad1973))
30+
* **profiler:** Add Brillig procedure info to debug artifact for more informative profiling ([#6385](https://github.com/noir-lang/noir/issues/6385)) ([f5f65dc](https://github.com/noir-lang/noir/commit/f5f65dc29eb1f71926e6f8ed6681df563a85bd23))
31+
* **profiler:** New flamegraph command that profiles the opcodes executed ([#6327](https://github.com/noir-lang/noir/issues/6327)) ([4d87c9a](https://github.com/noir-lang/noir/commit/4d87c9ac78b48b4bd0ae81316df28aab390d004e))
32+
* Reject programs with unconditional recursion ([#6292](https://github.com/noir-lang/noir/issues/6292)) ([00c5c51](https://github.com/noir-lang/noir/commit/00c5c5154b818d0b50802721eae621efb3379a4e))
33+
* Remove 'single use' intermediate variables ([#6268](https://github.com/noir-lang/noir/issues/6268)) ([ec75e8e](https://github.com/noir-lang/noir/commit/ec75e8ec59e0f2a2169aea67372411ede4074d09))
34+
* Remove mimc from stdlib ([#6402](https://github.com/noir-lang/noir/issues/6402)) ([ec03e77](https://github.com/noir-lang/noir/commit/ec03e779f438069e51e973d8f29727e1e0fb5665))
35+
* Sha256 refactoring and benchmark with longer input ([#6318](https://github.com/noir-lang/noir/issues/6318)) ([d606491](https://github.com/noir-lang/noir/commit/d606491a61a9fe2153666f7d0a3ec6cae7bfaecb))
36+
* **ssa:** Various mem2reg reverts to reduce memory and compilation time ([#6307](https://github.com/noir-lang/noir/issues/6307)) ([b820328](https://github.com/noir-lang/noir/commit/b82032888819eac82b2bfce8300c2c8b66507c64))
37+
* Suggest removing `!` from macro call that doesn't return Quoted ([#6384](https://github.com/noir-lang/noir/issues/6384)) ([0232b57](https://github.com/noir-lang/noir/commit/0232b573c418ab74715b7cc1d3e858d993bc1c07))
38+
* Support specifying generics on a struct when calling an associated function ([#6306](https://github.com/noir-lang/noir/issues/6306)) ([eba151e](https://github.com/noir-lang/noir/commit/eba151ecf59c61f7ffc6bec00d455dce84e7b927))
39+
* **test:** Run test matrix on stdlib tests ([#6352](https://github.com/noir-lang/noir/issues/6352)) ([4c39514](https://github.com/noir-lang/noir/commit/4c39514fccf3595de6bdfad755b6ae2d3ef11aa1))
40+
41+
42+
### Bug Fixes
43+
44+
* (formatter) correctly format quote delimiters ([#6377](https://github.com/noir-lang/noir/issues/6377)) ([b42accf](https://github.com/noir-lang/noir/commit/b42accf59c9294131ce2773ac3ebdb20f548ece5))
45+
* (formatter) indent after infix lhs ([#6331](https://github.com/noir-lang/noir/issues/6331)) ([c891ffd](https://github.com/noir-lang/noir/commit/c891ffda9df17eabcaf2035f098d29f97bfc463a))
46+
* (LSP) check visibility of module that re-exports item, if any ([#6371](https://github.com/noir-lang/noir/issues/6371)) ([a4fc6e8](https://github.com/noir-lang/noir/commit/a4fc6e861492ab5ff12ebc5fdbb248f983eab0a2))
47+
* Aliases in path ([#6399](https://github.com/noir-lang/noir/issues/6399)) ([be882f1](https://github.com/noir-lang/noir/commit/be882f11ee661bf19ed6d78a7b3085099d4273e8))
48+
* Allow globals in format strings ([#6382](https://github.com/noir-lang/noir/issues/6382)) ([15c729a](https://github.com/noir-lang/noir/commit/15c729a7f29564092411658be613145b18ddd226))
49+
* Allow type aliases in let patterns ([#6356](https://github.com/noir-lang/noir/issues/6356)) ([91c0842](https://github.com/noir-lang/noir/commit/91c08421fdc5df7edcf502fb7fc1d343bb860b03))
50+
* Always inline `derive_generators` ([#6350](https://github.com/noir-lang/noir/issues/6350)) ([7c98b36](https://github.com/noir-lang/noir/commit/7c98b36305ffdbbaee3947723f248fa718e7a950))
51+
* Better formatting of leading/trailing line/block comments in expression lists ([#6338](https://github.com/noir-lang/noir/issues/6338)) ([3299c25](https://github.com/noir-lang/noir/commit/3299c25cefb6e3eb4b55396b2f842138b658e42f))
52+
* Display every bit in integer tokens ([#6360](https://github.com/noir-lang/noir/issues/6360)) ([b985fdf](https://github.com/noir-lang/noir/commit/b985fdf6e635570b8db3af83d9ec14e7cd749062))
53+
* Distinguish TypePath with and without turbofish ([#6404](https://github.com/noir-lang/noir/issues/6404)) ([0e974c2](https://github.com/noir-lang/noir/commit/0e974c22a1de0f6d38bc7a59280f86222f864698))
54+
* Fix panic in comptime code ([#6361](https://github.com/noir-lang/noir/issues/6361)) ([2f37610](https://github.com/noir-lang/noir/commit/2f376100d3ee7ab519d6ea30153395bb3e7af7b1))
55+
* Formatter didn't format `&gt;>=` well ([#6337](https://github.com/noir-lang/noir/issues/6337)) ([598230d](https://github.com/noir-lang/noir/commit/598230d9427cf988fc6da8fe9e1eb2b7c00a2fa6))
56+
* LSP auto-import would import public item inside private module ([#6366](https://github.com/noir-lang/noir/issues/6366)) ([51eb295](https://github.com/noir-lang/noir/commit/51eb2954e8dfb3da298431a82f36fa72ebbee8eb))
57+
* Make keccak256 work with input lengths greater than 136 bytes ([#6393](https://github.com/noir-lang/noir/issues/6393)) ([07c9322](https://github.com/noir-lang/noir/commit/07c9322332e147c0e8fade5e238552ecbf3e7849))
58+
* Mutable global pattern didn't have a span ([#6328](https://github.com/noir-lang/noir/issues/6328)) ([5a6dae9](https://github.com/noir-lang/noir/commit/5a6dae9a9ee9c3650695a16d18fb8b7ac12180f4))
59+
* Numeric generic doesn't have a default type ([#6405](https://github.com/noir-lang/noir/issues/6405)) ([3a073f7](https://github.com/noir-lang/noir/commit/3a073f7446e3cd78ca963b221e05f341a6041067))
60+
* Remove assumed parent traits ([#6365](https://github.com/noir-lang/noir/issues/6365)) ([83d29f2](https://github.com/noir-lang/noir/commit/83d29f259debe41d0b5cdfb6e63d31733ae4e0c7))
61+
* Slightly better formatting of empty blocks with comments ([#6367](https://github.com/noir-lang/noir/issues/6367)) ([da72979](https://github.com/noir-lang/noir/commit/da729791b7ffcfcd2f58ba1f8bf2c274c04f303e))
62+
* **ssa:** Do not mark an array from a parameter mutable ([#6355](https://github.com/noir-lang/noir/issues/6355)) ([bcd8976](https://github.com/noir-lang/noir/commit/bcd897627c69b1ebcadc8b84abe2922ce3473c56))
63+
64+
65+
### Miscellaneous Chores
66+
67+
* Remove noir_js_backend_barretenberg (https://github.com/AztecProtocol/aztec-packages/pull/9338) ([3925228](https://github.com/noir-lang/noir/commit/392522880e102e275ebcf42f16651a8ffa0bbbd2))
68+
* Replace usage of vector in keccakf1600 input with array (https://github.com/AztecProtocol/aztec-packages/pull/9350) ([3925228](https://github.com/noir-lang/noir/commit/392522880e102e275ebcf42f16651a8ffa0bbbd2))
69+
* Use Brillig opcode when possible for less-than operations on fields (https://github.com/AztecProtocol/aztec-packages/pull/9416) ([321a493](https://github.com/noir-lang/noir/commit/321a493216e19a2f077007c3447a3030db0df0d0))
70+
371
## [0.36.0](https://github.com/noir-lang/noir/compare/v0.35.0...v0.36.0) (2024-10-22)
472

573

0 commit comments

Comments
 (0)