Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Validate nargo version against expected one #2254

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

spalladino
Copy link
Collaborator

@spalladino spalladino commented Sep 12, 2023

Adds a noir-version.json file in the noir-compiler project, which pins what is the expected nargo tag and commit hash to be used for Aztec.

  • When installing nargo in the CI, the tag is used as the argument for noirup.
  • When using the noir compiler from the CLI or programmatically, a warning is emitted if the current nargo version does not match the expected one in the json file.
  • When building contracts using yarn noir:build, an error is thrown if the version does not match.

The noir-version.json file is reached by the noir-complier rebuild patterns, which is a build-system dependency of noir-contracts, which means that all contracts in the repo should get recompiled when we bump to a new version of Noir. Fixes #2185.


This also allows us to start versioning the aztec noir releases rather than having a moving tag that potentially breaks master (and any open branches) when we update to a breaking release. To make the most of out this, I believe we should publish each aztec release as both aztec (so it's easy for end users to just install that version when they are starting) and a specific tag like aztec-0.7.0 that we refer to in the noir-version.

Alternatively, we can drop the aztec tag altogether, and either 1) automatically update our docs to reflect the tag listed in noir-verison.json in the install instructions (requires a smarter include_code macro) or 2) have the aztec-cli run noirup on its own to install the version required.

Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@spalladino spalladino merged commit 011c0b7 into master Sep 12, 2023
3 checks passed
@spalladino spalladino deleted the palla/noir-version-in-repo branch September 12, 2023 18:10
@spalladino
Copy link
Collaborator Author

@ludamad @sirasistant I've merged with @Maddiaa0's approval, but I'd still like to hear your thoughts on this one, especially on how to manage aztec tags on the noir repo.

PhilWindle pushed a commit that referenced this pull request Sep 13, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.7.0</summary>

##
[0.7.0](aztec-packages-v0.6.7...aztec-packages-v0.7.0)
(2023-09-13)


### ⚠ BREAKING CHANGES

