* Set optimism geth endpoint from env file
* Set L1 account private keys from env
* Only deploy contract and generate invite in mobymask container
* Add readme for running mobymask v2 stack independently
* Modify mobymask container to stop running server and update readmes
* Check deployer account balance before deploying contract
* Fix for checking account balance before deploying
* Update readme description
* Update MobyMask repo tag in readme
Former-commit-id: 94e38ceaba
3.4 KiB
MobyMask v2 watcher
Instructions to setup and deploy an end-to-end MobyMask v2 stack (L1 + L2 chains + watcher) using laconic-stack-orchestrator
We support running just the watcher part of stack, given an external L2 Optimism endpoint. Follow mobymask-only for the same.
Setup
Clone required repositories:
laconic-so --stack mobymask-v2 setup-repositories
NOTE: If repositories already exist and are checked out to different versions, setup-repositories
command will throw an error.
For getting around this, the repositories mentioned below can be removed and then run the command.
Checkout to the required versions and branches in repos
# watcher-ts
cd ~/cerc/watcher-ts
git checkout v0.2.34
# react-peer
cd ~/cerc/react-peer
git checkout v0.2.31
# mobymask-ui
cd ~/cerc/mobymask-ui
git checkout laconic
# MobyMask
cd ~/cerc/MobyMask
git checkout v0.1.2
# Optimism
cd ~/cerc/optimism
git checkout @eth-optimism/sdk@0.0.0-20230329025055
Build the container images:
laconic-so --stack mobymask-v2 build-containers
This should create the required docker images in the local image registry.
Deploy the stack:
-
Deploy the containers:
laconic-so --stack mobymask-v2 deploy-system up
-
List and check the health status of all the containers using
docker ps
and wait for them to behealthy
NOTE: The
mobymask-app
container might not start; if the app is not running at http://localhost:3002, restart the container using it's id:docker ps -a | grep "mobymask-app" docker restart <CONTAINER_ID>
Tests
Find the watcher container's id and export it for later use:
export CONTAINER_ID=$(docker ps -q --filter "name=mobymask-watcher-server")
Run the peer tests:
docker exec -w /app/packages/peer $CONTAINER_ID yarn test
Web Apps
Check that the web-app containers are healthy:
docker ps | grep -E 'mobymask-app|peer-test-app'
mobymask-app
The mobymask-app should be running at http://localhost:3002
peer-test-app
The peer-test-app should be running at http://localhost:3003
Details
-
The relay node for p2p network is running at http://localhost:9090
-
The peer package (published in gitea) can be used in client code for connecting to the network
-
The react-peer package (published in gitea) which uses the peer package can be used in react app for connecting to the network
Demo
Follow the demo to try out the MobyMask app with L2 chain
Clean up
Stop all the services running in background run:
laconic-so --stack mobymask-v2 deploy-system down
Clear volumes:
-
List all relevant volumes:
docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*moby_data_server|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data"
-
Remove all the listed volumes:
docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*moby_data_server|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data")