Skip to content

Commit 7be571e

Browse files
authored
Merge pull request #1 from noir-lang/jtriley/updates
chore: Updates to tests, fuzzes, scripts, & metadata
2 parents e766bcc + 7eb56df commit 7be571e

File tree

15 files changed

+75
-39
lines changed

15 files changed

+75
-39
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Benchmarks
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88

99
jobs:
@@ -17,12 +17,12 @@ jobs:
1717
- name: Install Nargo
1818
uses: noir-lang/[email protected]
1919
with:
20-
toolchain: 0.34.0
20+
toolchain: 0.36.0
2121

2222
- name: Install bb
2323
run: |
2424
npm install -g bbup
25-
bbup -nv 0.34.0
25+
bbup -nv 0.36.0
2626
2727
- name: Build Noir benchmark programs
2828
run: nargo export
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Compare gates reports
3636
id: gates_diff
37-
uses: noir-lang/noir-gates-diff@1931aaaa848a1a009363d6115293f7b7fc72bb87
37+
uses: noir-lang/noir-gates-diff@7e4ddaa91c69380f15ccba514eac17bc7432a8cc
3838
with:
3939
report: gates_report.json
4040
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)

.github/workflows/nightly-canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
test:
16-
name: Test on Nargo ${{matrix.toolchain}}
16+
name: Test on Nargo Nightly
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout sources

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77

88
jobs:
99
release-please:

.github/workflows/test.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ jobs:
4747
with:
4848
toolchain: ${{ matrix.toolchain }}
4949

50+
- name: Run Noir tests
51+
run: nargo test
52+
53+
rust-equivalence-tests:
54+
name: Test for equivalence against Rust impl
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout sources
58+
uses: actions/checkout@v4
59+
60+
- name: Install Nargo
61+
uses: noir-lang/[email protected]
62+
with:
63+
toolchain: ${{ env.MINIMUM_NOIR_VERSION }}
64+
5065
- name: Install Cargo
5166
uses: dtolnay/[email protected]
5267
with:
@@ -58,11 +73,8 @@ jobs:
5873
key: x86_64-unknown-linux-gnu
5974
cache-on-failure: true
6075

61-
- name: Run Noir tests
62-
run: nargo test
63-
64-
- name: Run Cargo tests
65-
run: cargo test
76+
- name: Export and Test Noir Functions
77+
run: ./scripts/fuzz-test.sh
6678

6779
format:
6880
runs-on: ubuntu-latest
@@ -87,6 +99,7 @@ jobs:
8799
if: ${{ always() }}
88100
needs:
89101
- test
102+
- rust-equivalence-tests
90103
- format
91104

92105
steps:

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
/target
1+
target
2+
export
3+
gates_report.json

Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "keccak256"
33
type = "lib"
4-
authors = ["jtriley-eth"]
4+
authors = ["noir-lang"]
55
compiler_version = ">=0.36.0"
66

77
[dependencies]

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,27 @@
22

33
This package contains the Keccak256 hashing interface, formerly in the Noir standard library.
44

5-
> WIP
5+
## Noir Version Compatibility
6+
7+
This library is tested to work as of Noir v0.36.0.
8+
9+
## Benchmarks
10+
11+
Benchmarks are ignored by `git` and checked on pull-request. As such, benchmarks may be generated
12+
with the following command.
13+
14+
```bash
15+
# execute the following
16+
./scripts/build-gates-report.sh
17+
```
18+
19+
The benchmark will be generated at `./gates_report.json`.
20+
21+
## Installation
22+
23+
In `Nargo.toml`, add the version of this library desired to install the dependency:
24+
25+
```toml
26+
[dependencies]
27+
keccak256 = { tag = "v0.1.0", git = "https://github.com/noir-lang/keccak256" }
28+
```

export/test_keccak256_0.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

export/test_keccak256_1.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

export/test_keccak256_100.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)