diff --git a/docs/docs/developers/contracts/testing_contracts/main.md b/docs/docs/developers/contracts/testing_contracts/main.md index f00e567bc0a5..e0d217adbef9 100644 --- a/docs/docs/developers/contracts/testing_contracts/main.md +++ b/docs/docs/developers/contracts/testing_contracts/main.md @@ -10,4 +10,4 @@ To make testing easier, the sandbox is shipped with cheat codes to easily test i ## Examples -You can find example tests in the [Aztec Boxes](https://github.com/AztecProtocol/aztec-packages/tree/master/boxes). You can also have a look at the [end-to-end tests](https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/end-to-end). +You can find example tests in the [aztec-starter](https://github.com/AztecProtocol/aztec-starter/tree/main) repo as well as the [Aztec Boxes](https://github.com/AztecProtocol/aztec-packages/tree/master/boxes). diff --git a/docs/docs/developers/getting_started/quickstart.md b/docs/docs/developers/getting_started/quickstart.md index 6cc067c01517..a05f8abc6752 100644 --- a/docs/docs/developers/getting_started/quickstart.md +++ b/docs/docs/developers/getting_started/quickstart.md @@ -2,38 +2,82 @@ title: Quickstart --- -The easiest way to start developing on Aztec is simply to click on one of these buttons: +In this guide, you will -[![One-Click React Starter](/img/codespaces_badges/react_cta_badge.svg)](https://codespaces.new/AztecProtocol/aztec-packages?devcontainer_path=.devcontainer%2Freact%2Fdevcontainer.json) [![One-Click HTML/TS Starter](/img/codespaces_badges/vanilla_cta_badge.svg)](https://codespaces.new/AztecProtocol/aztec-packages?devcontainer_path=.devcontainer%2Fvanilla%2Fdevcontainer.json) [![One-Click Token Starter](/img/codespaces_badges/token_cta_badge.svg)](https://codespaces.new/AztecProtocol/aztec-packages?devcontainer_path=.devcontainer%2Ftoken%2Fdevcontainer.json) +1. Set up the Aztec sandbox (local development environment) locally +2. Install the Aztec development kit +3. Use Aztec.js to deploy an example contract that comes with the sandbox +4. Use Aztec.js to interact with the contract you just deployed -That's it! +... in less than 10 minutes. -This creates a codespace with a prebuilt image containing one of the "Aztec Boxes" and a development network (sandbox). -- You can develop directly on the codespace, push it to a repo, make yourself at home. -- You can also just use the sandbox that comes with it. The URL will be logged, you just need to use it as your `PXE_URL`. +## Prerequisites -## Develop Locally +- Node.js >= v18 (recommend installing with [nvm](https://github.com/nvm-sh/nvm)) -The above method uses Aztec boxes to install the sandbox and clone the repo. You can use it too to get started on your own machine and use your own IDE. +## Install Docker -You can also [install the sandbox manually](../sandbox/references/sandbox-reference.md). +Aztec tooling requires the Docker daemon to be running, and this is easily achieved via Docker Desktop. See [this page of the Docker docs](https://docs.docker.com/get-docker/) for instructions on how to install Docker Desktop for your operating system. +Note: if installing via Docker Desktop, you do NOT need to keep the application open at all times (just Docker daemon). -### Prerequisites +Installing and running the Docker daemon can also be achieved by installing Docker Engine, see [these instructions](https://docs.docker.com/engine/install/). -- Node.js >= v18 (recommend installing with [nvm](https://github.com/nvm-sh/nvm)) -- Docker (visit [this page of the Docker docs](https://docs.docker.com/get-docker/) on how to install it) +However installed, ensure Docker daemon is running. See [start Docker daemon](https://docs.docker.com/config/daemon/start/). + +### Note on Linux + +If you are running Linux, you will need to set the context (because Docker Desktop runs in a VM by default). See [this page](https://docs.docker.com/desktop/faqs/linuxfaqs/#what-is-the-difference-between-docker-desktop-for-linux-and-docker-engine) for more information. You can do this by running: + +```bash +docker context use default +``` + +## Install the Sandbox + +You can run the Sandbox using Docker. + +To install the latest Sandbox version, run: + +```bash +bash -i <(curl -s install.aztec.network) +``` + +> If Docker has been installed on your linux server but you encounter the error "Docker is not running. Please start Docker and try again". If you're encountering this issue, it's likely because Docker is running with root user privileges. In such cases, consider [managing Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) to resolve the problem. + + +This will install the following: + +- **aztec** - launches various infrastructure subsystems (sequencer, prover, pxe, etc). +- **aztec-nargo** - aztec's build of nargo, the noir compiler toolchain. +- **aztec-sandbox** - a wrapper around docker-compose that launches services needed for sandbox testing. +- **aztec-up** - a tool to upgrade the aztec toolchain to the latest, or specific versions. +- **aztec-builder** - A useful tool for projects to generate ABIs and update their dependencies. -### Run the `npx` script -With the node installation, you now should have `npm` and be able to run `npx` scripts. You can do that running: +Once these have been installed, to start the sandbox, run: ```bash -npx create-aztec-app +aztec-sandbox ``` -And follow the instructions. If all goes well, you should now have a development environment running locally on your machine. +This will attempt to run the Sandbox on ` localhost:8080`, so you will have to make sure nothing else is running on that port or change the port defined in `./.aztec/docker-compose.yml`. Running the installation again will overwrite any changes made to the `docker-compose.yml`. -You can run `npx create-aztec-app sandbox -h` to start, stop, update and output logs from the sandbox. +**Congratulations, you have just installed and run the Aztec Sandbox!** + +```bash + /\ | | + / \ ___| |_ ___ ___ + / /\ \ |_ / __/ _ \/ __| + / ____ \ / /| || __/ (__ + /_/___ \_\/___|\__\___|\___| + +``` + +In the terminal, you will see some logs: +1. Sandbox version +2. Contract addresses of rollup contracts +3. PXE (private execution environment) setup logs +4. Initial accounts that are shipped with the sandbox and can be used in tests ## What's next? @@ -41,4 +85,3 @@ To deploy a smart contract to your sandbox and interact with it using Aztec.js, To skip this and write your first smart contract, go to the [Aztec.nr getting started page](aztecnr-getting-started.md). - diff --git a/docs/docs/developers/sandbox/references/sandbox-reference.md b/docs/docs/developers/sandbox/references/sandbox-reference.md index fc401a573367..99e7850fb04e 100644 --- a/docs/docs/developers/sandbox/references/sandbox-reference.md +++ b/docs/docs/developers/sandbox/references/sandbox-reference.md @@ -2,30 +2,19 @@ title: Sandbox Reference --- -:::tip +Here you will find a reference to everything available within the Sandbox. -For a quick start, follow the [guide](../../getting_started/quickstart.md) to install the sandbox. +## Installation -::: +You can run the Sandbox using Docker. See the [Quickstart](../../getting_started/quickstart.md#install-docker) for instructions on installing Docker. -## Manual Install - -You can manually install the sandbox via the underlying script used in the [Aztec Boxes](../../getting_started/quickstart.md#run-the-npx-script). - -### Prerequisites - -- Node.js >= v18 (recommend installing with [nvm](https://github.com/nvm-sh/nvm)) -- Docker (visit [this page of the Docker docs](https://docs.docker.com/get-docker/) on how to install it) - -### Install the sandbox - -To install the latest Sandbox version, run: +### With Docker ```bash bash -i <(curl -s install.aztec.network) ``` -This will install the following tools: +This will install the following: - **aztec** - launches various infrastructure subsystems (sequencer, prover, pxe, etc). - **aztec-nargo** - aztec's build of nargo, the noir compiler toolchain. @@ -39,25 +28,31 @@ Once these have been installed, to start the sandbox, run: aztec-sandbox ``` -### Have fun! +This will attempt to run the Sandbox with the PXE listening on ` localhost:8080`. You can change the port defined in `./.aztec/docker-compose.yml` or by setting the `PXE_PORT` environment variable. Running the install command again will overwrite any changes made to the `docker-compose.yml`. + +See the full list of configurable environment variables [here](#environment-variables). -**Congratulations, you have just installed and run the Aztec Sandbox!** +If you have previously installed the CLI via a node package manager, you will need to uninstall it and remove it from your project dependencies and install it via Docker. -```bash - /\ | | - / \ ___| |_ ___ ___ - / /\ \ |_ / __/ _ \/ __| - / ____ \ / /| || __/ (__ - /_/___ \_\/___|\__\___|\___| +To install a specific version of the sandbox, you can set the environment variable `SANDBOX_VERSION` +```bash +VERSION= bash -i <(curl -s install.aztec.network) ``` -In the terminal, you will see some logs: -1. Sandbox version -2. Contract addresses of rollup contracts -3. PXE (private execution environment) setup logs -4. Initial accounts that are shipped with the sandbox and can be used in tests +## Running + +Once the installed, you can run the sandbox with: +```bash +aztec-sandbox +``` + +Alternatively, you can run like so: + +```bash +cd ~/.aztec && docker-compose up +``` ## Running Aztec PXE / Node / P2P-Bootstrap node diff --git a/docs/docs/misc/aztec_connect_sunset.mdx b/docs/docs/misc/aztec_connect_sunset.mdx new file mode 100644 index 000000000000..873b62563ecf --- /dev/null +++ b/docs/docs/misc/aztec_connect_sunset.mdx @@ -0,0 +1,30 @@ +--- +title: Aztec Connect Sunset +--- + +import Image from "@theme/IdealImage"; + +:::danger Deprecated + +Aztec Connect is no longer being actively developed and is shut down. + +::: + +## Run your own AC + +Aztec Labs ran a sequencer for a year in maintenance mode, providing free withdrawals until the 31st March 2024. + +However, all of the infrastructure and associated code required to run and interact with the Aztec Connect rollup is open source, so anyone can publish blocks, or run their own instance of the rollup software. For convenience, we've provided an [Aztec Connect Ejector](https://github.com/AztecProtocol/aztec-connect-ejector) you can refer to for instructions. +You can find the old documentation site that includes all of the pertinent information on the [`aztec-connect` branch](https://github.com/AztecProtocol/docs/tree/aztec-connect) of the docs repository. + +### Source Code + +The code is open-source. Here are the relevant repositories you can check for more information: + +- [Running the rollup service](https://github.com/AztecProtocol/aztec-connect/blob/master/yarn-project/README.md) +- [Sequencer](https://github.com/AztecProtocol/aztec-connect/tree/master/yarn-project/falafel) +- [Contracts](https://github.com/AztecProtocol/aztec-connect/tree/master/contracts) +- [SDK](https://github.com/AztecProtocol/aztec-connect/tree/master/yarn-project/sdk) +- [Block Explorer](https://github.com/AztecProtocol/aztec-connect-explorer) +- [Alpha SDK](https://github.com/AztecProtocol/aztec-connect/tree/master/yarn-project/alpha-sdk) +- [Wallet UI](https://github.com/AztecProtocol/wallet-ui) diff --git a/docs/docs/protocol-specs/public-vm/gen/_instruction-set.mdx b/docs/docs/protocol-specs/public-vm/gen/_instruction-set.mdx index a2a35da1fb8a..a13fb19a0f55 100644 --- a/docs/docs/protocol-specs/public-vm/gen/_instruction-set.mdx +++ b/docs/docs/protocol-specs/public-vm/gen/_instruction-set.mdx @@ -1103,6 +1103,7 @@ context.machineState.pc = loc`} - **Details**: Target location is an immediate value (a constant in the bytecode). - **Bit-size**: 48 +[![](/img/protocol-specs/public-vm/bit-formats/INTERNALCALL.png)](/img/protocol-specs/public-vm/bit-formats/INTERNALCALL.png) ### `INTERNALRETURN` Return from an internal call. Pop from the internal call stack and jump to the popped location. diff --git a/docs/docs/welcome.md b/docs/docs/welcome.md index c579ef9d130b..6be66998211a 100644 --- a/docs/docs/welcome.md +++ b/docs/docs/welcome.md @@ -23,4 +23,6 @@ Go to the [Getting Started section](./developers/getting_started/main.md) of the Check out the [Awesome Aztec repo](https://github.com/AztecProtocol/awesome-aztec) for a curated list of learning resources and tools to help you learn more about Aztec. +Clone the [Aztec Starter repo](https://github.com/AztecProtocol/aztec-starter) to get a minimal project set up with Sandbox (local developer network), a simple contract and a test suite. + Jump into one of the [tutorials](./developers/tutorials/main.md) to learn how to build more complex applications on Aztec. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index ddfc137fc7c2..b0a158adaf43 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -43,7 +43,7 @@ const config = { /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { - path: process.env.ENV === "dev" ? "docs" : "processed-docs", + path: "processed-docs", sidebarPath: require.resolve("./sidebars.js"), editUrl: (params) => { return ( diff --git a/docs/package.json b/docs/package.json index c4aaac29040b..a6cd883a4e2c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -4,8 +4,8 @@ "private": true, "scripts": { "docusaurus": "docusaurus", - "start": "yarn preprocess && yarn typedoc && docusaurus start --host 0.0.0.0 ", - "start:dev": "ENV=dev yarn start", + "start": "yarn preprocess && yarn typedoc && docusaurus start --host 0.0.0.0", + "start:dev": "yarn start", "start:dev:local": "yarn preprocess && yarn typedoc && docusaurus start", "build": "./scripts/build.sh", "swizzle": "docusaurus swizzle", diff --git a/docs/sidebars.js b/docs/sidebars.js index 0db00fc8742c..b2272172ad87 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -603,6 +603,8 @@ const sidebars = { type: "html", value: '', }, + + "misc/aztec_connect_sunset", ], protocolSpecSidebar: [