diff --git a/app/data/compose/docker-compose-fixturenet-optimism.yml b/app/data/compose/docker-compose-fixturenet-optimism.yml index 5bddcddf..ee7d3cde 100644 --- a/app/data/compose/docker-compose-fixturenet-optimism.yml +++ b/app/data/compose/docker-compose-fixturenet-optimism.yml @@ -8,12 +8,12 @@ services: hostname: fixturenet-optimism-contracts image: cerc/optimism-contracts:local env_file: - - ../config/fixturenet-optimism/.env + - ../config/fixturenet-optimism/l1-params.env # Waits for L1 endpoint to be up before running the script command: | "./wait-for-it.sh -h $${L1_HOST} -p $${L1_PORT} -s -t 60 -- ./run.sh" volumes: - - ../config/fixturenet-optimism/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh + - ../config/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh - ../container-build/cerc-optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts - ../container-build/cerc-optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts - ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js @@ -31,7 +31,7 @@ services: fixturenet-optimism-contracts: condition: service_completed_successfully env_file: - - ../config/fixturenet-optimism/.env + - ../config/fixturenet-optimism/l1-params.env volumes: - ../config/fixturenet-optimism/generate-l2-config.sh:/app/generate-l2-config.sh - l1_deployment:/contracts-bedrock:ro @@ -64,7 +64,7 @@ services: # Runs the L2 consensus client (Sequencer node) op-node: env_file: - - ../config/fixturenet-optimism/.env + - ../config/fixturenet-optimism/l1-params.env depends_on: op-geth: condition: service_healthy @@ -88,7 +88,7 @@ services: # Runs the batcher (takes transactions from the Sequencer and publishes them to L1) op-batcher: env_file: - - ../config/fixturenet-optimism/.env + - ../config/fixturenet-optimism/l1-params.env depends_on: op-node: condition: service_healthy @@ -96,7 +96,7 @@ services: condition: service_healthy image: cerc/optimism-op-batcher:local volumes: - - ../config/fixturenet-optimism/wait-for-it.sh:/wait-for-it.sh + - ../config/wait-for-it.sh:/wait-for-it.sh - ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh - l2_accounts:/l2-accounts:ro entrypoint: ["sh", "-c"] diff --git a/app/data/config/fixturenet-optimism/generate-l2-config.sh b/app/data/config/fixturenet-optimism/generate-l2-config.sh index bb3c7aff..0ec60a08 100755 --- a/app/data/config/fixturenet-optimism/generate-l2-config.sh +++ b/app/data/config/fixturenet-optimism/generate-l2-config.sh @@ -4,8 +4,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -export L1_RPC="http://${L1_HOST}:${L1_PORT}" - op-node genesis l2 \ --deploy-config /contracts-bedrock/deploy-config/getting-started.json \ --deployment-dir /contracts-bedrock/deployments/getting-started/ \ diff --git a/app/data/config/fixturenet-optimism/.env b/app/data/config/fixturenet-optimism/l1-params.env similarity index 79% rename from app/data/config/fixturenet-optimism/.env rename to app/data/config/fixturenet-optimism/l1-params.env index ce2dda46..31876523 100644 --- a/app/data/config/fixturenet-optimism/.env +++ b/app/data/config/fixturenet-optimism/l1-params.env @@ -1,4 +1,5 @@ # Change if pointing to an external L1 endpoint +L1_RPC="http://fixturenet-eth-geth-1:8545" L1_CHAIN_ID=1212 L1_HOST="fixturenet-eth-geth-1" L1_PORT=8545 diff --git a/app/data/config/fixturenet-optimism/optimism-contracts/run.sh b/app/data/config/fixturenet-optimism/optimism-contracts/run.sh index 41910e27..e10c45e1 100755 --- a/app/data/config/fixturenet-optimism/optimism-contracts/run.sh +++ b/app/data/config/fixturenet-optimism/optimism-contracts/run.sh @@ -11,7 +11,6 @@ fi # exit 0 # fi -export L1_RPC="http://${L1_HOST}:${L1_PORT}" echo "Using L1 RPC endpoint ${L1_RPC}" # Append tasks/index.ts file diff --git a/app/data/config/fixturenet-optimism/run-op-batcher.sh b/app/data/config/fixturenet-optimism/run-op-batcher.sh index e2a38d25..3cab3e94 100755 --- a/app/data/config/fixturenet-optimism/run-op-batcher.sh +++ b/app/data/config/fixturenet-optimism/run-op-batcher.sh @@ -4,8 +4,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -export L1_RPC="http://${L1_HOST}:${L1_PORT}" - # Get BACTHER_KEY from keys.json BATCHER_KEY=$(jq -r '.Batcher.privateKey' /l2-accounts/keys.json | tr -d '"') diff --git a/app/data/config/fixturenet-optimism/run-op-node.sh b/app/data/config/fixturenet-optimism/run-op-node.sh index c4428bae..f495aeef 100755 --- a/app/data/config/fixturenet-optimism/run-op-node.sh +++ b/app/data/config/fixturenet-optimism/run-op-node.sh @@ -4,8 +4,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -export L1_RPC="http://${L1_HOST}:${L1_PORT}" - # Get SEQUENCER KEY from keys.json SEQUENCER_KEY=$(jq -r '.Sequencer.privateKey' /l2-accounts/keys.json | tr -d '"') diff --git a/app/data/config/fixturenet-optimism/wait-for-it.sh b/app/data/config/wait-for-it.sh similarity index 100% rename from app/data/config/fixturenet-optimism/wait-for-it.sh rename to app/data/config/wait-for-it.sh diff --git a/app/data/stacks/fixturenet-optimism/README.md b/app/data/stacks/fixturenet-optimism/README.md index f3187465..2a881b57 100644 --- a/app/data/stacks/fixturenet-optimism/README.md +++ b/app/data/stacks/fixturenet-optimism/README.md @@ -43,8 +43,8 @@ This should create the required docker images in the local image registry: ## Deploy -(Optional) Update the [.env](../../config/fixturenet-optimism/.env) file with L1 endpoint (`L1_HOST` and `L1_PORT`) and other params if running L1 separately - * NOTE: If L1 is running on the host machine, use `host.docker.internal` as `L1_HOST` to access the host port +(Optional) Update the [l1-params.env](../../config/fixturenet-optimism/l1-params.env) file with L1 endpoint (`L1_RPC`, `L1_HOST` and `L1_PORT`) and other params if running L1 separately + * NOTE: If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port Deploy the stack: diff --git a/app/data/stacks/mobymask-v2/README.md b/app/data/stacks/mobymask-v2/README.md index 71d30a56..68b9b61c 100644 --- a/app/data/stacks/mobymask-v2/README.md +++ b/app/data/stacks/mobymask-v2/README.md @@ -65,13 +65,15 @@ Deploy the stack: ## Tests -Find the watcher container's id: +Find the watcher container's id and export it for later use: ```bash laconic-so --stack mobymask-v2 deploy-system ps | grep "mobymask-watcher-server" + +export CONTAINER_ID= ``` -Example output +Example output: ``` id: 5d3aae4b22039fcd1c9b18feeb91318ede1100581e75bb5ac54f9e436066b02c, name: laconic-bfb01caf98b1b8f7c8db4d33f11b905a-mobymask-watcher-server-1, ports: 0.0.0.0:3001->3001/tcp, 0.0.0.0:9001->9001/tcp, 0.0.0.0:9090->9090/tcp @@ -79,12 +81,6 @@ id: 5d3aae4b22039fcd1c9b18feeb91318ede1100581e75bb5ac54f9e436066b02c, name: laco In above output the container ID is `5d3aae4b22039fcd1c9b18feeb91318ede1100581e75bb5ac54f9e436066b02c` -Export it for later use: - -```bash -export CONTAINER_ID= -``` - Run the peer tests: ```bash diff --git a/app/data/stacks/mobymask-v2/demo.md b/app/data/stacks/mobymask-v2/demo.md index dbed1871..8a5049c4 100644 --- a/app/data/stacks/mobymask-v2/demo.md +++ b/app/data/stacks/mobymask-v2/demo.md @@ -12,11 +12,11 @@ laconic-bfb01caf98b1b8f7c8db4d33f11b905a-mobymask-1 | http://127.0.0.1:3002/#/members?invitation=%7B%22v%22%3A1%2C%22signedDelegations%22%3A%5B%7B%22signature%22%3A%220x7559bd412f02677d60820e38243acf61547f79339395a34f7d4e1630e645aeb30535fc219f79b6fbd3af0ce3bd05132ad46d2b274a9fbc4c36bc71edd09850891b%22%2C%22delegation%22%3A%7B%22delegate%22%3A%220xc0838c92B2b71756E0eAD5B3C1e1F186baeEAAac%22%2C%22authority%22%3A%220x0000000000000000000000000000000000000000000000000000000000000000%22%2C%22caveats%22%3A%5B%7B%22enforcer%22%3A%220x558024C7d593B840E1BfD83E9B287a5CDad4db15%22%2C%22terms%22%3A%220x0000000000000000000000000000000000000000000000000000000000000000%22%7D%5D%7D%7D%5D%2C%22key%22%3A%220x98da9805821f1802196443e578fd32af567bababa0a249c07c82df01ecaa7d8d%22%7D ``` -* Open the invite link in browser to use the mobymask-app. +* Open the invite link in a browser to use the mobymask-app. NOTE: Before opening the invite link, clear the browser cache (local storage) for http://127.0.0.1:3002 to remove old invitations -* In the debug panel, check if it is connected to the p2p network (it should be connected to atleast one other peer for pubsub to work). +* In the debug panel, check if it is connected to the p2p network (it should be connected to at least one other peer for pubsub to work). * Create an invite link in the app by clicking on `Create new invite link` button. @@ -94,7 +94,7 @@ } ``` - It should return true for reported phisher names. + It should return `true` for reported phisher names. * Watcher internally is using L2 chain `eth_getStorageAt` method.