From e894901b0206414245813936fb9c1232b13b683b Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Mon, 10 Apr 2023 20:10:36 +0530 Subject: [PATCH] Update instructions --- .../stacks/fixturenet-optimism/l2-only.md | 17 ++++++++- app/data/stacks/mobymask-v2/mobymask-only.md | 37 ++++++++++++++----- app/data/stacks/mobymask-v2/web-apps.md | 33 ++++++++++++----- 3 files changed, 67 insertions(+), 20 deletions(-) diff --git a/app/data/stacks/fixturenet-optimism/l2-only.md b/app/data/stacks/fixturenet-optimism/l2-only.md index 5da7fbb6..bdd7920c 100644 --- a/app/data/stacks/fixturenet-optimism/l2-only.md +++ b/app/data/stacks/fixturenet-optimism/l2-only.md @@ -35,7 +35,22 @@ This should create the required docker images in the local image registry: ## Deploy -Create an env file to be used in the next step with contents from [l1-params.env](../../config/fixturenet-optimism/l1-params.env); update it with L1 endpoint (`L1_RPC`, `L1_HOST` and `L1_PORT`) and other params +Create and update an env file to be used in the next step: + + ```bash + # External L1 endpoint + L1_CHAIN_ID= + L1_RPC= + L1_HOST= + L1_PORT= + + # Credentials for accounts on L1 to send balance to Optimism Proxy contract from + # (enables them to do transactions on L2) + L1_ADDRESS= + L1_PRIV_KEY= + L1_ADDRESS_2= + L1_PRIV_KEY_2= + ``` * NOTE: If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port diff --git a/app/data/stacks/mobymask-v2/mobymask-only.md b/app/data/stacks/mobymask-v2/mobymask-only.md index 74290151..26fb5d9e 100644 --- a/app/data/stacks/mobymask-v2/mobymask-only.md +++ b/app/data/stacks/mobymask-v2/mobymask-only.md @@ -36,19 +36,38 @@ This should create the required docker images in the local image registry ### Configuration -* In [mobymask-params.env](../../config/watcher-mobymask-v2/mobymask-params.env) file set `DEPLOYED_CONTRACT` to existing deployed mobymask contract address - * Setting `DEPLOYED_CONTRACT` will skip contract deployment when running stack - * `ENABLE_PEER_L2_TXS` is used to enable/disable sending txs to L2 chain from watcher peer. -* Update the [optimism-params.env](../../config/watcher-mobymask-v2/optimism-params.env) file with Optimism endpoints and other params for the Optimism running separately - * `PRIVATE_KEY_PEER` is used by watcher peer to send txs to L2 chain -* NOTE: - * Stack Orchestrator needs to be run in [`dev`](/docs/CONTRIBUTING.md#install-developer-mode) mode to be able to edit the env file - * If Optimism is running on the host machine, use `host.docker.internal` as the hostname to access the host port +Create an env file to be used in the next step: + + ```bash + # External L2 endpoints + L2_GETH_RPC= + L2_GETH_HOST= + L2_GETH_PORT= + + L2_NODE_HOST= + L2_NODE_PORT= + + # Credentials for accounts to perform txs on L2 + PRIVATE_KEY_DEPLOYER= + PRIVATE_KEY_PEER= + + # Base URI for mobymask-app (used for generating invite) + MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#" + + # Set to false for disabling watcher peer to send txs to L2 + ENABLE_PEER_L2_TXS=true + + # Set deployed MobyMask contract address to avoid deploying contract in the stack + # mobymask-app will use this contract address in config if run separately + DEPLOYED_CONTRACT= + ``` + +* NOTE: If Optimism is running on the host machine, use `host.docker.internal` as the hostname to access the host port ### Deploy the stack ```bash -laconic-so --stack mobymask-v2 deploy --include watcher-mobymask-v2 up +laconic-so --stack mobymask-v2 deploy --include watcher-mobymask-v2 --env-file up ``` To list down and monitor the running containers: diff --git a/app/data/stacks/mobymask-v2/web-apps.md b/app/data/stacks/mobymask-v2/web-apps.md index 052a7cb7..4a462024 100644 --- a/app/data/stacks/mobymask-v2/web-apps.md +++ b/app/data/stacks/mobymask-v2/web-apps.md @@ -36,25 +36,38 @@ This should create the required docker images in the local image registry ### Configuration -* Update the [mobymask-params.env](../../config/watcher-mobymask-v2/mobymask-params.env) file with watcher endpoints and other params required by the web-apps - * `WATCHER_HOST` and `WATCHER_PORT` is used to check if watcher is up before building and deploying mobymask-app - * `APP_WATCHER_URL` is used by mobymask-app to make GQL queries - * `DEPLOYED_CONTRACT` and `CHAIN_ID` is used by mobymask-app in app config when creating messgaes for L2 txs - * `RELAY_NODES` is used by the web-apps to connect to the relay nodes (run in watcher) -* NOTE: - * Stack Orchestrator needs to be run in [`dev`](/docs/CONTRIBUTING.md#install-developer-mode) mode to be able to edit the env file - * If watcher is running on the host machine, use `host.docker.internal` as the hostname to access the host port +Create an env file to be used in the next step: + + ```bash + # Set relay nodes to be used by the web-app + RELAY_NODES=["/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"] + + # Also add if running MobyMask app: + + # External watcher endpoint + WATCHER_HOST= + WATCHER_PORT= + APP_WATCHER_URL= + + # Set deployed MobyMask contract address to be used in MobyMask app's config + DEPLOYED_CONTRACT= + + # L2 Chain ID used by mobymask web-app for L2 txs + CHAIN_ID=42069 + ``` + +* NOTE: If watcher is running on the host machine, use `host.docker.internal` as the hostname to access the host port ### Deploy the stack For running mobymask-app ```bash -laconic-so --stack mobymask-v2 deploy --include mobymask-app up +laconic-so --stack mobymask-v2 deploy --include mobymask-app --env-file up ``` For running peer-test-app ```bash -laconic-so --stack mobymask-v2 deploy --include peer-test-app up +laconic-so --stack mobymask-v2 deploy --include peer-test-app --env-file up ``` To list down and monitor the running containers: