Skip to content

Commit

Permalink
Merge branch 'master' into tf/borrowed-acir
Browse files Browse the repository at this point in the history
* master: (53 commits)
  feat: Nargo test runtime callstacks and assert messages without string matching (#2953)
  chore: Release Noir(0.16.0) (#2908)
  chore: run smart contract verification integration tests inside hardhat (#2957)
  chore: fix publishing workflows (#2926)
  chore: restructure integration tests (#2954)
  fix: Improve error message when multiplying unit values (#2950)
  chore: Perform lazy initialization inside `noir_js` (#2951)
  chore: Make one input public in simple assertion program (#2949)
  chore: use new JS packages in integration tests (#2938)
  fix(println): Enable printing of arrays/strings >2 in fmt strings  (#2947)
  feat(ssa): Multiple slice mergers (#2753)
  fix: fix should_fail_with (#2940)
  feat: Oracle mocker for nargo test (#2928)
  chore: add linting to new packages (#2937)
  feat: Dynamic indexing of non-homogenous slices (#2883)
  chore: Fix barretenberg noir typescript wrapper (#2922)
  chore(ci): Rename Noir.js test job (#2932)
  feat!: Maintain shape of foreign call arguments (#2935)
  chore: add init method to Noir class for web (#2920)
  chore: bump `reqwest` to 0.11.20 (#2931)
  ...
  • Loading branch information
TomAFrench committed Oct 3, 2023
2 parents 7b08e8e + 1b6a4e6 commit 236a8a8
Show file tree
Hide file tree
Showing 304 changed files with 6,873 additions and 4,226 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
"comma-spacing": ["error", { before: false, after: true }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
'comma-spacing': ['error', { before: false, after: true }],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
"prettier/prettier": "error",
'prettier/prettier': 'error',
},
};
4 changes: 2 additions & 2 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 30
env:
RUSTFLAGS: -Dwarnings

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
name: eslint
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish-abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build noirc_abi_wasm
run: |
nix build -L .#noirc_abi_wasm
run: nix build .#noirc_abi_wasm

- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
Expand All @@ -42,10 +41,11 @@ jobs:
run: |
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock
- name: Publish to npm
- name: Publish to NPM
working-directory: ./temp_publish_dir
run: |
yarn npm publish --tag latest
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

17 changes: 7 additions & 10 deletions .github/workflows/publish-acvm-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish acvm_js
name: Publish acvm-js

on:
workflow_dispatch:
Expand Down Expand Up @@ -33,22 +33,19 @@ jobs:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build acvm-js
working-directory: acvm-repo
run: |
nix build .#
run: nix build .#acvm_js

- name: Discover Build Output Path
working-directory: acvm-repo
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/acvm_js)" >> $GITHUB_ENV

- name: Copy Build Output to Temporary Directory
working-directory: acvm-repo
run: |
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock
- name: Publish to NPM
working-directory: ./acvm-repo/temp_publish_dir
run: npm publish
working-directory: ./temp_publish_dir
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Test built artifact
if: matrix.target == 'x86_64-apple-darwin'
run: |
cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/
cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/
yarn workspace release-tests test
- name: Upload binaries to release tag
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/publish-noir-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release and Publish Noir Js
name: Publish Noir Js

on:
workflow_dispatch:
Expand All @@ -17,11 +17,13 @@ jobs:
- name: Install jq
run: sudo apt-get install jq

- name: Install cargo and wasm-bindgen
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo install -f wasm-bindgen-cli --version 0.2.86
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.66.0

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: wasm-bindgen-cli@0.2.86

- name: Install wasm-opt
run: |
Expand All @@ -34,6 +36,9 @@ jobs:
- name: Build noirc_abi
run: yarn workspace @noir-lang/noirc_abi build

- name: Build acvm_js
run: yarn workspace @noir-lang/acvm_js build

- name: Build noir_js
run: yarn workspace @noir-lang/noir_js build

Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/publish-noir-wasm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Noir Wasm
name: Publish Noir Wasm

on:
workflow_dispatch:
Expand Down Expand Up @@ -26,18 +26,22 @@ jobs:
nix_path: nixpkgs=channel:nixos-23.05

- name: Build with Nix
run: |
nix build -L .#wasm
run: nix build .#noir_wasm

- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV

- name: Copy output
- name: Copy Build Output to Temporary Directory
run: |
cp -r $(readlink result)/* .
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock
- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish to npm
run: |
npm publish --access public
- name: Publish to NPM
working-directory: ./temp_publish_dir
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions .github/workflows/publish-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
node-version: 18.15

- name: Install dependencies
run: yarn install --immutable

Expand Down
42 changes: 3 additions & 39 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: test-integration
on:
workflow_dispatch:
pull_request:
paths:
- ./compiler/integration-tests/**
merge_group:
schedule:
- cron: "0 2 * * *" # Run nightly at 2 AM UTC

Expand Down Expand Up @@ -206,47 +205,12 @@ jobs:
run: |
npm i wasm-opt -g
- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- name: Run Anvil
run: |
anvil > /dev/null 2>&1 &
sleep 10
- name: Create new Foundry project
run: forge init --no-git --no-commit --force foundry-project

- name: Run codegen-verifier for 1_mul
working-directory: tooling/nargo_cli/tests/execution_success/1_mul
run: nargo codegen-verifier

- name: Run codegen-verifier for main
working-directory: compiler/integration-tests/test/circuits/main
run: nargo codegen-verifier

- name: Copy compiled contracts
run: |
cp tooling/nargo_cli/tests/execution_success/1_mul/contract/1_mul/plonk_vk.sol foundry-project/src/1_mul.sol
cp compiler/integration-tests/test/circuits/main/contract/main/plonk_vk.sol foundry-project/src/main.sol
- name: Forge build
working-directory: foundry-project
run: forge build

- name: Forge deploy
working-directory: foundry-project
run: |
forge create --rpc-url http://127.0.0.1:8545 --mnemonic "test test test test test test test test test test test junk" src/1_mul.sol:UltraVerifier --json > mul_output.json
forge create --rpc-url http://127.0.0.1:8545 --mnemonic "test test test test test test test test test test test junk" src/main.sol:UltraVerifier --json > main_output.json
- name: Setup `integration-tests`
run: |
yarn workspace @noir-lang/source-resolver build
yarn workspace @noir-lang/acvm_js build
yarn workspace @noir-lang/types build
yarn workspace @noir-lang/backend_barretenberg build
yarn workspace @noir-lang/noir_js build
- name: Run `integration-tests`
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/test-noir-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Noir JS
name: Test Noir Js

on:
pull_request:
Expand All @@ -8,7 +8,8 @@ on:
- master

jobs:
test:
test-noir-js:
name: Test Noir JS
runs-on: ubuntu-latest
timeout-minutes: 30

Expand Down Expand Up @@ -48,6 +49,12 @@ jobs:
- name: Build noirc_abi
run: yarn workspace @noir-lang/noirc_abi build

- name: Build noir_js_types
run: yarn workspace @noir-lang/types build

- name: Build barretenberg wrapper
run: yarn workspace @noir-lang/backend_barretenberg build

- name: Run noir_js tests
run: |
yarn workspace @noir-lang/noir_js build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-noir_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
cp -r ./compiler/wasm/downloaded/nodejs ./compiler/wasm
cp -r ./compiler/wasm/downloaded/web ./compiler/wasm
yarn workspace @noir-lang/source-resolver build
- name: Run node tests
run: yarn workspace @noir-lang/noir_wasm test:node

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
".": "0.14.0",
"acvm-repo": "0.27.2"
".": "0.16.0",
"acvm-repo": "0.28.0"
}
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# Changelog

## [0.16.0](https://github.com/noir-lang/noir/compare/v0.15.0...v0.16.0) (2023-10-03)


### ⚠ BREAKING CHANGES

* Maintain shape of foreign call arguments ([#2935](https://github.com/noir-lang/noir/issues/2935))

### Features

* **abi:** Tuples as inputs/outputs to main ([#2899](https://github.com/noir-lang/noir/issues/2899)) ([d8bd78f](https://github.com/noir-lang/noir/commit/d8bd78f60c447bb8488a844d779e8aaf4150afe7))
* **acvm_js:** Export black box solver functions ([#2812](https://github.com/noir-lang/noir/issues/2812)) ([da8a98e](https://github.com/noir-lang/noir/commit/da8a98ed312fe69cb0bdb8f9d0a70ee7a981398f))
* Add bb interface implementation ([#2902](https://github.com/noir-lang/noir/issues/2902)) ([fe92dc0](https://github.com/noir-lang/noir/commit/fe92dc0df57b2cbc0e7b8cd1f3a91cba6b0f3049))
* Add noir types package ([#2893](https://github.com/noir-lang/noir/issues/2893)) ([e8fc868](https://github.com/noir-lang/noir/commit/e8fc8687e6dd89295fd023201443f1197963a243))
* Dynamic indexing of non-homogenous slices ([#2883](https://github.com/noir-lang/noir/issues/2883)) ([72c3661](https://github.com/noir-lang/noir/commit/72c3661c86712b99236eafaac99f76f13d42b9d9))
* Maintain shape of foreign call arguments ([#2935](https://github.com/noir-lang/noir/issues/2935)) ([f7869e6](https://github.com/noir-lang/noir/commit/f7869e6fb492b617e776e538ac4babfa56261d26))
* Oracle mocker for nargo test ([#2928](https://github.com/noir-lang/noir/issues/2928)) ([0dd1e77](https://github.com/noir-lang/noir/commit/0dd1e77c0e625805e15fa56b4738c93ebae19b6d))
* **ssa:** Multiple slice mergers ([#2753](https://github.com/noir-lang/noir/issues/2753)) ([8f76fe5](https://github.com/noir-lang/noir/commit/8f76fe5819e95ed111587090e15add48a2b4e859))
* **traits:** Multi module support for traits ([#2844](https://github.com/noir-lang/noir/issues/2844)) ([4deb07f](https://github.com/noir-lang/noir/commit/4deb07f80ce110187b66a46dd5624af3b8df3dbd))


### Bug Fixes

* Fix should_fail_with ([#2940](https://github.com/noir-lang/noir/issues/2940)) ([4f07b84](https://github.com/noir-lang/noir/commit/4f07b84458dba97530d8179a3b9b19101b472616))
* Force recompilation when `output_debug` flag is set. ([#2898](https://github.com/noir-lang/noir/issues/2898)) ([9854416](https://github.com/noir-lang/noir/commit/9854416f5ac03c9da6538edc6a0a540ccccb4b61))
* Improve error message when multiplying unit values ([#2950](https://github.com/noir-lang/noir/issues/2950)) ([57b7c55](https://github.com/noir-lang/noir/commit/57b7c55e7005876dc2e070c64e1b8115ca8a4242))
* **println:** Enable printing of arrays/strings >2 in fmt strings ([#2947](https://github.com/noir-lang/noir/issues/2947)) ([309fa70](https://github.com/noir-lang/noir/commit/309fa70823535c5340f986a17f4ddddcb8723bb8))

## [0.15.0](https://github.com/noir-lang/noir/compare/v0.14.1...v0.15.0) (2023-09-28)


### ⚠ BREAKING CHANGES

* update to `bb` version 0.7.3 ([#2729](https://github.com/noir-lang/noir/issues/2729))

### Features

* Contract events in artifacts ([#2873](https://github.com/noir-lang/noir/issues/2873)) ([4765c82](https://github.com/noir-lang/noir/commit/4765c8288c583a61a81ff97eea1ef49df13eeca0))


### Bug Fixes

* Finer bit size in bound constrain ([#2869](https://github.com/noir-lang/noir/issues/2869)) ([68385e2](https://github.com/noir-lang/noir/commit/68385e294a1501b19b28f3f5510e973283ed0821))


### Miscellaneous Chores

* Update to `bb` version 0.7.3 ([#2729](https://github.com/noir-lang/noir/issues/2729)) ([fce68d1](https://github.com/noir-lang/noir/commit/fce68d1404ae66bd7a71417d791dd70545bf24f2))

## [0.14.1](https://github.com/noir-lang/noir/compare/v0.14.0...v0.14.1) (2023-09-27)


### Bug Fixes

* Remove cast for field comparisons in brillig ([#2874](https://github.com/noir-lang/noir/issues/2874)) ([1fc1fdb](https://github.com/noir-lang/noir/commit/1fc1fdb4e15d2ce625ea79d458c5346fab418e49))
* Remove duplication of code to load stdlib files ([#2868](https://github.com/noir-lang/noir/issues/2868)) ([b694aab](https://github.com/noir-lang/noir/commit/b694aab87c4665a3a89715c9d4096eeb3efb9944))

## [0.14.0](https://github.com/noir-lang/noir/compare/v0.13.0...v0.14.0) (2023-09-26)


Expand Down
Loading

0 comments on commit 236a8a8

Please sign in to comment.