What You'll Learn in This Chapter
In this chapter, you will learn how to prepare your local development environment for AO and Arweave.
Specifically, you will gain hands-on experience with starting up local nodes using Docker, downloading the AOS module, and generating the required wallets.
You will also understand the roles and functions of each AO unit (MU, SU, CU).
Grasping how these units collaborate to enable scalable distributed computing will provide a solid foundation for your further development.
Setup: Preparing Your Local Development Environment
To start building with AO and Arweave, you'll first need to set up your local development environment.
This tutorial assumes you have NodeJS v22 and Docker installed.
Clone the localnet repository and start the services:
git clone -b hotfix https://github.com/weavedb/ao-localnet.git
cd ao-localnet/wallets && ./generateAll.sh
cd ../ && sudo docker compose --profile explorer up
Once the Docker services are up, the following local nodes will be available:
- ArLocal: localhost:4000 – Local Arweave gateway
- GraphQL: localhost:4000/graphql – GraphQL interface for Arweave
- Scar: localhost:4006 – Local Arweave explorer
- MU (Messenger Unit): localhost:4002 – Handles messaging within AO
- SU (Scheduler Unit): localhost:4003– Schedules process execution
- CU (Compute Unit): localhost:4004 – Executes computation workloads
Next, download the AOS Wasm module and generate the required wallets for interacting with AO units:
nvm use 22
cd ao-localnet/seed && ./download-aos-module.sh
./seed-for-aos.sh
cd ../wallets && node printWalletAddresses.mjs
The last command will print all wallet addresses to the console.
Make sure to note down the address for the Scheduler Wallet, as you’ll need it later in this tutorial.
What Does Each Unit Do?
AO operates through a set of modular components called units. Each unit runs as an independent WASM process and handles a specific role in the system. Together, they enable scalable and composable distributed computation.
Here’s a quick breakdown of the core units:
Unit | Name | Role Description |
---|---|---|
MU | Messenger Unit | Handles the sending and receiving of messages between processes. It’s the communication hub of AO. |
SU | Scheduler Unit | Manages the scheduling and execution timing of processes. It ensures tasks run in the correct order. |
CU | Compute Unit | Executes the actual logic and handlers. This is where computation happens. |
This modular structure is what makes AO so powerful — it allows you to build custom, parallelized computing flows tailored to your application's needs.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.