* **aztec-noir:** rename noir-aztec to aztec-noir
([#2071](#2071))

### Features

* **build:** Use LTS version of ubuntu
([#2239](#2239))
([ce6671e](ce6671e))
* **ci:** Run nargo test in ci on all packages
([#2197](#2197))
([cca55f2](cca55f2))
* **cli:** Add commands for generating ts and nr interfaces
([#2241](#2241))
([c11b70d](c11b70d)),
closes
[#2183](#2183)
* **cli:** Inspect contract command
([#2248](#2248))
([381706e](381706e)),
closes
[#2180](#2180)
* Define specific Sandbox version when running docker-compose up
([#2238](#2238))
([71da236](71da236))
* **docs:** Updated docs explaining Sandbox accounts
([#2235](#2235))
([f560066](f560066))
* Optimise sandbox startup time by only initialising the BB solver once.
([#2240](#2240))
([e9cac9c](e9cac9c))
* Remove entrypoint collection
([#2148](#2148))
([e97c94d](e97c94d))
* Validate nargo version against expected one
([#2254](#2254))
([011c0b7](011c0b7))


### Bug Fixes

* Add cjs-entry to bbjs package files
([#2237](#2237))
([ae16193](ae16193))
* Add link to example contracts in the monorepo
([#2219](#2219))
([8aede54](8aede54))
* **build:** Update ubuntu version used in Docker builds
([#2236](#2236))
([dbe80b7](dbe80b7))
* **docs:** Use code snippet macros in bridge docs
([#2205](#2205))
([0c3a627](0c3a627))
* Format barretenberg
([#2209](#2209))
([0801372](0801372))
* Msgpack blowup with bigger objects
([#2207](#2207))
([b909937](b909937))
* Refactor constraints in scalar mul to use the high limb
([#2161](#2161))
([1d0e25d](1d0e25d))
* Reinstate v stripping in build
([#2220](#2220))
([13d34f5](13d34f5))
* Return partial witnesses based on the content of read requests.
([#2164](#2164))
([a2125f7](a2125f7))
* Try e2e cli timeout bump
([#2210](#2210))
([a039fdd](a039fdd))
* Try workaround sample dapp ci timeout
([#2208](#2208))
([e39f6bf](e39f6bf))


### Miscellaneous

* Add a Nargo workspace in `noir-contracts`
([#2083](#2083))
([728a79c](728a79c))
* Add debugging to run_tests
([#2212](#2212))
([1c5e78a](1c5e78a))
* **aztec-noir:** Rename noir-aztec to aztec-noir
([#2071](#2071))
([e1e14d2](e1e14d2))
* **circuits:** Merge and root rollup cbind msgpack
([#2192](#2192))
([4f3ecee](4f3ecee))
* **noir-contracts:** 1655 - rename functions to make hack clearer for
publicly created notes
([#2230](#2230))
([707bc09](707bc09))
* Run the test for zero division with mul div up
([#2206](#2206))
([747de6a](747de6a))
* Update url for acir artifacts
([#2231](#2231))
([5e0abd3](5e0abd3))
* Use workspace build with `nargo compile --workspace`
([#2266](#2266))
([9ab66a0](9ab66a0))


### Documentation

* Dapp tutorial
([#2109](#2109))
([573dbc2](573dbc2)),
closes
[#2051](#2051)
* Minor fixes to dapp tutorial
([#2203](#2203))
([dcc927c](dcc927c))
</details>

<details><summary>barretenberg.js: 0.7.0</summary>

##
[0.7.0](barretenberg.js-v0.6.7...barretenberg.js-v0.7.0)
(2023-09-13)


### Bug Fixes

* Add cjs-entry to bbjs package files
([#2237](#2237))
([ae16193](ae16193))


### Miscellaneous

* Add debugging to run_tests
([#2212](#2212))
([1c5e78a](1c5e78a))
</details>

<details><summary>barretenberg: 0.7.0</summary>

##
[0.7.0](barretenberg-v0.6.7...barretenberg-v0.7.0)
(2023-09-13)


### ⚠ BREAKING CHANGES

* **aztec-noir:** rename noir-aztec to aztec-noir
([#2071](#2071))

### Features

* **build:** Use LTS version of ubuntu
([#2239](#2239))
([ce6671e](ce6671e))


### Bug Fixes

* **build:** Update ubuntu version used in Docker builds
([#2236](#2236))
([dbe80b7](dbe80b7))
* Format barretenberg
([#2209](#2209))
([0801372](0801372))
* Msgpack blowup with bigger objects
([#2207](#2207))
([b909937](b909937))
* Refactor constraints in scalar mul to use the high limb
([#2161](#2161))
([1d0e25d](1d0e25d))


### Miscellaneous

* Add debugging to run_tests
([#2212](#2212))
([1c5e78a](1c5e78a))
* **aztec-noir:** Rename noir-aztec to aztec-noir
([#2071](#2071))
([e1e14d2](e1e14d2))
* Update url for acir artifacts
([#2231](#2231))
([5e0abd3](5e0abd3))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Sep 13, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.7.0</summary>

##
[0.7.0](AztecProtocol/aztec-packages@aztec-packages-v0.6.7...aztec-packages-v0.7.0)
(2023-09-13)


### ⚠ BREAKING CHANGES

* **aztec-noir:** rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))

### Features

* **build:** Use LTS version of ubuntu
([#2239](AztecProtocol/aztec-packages#2239))
([ce6671e](AztecProtocol/aztec-packages@ce6671e))
* **ci:** Run nargo test in ci on all packages
([#2197](AztecProtocol/aztec-packages#2197))
([cca55f2](AztecProtocol/aztec-packages@cca55f2))
* **cli:** Add commands for generating ts and nr interfaces
([#2241](AztecProtocol/aztec-packages#2241))
([c11b70d](AztecProtocol/aztec-packages@c11b70d)),
closes
[#2183](AztecProtocol/aztec-packages#2183)
* **cli:** Inspect contract command
([#2248](AztecProtocol/aztec-packages#2248))
([381706e](AztecProtocol/aztec-packages@381706e)),
closes
[#2180](AztecProtocol/aztec-packages#2180)
* Define specific Sandbox version when running docker-compose up
([#2238](AztecProtocol/aztec-packages#2238))
([71da236](AztecProtocol/aztec-packages@71da236))
* **docs:** Updated docs explaining Sandbox accounts
([#2235](AztecProtocol/aztec-packages#2235))
([f560066](AztecProtocol/aztec-packages@f560066))
* Optimise sandbox startup time by only initialising the BB solver once.
([#2240](AztecProtocol/aztec-packages#2240))
([e9cac9c](AztecProtocol/aztec-packages@e9cac9c))
* Remove entrypoint collection
([#2148](AztecProtocol/aztec-packages#2148))
([e97c94d](AztecProtocol/aztec-packages@e97c94d))
* Validate nargo version against expected one
([#2254](AztecProtocol/aztec-packages#2254))
([011c0b7](AztecProtocol/aztec-packages@011c0b7))


### Bug Fixes

* Add cjs-entry to bbjs package files
([#2237](AztecProtocol/aztec-packages#2237))
([ae16193](AztecProtocol/aztec-packages@ae16193))
* Add link to example contracts in the monorepo
([#2219](AztecProtocol/aztec-packages#2219))
([8aede54](AztecProtocol/aztec-packages@8aede54))
* **build:** Update ubuntu version used in Docker builds
([#2236](AztecProtocol/aztec-packages#2236))
([dbe80b7](AztecProtocol/aztec-packages@dbe80b7))
* **docs:** Use code snippet macros in bridge docs
([#2205](AztecProtocol/aztec-packages#2205))
([0c3a627](AztecProtocol/aztec-packages@0c3a627))
* Format barretenberg
([#2209](AztecProtocol/aztec-packages#2209))
([0801372](AztecProtocol/aztec-packages@0801372))
* Msgpack blowup with bigger objects
([#2207](AztecProtocol/aztec-packages#2207))
([b909937](AztecProtocol/aztec-packages@b909937))
* Refactor constraints in scalar mul to use the high limb
([#2161](AztecProtocol/aztec-packages#2161))
([1d0e25d](AztecProtocol/aztec-packages@1d0e25d))
* Reinstate v stripping in build
([#2220](AztecProtocol/aztec-packages#2220))
([13d34f5](AztecProtocol/aztec-packages@13d34f5))
* Return partial witnesses based on the content of read requests.
([#2164](AztecProtocol/aztec-packages#2164))
([a2125f7](AztecProtocol/aztec-packages@a2125f7))
* Try e2e cli timeout bump
([#2210](AztecProtocol/aztec-packages#2210))
([a039fdd](AztecProtocol/aztec-packages@a039fdd))
* Try workaround sample dapp ci timeout
([#2208](AztecProtocol/aztec-packages#2208))
([e39f6bf](AztecProtocol/aztec-packages@e39f6bf))


### Miscellaneous

* Add a Nargo workspace in `noir-contracts`
([#2083](AztecProtocol/aztec-packages#2083))
([728a79c](AztecProtocol/aztec-packages@728a79c))
* Add debugging to run_tests
([#2212](AztecProtocol/aztec-packages#2212))
([1c5e78a](AztecProtocol/aztec-packages@1c5e78a))
* **aztec-noir:** Rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))
([e1e14d2](AztecProtocol/aztec-packages@e1e14d2))
* **circuits:** Merge and root rollup cbind msgpack
([#2192](AztecProtocol/aztec-packages#2192))
([4f3ecee](AztecProtocol/aztec-packages@4f3ecee))
* **noir-contracts:** 1655 - rename functions to make hack clearer for
publicly created notes
([#2230](AztecProtocol/aztec-packages#2230))
([707bc09](AztecProtocol/aztec-packages@707bc09))
* Run the test for zero division with mul div up
([#2206](AztecProtocol/aztec-packages#2206))
([747de6a](AztecProtocol/aztec-packages@747de6a))
* Update url for acir artifacts
([#2231](AztecProtocol/aztec-packages#2231))
([5e0abd3](AztecProtocol/aztec-packages@5e0abd3))
* Use workspace build with `nargo compile --workspace`
([#2266](AztecProtocol/aztec-packages#2266))
([9ab66a0](AztecProtocol/aztec-packages@9ab66a0))


### Documentation

* Dapp tutorial
([#2109](AztecProtocol/aztec-packages#2109))
([573dbc2](AztecProtocol/aztec-packages@573dbc2)),
closes
[#2051](AztecProtocol/aztec-packages#2051)
* Minor fixes to dapp tutorial
([#2203](AztecProtocol/aztec-packages#2203))
([dcc927c](AztecProtocol/aztec-packages@dcc927c))
</details>

<details><summary>barretenberg.js: 0.7.0</summary>

##
[0.7.0](AztecProtocol/aztec-packages@barretenberg.js-v0.6.7...barretenberg.js-v0.7.0)
(2023-09-13)


### Bug Fixes

* Add cjs-entry to bbjs package files
([#2237](AztecProtocol/aztec-packages#2237))
([ae16193](AztecProtocol/aztec-packages@ae16193))


### Miscellaneous

* Add debugging to run_tests
([#2212](AztecProtocol/aztec-packages#2212))
([1c5e78a](AztecProtocol/aztec-packages@1c5e78a))
</details>

<details><summary>barretenberg: 0.7.0</summary>

##
[0.7.0](AztecProtocol/aztec-packages@barretenberg-v0.6.7...barretenberg-v0.7.0)
(2023-09-13)


### ⚠ BREAKING CHANGES

* **aztec-noir:** rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))

### Features

* **build:** Use LTS version of ubuntu
([#2239](AztecProtocol/aztec-packages#2239))
([ce6671e](AztecProtocol/aztec-packages@ce6671e))


### Bug Fixes

* **build:** Update ubuntu version used in Docker builds
([#2236](AztecProtocol/aztec-packages#2236))
([dbe80b7](AztecProtocol/aztec-packages@dbe80b7))
* Format barretenberg
([#2209](AztecProtocol/aztec-packages#2209))
([0801372](AztecProtocol/aztec-packages@0801372))
* Msgpack blowup with bigger objects
([#2207](AztecProtocol/aztec-packages#2207))
([b909937](AztecProtocol/aztec-packages@b909937))
* Refactor constraints in scalar mul to use the high limb
([#2161](AztecProtocol/aztec-packages#2161))
([1d0e25d](AztecProtocol/aztec-packages@1d0e25d))


### Miscellaneous

* Add debugging to run_tests
([#2212](AztecProtocol/aztec-packages#2212))
([1c5e78a](AztecProtocol/aztec-packages@1c5e78a))
* **aztec-noir:** Rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))
([e1e14d2](AztecProtocol/aztec-packages@e1e14d2))
* Update url for acir artifacts
([#2231](AztecProtocol/aztec-packages#2231))
([5e0abd3](AztecProtocol/aztec-packages@5e0abd3))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/build-system that referenced this pull request Sep 14, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.7.0</summary>

##
[0.7.0](AztecProtocol/aztec-packages@aztec-packages-v0.6.7...aztec-packages-v0.7.0)
(2023-09-13)


### ⚠ BREAKING CHANGES

* **aztec-noir:** rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))

### Features

* **build:** Use LTS version of ubuntu
([#2239](AztecProtocol/aztec-packages#2239))
([ce6671e](AztecProtocol/aztec-packages@ce6671e))
* **ci:** Run nargo test in ci on all packages
([#2197](AztecProtocol/aztec-packages#2197))
([cca55f2](AztecProtocol/aztec-packages@cca55f2))
* **cli:** Add commands for generating ts and nr interfaces
([#2241](AztecProtocol/aztec-packages#2241))
([c11b70d](AztecProtocol/aztec-packages@c11b70d)),
closes
[#2183](AztecProtocol/aztec-packages#2183)
* **cli:** Inspect contract command
([#2248](AztecProtocol/aztec-packages#2248))
([381706e](AztecProtocol/aztec-packages@381706e)),
closes
[#2180](AztecProtocol/aztec-packages#2180)
* Define specific Sandbox version when running docker-compose up
([#2238](AztecProtocol/aztec-packages#2238))
([71da236](AztecProtocol/aztec-packages@71da236))
* **docs:** Updated docs explaining Sandbox accounts
([#2235](AztecProtocol/aztec-packages#2235))
([f560066](AztecProtocol/aztec-packages@f560066))
* Optimise sandbox startup time by only initialising the BB solver once.
([#2240](AztecProtocol/aztec-packages#2240))
([e9cac9c](AztecProtocol/aztec-packages@e9cac9c))
* Remove entrypoint collection
([#2148](AztecProtocol/aztec-packages#2148))
([e97c94d](AztecProtocol/aztec-packages@e97c94d))
* Validate nargo version against expected one
([#2254](AztecProtocol/aztec-packages#2254))
([011c0b7](AztecProtocol/aztec-packages@011c0b7))


### Bug Fixes

* Add cjs-entry to bbjs package files
([#2237](AztecProtocol/aztec-packages#2237))
([ae16193](AztecProtocol/aztec-packages@ae16193))
* Add link to example contracts in the monorepo
([#2219](AztecProtocol/aztec-packages#2219))
([8aede54](AztecProtocol/aztec-packages@8aede54))
* **build:** Update ubuntu version used in Docker builds
([#2236](AztecProtocol/aztec-packages#2236))
([dbe80b7](AztecProtocol/aztec-packages@dbe80b7))
* **docs:** Use code snippet macros in bridge docs
([#2205](AztecProtocol/aztec-packages#2205))
([0c3a627](AztecProtocol/aztec-packages@0c3a627))
* Format barretenberg
([#2209](AztecProtocol/aztec-packages#2209))
([0801372](AztecProtocol/aztec-packages@0801372))
* Msgpack blowup with bigger objects
([#2207](AztecProtocol/aztec-packages#2207))
([b909937](AztecProtocol/aztec-packages@b909937))
* Refactor constraints in scalar mul to use the high limb
([#2161](AztecProtocol/aztec-packages#2161))
([1d0e25d](AztecProtocol/aztec-packages@1d0e25d))
* Reinstate v stripping in build
([#2220](AztecProtocol/aztec-packages#2220))
([13d34f5](AztecProtocol/aztec-packages@13d34f5))
* Return partial witnesses based on the content of read requests.
([#2164](AztecProtocol/aztec-packages#2164))
([a2125f7](AztecProtocol/aztec-packages@a2125f7))
* Try e2e cli timeout bump
([#2210](AztecProtocol/aztec-packages#2210))
([a039fdd](AztecProtocol/aztec-packages@a039fdd))
* Try workaround sample dapp ci timeout
([#2208](AztecProtocol/aztec-packages#2208))
([e39f6bf](AztecProtocol/aztec-packages@e39f6bf))


### Miscellaneous

* Add a Nargo workspace in `noir-contracts`
([#2083](AztecProtocol/aztec-packages#2083))
([728a79c](AztecProtocol/aztec-packages@728a79c))
* Add debugging to run_tests
([#2212](AztecProtocol/aztec-packages#2212))
([1c5e78a](AztecProtocol/aztec-packages@1c5e78a))
* **aztec-noir:** Rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))
([e1e14d2](AztecProtocol/aztec-packages@e1e14d2))
* **circuits:** Merge and root rollup cbind msgpack
([#2192](AztecProtocol/aztec-packages#2192))
([4f3ecee](AztecProtocol/aztec-packages@4f3ecee))
* **noir-contracts:** 1655 - rename functions to make hack clearer for
publicly created notes
([#2230](AztecProtocol/aztec-packages#2230))
([707bc09](AztecProtocol/aztec-packages@707bc09))
* Run the test for zero division with mul div up
([#2206](AztecProtocol/aztec-packages#2206))
([747de6a](AztecProtocol/aztec-packages@747de6a))
* Update url for acir artifacts
([#2231](AztecProtocol/aztec-packages#2231))
([5e0abd3](AztecProtocol/aztec-packages@5e0abd3))
* Use workspace build with `nargo compile --workspace`
([#2266](AztecProtocol/aztec-packages#2266))
([9ab66a0](AztecProtocol/aztec-packages@9ab66a0))


### Documentation

* Dapp tutorial
([#2109](AztecProtocol/aztec-packages#2109))
([573dbc2](AztecProtocol/aztec-packages@573dbc2)),
closes
[#2051](AztecProtocol/aztec-packages#2051)
* Minor fixes to dapp tutorial
([#2203](AztecProtocol/aztec-packages#2203))
([dcc927c](AztecProtocol/aztec-packages@dcc927c))
</details>

<details><summary>barretenberg.js: 0.7.0</summary>

##
[0.7.0](AztecProtocol/aztec-packages@barretenberg.js-v0.6.7...barretenberg.js-v0.7.0)
(2023-09-13)


### Bug Fixes

* Add cjs-entry to bbjs package files
([#2237](AztecProtocol/aztec-packages#2237))
([ae16193](AztecProtocol/aztec-packages@ae16193))


### Miscellaneous

* Add debugging to run_tests
([#2212](AztecProtocol/aztec-packages#2212))
([1c5e78a](AztecProtocol/aztec-packages@1c5e78a))
</details>

<details><summary>barretenberg: 0.7.0</summary>

##
[0.7.0](AztecProtocol/aztec-packages@barretenberg-v0.6.7...barretenberg-v0.7.0)
(2023-09-13)


### ⚠ BREAKING CHANGES

* **aztec-noir:** rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))

### Features

* **build:** Use LTS version of ubuntu
([#2239](AztecProtocol/aztec-packages#2239))
([ce6671e](AztecProtocol/aztec-packages@ce6671e))


### Bug Fixes

* **build:** Update ubuntu version used in Docker builds
([#2236](AztecProtocol/aztec-packages#2236))
([dbe80b7](AztecProtocol/aztec-packages@dbe80b7))
* Format barretenberg
([#2209](AztecProtocol/aztec-packages#2209))
([0801372](AztecProtocol/aztec-packages@0801372))
* Msgpack blowup with bigger objects
([#2207](AztecProtocol/aztec-packages#2207))
([b909937](AztecProtocol/aztec-packages@b909937))
* Refactor constraints in scalar mul to use the high limb
([#2161](AztecProtocol/aztec-packages#2161))
([1d0e25d](AztecProtocol/aztec-packages@1d0e25d))


### Miscellaneous

* Add debugging to run_tests
([#2212](AztecProtocol/aztec-packages#2212))
([1c5e78a](AztecProtocol/aztec-packages@1c5e78a))
* **aztec-noir:** Rename noir-aztec to aztec-noir
([#2071](AztecProtocol/aztec-packages#2071))
([e1e14d2](AztecProtocol/aztec-packages@e1e14d2))
* Update url for acir artifacts
([#2231](AztecProtocol/aztec-packages#2231))
([5e0abd3](AztecProtocol/aztec-packages@5e0abd3))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Rebuild noir-contracts if a new Noir compiler version is pushed.
2 participants