-
Notifications
You must be signed in to change notification settings - Fork 607
docs: update instructions #2297
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b8a6743
WIP
benesjan 7500208
WIP
benesjan 523c609
Apply suggestions from code review
benesjan 29f00e9
testing get-node-info command
benesjan 53b1379
describing how to get a version
benesjan fa3e151
cleanup
benesjan ceb671a
WIP
benesjan 7faa014
WIP
benesjan a0044b3
WIP
benesjan 4683bf8
WIP
benesjan de94765
Merge branch 'master' into janb/sandbox-update-docs
benesjan daea076
WIP
benesjan ef17a14
WIP
benesjan 1c9fe84
Merge branch 'master' into janb/sandbox-update-docs
benesjan 42643d0
Merge branch 'master' into janb/sandbox-update-docs
benesjan 476c089
Apply suggestions from code review
benesjan e0f155a
Merge branch 'master' into janb/sandbox-update-docs
benesjan 534a73e
merge fix
benesjan e783331
TLDR
benesjan 999b17b
Merge branch 'master' into janb/sandbox-update-docs
benesjan e3e73ff
feat: nargo version in sandbox logs
benesjan 644a519
Merge branch 'master' into janb/sandbox-update-docs
benesjan 0e480ad
Merge branch 'master' into janb/sandbox-update-docs
benesjan 5e18c6a
feat: #include_short_version
benesjan 3467cfc
using the version macro
benesjan 3561503
cleanup
benesjan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| title: Updating | ||
| --- | ||
|
|
||
| There are 4 components whose versions need to be kept compatible: | ||
| 1. Aztec Sandbox, | ||
| 2. Aztec CLI, | ||
| 3. Noir compiler `nargo`, | ||
| 4. Noir framework for Aztec contracts `aztec.nr`. | ||
|
|
||
| Aztec Sandbox, Aztec CLI and `aztec.nr` are using the same versioning scheme and their versions must match. | ||
| The Noir compiler `nargo` has its own versioning scheme and its version must match the compatible nargo version specified in Sandbox. | ||
|
|
||
| ## Updating Aztec Sandbox | ||
| To update the sandbox to the latest version, simply run the curl command we used for installation again: | ||
| ```shell | ||
| /bin/bash -c "$(curl -fsSL 'https://sandbox.aztec.network')" | ||
| ``` | ||
|
|
||
| It will download and start the latest version of sandbox. | ||
|
|
||
| If you would like to use a fixed version of the sandbox, you can export the `SANDBOX_VERSION` environmental variable. | ||
| If you are unsure what version to use go to [aztec-packages repository](https://github.com/AztecProtocol/aztec-packages/releases) and choose the `aztec-packages` release based on the changelog. | ||
|
|
||
| Then set the `SANDBOX_VERSION` environmental variable to the version you want to use. E.g.: | ||
| ```shell | ||
| export SANDBOX_VERSION=#include_aztec_short_version | ||
| ``` | ||
|
|
||
| Now when you run the curl command it will use the version you specified. | ||
| To verify that it's the case check the console output of the curl command. | ||
| You should see the following line: | ||
| ``` | ||
| Setting up Aztec Sandbox v#include_aztec_short_version (nargo #include_noir_version), please stand by... | ||
| ``` | ||
|
|
||
| Alternatively you can open a new terminal and use aztec-cli to get the version. | ||
|
|
||
| #include_code node-info yarn-project/end-to-end/src/cli_docs_sandbox.test.ts bash | ||
|
benesjan marked this conversation as resolved.
|
||
|
|
||
| The sandbox version should be the same as the one we chose by setting the `SANDBOX_VERSION` environmental variable. | ||
|
|
||
| ## Updating Aztec CLI | ||
| If the latest version was used when updating the sandbox then we can simply run the following command to update the CLI: | ||
| ```shell | ||
| npm install -g @aztec/cli | ||
| ``` | ||
|
|
||
| If a specific version was set for the sandbox then we need to install the CLI with the same version: | ||
| ```shell | ||
| npm install -g @aztec/cli@$SANDBOX_VERSION | ||
| ``` | ||
|
|
||
| E.g.: | ||
| ```shell | ||
| npm install -g @aztec/cli@#include_aztec_short_version | ||
| ``` | ||
|
|
||
| ## Updating Noir compiler | ||
| Now we need to update the Noir compiler `nargo` to the version compatible with the sandbox. | ||
| Use `aztec-cli` to get it: | ||
| #include_code node-info yarn-project/end-to-end/src/cli_docs_sandbox.test.ts bash | ||
|
|
||
| Then we install the `Compatible Nargo Version` with (replace `COMPATIBLE_NARGO_VERSION` with the version from the previous command): | ||
| ```shell | ||
| noirup -v COMPATIBLE_NARGO_VERSION | ||
|
benesjan marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| ## Updating Noir framework | ||
| Finally we need to update the Noir framework for Aztec contracts. | ||
| We need to install a version compatible with our `nargo` and Sandbox. | ||
|
|
||
| To update the framework we will update a tag of the `aztec.nr` dependency in the `Nargo.toml` file to the `SANDBOX_VERSION` from above. | ||
| Find all the dependencies pointing to the directory within `aztec.nr` framework and update the corresponding tag. | ||
| E.g.: | ||
|
|
||
| ```diff | ||
| [dependencies] | ||
| -aztec = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.7.5", directory="yarn-project/aztec-nr/aztec" } | ||
| +aztec = { git="https://github.com/AztecProtocol/aztec-packages", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } | ||
| -value_note = { git="https://github.com/AztecProtocol/aztec-packages", tag="aztec-packages-v0.7.5", directory="yarn-project/aztec-nr/value-note" } | ||
| +value_note = { git="https://github.com/AztecProtocol/aztec-packages", tag="#include_aztec_version", directory="yarn-project/aztec-nr/value-note" } | ||
| ``` | ||
|
|
||
| Go to the project directory and try compiling it with `aztec-cli`` to verify that the update was successful: | ||
| ```shell | ||
| cd /your/project/root | ||
| aztec-cli compile ./ | ||
| ``` | ||
|
|
||
| If the dependencies fail to resolve ensure that the tag matches a tag in the [aztec-packages repository](https://github.com/AztecProtocol/aztec-packages/tags). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,9 @@ | |
| { | ||
| "path": "../l1-artifacts" | ||
| }, | ||
| { | ||
| "path": "../noir-compiler" | ||
| }, | ||
| { | ||
| "path": "../noir-contracts" | ||
| }, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.