stack-orchestrator/app/data/stacks/mobymask-v2
Nabarun Gogoi b678a3ecb4
Add environment variables for multiaddrs blacklist (#381)
* Add env variable for web apps config denyMultiaddrs

* Add watcher config option for blacklisted multiaddrs

* Update package versions

* Use provided domain for relay multiaddr in peer config

* Change delimeter while replacing deny multiaddrs list

---------

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2023-05-05 13:32:19 +05:30
..
watcher-p2p-network Add environment variables for multiaddrs blacklist (#381) 2023-05-05 13:32:19 +05:30
demo.md Add instructions to join MobyMask watcher p2p network (#346) 2023-04-20 15:30:19 +05:30
mobymask-only.md Add environment variables for multiaddrs blacklist (#381) 2023-05-05 13:32:19 +05:30
README.md Add environment variables for multiaddrs blacklist (#381) 2023-05-05 13:32:19 +05:30
stack.yml Use standalone mobymask-v2-watcher-ts for running watcher server (#327) 2023-04-19 13:48:51 +05:30
web-apps.md Add environment variables for multiaddrs blacklist (#381) 2023-05-05 13:32:19 +05:30

MobyMask v2 watcher

Instructions to setup and deploy an end-to-end MobyMask v2 stack (L1 + L2 chains + watcher + web-app(s)) 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.

We also support running just the web-app(s), given external watcher GQL (for mobymask-app) and relay node endpoints. Follow web-apps.md 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.41

# mobymask-v2-watcher-ts
cd ~/cerc/mobymask-v2-watcher-ts
git checkout v0.1.1

# MobyMask
cd ~/cerc/MobyMask
git checkout v0.1.2

# Optimism
cd ~/cerc/optimism
git checkout v1.0.4

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 be healthy

    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=peer-tests")

Run the peer tests:

docker exec $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

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 30

Clear volumes created by this stack:

# List all relevant volumes
docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*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|.*peers_ids|.*mobymask_deployment|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data")