atticus-ao-localnet
v1.0.0
Published
> [!CAUTION] > **This is an experimental repo that is intended for power users developing core aspects of the `ao` > computer, new `ao` unit implementations, or custom `ao` modules.** > > **As such, this repo may become out-of-date and may not work out-of
Readme
[!CAUTION] This is an experimental repo that is intended for power users developing core aspects of the
aocomputer, newaounit implementations, or customaomodules.As such, this repo may become out-of-date and may not work out-of-the-box, and no Tier 1 support from the is offered for this repository.
If you want to run
aosprocesses, please refer to its source code or theaocookbook.
ao-localnet
Run a complete AO Computer testbed, locally, with Docker Compose.
Purpose
The repo may helpful if you are doing one or more of the following:
- Contributing to @permaweb/ao.
- Compiling
aomodules using theaodev-cli.- And you want to avoid publishing each revision onto Arweave mainnet.
- You are developing an
aocomponent (e.g. acu,mu, orsu).- And you want to plug that into a working environment.
- You are developing Lua code that will be loaded into
aosprocesses.- And you want to avoid bricking your
aosprocesses onaotestnet.
- And you want to avoid bricking your
Quick Start Guide
- Clone this repo.
- Setup the necessary Arweave wallets:
cdinto thewalletsdirectory (at the root of this repo).- Run
generateAll.shto create new wallets for everything.- See wallets/README.md for more details.
- Run
printWalletAddresses.mjsto list the addresses. (Useful for step 4, below.)
- Boot up the localnet:
- Run
docker compose up --detach.- You will need to have the Docker daemon running.
- This could take a while the first time you run it.
- You will have many services now bound to ports in the 4000 range (all subject to change):
- http://localhost:4000/ - ArLocal (Arweave gateway/mock)
- http://localhost:4007/ - A simple Arweave bundler/uploader
- http://localhost:4004/ - An
aocompute unit (cu). - http://localhost:4002/ - An
aomessenger unit (cm). - http://localhost:4003/ - An
aoschedule unit (su).
- Run
- Seed data onto the blockchain:
cdinto theseeddirectory (at the root of this repo).- Run
./download-aos-module.shto pull a WASM binary from testnet. - Set your wallet addresses (from step 2, above) in
./seed-for-aos.sh, then run it.
- Run
aos:cdinto theaosdirectory (at the root of this repo).- Run
./aos.
Additional Services
[!NOTE] You can optionally enable the following services. Powered by Docker Compose profiles
- ScAR (Arweave block explorer):
- Run
docker compose --profile explorer up. - http://localhost:4006/
- Run
- ArDrive Web:
- Run
docker compose --profile ardrive up. - http://localhost:4001/
- Not fully functional. See below for more details.
- Run
- Turbo Upload Service (an Arweave uploader/bundlr):
- Run
docker compose --profile turbo up. - http://localhost:4005/
- Not fully functional. See below for more details.
- Run
Development Status of this Repo
[!WARNING]
aoandaosare have just started working, but configuration (such as port mappings) will change soon and more usability features are planned.
- ✅ ArLocal instance mocking Arweave and acting as Arweave gateway.
- ℹ️ There are some features missing from the upstream that tend to be used by block explorers, so we are using this fork, which fixes:
- ✅ Arweave block explorer (web interface).
- ✅ Fully functional
aocomputer, using the reference implementations.- ✅
cu - ✅
mu - ✅
su
- ✅
- ✅ Successfully launching
aosprocesses on theaolocalnet. - ⬜ Live reloading for
cuandmudevelopment.- A cool feature of Docker Compose.
- ⬜ nginx reverse proxy, for hostname routing
- Currently in testing. This looks promising.
- ⬜ DNS routing
- ✅ Routing
*.ao-localnet.xyzto127.0.0.1and::1 - ℹ️ All containers should be reachable via
*.ao-localnet.xyzdomain names.
- ✅ Routing
- ⚠️ Fully functional ArDrive Web (web interface)
- ⏳ Known issues:
- ℹ️ Arweave gateway port bug:
- ✅ Fixed in [email protected].
- 💻 Hacked together by
grep | sedreplacing the dependency in[email protected] - 🙏 Hopefully fixed in the next version of ArDrive Web.
- ⚠️ ArDrive Web is using so-called "sandboxed urls" where it contacts the gateway on a subdomain that is
the base32 encoded transaction id of the Arweave transaction.
- This can be resolved by adding
127.0.0.1 *.localhostto your/etc/hostsfile. - Probably will be fixed with DNS routing, see above.
- This can be resolved by adding
- ⚠️ Cannot upload files due to missing Payment Service.
- ArDrive Web doesn't respect its own configuration file setting:
"useTurboPayment": false - Probably because this class member is hard coded?
- ArDrive Web doesn't respect its own configuration file setting:
- ℹ️ Arweave gateway port bug:
- ⏳ Known issues:
