Skip to content

Commit

Permalink
scoping some pending decisions and tiny nits
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Jul 9, 2024
1 parent d06ea3d commit 225c144
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 93 deletions.
21 changes: 20 additions & 1 deletion boxes/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# Aztec Boxes
# Aztec-App

Aztec-App is a set of tools to ease development on Aztec. It consists of two main components:

## npx script

NPX is a tool bundled with `npm` and other package managers. It allows you to run a binary from a cache without installing it globally.

To ease the development process, Aztec has developed this binary. To run it, install Node and run:

```bash
npx aztec-app
```

This will prompt you with some options to clone `Aztec Boxes` and install the sandbox. As the `npx` script evolves, other commands will be added or removed. You can run it with the `-h` flag to know what other commands and flags you can pass to it.

> [!NOTE]
> As a tool that doesn't (yet) have automated testing, it versioning and release process is decoupled from `aztec`, and its deployment is entirely manual by running `yarn npm publish --access public`.
## Aztec Boxes

Aztec Boxes are the one-stop-shop for developing on Aztec. They often include a combination of:

Expand Down
8 changes: 0 additions & 8 deletions boxes/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ program
global.spinner = ora({ color: "blue" });
});

const sandbox = program.command("sandbox");
sandbox.description("Manage the Aztec Sandbox");
sandbox.command("start").action(start);
sandbox.command("logs").action(log);
sandbox.command("stop").action(stop);
sandbox.command("install").action(install);
sandbox.command("update").action(update);

program
.command("init")
.description("Bootstrap an empty Aztec contract")
Expand Down
67 changes: 60 additions & 7 deletions docs/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,77 @@
title: Quickstart
---

The easiest way to start developing on Aztec locally is through `npx aztec-app`. This is a convenient way of installing the development environment (A.K.A. Sandbox) and starting new projects from a boilerplate.
You can get started with an Aztec development environment (A.K.A. Sandbox) in less than 5 minutes.

To locally install the Sandbox without other tools, see [here](./getting_started/manual_install.md).
The Sandbox is an Aztec network running fully on your machine, and interacting with an development Ethereum node. You can develop and deploy on it just like on a testnet or mainnet.

## Prerequisites
### Prerequisites

You need two global dependencies in your machine:

- 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)

### Run the `npx` script
### Install the sandbox

Run:

```bash
bash -i <(curl -s install.aztec.network)
```

This will install the following tools:

- **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.

Once these have been installed, to start the sandbox, run:

```bash
aztec-sandbox
```

### Have fun

**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
## Running Aztec PXE / Node / P2P-Bootstrap node
If you wish to run components of the Aztec network stack separately, you can use the `aztec start` command with various options for enabling components.
```bash
aztec start --node [nodeOptions] --pxe [pxeOptions] --archiver [archiverOptions] --sequencer [sequencerOptions] --prover [proverOptions] ----p2p-bootstrap [p2pOptions]
```
Starting the aztec node alongside a PXE, sequencer or archiver, will attach the components to the node.Eg if you want to run a PXE separately to a node, you can [read this guide](../aztec/concepts/pxe/index.md)/
## Update the sandbox
Thanks to Node, you can run the recommended `npx script`:
To update the sandbox, you can just run:
```bash
npx aztec-app
aztec-up
```
This script gives you some options to bootstrap a new project, start/stop the sandbox, or see the logs. Run `npx aztec-app -h` for a list of options.
## Install Noir LSP (recommended)
Expand Down
77 changes: 0 additions & 77 deletions docs/docs/getting_started/manual_install.md

This file was deleted.

0 comments on commit 225c144

Please sign in to comment.