Habtor Development Stack
Learn how to run the Habtor development stack
Running the Habtor development stack
Basics
Note: this is only relevant to developers who wish to work on Habtor core services.
For most test uses, it's simpler to use https://testnet.habtor.com.
Clone the repository, open it, and install nodejs packages with yarn:
$ git clone [email protected]:habtorcom/optimism-v2.git
$ cd optimism-v2
$ yarn clean
$ yarn
$ yarn buildThen, make sure you have Docker installed and make sure Docker is running. Finally, build and run the entire stack:
$ cd ops
$ BUILD=1 DAEMON=0 ./up_local.shSpinning up the stack
Stack spinup can take 15 minutes or more. There are many interdependent services to bring up with two waves of contract deployment and initialisation. Recommended settings - 10 CPUs, 30 to 40 GB of memory. You can either inspect the Docker Dashboard>Containers/All>Ops for the progress of the ops_deployer or you can run this script to wait for the sequencer to be fully up:
./scripts/wait-for-sequencer.shIf the command returns with no log output, the sequencer is up. Once the sequencer is up, you can inspect the Docker Dashboard>Containers/All>Ops for the progress of ops_boba_deployer or you can run the following script to wait for all the Habtor contracts (e.g. the fast message relay system) to be deployed and up:
When the command returns with Pass: Found L2 Liquidity Pool contract address, the entire Habtor stack has come up correctly.
Helpful commands
Running out of space on your Docker, or having other having hard to debug issues? Try running
docker system prune -a --volumesand then rebuild the images.To (re)build individual base services:
docker-compose build -- l2gethTo (re)build individual Habtor services:
docker-compose -f "docker-compose.yml" build -- boba_message-relayer-fastNote: First you will have to comment out various dependencies indocker-compose.yml.
Running unit tests
To run unit tests for a specific package:
Running integration tests
Make sure you are in the ops folder and then run
Expect the full test suite to complete in between 30 minutes to two hours depending on your computer hardware.
Last updated