Skip to content

Commit ea49d44

Browse files
committed
Merge branch 'master' of https://github.com/noir-lang/noir into jf/method-attrs
2 parents 7d6e6df + e65591d commit ea49d44

455 files changed

Lines changed: 11278 additions & 3973 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.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{"suite":"keccak256","name":"keccak256::oracle_tests::test_keccak256_1"}
22
{"suite":"keccak256","name":"keccak256::oracle_tests::test_keccak256_100"}
33
{"suite":"keccak256","name":"keccak256::oracle_tests::test_keccak256_135"}
4+
{"suite":"keccak256","name":"keccak256::oracle_tests::test_keccak256_136"}
45
{"suite":"keccak256","name":"keccak256::oracle_tests::test_keccak256_256"}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
# Usage: ./extract-fuzz-seeds.sh <fuzz-output.log> [output-dir]
5+
#
6+
# Parses a captured `cargo nextest run -p noir_ast_fuzzer_fuzz` log and writes:
7+
# <output-dir>/seeds.txt — one deduplicated 0x... seed per line
8+
# <output-dir>/seeds-by-test.tsv — "<nextest FAIL line>\t<seed>" pairs
9+
#
10+
# Recognises both the arbtest panic line (e.g. " Seed: 0x6819c61400001000")
11+
# and the explicit repro env var (e.g. "NOIR_AST_FUZZER_SEED=0x6819c61400001000").
12+
13+
if [ $# -lt 1 ] || [ $# -gt 2 ]; then
14+
echo "Usage: $0 <fuzz-output.log> [output-dir]" >&2
15+
exit 2
16+
fi
17+
18+
log_file=$1
19+
out_dir=${2:-.}
20+
21+
if [ ! -f "$log_file" ]; then
22+
echo "error: log file not found: $log_file" >&2
23+
exit 1
24+
fi
25+
26+
mkdir -p "$out_dir"
27+
seeds_file="$out_dir/seeds.txt"
28+
by_test_file="$out_dir/seeds-by-test.tsv"
29+
30+
# nextest emits ANSI color escapes even when stdout is a pipe, so any log
31+
# captured via `tee` contains CSI sequences like \x1b[31;1m wrapping seeds and
32+
# `FAIL` markers. Strip them up-front so the downstream patterns can match.
33+
cleaned_log=$(mktemp)
34+
trap 'rm -f "$cleaned_log"' EXIT
35+
sed -E $'s/\x1b\\[[0-9;?]*[ -/]*[@-~]//g' "$log_file" > "$cleaned_log"
36+
37+
grep -hoE '(Seed:[[:space:]]*0x[0-9a-fA-F]+|NOIR_AST_FUZZER_SEED=0x[0-9a-fA-F]+)' "$cleaned_log" \
38+
| grep -oE '0x[0-9a-fA-F]+' \
39+
| sort -u > "$seeds_file" || true
40+
41+
awk '
42+
/^[[:space:]]*FAIL / { current = $0 }
43+
/Seed:[[:space:]]*0x[0-9a-fA-F]+/ {
44+
match($0, /0x[0-9a-fA-F]+/); seed = substr($0, RSTART, RLENGTH);
45+
print current "\t" seed
46+
}
47+
' "$cleaned_log" > "$by_test_file" || true

.github/workflows/nightly-fuzz-test.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,37 @@ jobs:
3333
- uses: taiki-e/install-action@just
3434

3535
- name: Run fuzzer
36-
run: just fuzz-nightly
36+
id: fuzz
37+
shell: bash
38+
run: |
39+
set -o pipefail
40+
just fuzz-nightly 2>&1 | tee fuzz-output.log
3741
env:
3842
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3943
RUST_MIN_STACK: 8388608
4044

45+
- name: Extract fuzzer seeds
46+
if: failure()
47+
id: seeds
48+
shell: bash
49+
run: |
50+
./.github/scripts/extract-fuzz-seeds.sh fuzz-output.log .
51+
seed_count=$(wc -l < seeds.txt | tr -d ' ')
52+
seeds=$(paste -sd, - < seeds.txt)
53+
echo "seed_count=${seed_count}" >> "$GITHUB_OUTPUT"
54+
echo "seeds=${seeds}" >> "$GITHUB_OUTPUT"
55+
56+
- name: Upload fuzz failure artifact
57+
if: failure()
58+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
59+
with:
60+
name: nightly-fuzz-failure
61+
path: |
62+
fuzz-output.log
63+
seeds.txt
64+
seeds-by-test.tsv
65+
retention-days: 30
66+
4167
- name: Get current date
4268
id: date
4369
run: echo "DAY=date::$(date +'%u')" >> $GITHUB_OUTPUT
@@ -51,3 +77,6 @@ jobs:
5177
webhook-type: webhook-trigger
5278
payload: |
5379
workflow-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
80+
seed-count: ${{ steps.seeds.outputs.seed_count }}
81+
seeds: ${{ steps.seeds.outputs.seeds }}
82+
artifact-name: nightly-fuzz-failure

.github/workflows/publish-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
contents: read
1515
steps:
1616
- name: Dispatch to publish-nargo
17-
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1
17+
uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1
1818
with:
1919
workflow: publish-nargo.yml
2020
token: ${{ secrets.NOIR_REPO_TOKEN }}
@@ -23,7 +23,7 @@ jobs:
2323

2424

2525
- name: Dispatch to publish-es-packages
26-
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1
26+
uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1
2727
with:
2828
workflow: publish-es-packages.yml
2929
token: ${{ secrets.NOIR_REPO_TOKEN }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
contents: read
212212
steps:
213213
- name: Dispatch to publish workflow
214-
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1
214+
uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1
215215
with:
216216
workflow: publish-nargo.yml
217217
repo: noir-lang/noir
@@ -228,7 +228,7 @@ jobs:
228228
contents: read
229229
steps:
230230
- name: Dispatch to publish-es-packages
231-
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1
231+
uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1
232232
with:
233233
workflow: publish-es-packages.yml
234234
ref: master
@@ -245,7 +245,7 @@ jobs:
245245

246246
steps:
247247
- name: Dispatch to publish-acvm
248-
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1
248+
uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1
249249
with:
250250
workflow: publish-acvm.yml
251251
ref: master

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ Special labels to control CI behavior:
235235

236236
- Use when you think that the PR will result in improvements/degradation of compilation time or memory usage.
237237

238+
### GitHub Actions
239+
240+
Third-party actions in `.github/workflows/` are pinned by full commit SHA with the human-readable version in a trailing comment, e.g. `uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7`. When updating an action, rewrite the reference to the new commit SHA rather than a mutable `@vN` tag, and keep the `# vN` comment in sync.
241+
238242
### Workflow Reminders
239243

240244
- ✅ Always compile before testing

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ implicit_clone = "warn"
106106
map_unwrap_or = "warn"
107107
needless_borrows_for_generic_args = "warn"
108108
redundant_field_names = "warn"
109+
while_let_loop = "warn"
110+
for_kv_map = "warn"
111+
iter_kv_map = "warn"
112+
unnecessary_sort_by = "warn"
113+
useless_conversion = "warn"
109114

110115
[workspace.dependencies]
111116

EXTERNAL_NOIR_LIBRARIES.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ libraries:
4646
critical: false
4747
noir_json_parser:
4848
repo: noir-lang/noir_json_parser
49-
timeout: 16
49+
timeout: 17
5050
critical: false
5151
sha256:
5252
repo: noir-lang/sha256
@@ -67,13 +67,13 @@ libraries:
6767
repo: AztecProtocol/aztec-packages
6868
ref: *AZ_COMMIT
6969
path: noir-projects/aztec-nr
70-
timeout: 260
70+
timeout: 280
7171
critical: false
7272
noir_contracts:
7373
repo: AztecProtocol/aztec-packages
7474
ref: *AZ_COMMIT
7575
path: noir-projects/noir-contracts
76-
timeout: 230
76+
timeout: 250
7777
critical: false
7878
blob:
7979
repo: AztecProtocol/aztec-packages
@@ -85,7 +85,7 @@ libraries:
8585
repo: AztecProtocol/aztec-packages
8686
ref: *AZ_COMMIT
8787
path: noir-projects/noir-protocol-circuits/crates/private-kernel-lib
88-
timeout: 550
88+
timeout: 620
8989
critical: false
9090
protocol_circuits_types:
9191
repo: AztecProtocol/aztec-packages

acvm-repo/acir/src/native_types/expression/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<F> Expression<F> {
141141
}
142142
}
143143
self.mul_terms.sort_by(|a, b| a.1.cmp(&b.1).then(a.2.cmp(&b.2)));
144-
self.linear_combinations.sort_by(|a, b| a.1.cmp(&b.1));
144+
self.linear_combinations.sort_by_key(|a| a.1);
145145
}
146146

147147
#[cfg(test)]

0 commit comments

Comments
 (0)