From 7faa0143318d5db97996f3a36f5cc6eb44f8f94e Mon Sep 17 00:00:00 2001 From: benesjan Date: Mon, 18 Sep 2023 12:51:26 +0200 Subject: [PATCH] WIP --- docs/docs/dev_docs/getting_started/cli.md | 24 +------- .../docs/dev_docs/getting_started/updating.md | 57 ++++++++++++++++++- .../end-to-end/src/cli_docs_sandbox.test.ts | 3 +- 3 files changed, 60 insertions(+), 24 deletions(-) diff --git a/docs/docs/dev_docs/getting_started/cli.md b/docs/docs/dev_docs/getting_started/cli.md index 55c03eff9a2..810e992183c 100644 --- a/docs/docs/dev_docs/getting_started/cli.md +++ b/docs/docs/dev_docs/getting_started/cli.md @@ -24,30 +24,10 @@ Or if you use yarn: yarn global add @aztec/cli ``` -If you have specified a SANDBOX_VERSION environmental variable when installing the Sandbox, you will need to specify the same version when installing the CLI. -To get the version of the Sandbox you have installed start the Sandbox and look for the version in the logs. -Alternatively, if you already have a version of aztec-cli installed, you can run: - -#include_code node-info yarn-project/end-to-end/src/cli_docs_sandbox.test.ts bash - -To install a specific version of the CLI, run: - -```bash -npm install -g @aztec/cli@YOUR_VERSION -``` - -or if you use yarn: - -```bash -yarn global add @aztec/cli@YOUR_VERSION -``` - -If your version was not found look at the list of available versions on [npmjs.com](https://www.npmjs.com/package/@aztec/cli?activeTab=versions). - -Verify that the correct version is installed: +Then verify that it is installed with: ```bash -aztec-cli --version +aztec-cli -h ``` ## I have the Sandbox running, now what? diff --git a/docs/docs/dev_docs/getting_started/updating.md b/docs/docs/dev_docs/getting_started/updating.md index 3992220a3b9..aed8850ce2a 100644 --- a/docs/docs/dev_docs/getting_started/updating.md +++ b/docs/docs/dev_docs/getting_started/updating.md @@ -6,4 +6,59 @@ 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`. \ No newline at end of file +4. Noir framework for Aztec contracts `aztec.nr`. + +## 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=v0.7.5 +``` + +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: +``` +Aztec Sandbox v0.7.5 is now ready for use! +``` + +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 + +The client 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@REPLACE_WITH_SANDBOX_VERSION +``` + +E.g.: +```shell +npm install -g @aztec/cli@0.7.5 +``` + +## 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 +``` diff --git a/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts b/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts index ae616884069..9d413b4d688 100644 --- a/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts +++ b/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts @@ -35,7 +35,8 @@ Node Info: Version: 1 Chain Id: 31337 Rollup Address: 0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9 -Client: aztec-rpc@0.7.2 +Client: aztec-rpc@0.7.5 +Compatible Nargo Version: 0.11.1-aztec.0 // docs:end:node-info `;