diff --git a/app/base.py b/app/base.py index cc20da1b..76e9841f 100644 --- a/app/base.py +++ b/app/base.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/build_containers.py b/app/build_containers.py index 0187bb5e..20201a7c 100644 --- a/app/build_containers.py +++ b/app/build_containers.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/build_npms.py b/app/build_npms.py index 2ffbea1b..9120ec00 100644 --- a/app/build_npms.py +++ b/app/build_npms.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/command_types.py b/app/command_types.py index 44df9e4b..67b74883 100644 --- a/app/command_types.py +++ b/app/command_types.py @@ -1,4 +1,4 @@ -# Copyright © 2023 Vulcanize +# Copyright © 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/data/compose/docker-compose-fixturenet-plugeth.yml b/app/data/compose/docker-compose-fixturenet-plugeth.yml index 598b25ea..f31ef559 100644 --- a/app/data/compose/docker-compose-fixturenet-plugeth.yml +++ b/app/data/compose/docker-compose-fixturenet-plugeth.yml @@ -20,7 +20,7 @@ services: - SYS_PTRACE environment: CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true} - CERC_RUN_STATEDIFF: "detect" + CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect} CERC_STATEDIFF_DB_NODE_ID: 1 CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} env_file: diff --git a/app/data/compose/docker-compose-mobymask-app-v3.yml b/app/data/compose/docker-compose-mobymask-app-v3.yml deleted file mode 100644 index bc0973c8..00000000 --- a/app/data/compose/docker-compose-mobymask-app-v3.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: '3.2' - -services: - # Builds and serves the MobyMask v3 react-app - mobymask-v3-app: - restart: unless-stopped - image: cerc/mobymask-ui:local - env_file: - - ../config/watcher-mobymask-v3/mobymask-params.env - environment: - CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_CHAIN_ID: ${CERC_CHAIN_ID} - CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT} - CERC_RELAY_NODES: ${CERC_RELAY_NODES} - CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS} - CERC_PUBSUB: ${CERC_PUBSUB} - CERC_RELEASE: "laconic-v3" - CERC_NA_ADDRESS: ${CERC_NA_ADDRESS} - CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS} - CERC_CA_ADDRESS: ${CERC_CA_ADDRESS} - CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL} - CERC_PAYMENT_NITRO_ADDRESS: ${CERC_PAYMENT_NITRO_ADDRESS} - CERC_SNAP_URL: ${CERC_SNAP_URL} - working_dir: /scripts - command: ["sh", "mobymask-app-start.sh"] - volumes: - - ../config/watcher-mobymask-v3/mobymask-app-start.sh:/scripts/mobymask-app-start.sh - - ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json - ports: - - "127.0.0.1:3004:80" - healthcheck: - test: ["CMD", "nc", "-vz", "localhost", "80"] - interval: 20s - timeout: 5s - retries: 15 - start_period: 10s - extra_hosts: - - "host.docker.internal:host-gateway" diff --git a/app/data/compose/docker-compose-watcher-mobymask-v3.yml b/app/data/compose/docker-compose-watcher-mobymask-v3.yml deleted file mode 100644 index 8c351ae7..00000000 --- a/app/data/compose/docker-compose-watcher-mobymask-v3.yml +++ /dev/null @@ -1,128 +0,0 @@ -version: '3.2' - -services: - # Starts the PostgreSQL database for watcher - mobymask-watcher-db: - restart: unless-stopped - image: postgres:14-alpine - environment: - - POSTGRES_USER=vdbm - - POSTGRES_MULTIPLE_DATABASES=mobymask-watcher,mobymask-watcher-job-queue - - POSTGRES_EXTENSION=mobymask-watcher-job-queue:pgcrypto - - POSTGRES_PASSWORD=password - volumes: - - ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh - - mobymask_watcher_db_data:/var/lib/postgresql/data - ports: - - "127.0.0.1:15432:5432" - healthcheck: - test: ["CMD", "nc", "-v", "localhost", "5432"] - interval: 20s - timeout: 5s - retries: 15 - start_period: 10s - - # Deploys the MobyMask contract and generates an invite link - # Deployment is skipped if CERC_DEPLOYED_CONTRACT env is set - mobymask: - image: cerc/mobymask:local - working_dir: /app/packages/server - env_file: - - ../config/watcher-mobymask-v3/mobymask-params.env - environment: - CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - ENV: "PROD" - CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC} - CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL} - CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER} - CERC_MOBYMASK_APP_BASE_URI: ${CERC_MOBYMASK_APP_BASE_URI} - CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT} - CERC_L2_GETH_HOST: ${CERC_L2_GETH_HOST} - CERC_L2_GETH_PORT: ${CERC_L2_GETH_PORT} - CERC_L2_NODE_HOST: ${CERC_L2_NODE_HOST} - CERC_L2_NODE_PORT: ${CERC_L2_NODE_PORT} - command: ["sh", "deploy-and-generate-invite.sh"] - volumes: - - ../config/network/wait-for-it.sh:/app/packages/server/wait-for-it.sh - - ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json - - ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh - - mobymask_deployment:/app/packages/server - extra_hosts: - - "host.docker.internal:host-gateway" - - # Creates peer-id files if they don't exist - peer-ids-gen: - image: cerc/watcher-ts:local - restart: on-failure - environment: - CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - working_dir: /app/packages/peer - command: ["sh", "generate-peer-ids.sh"] - volumes: - - ../config/watcher-mobymask-v2/generate-peer-ids.sh:/app/packages/peer/generate-peer-ids.sh - - peers_ids:/peer-ids - - # Optionally deploys the Nitro contracts; sets them at the required path - # Starts the MobyMask v3 watcher server - mobymask-watcher-server: - image: cerc/watcher-mobymask-v3:local - restart: unless-stopped - depends_on: - mobymask-watcher-db: - condition: service_healthy - peer-ids-gen: - condition: service_completed_successfully - mobymask: - condition: service_completed_successfully - env_file: - - ../config/watcher-mobymask-v3/mobymask-params.env - environment: - CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC} - CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL} - CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER} - CERC_RELAY_PEERS: ${CERC_RELAY_PEERS} - CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS} - CERC_PUBSUB: ${CERC_PUBSUB} - CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN} - CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS} - CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT} - CERC_NA_ADDRESS: ${CERC_NA_ADDRESS} - CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS} - CERC_CA_ADDRESS: ${CERC_CA_ADDRESS} - CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER} - CERC_PRIVATE_KEY_NITRO: ${CERC_PRIVATE_KEY_NITRO} - CERC_PEER_ID: ${CERC_PEER_ID} - entrypoint: ["bash", "-c"] - command: ["./deploy-nitro-contracts.sh && ./start-server.sh"] - volumes: - - ../config/watcher-mobymask-v3/deploy-nitro-contracts.sh:/app/deploy-nitro-contracts.sh - - ../config/watcher-mobymask-v3/deploy-nitro-contracts.ts:/app/deploy-nitro-contracts.ts - - ../config/watcher-mobymask-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml - - ../config/watcher-mobymask-v3/watcher-config-rates.toml:/app/environments/rates.toml - - ../config/watcher-mobymask-v3/keys:/app/keys - - ../config/watcher-mobymask-v3/start-server.sh:/app/start-server.sh - - nitro_data:/app/out/nitro-db - - peers_ids:/app/peers - - nitro_addresses:/nitro - - mobymask_deployment:/server - # Expose GQL, metrics and relay node ports - ports: - - "127.0.0.1:3001:3001" - - "127.0.0.1:9001:9001" - - "127.0.0.1:9090:9090" - healthcheck: - test: ["CMD", "busybox", "nc", "localhost", "9090"] - interval: 20s - timeout: 5s - retries: 15 - start_period: 5s - extra_hosts: - - "host.docker.internal:host-gateway" - -volumes: - mobymask_watcher_db_data: - peers_ids: - mobymask_deployment: - nitro_addresses: - nitro_data: diff --git a/app/data/config/mainnet-eth-metrics/grafana/etc/dashboards/eth_dashboard.json b/app/data/config/mainnet-eth-metrics/grafana/etc/dashboards/eth_dashboard.json index 623c0a56..1946ed37 100644 --- a/app/data/config/mainnet-eth-metrics/grafana/etc/dashboards/eth_dashboard.json +++ b/app/data/config/mainnet-eth-metrics/grafana/etc/dashboards/eth_dashboard.json @@ -24,7 +24,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 45, + "id": 1, "links": [], "liveNow": false, "panels": [ @@ -38,85 +38,9 @@ }, "id": 16, "panels": [], - "title": "Services", + "title": "Row title", "type": "row" }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 12, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "chain_head_block", - "hide": false, - "legendFormat": "geth ({{instance}})", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "beacon_head_slot", - "hide": false, - "legendFormat": "lighthouse ({{instance}})", - "range": true, - "refId": "A" - } - ], - "title": "Head Positions", - "transformations": [ - ], - "type": "stat" - }, { "datasource": { "type": "prometheus", @@ -141,7 +65,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -158,9 +81,698 @@ "mode": "off" } }, - "decimals": 2, "mappings": [], - "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(nginx_http_requests_total{instance=\"keycloak-nginx-prometheus-exporter:9113\"}[$__rate_interval])", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "nginx Requests/sec", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "builder", + "expr": "rate(ipld_eth_server_http_count{instance=\"ipld-eth-server:8090\"}[$__rate_interval])", + "legendFormat": "{{method}}", + "range": true, + "refId": "A" + } + ], + "title": "ipld-eth-server Requests/sec", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "Time" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "{instance=\"ipld-eth-server:8090\", job=\"ipld-eth-server\"}": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_blockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_blockNumber", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_call_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_call", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_chainId_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_chainId", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_estimateGas_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_estimateGas", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_gasPrice_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_gasPrice", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getBalance_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getBalance", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getBlockByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getBlockByHash", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getBlockByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getBlockByNumber", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getBlockReceipts_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getBlockReceipts", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getBlockTransactionCountByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getBlockTransactionCountByHash", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getBlockTransactionCountByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getBlockTransactionCountByNumber", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getCode_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getCode", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getFilterChanges_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getFilterChanges", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getFilterLogs_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getFilterLogs", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getLogs_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getLogs", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getStorageAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getStorageAt", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getTransactionByBlockHashAndIndex_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getTransactionByBlockHashAndIndex", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getTransactionByBlockNumberAndIndex_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getTransactionByBlockNumberAndIndex", + "range": true, + "refId": "R" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getTransactionByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getTransactionByHash", + "range": true, + "refId": "S" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getTransactionCount_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getTransactionCount", + "range": true, + "refId": "T" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getTransactionReceipt_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getTransactionReceipt", + "range": true, + "refId": "U" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getUncleCountByBlockHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getUncleCountByBlockHash", + "range": true, + "refId": "V" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_getUncleCountByBlockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_getUncleCountByBlockNumber", + "range": true, + "refId": "W" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_mining_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_mining_success", + "range": true, + "refId": "X" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_newBlockFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_newBlockFilter", + "range": true, + "refId": "Y" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_newFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_newFilter", + "range": true, + "refId": "Z" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_newPendingTransactionFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_newPendingTransactionFilter", + "range": true, + "refId": "AA" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_sendRawTransaction_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_sendRawTransaction", + "range": true, + "refId": "AB" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_signTransaction_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_signTransaction", + "range": true, + "refId": "AC" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_subscribe_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_subscribe", + "range": true, + "refId": "AD" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_syncing_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_syncing", + "range": true, + "refId": "AE" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_eth_unsubscribe_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "eth_unsubscribe", + "range": true, + "refId": "AF" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_statediff_writeStateDiffFor_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "statediff_writeStateDiffFor", + "range": true, + "refId": "AG" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "rate(rpc_duration_statediff_writeStateDiffAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])", + "hide": false, + "legendFormat": "statediff_writeStateDiffAt", + "range": true, + "refId": "AH" + } + ], + "title": "geth API Requests/sec", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [ @@ -169,16 +781,15 @@ "value": null } ] - }, - "unit": "none" + } }, "overrides": [] }, "gridPos": { "h": 8, - "w": 8, - "x": 4, - "y": 1 + "w": 12, + "x": 12, + "y": 9 }, "id": 2, "options": { @@ -202,11 +813,11 @@ }, "editorMode": "code", "exemplar": false, - "expr": "rate(keycloak_logins[$__rate_interval]) * 60", + "expr": "rate(keycloak_logins{instance=\"keycloak:8080\"}[90s]) * 60", "format": "time_series", "instant": false, - "interval": "5m", - "legendFormat": "{{client_id}} ({{instance}})", + "interval": "2m", + "legendFormat": "{{client_id}}", "range": true, "refId": "A" } @@ -228,11 +839,7 @@ "13761bf2-2c0e-42fd-acc8-09a677ab179e": true, "79a56c4e-0bfb-4ef0-87d4-244c4ace9b4b": true, "9c41e289-92f0-456f-bd65-8f73024a9e45": true, - "VVQkSrRksVEKAqUmiNh4aMAVD6BcviyYV4b5LpnCrtUkRwTMoE (jackal.lan.vdb.to:8080)": true, - "c9718dd1-06d6-4f98-a821-9adbeb4b663b": true, - "nYByi9xhWdDHPpStoPLP3hjeJUzyQou8dsjK8aSipOglB3yx75 (jackal.lan.vdb.to:8080)": true, - "oA7XX21gTNMFRJJJdbDzjBVERbjrWamzIGhwHUAeMLrd1sXCWx (jackal.lan.vdb.to:8080)": true, - "oJf5jLHEqRbZg7BvSboYX1DM2T25K7XS4jgwF8NNzl3AHNWHm2 (jackal.lan.vdb.to:8080)": true + "c9718dd1-06d6-4f98-a821-9adbeb4b663b": true }, "indexByName": {}, "renameByName": { @@ -260,6 +867,80 @@ "color": { "mode": "palette-classic" }, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 17 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "chain_head_block{instance=\"${node}:6060\"}", + "hide": false, + "legendFormat": "geth", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "editorMode": "code", + "expr": "statediff_service_last_statediff_height{instance=\"${node}:6060\"}", + "legendFormat": "statediff", + "range": true, + "refId": "A" + } + ], + "title": "Block Positions", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "jZUuGao4k" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", @@ -267,15 +948,14 @@ "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 28, + "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, - "insertNulls": false, - "lineInterpolation": "smooth", + "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -285,14 +965,13 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "normal" + "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], - "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -307,15 +986,40 @@ ] } }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Distance" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] }, "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 1 + "h": 7, + "w": 6, + "x": 6, + "y": 17 }, - "id": 20, + "id": 22, "options": { "legend": { "calcs": [], @@ -335,17 +1039,14 @@ "uid": "jZUuGao4k" }, "editorMode": "code", - "expr": "rate(rpc_duration_all_count[$__rate_interval])", - "hide": false, - "instant": false, - "legendFormat": "Requests ({{instance}})", + "expr": "clamp_min(chain_head_block{instance=\"${node}:6060\"} - on() statediff_service_last_statediff_height{instance=\"${node}:6060\"}, 0)", + "interval": "1m", + "legendFormat": "Distance", "range": true, "refId": "A" } ], - "title": "geth API Requests/sec", - "transformations": [ - ], + "title": "Block Distance (geth to statediff)", "type": "timeseries" }, { @@ -372,7 +1073,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -390,30 +1090,26 @@ } }, "mappings": [], - "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] - } + }, + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 8, + "h": 7, "w": 12, - "x": 0, - "y": 9 + "x": 12, + "y": 17 }, - "id": 67, + "id": 10, "options": { "legend": { "calcs": [], @@ -434,8 +1130,12 @@ "uid": "jZUuGao4k" }, "editorMode": "code", - "expr": "p2p_peers{job=\"geth\"}", - "legendFormat": "geth ({{instance}})", + "exemplar": false, + "expr": "increase(statediff_service_succeeded{instance=\"${node}:6060\"}[1m])", + "format": "time_series", + "instant": false, + "interval": "1m", + "legendFormat": "Succeeded", "range": true, "refId": "A" }, @@ -445,118 +1145,10 @@ "uid": "jZUuGao4k" }, "editorMode": "code", - "expr": "network_inbound_peers{job=\"lighthouse-beacon\"}", + "expr": "increase(statediff_service_failed{instance=\"${node}:6060\"}[1m])", "hide": false, - "legendFormat": "lighthouse ({{instance}})", - "range": true, - "refId": "B" - } - ], - "title": "P2P Peers", - "transformations": [ - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "binBps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 9 - }, - "id": 32, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(system_disk_writebytes[$__rate_interval])", - "interval": "", - "legendFormat": "Process Write ({{instance}})", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(system_disk_readbytes[$__rate_interval])", - "hide": false, - "legendFormat": "Process Read ({{instance}})", + "interval": "1m", + "legendFormat": "Failed", "range": true, "refId": "B" }, @@ -566,28 +1158,15 @@ "uid": "jZUuGao4k" }, "editorMode": "code", - "expr": "rate(eth_db_chaindata_disk_read[$__rate_interval])", + "expr": "statediff_service_underway{instance=\"${node}:6060\"}", "hide": false, - "legendFormat": "ethdb Read ({{instance}})", + "interval": "1s", + "legendFormat": "Underway", "range": true, "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_disk_write[$__rate_interval])", - "hide": false, - "legendFormat": "ethdb Write ({{instance}})", - "range": true, - "refId": "D" } ], - "title": "geth Disk Bytes/sec", - "transformations": [ - ], + "title": "Statediff Operations", "type": "timeseries" }, { @@ -598,7 +1177,7 @@ "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "continuous-GrYlRd" }, "custom": { "axisCenteredZero": false, @@ -614,8 +1193,10 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { @@ -633,18 +1214,23 @@ }, "mappings": [], "thresholds": { - "mode": "absolute", + "mode": "percentage", "steps": [ { "color": "green", "value": null }, + { + "color": "#EAB839", + "value": 50 + }, { "color": "red", "value": 80 } ] - } + }, + "unit": "ms" }, "overrides": [] }, @@ -652,9 +1238,9 @@ "h": 8, "w": 12, "x": 0, - "y": 17 + "y": 24 }, - "id": 34, + "id": 14, "options": { "legend": { "calcs": [], @@ -667,6 +1253,7 @@ "sort": "none" } }, + "pluginVersion": "9.0.1", "targets": [ { "datasource": { @@ -674,27 +1261,16 @@ "uid": "jZUuGao4k" }, "editorMode": "code", - "expr": "rate(system_disk_readcount[$__rate_interval])", - "legendFormat": "Process Read ({{instance}})", + "exemplar": false, + "expr": "rate(statediff_service_total_processing_time{instance=\"${node}:6060\"}[$__rate_interval])", + "instant": false, + "interval": "1m", + "legendFormat": "__auto", "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(system_disk_writecount[$__rate_interval])", - "hide": false, - "legendFormat": "Process Write ({{instance}})", - "range": true, - "refId": "B" } ], - "title": "geth Disk Operations/sec", - "transformations": [ - ], + "title": "Statediff Duty Cycle", "type": "timeseries" }, { @@ -721,7 +1297,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -759,9 +1334,9 @@ "h": 8, "w": 12, "x": 12, - "y": 17 + "y": 24 }, - "id": 61, + "id": 4, "options": { "legend": { "calcs": [], @@ -781,322 +1356,54 @@ "uid": "jZUuGao4k" }, "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_get_time_count[$__rate_interval])", - "legendFormat": "get ({{instance}})", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_put_time_count[$__rate_interval])", - "hide": false, - "legendFormat": "put ({{instance}})", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_has_time_count[$__rate_interval])", - "hide": false, - "legendFormat": "has ({{instance}})", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_delete_time_count[$__rate_interval])", - "hide": false, - "legendFormat": "delete ({{instance}})", - "range": true, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_batch_write_time_count[$__rate_interval])", - "hide": false, - "legendFormat": "batch_write ({{instance}})", - "range": true, - "refId": "E" - } - ], - "title": "geth LevelDB Operations/sec", - "transformations": [ - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 63, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_get_time_total[$__rate_interval]) / 10000000", - "legendFormat": "get ({{instance}})", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_put_time_total[$__rate_interval]) / 10000000", - "hide": false, - "legendFormat": "put ({{instance}})", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_has_time_total[$__rate_interval]) / 10000000", - "hide": false, - "legendFormat": "has ({{instance}})", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_delete_time_total[$__rate_interval]) / 10000000", - "hide": false, - "legendFormat": "delete ({{instance}})", - "range": true, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_batch_write_time_total[$__rate_interval]) / 10000000", - "hide": false, - "legendFormat": "batch_write ({{instance}})", - "range": true, - "refId": "E" - } - ], - "title": "geth LevelDB Utilization", - "transformations": [ - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 25 - }, - "id": 65, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "jZUuGao4k" - }, - "editorMode": "code", - "expr": "rate(eth_db_chaindata_db_batch_item_count[$__rate_interval])", - "legendFormat": "batch_items ({{instance}})", + "expr": "rate(statediff_service_api_requests{instance=\"${node}:6060\"}[$__rate_interval])", + "legendFormat": "__auto", "range": true, "refId": "A" } ], - "title": "geth LevelDB Batch Items Written/sec", - "transformations": [ - ], + "title": "Statediff API Requests/sec", "type": "timeseries" } ], - "refresh": "30s", - "schemaVersion": 38, + "refresh": "5s", + "schemaVersion": 37, "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "selected": true, + "text": "mainnet-eth-geth-1", + "value": "mainnet-eth-geth-1" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "node", + "options": [ + { + "selected": true, + "text": "mainnet-eth-geth-1", + "value": "mainnet-eth-geth-1" + } + ], + "query": "mainnet-eth-geth-1", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] }, "time": { - "from": "now-6h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "", - "title": "eth API Simple", - "uid": "b4ba9b2e-965d-4c71-8735-78b6af93156e", - "version": 4, + "title": "cerc-io overview", + "uid": "nT9VeZoVk", + "version": 2, "weekStart": "" } diff --git a/app/data/config/mainnet-eth-metrics/prometheus/etc/prometheus.yml b/app/data/config/mainnet-eth-metrics/prometheus/etc/prometheus.yml index 4cc74fc0..e9f23e89 100644 --- a/app/data/config/mainnet-eth-metrics/prometheus/etc/prometheus.yml +++ b/app/data/config/mainnet-eth-metrics/prometheus/etc/prometheus.yml @@ -10,13 +10,6 @@ scrape_configs: static_configs: - targets: ['mainnet-eth-geth-1:6060'] - # lighthouse - - job_name: 'lighthouse' - metrics_path: /metrics - scheme: http - static_configs: - - targets: ['mainnet-eth-lighthouse-1:5054'] - # keycloak - job_name: 'keycloak' scrape_interval: 5s diff --git a/app/data/config/watcher-mobymask-v3/deploy-nitro-contracts.sh b/app/data/config/watcher-mobymask-v3/deploy-nitro-contracts.sh deleted file mode 100755 index b12e9ce2..00000000 --- a/app/data/config/watcher-mobymask-v3/deploy-nitro-contracts.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -set -e -if [ -n "$CERC_SCRIPT_DEBUG" ]; then - set -x -fi - -CERC_NA_ADDRESS="${CERC_NA_ADDRESS:-${DEFAULT_CERC_NA_ADDRESS}}" -CERC_VPA_ADDRESS="${CERC_VPA_ADDRESS:-${DEFAULT_CERC_VPA_ADDRESS}}" -CERC_CA_ADDRESS="${CERC_CA_ADDRESS:-${DEFAULT_CERC_CA_ADDRESS}}" - -NITRO_ADDRESSES_FILE_PATH="/nitro/nitro-addresses.json" - -# Check if CERC_NA_ADDRESS environment variable set to skip contract deployment -if [ -n "$CERC_NA_ADDRESS" ]; then - echo "CERC_NA_ADDRESS is set to '$CERC_NA_ADDRESS'" - echo "CERC_VPA_ADDRESS is set to '$CERC_VPA_ADDRESS'" - echo "CERC_CA_ADDRESS is set to '$CERC_CA_ADDRESS'" - echo "Using the above addresses and skipping Nitro contracts deployment" - - # Create the required JSON and write it to a file - nitro_addresses_json=$(jq -n \ - --arg na "$CERC_NA_ADDRESS" \ - --arg vpa "$CERC_VPA_ADDRESS" \ - --arg ca "$CERC_CA_ADDRESS" \ - '.nitroAdjudicatorAddress = $na | .virtualPaymentAppAddress = $vpa | .consensusAppAddress = $ca') - echo "$nitro_addresses_json" > "${NITRO_ADDRESSES_FILE_PATH}" - - exit -fi - -# Check and exit if a deployment already exists (on restarts) -if [ -f ${NITRO_ADDRESSES_FILE_PATH} ]; then - echo "${NITRO_ADDRESSES_FILE_PATH} already exists, skipping Nitro contracts deployment" - exit -fi - -echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}" - -if [ -n "$CERC_L1_ACCOUNTS_CSV_URL" ] && \ - l1_accounts_response=$(curl -L --write-out '%{http_code}' --silent --output /dev/null "$CERC_L1_ACCOUNTS_CSV_URL") && \ - [ "$l1_accounts_response" -eq 200 ]; -then - echo "Fetching L1 account credentials using provided URL" - mkdir -p /geth-accounts - wget -O /geth-accounts/accounts.csv "$CERC_L1_ACCOUNTS_CSV_URL" - - # Read the private key of an L1 account to deploy contract - CERC_PRIVATE_KEY_DEPLOYER=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3) -else - echo "Couldn't fetch L1 account credentials, using CERC_PRIVATE_KEY_DEPLOYER from env" -fi - -echo "RPC_URL=${CERC_L2_GETH_RPC}" > .env -echo "NITRO_ADDRESSES_FILE_PATH=${NITRO_ADDRESSES_FILE_PATH}" >> .env -echo "PRIVATE_KEY=${CERC_PRIVATE_KEY_DEPLOYER}" >> .env - -yarn ts-node --esm deploy-nitro-contracts.ts diff --git a/app/data/config/watcher-mobymask-v3/deploy-nitro-contracts.ts b/app/data/config/watcher-mobymask-v3/deploy-nitro-contracts.ts deleted file mode 100644 index c738083d..00000000 --- a/app/data/config/watcher-mobymask-v3/deploy-nitro-contracts.ts +++ /dev/null @@ -1,49 +0,0 @@ -import 'dotenv/config'; -import fs from 'fs'; -import { providers, Wallet } from 'ethers'; -import { deployContracts } from '@cerc-io/nitro-util'; - -async function main () { - const rpcURL = process.env.RPC_URL; - const addressesFilePath = process.env.NITRO_ADDRESSES_FILE_PATH; - const deployerKey = process.env.PRIVATE_KEY; - - if (!rpcURL) { - console.log('RPC_URL not set, skipping deployment'); - return; - } - - if (!addressesFilePath) { - console.log('NITRO_ADDRESSES_FILE_PATH not set, skipping deployment'); - return; - } - - if (!deployerKey) { - console.log('PRIVATE_KEY not set, skipping deployment'); - return; - } - - const provider = new providers.JsonRpcProvider(process.env.RPC_URL); - const signer = new Wallet(deployerKey, provider); - - const [ - nitroAdjudicatorAddress, - virtualPaymentAppAddress, - consensusAppAddress - ] = await deployContracts(signer as any); - - const output = { - nitroAdjudicatorAddress, - virtualPaymentAppAddress, - consensusAppAddress - }; - - fs.writeFileSync(addressesFilePath, JSON.stringify(output, null, 2)); - console.log('Nitro contracts deployed, addresses written to', addressesFilePath); - console.log('Result:', JSON.stringify(output, null, 2)); -} - -main() - .catch((err) => { - console.log(err); - }); diff --git a/app/data/config/watcher-mobymask-v3/keys/12D3KooWAMjBkFCT9DtCnSDcxftxJzSuTBvzVojabv64cnEvX4AZ.json b/app/data/config/watcher-mobymask-v3/keys/12D3KooWAMjBkFCT9DtCnSDcxftxJzSuTBvzVojabv64cnEvX4AZ.json deleted file mode 100644 index 84465346..00000000 --- a/app/data/config/watcher-mobymask-v3/keys/12D3KooWAMjBkFCT9DtCnSDcxftxJzSuTBvzVojabv64cnEvX4AZ.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "peerId": { - "id": "12D3KooWAMjBkFCT9DtCnSDcxftxJzSuTBvzVojabv64cnEvX4AZ", - "privKey": "CAESQAKCrnY0QKTky1I18fqn+VPydXGUv1NYiV+nVKqBFkw/CAjE9sKKIDGnYAo8mivnI6dngFenERY+0Q8AJrPTaXY=", - "pubKey": "CAESIAgIxPbCiiAxp2AKPJor5yOnZ4BXpxEWPtEPACaz02l2" - }, - "consensus": { - "publicKey": "02cd17b05ca998955be5ca7bf4fd4531243d438f1aae7ce8a0ed5159f53cee5b40", - "privateKey": "67d80505614bdf61fca11cbad31d93acb2c7df1c653dc25975d77d05f05f154f" - } -} diff --git a/app/data/config/watcher-mobymask-v3/keys/12D3KooWBNEbY3QS4y23ngupDw9PDc4bvNvRJGVRejjV9EZLjux5.json b/app/data/config/watcher-mobymask-v3/keys/12D3KooWBNEbY3QS4y23ngupDw9PDc4bvNvRJGVRejjV9EZLjux5.json deleted file mode 100644 index 8eea1872..00000000 --- a/app/data/config/watcher-mobymask-v3/keys/12D3KooWBNEbY3QS4y23ngupDw9PDc4bvNvRJGVRejjV9EZLjux5.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "peerId": { - "id": "12D3KooWBNEbY3QS4y23ngupDw9PDc4bvNvRJGVRejjV9EZLjux5", - "privKey": "CAESQGSTw0ymvn8+wX9Dbvyr4/Gib1q2voe0CC0VyeClMQP6FwW14x0fpRbBIx0XhLdxWHkRndphVg3gVAHyC+7ZI8o=", - "pubKey": "CAESIBcFteMdH6UWwSMdF4S3cVh5EZ3aYVYN4FQB8gvu2SPK" - }, - "consensus": { - "publicKey": "029c8035b3e9401b8f178f7c37285b5cb22501e017340e2058b3b842f2a1f0ae45", - "privateKey": "0261008e8e3ec808168e99333599da38ca59a056a2ae4510a6ad3d8b5cb0918c" - } -} diff --git a/app/data/config/watcher-mobymask-v3/keys/12D3KooWSRH6ftgkAZsKZK7UX1Zr6Hx6YAsEepHqzopFszqfTxxi.json b/app/data/config/watcher-mobymask-v3/keys/12D3KooWSRH6ftgkAZsKZK7UX1Zr6Hx6YAsEepHqzopFszqfTxxi.json deleted file mode 100644 index 80721faa..00000000 --- a/app/data/config/watcher-mobymask-v3/keys/12D3KooWSRH6ftgkAZsKZK7UX1Zr6Hx6YAsEepHqzopFszqfTxxi.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "peerId": { - "id": "12D3KooWSRH6ftgkAZsKZK7UX1Zr6Hx6YAsEepHqzopFszqfTxxi", - "privKey": "CAESQHBjlHxfVhZ2gXsBItrIEEgSGKcjMkFiGs3PPz9E3ace9qyWEkvR4oit5ve9SAROVoh20hoa42IC91NIafMaqws=", - "pubKey": "CAESIPaslhJL0eKIreb3vUgETlaIdtIaGuNiAvdTSGnzGqsL" - }, - "consensus": { - "publicKey": "039160c244a7ad8be16a64bdb69e6dbacdcfe20b37076792a0d06032a8097468ca", - "privateKey": "8894685fe81001d75662b079905472699373967451d1255ee5fc669d0a09a9ca" - } -} diff --git a/app/data/config/watcher-mobymask-v3/mobymask-app-start.sh b/app/data/config/watcher-mobymask-v3/mobymask-app-start.sh deleted file mode 100644 index d7f87f19..00000000 --- a/app/data/config/watcher-mobymask-v3/mobymask-app-start.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -set -e -if [ -n "$CERC_SCRIPT_DEBUG" ]; then - set -x -fi - -CERC_CHAIN_ID="${CERC_CHAIN_ID:-${DEFAULT_CERC_CHAIN_ID}}" -CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}" -CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}" -CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}" -CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}" - -echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES" - -if [ -z "$CERC_DEPLOYED_CONTRACT" ]; then - echo "CERC_DEPLOYED_CONTRACT not set" - exit 1 -else - echo "Using CERC_DEPLOYED_CONTRACT ${CERC_DEPLOYED_CONTRACT} from env as the MobyMask contract address" -fi - -# Checkout to the required release/branch -cd /app -git checkout $CERC_RELEASE - -# Check if CERC_NA_ADDRESS is set -if [ -n "$CERC_NA_ADDRESS" ]; then - echo "CERC_NA_ADDRESS is set to '$CERC_NA_ADDRESS'" - echo "CERC_VPA_ADDRESS is set to '$CERC_VPA_ADDRESS'" - echo "CERC_CA_ADDRESS is set to '$CERC_CA_ADDRESS'" - echo "Using the above Nitro addresses" - - # Create the required JSON and write it to a file - nitro_addresses_json=$(jq -n \ - --arg na "$CERC_NA_ADDRESS" \ - --arg vpa "$CERC_VPA_ADDRESS" \ - --arg ca "$CERC_CA_ADDRESS" \ - '.nitroAdjudicatorAddress = $na | .virtualPaymentAppAddress = $vpa | .consensusAppAddress = $ca') - echo "$nitro_addresses_json" > /app/src/utils/nitro-addresses.json -else - echo "Nitro addresses not provided" - exit 1 -fi - -# Export config values in a json file -jq --arg address "$CERC_DEPLOYED_CONTRACT" \ - --argjson chainId "$CERC_CHAIN_ID" \ - --argjson relayNodes "$CERC_RELAY_NODES" \ - --argjson denyMultiaddrs "$CERC_DENY_MULTIADDRS" \ - --arg pubsub "$CERC_PUBSUB" \ - '.address = $address | .chainId = $chainId | .relayNodes = $relayNodes | .peer.denyMultiaddrs = $denyMultiaddrs | .peer.pubsub = $pubsub' \ - /app/src/mobymask-app-config.json > /app/src/utils/config.json - -yarn install - -REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" \ -REACT_APP_PAY_TO_NITRO_ADDRESS="$CERC_PAYMENT_NITRO_ADDRESS" \ -REACT_APP_SNAP_ORIGIN="local:$CERC_SNAP_URL" \ -yarn build - -http-server -p 80 /app/build diff --git a/app/data/config/watcher-mobymask-v3/mobymask-params.env b/app/data/config/watcher-mobymask-v3/mobymask-params.env deleted file mode 100644 index 35a54b69..00000000 --- a/app/data/config/watcher-mobymask-v3/mobymask-params.env +++ /dev/null @@ -1,34 +0,0 @@ -# Defaults - -# Set of relay peers to connect to from the relay node -DEFAULT_CERC_RELAY_PEERS=[] - -# Domain to be used in the relay node's announce address -DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN= - -# Base URI for mobymask-app (used for generating invite) -DEFAULT_CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3004/#" - -# Set to false for disabling watcher peer to send txs to L2 -DEFAULT_CERC_ENABLE_PEER_L2_TXS=true - -# Set deployed MobyMask contract address to avoid deploying contract in stack -# mobymask-app will use this contract address in config if run separately -DEFAULT_CERC_DEPLOYED_CONTRACT= - -# Chain ID is used by mobymask web-app for txs -DEFAULT_CERC_CHAIN_ID=42069 - -# Set of relay nodes to be used by web-apps -DEFAULT_CERC_RELAY_NODES=[] - -# Set of multiaddrs to be avoided while dialling -DEFAULT_CERC_DENY_MULTIADDRS=[] - -# Type of pubsub to be used -DEFAULT_CERC_PUBSUB="" - -# Set deployed Nitro addresses to avoid deploying them in the stack -DEFAULT_CERC_NA_ADDRESS= -DEFAULT_CERC_VPA_ADDRESS= -DEFAULT_CERC_CA_ADDRESS= diff --git a/app/data/config/watcher-mobymask-v3/start-server.sh b/app/data/config/watcher-mobymask-v3/start-server.sh deleted file mode 100755 index 9ff4020f..00000000 --- a/app/data/config/watcher-mobymask-v3/start-server.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash - -set -e -if [ -n "$CERC_SCRIPT_DEBUG" ]; then - set -x -fi - -CERC_L2_GETH_RPC="${CERC_L2_GETH_RPC:-${DEFAULT_CERC_L2_GETH_RPC}}" - -CERC_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}" -CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}" -CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}" -CERC_RELAY_ANNOUNCE_DOMAIN="${CERC_RELAY_ANNOUNCE_DOMAIN:-${DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN}}" -CERC_ENABLE_PEER_L2_TXS="${CERC_ENABLE_PEER_L2_TXS:-${DEFAULT_CERC_ENABLE_PEER_L2_TXS}}" -CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}" - -nitro_addresses_file="/nitro/nitro-addresses.json" -nitro_addresses_destination_file="./src/nitro-addresses.json" - -watcher_keys_dir="./keys" - -echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}" - -# Use public domain for relay multiaddr in peer config if specified -# Otherwise, use the docker container's host IP -if [ -n "$CERC_RELAY_ANNOUNCE_DOMAIN" ]; then - CERC_RELAY_MULTIADDR="/dns4/${CERC_RELAY_ANNOUNCE_DOMAIN}/tcp/443/wss/p2p/$(jq -r '.id' /app/peers/relay-id.json)" -else - CERC_RELAY_MULTIADDR="/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/$(jq -r '.id' /app/peers/relay-id.json)" -fi - -# Use contract address from environment variable or set from config.json in mounted volume -if [ -n "$CERC_DEPLOYED_CONTRACT" ]; then - CONTRACT_ADDRESS="${CERC_DEPLOYED_CONTRACT}" -else - # Assign deployed contract address from server config (created by mobymask container after deploying contract) - CONTRACT_ADDRESS=$(jq -r '.address' /server/config.json | tr -d '"') -fi - -# Copy the deployed Nitro addresses to the required path -if [ -f "$nitro_addresses_file" ]; then - cat "$nitro_addresses_file" > "$nitro_addresses_destination_file" - echo "Nitro addresses set to ${nitro_addresses_destination_file}" - - # Build after setting the Nitro addresses - yarn build -else - echo "File ${nitro_addresses_file} does not exist" - exit 1 -fi - -echo "Using CERC_PRIVATE_KEY_PEER (account with funds) from env for sending txs to L2" -echo "Using CERC_PRIVATE_KEY_NITRO from env for Nitro account" - -if [ -n "$CERC_PEER_ID" ]; then - echo "Using CERC_PEER_ID ${CERC_PEER_ID} from env for watcher fixture" - echo "Consensus module enabled" - - # Set corresponding variables - PEER_ID_FILE='./peer-id.json' - CONSENSUS_ENABLED=true - WATCHER_PARTY_PEERS_FILE='./watcher-party-peers.json' - - # Create watcher party array - watcher_parties=() - - # Iterate over each fixture JSON file - for peer_data_file in "$watcher_keys_dir"/*.json; do - # Extract the filename without the path and extension - peer_id=$(basename "$peer_data_file" .json) - - # Read the consensus keys - consensus_public_key=$(jq -r '.consensus.publicKey' "$peer_data_file") - consensus_private_key=$(jq -r '.consensus.privateKey' "$peer_data_file") - - # Append watcher party - watcher_party=$(jq -n \ - --arg peerId "$peer_id" \ - --arg publicKey "$consensus_public_key" \ - '.peerId = $peerId | .publicKey = $publicKey') - watcher_parties+=("$watcher_party") - - if [ "$peer_id" = "$CERC_PEER_ID" ]; then - # Export peer id - peer_id_data=$(jq '.peerId' "$peer_data_file") - echo "$peer_id_data" > "${PEER_ID_FILE}" - - # Set consensus keys for this peer - CONSENSUS_PUBLIC_KEY=${consensus_public_key} - CONSENSUS_PRIVATE_KEY=${consensus_private_key} - fi - done - - # Export watcher party file - watcher_parties_json=$(printf '%s\n' "${watcher_parties[@]}" | jq -s .) - echo "$watcher_parties_json" > "${WATCHER_PARTY_PEERS_FILE}" - echo "Watcher party peers exported to ${WATCHER_PARTY_PEERS_FILE}" -else - echo "Using generated peer id" - echo "Consensus module disabled" - - # Set corresponding variables - PEER_ID_FILE='./peers/peer-id.json' - CONSENSUS_ENABLED=false - WATCHER_PARTY_PEERS_FILE='' - CONSENSUS_PUBLIC_KEY='' - CONSENSUS_PRIVATE_KEY='' -fi - -# Read in the config template TOML file and modify it -WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) -WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ - sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \ - s|REPLACE_WITH_CERC_DENY_MULTIADDRS|${CERC_DENY_MULTIADDRS}|g; \ - s/REPLACE_WITH_CERC_PUBSUB/${CERC_PUBSUB}/g; \ - s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \ - s|REPLACE_WITH_CERC_RELAY_MULTIADDR|${CERC_RELAY_MULTIADDR}|g; \ - s|REPLACE_WITH_PEER_ID_FILE|${PEER_ID_FILE}|g; \ - s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \ - s/REPLACE_WITH_CERC_PRIVATE_KEY_PEER/${CERC_PRIVATE_KEY_PEER}/g; \ - s/REPLACE_WITH_CERC_PRIVATE_KEY_NITRO/${CERC_PRIVATE_KEY_NITRO}/g; \ - s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/g; \ - s/REPLACE_WITH_CONSENSUS_ENABLED/${CONSENSUS_ENABLED}/g; \ - s/REPLACE_WITH_CONSENSUS_PUBLIC_KEY/${CONSENSUS_PUBLIC_KEY}/g; \ - s/REPLACE_WITH_CONSENSUS_PRIVATE_KEY/${CONSENSUS_PRIVATE_KEY}/g; \ - s|REPLACE_WITH_WATCHER_PARTY_PEERS_FILE|${WATCHER_PARTY_PEERS_FILE}|g; \ - s|REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT|${CERC_L2_GETH_RPC}| ") - -# Write the modified content to a new file -echo "$WATCHER_CONFIG" > environments/local.toml - -echo 'yarn server' -yarn server diff --git a/app/data/config/watcher-mobymask-v3/watcher-config-rates.toml b/app/data/config/watcher-mobymask-v3/watcher-config-rates.toml deleted file mode 100644 index ebb8f8a1..00000000 --- a/app/data/config/watcher-mobymask-v3/watcher-config-rates.toml +++ /dev/null @@ -1,14 +0,0 @@ -freeQueriesLimit = 10 - -freeQueriesList = [] - -[queries] - multiNonce = '50' - _owner = '50' - isRevoked = '50' - isPhisher = '50' - isMember = '50' - -[mutations] - invoke = '100' - revoke = '100' diff --git a/app/data/config/watcher-mobymask-v3/watcher-config-template.toml b/app/data/config/watcher-mobymask-v3/watcher-config-template.toml deleted file mode 100644 index dbf5b407..00000000 --- a/app/data/config/watcher-mobymask-v3/watcher-config-template.toml +++ /dev/null @@ -1,103 +0,0 @@ -[server] - host = "0.0.0.0" - port = 3001 - kind = "lazy" - - # Checkpointing state. - checkpointing = true - - # Checkpoint interval in number of blocks. - checkpointInterval = 2000 - - # Enable state creation - enableState = true - - # Boolean to filter logs by contract. - filterLogs = true - - # Max block range for which to return events in eventsInRange GQL query. - # Use -1 for skipping check on block range. - maxEventsBlockRange = -1 - - [server.p2p] - enableRelay = true - enablePeer = true - - [server.p2p.relay] - host = "0.0.0.0" - port = 9090 - relayPeers = REPLACE_WITH_CERC_RELAY_PEERS - denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS - peerIdFile = './peers/relay-id.json' - announce = 'REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN' - pubsub = 'REPLACE_WITH_CERC_PUBSUB' - enableDebugInfo = true - - [server.p2p.peer] - relayMultiaddr = 'REPLACE_WITH_CERC_RELAY_MULTIADDR' - pubSubTopic = 'mobymask' - denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS - peerIdFile = 'REPLACE_WITH_PEER_ID_FILE' - pubsub = 'REPLACE_WITH_CERC_PUBSUB' - enableDebugInfo = true - enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS - - [server.p2p.peer.l2TxsConfig] - privateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_PEER' - contractAddress = 'REPLACE_WITH_CONTRACT_ADDRESS' - - [server.p2p.nitro] - store = './out/nitro-db' - privateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_NITRO' - chainPrivateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_PEER' - - [server.p2p.nitro.payments] - ratesFile = './environments/rates.toml' - requestTimeoutInSecs = 10 - - [server.p2p.nitro.payments.cache] - maxAccounts = 1000 - accountTTLInSecs = 1800 - maxVouchersPerAccount = 1000 - voucherTTLInSecs = 300 - maxPaymentChannels = 10000 - paymentChannelTTLInSecs = 1800 - - [server.p2p.consensus] - enabled = REPLACE_WITH_CONSENSUS_ENABLED - publicKey = 'REPLACE_WITH_CONSENSUS_PUBLIC_KEY' - privateKey = 'REPLACE_WITH_CONSENSUS_PRIVATE_KEY' - watcherPartyFile = 'REPLACE_WITH_WATCHER_PARTY_PEERS_FILE' - -[metrics] - host = "0.0.0.0" - port = 9000 - [metrics.gql] - port = 9001 - -[database] - type = "postgres" - host = "mobymask-watcher-db" - port = 5432 - database = "mobymask-watcher" - username = "vdbm" - password = "password" - synchronize = true - logging = false - -[upstream] - [upstream.ethServer] - gqlApiEndpoint = "http://ipld-eth-server:8083/graphql" - rpcProviderEndpoint = "REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT" - blockDelayInMilliSecs = 60000 - - [upstream.cache] - name = "requests" - enabled = false - deleteOnStart = false - -[jobQueue] - dbConnectionString = "postgres://vdbm:password@mobymask-watcher-db/mobymask-watcher-job-queue" - maxCompletionLagInSecs = 300 - jobDelayInMilliSecs = 100 - eventsInBatch = 50 diff --git a/app/data/container-build/cerc-mobymask-ui/Dockerfile b/app/data/container-build/cerc-mobymask-ui/Dockerfile index e00ac663..56e72a7a 100644 --- a/app/data/container-build/cerc-mobymask-ui/Dockerfile +++ b/app/data/container-build/cerc-mobymask-ui/Dockerfile @@ -1,6 +1,6 @@ # Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster -ARG VARIANT=18-bullseye +ARG VARIANT=16-bullseye FROM node:${VARIANT} ARG USERNAME=node @@ -37,7 +37,7 @@ RUN yarn global add http-server WORKDIR /app COPY . . -RUN yarn install +RUN npm install # Expose port for http EXPOSE 80 diff --git a/app/data/container-build/cerc-watcher-mobymask-v3/Dockerfile b/app/data/container-build/cerc-watcher-mobymask-v3/Dockerfile deleted file mode 100644 index 3e07eec9..00000000 --- a/app/data/container-build/cerc-watcher-mobymask-v3/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM ubuntu:22.04 - -RUN apt-get update \ - && apt-get install -y curl wget gnupg build-essential \ - && curl --silent --location https://deb.nodesource.com/setup_18.x | bash - \ - && apt-get update \ - && apt-get install -y nodejs git busybox jq \ - && node -v - -RUN corepack enable \ - && yarn --version - -WORKDIR /app - -COPY . . - -RUN echo "Building mobymask-v2-watcher-ts" && \ - yarn && yarn build - -WORKDIR /app diff --git a/app/data/container-build/cerc-watcher-mobymask-v3/build.sh b/app/data/container-build/cerc-watcher-mobymask-v3/build.sh deleted file mode 100755 index 1c26a4ce..00000000 --- a/app/data/container-build/cerc-watcher-mobymask-v3/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Build cerc/watcher-mobymask-v3 - -source ${CERC_CONTAINER_BASE_DIR}/build-base.sh - -# See: https://stackoverflow.com/a/246128/1701505 -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -docker build -t cerc/watcher-mobymask-v3:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/mobymask-v2-watcher-ts diff --git a/app/data/container-image-list.txt b/app/data/container-image-list.txt index ab8bc3ce..9ed473ba 100644 --- a/app/data/container-image-list.txt +++ b/app/data/container-image-list.txt @@ -50,4 +50,3 @@ cerc/watcher-sushiswap cerc/graph-node cerc/sushiswap-subgraphs cerc/webapp-base -cerc/watcher-mobymask-v3 diff --git a/app/data/pod-list.txt b/app/data/pod-list.txt index ee3fc53b..d375fd8e 100644 --- a/app/data/pod-list.txt +++ b/app/data/pod-list.txt @@ -35,5 +35,3 @@ contract-sushiswap graph-node sushiswap-subgraph-v3 fixturenet-sushiswap-subgraph-v3 -watcher-mobymask-v3 -mobymask-app-v3 diff --git a/app/data/stacks/fixturenet-laconic-loaded/README.md b/app/data/stacks/fixturenet-laconic-loaded/README.md index c82e48ad..b94189c2 100644 --- a/app/data/stacks/fixturenet-laconic-loaded/README.md +++ b/app/data/stacks/fixturenet-laconic-loaded/README.md @@ -4,8 +4,6 @@ Testing a "Loaded" fixturenet with console. Instructions for deploying a local Laconic blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator. -**Note:** For building some NPMs, access to the @lirewine repositories is required. If you don't have access, see [this tutorial](/docs/laconicd-fixturenet.md) to run this stack - ## 1. Install Laconic Stack Orchestrator Installation is covered in detail [here](https://github.com/cerc-io/stack-orchestrator#user-mode) but if you're on Linux and already have docker installed it should be as simple as: ``` @@ -32,24 +30,24 @@ $ export CERC_NPM_AUTH_TOKEN= ## 3. Clone required repositories ``` -$ laconic-so --stack fixturenet-laconic-loaded setup-repositories +$ laconic-so --stack fixturenet-laconicd setup-repositories ``` ## 4. Build the stack's packages and containers ``` -$ laconic-so --stack fixturenet-laconic-loaded build-npms -$ laconic-so --stack fixturenet-laconic-loaded build-containers +$ laconic-so --stack fixturenet-laconicd build-npms +$ laconic-so --stack fixturenet-laconicd build-containers ``` ## 5. Deploy the stack ``` -$ laconic-so --stack fixturenet-laconic-loaded deploy up +$ laconic-so --stack fixturenet-laconicd deploy up ``` Correct operation should be verified by checking the laconicd container's logs with: ``` -$ laconic-so --stack fixturenet-laconic-loaded deploy logs +$ laconic-so --stack fixturenet-laconicd deploy logs ``` ## 6. Test with the Registry CLI ``` -$ laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic cns status" +$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status" ``` ## 7. View the laconic console Get the URL for the console web app with this command (the port number will be different for each deployment): diff --git a/app/data/stacks/mainnet-eth/README.md b/app/data/stacks/mainnet-eth/README.md index 8f0dc1c4..79a3e788 100644 --- a/app/data/stacks/mainnet-eth/README.md +++ b/app/data/stacks/mainnet-eth/README.md @@ -17,7 +17,7 @@ $ laconic-so --stack mainnet-eth build-containers ## Create a deployment ``` -$ laconic-so --stack mainnet-eth deploy init --map-ports-to-host any-same --output mainnet-eth-spec.yml +$ laconic-so --stack mainnet-eth deploy init --output mainnet-eth-spec.yml $ laconic-so deploy create --spec-file mainnet-eth-spec.yml --deployment-dir mainnet-eth-deployment ``` ## Start the stack @@ -138,4 +138,4 @@ $ sudo du -h mainnet-eth-deployment/data/ 860G mainnet-eth-deployment/data/mainnet_eth_geth_1_data/geth 860G mainnet-eth-deployment/data/mainnet_eth_geth_1_data 885G mainnet-eth-deployment/data/ -``` +``` \ No newline at end of file diff --git a/app/data/stacks/mainnet-eth/deploy/commands.py b/app/data/stacks/mainnet-eth/deploy/commands.py index 9fcecbcf..350d0469 100644 --- a/app/data/stacks/mainnet-eth/deploy/commands.py +++ b/app/data/stacks/mainnet-eth/deploy/commands.py @@ -1,4 +1,4 @@ -# Copyright © 2023 Vulcanize +# Copyright © 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/data/stacks/mainnet-eth/stack.yml b/app/data/stacks/mainnet-eth/stack.yml index eca59ecc..6207756d 100644 --- a/app/data/stacks/mainnet-eth/stack.yml +++ b/app/data/stacks/mainnet-eth/stack.yml @@ -1,4 +1,4 @@ -version: "1.2" +version: "1.1" name: mainnet-eth description: "Ethereum Mainnet" repos: @@ -7,6 +7,7 @@ repos: - github.com/dboreham/foundry - git.vdb.to/cerc-io/keycloak-reg-api - git.vdb.to/cerc-io/keycloak-reg-ui + - github.com/vulcanize/eth-api-proxy containers: - cerc/go-ethereum - cerc/lighthouse @@ -16,8 +17,10 @@ containers: - cerc/webapp-base - cerc/keycloak-reg-api - cerc/keycloak-reg-ui + - cerc/eth-api-proxy pods: - mainnet-eth - mainnet-eth-keycloak - mainnet-eth-metrics + - mainnet-eth-api-proxy - foundry diff --git a/app/data/stacks/mainnet-laconic/deploy/commands.py b/app/data/stacks/mainnet-laconic/deploy/commands.py index 16bf015a..4d6c8881 100644 --- a/app/data/stacks/mainnet-laconic/deploy/commands.py +++ b/app/data/stacks/mainnet-laconic/deploy/commands.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/data/stacks/mobymask-v3/README.md b/app/data/stacks/mobymask-v3/README.md deleted file mode 100644 index 6ea57af5..00000000 --- a/app/data/stacks/mobymask-v3/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# MobyMask v3 - -Instructions to setup and deploy MobyMask v3 stack (watcher + web-app) using [laconic-stack-orchestrator](/README.md#install) - -* Follow [watcher.md](./watcher.md) for deploying the watcher -* Follow [web-app.md](./web-app.md) for deploying the app diff --git a/app/data/stacks/mobymask-v3/stack.yml b/app/data/stacks/mobymask-v3/stack.yml deleted file mode 100644 index 85af73ac..00000000 --- a/app/data/stacks/mobymask-v3/stack.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: "1.0" -description: "MobyMask v3 stack" -name: mobymask-v3 -repos: - - github.com/cerc-io/watcher-ts@v0.2.57 - - github.com/cerc-io/mobymask-v2-watcher-ts@v3 - - github.com/cerc-io/MobyMask@v0.1.3 - - github.com/cerc-io/mobymask-ui -containers: - - cerc/watcher-ts - - cerc/watcher-mobymask-v3 - - cerc/mobymask - - cerc/mobymask-ui -pods: - - watcher-mobymask-v3 - - mobymask-app-v3 diff --git a/app/data/stacks/mobymask-v3/watcher.md b/app/data/stacks/mobymask-v3/watcher.md deleted file mode 100644 index 9063b022..00000000 --- a/app/data/stacks/mobymask-v3/watcher.md +++ /dev/null @@ -1,135 +0,0 @@ -# MobyMask v3 Watcher - -## Setup - -Prerequisite: L2 Optimism Geth and Node RPC endpoints - -Clone required repositories: - -```bash -laconic-so --stack mobymask-v3 setup-repositories --pull --exclude github.com/cerc-io/mobymask-ui -``` - -Build the container images: - -```bash -laconic-so --stack mobymask-v3 build-containers --exclude cerc/mobymask-ui -``` - -## Deploy - -### Configuration - -Create and update an env file to be used in the next step ([defaults](../../config/watcher-mobymask-v3/mobymask-params.env)): - - ```bash - # External L2 endpoints - CERC_L2_GETH_RPC= - - # Endpoints waited on before contract deployment - CERC_L2_GETH_HOST= - CERC_L2_GETH_PORT= - - CERC_L2_NODE_HOST= - CERC_L2_NODE_PORT= - - # URL (fixturenet-eth-bootnode-lighthouse) to get CSV with credentials for accounts on L1 to perform txs on L2 - CERC_L1_ACCOUNTS_CSV_URL= - - # OR - # Specify the required account credentials - CERC_PRIVATE_KEY_DEPLOYER= - - # Base URI for mobymask-app - # (used for generating a root invite link after deploying the contract) - CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3004/#" - - # (Optional) Domain to be used in the relay node's announce address - CERC_RELAY_ANNOUNCE_DOMAIN= - - # (Optional) Set of relay peers to connect to from the relay node - CERC_RELAY_PEERS=[] - - # (Optional) Set of multiaddrs to be avoided while dialling - CERC_DENY_MULTIADDRS=[] - - # (Optional) Type of pubsub to be used - CERC_PUBSUB="" - - # Set to false for disabling watcher peer to send txs to L2 - CERC_ENABLE_PEER_L2_TXS=true - - # (Optional) Set already deployed MobyMask contract address to avoid deploying contract in the stack - CERC_DEPLOYED_CONTRACT= - - # (Optional) Set already deployed Nitro addresses to avoid deploying them in the stack - CERC_NA_ADDRESS= - CERC_VPA_ADDRESS= - CERC_CA_ADDRESS= - - # Specify private key of a funded account for sending txs to L2 - CERC_PRIVATE_KEY_PEER= - - # Specify private key for the Nitro account - CERC_PRIVATE_KEY_NITRO= - - # (Optional) Set a pre-existing peer id to be used (enables consensus) - # Uses a generated peer id if not set (disables consensus) - CERC_PEER_ID= - ``` - -* 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-v3 deploy --cluster mobymask_v3 --include watcher-mobymask-v3 --env-file up -``` - -* To list down and monitor the running containers: - - ```bash - laconic-so --stack mobymask-v3 deploy --cluster mobymask_v3 --include watcher-mobymask-v3 ps - - # With status - docker ps -a - - # Check logs for a container - docker logs -f - ``` - -* The watcher endpoint is exposed on host port `3001` and the relay node endpoint is exposed on host port `9090` - -* Check the logs of the MobyMask contract deployment container to get the deployed contract's address and generated root invite link: - - ```bash - docker logs -f $(docker ps -aq --filter name="mobymask-1") - ``` - -* Check the logs of the watcher server container to get the deployed Nitro contracts' addresses: - -```bash -docker exec -it $(docker ps -q --filter name="mobymask-watcher-server") bash -c "cat /nitro/nitro-addresses.json" -``` - -## Clean up - -Stop all services running in the background: - -```bash -laconic-so --stack mobymask-v3 deploy --cluster mobymask_v3 --include watcher-mobymask-v3 down -``` - -Clear volumes created by this stack: - -```bash -# List all relevant volumes -docker volume ls -q --filter "name=mobymask_v3" - -# Remove all the listed volumes -docker volume rm $(docker volume ls -q --filter "name=mobymask_v3") - -# WARNING: To avoid changing peer ids for the watcher, `peers_ids` volume can be persisted -# To delete all volumes except for `peers_ids` -docker volume rm $(docker volume ls -q --filter "name=mobymask_v3" | grep -v "peers_ids$") -``` diff --git a/app/data/stacks/mobymask-v3/web-app.md b/app/data/stacks/mobymask-v3/web-app.md deleted file mode 100644 index d0efee81..00000000 --- a/app/data/stacks/mobymask-v3/web-app.md +++ /dev/null @@ -1,86 +0,0 @@ -# MobyMask v3 App - -## Setup - -Prerequisite: Watcher with GQL and relay node endpoints - -Clone required repositories: - -```bash -laconic-so --stack mobymask-v3 setup-repositories --pull --include github.com/cerc-io/mobymask-ui -``` - -Build the container images: - -```bash -laconic-so --stack mobymask-v3 build-containers --include cerc/mobymask-ui -``` - -## Deploy - -### Configuration - -Create and update an env file to be used in the next step ([defaults](../../config/watcher-mobymask-v3/mobymask-params.env)): - - ```bash - # Set of relay nodes to be used by the web-app - # (use double quotes " for strings, avoid space after commas) - # Eg. CERC_RELAY_NODES=["/dns4/example.com/tcp/443/wss/p2p/12D3KooWGHmDDCc93XUWL16FMcTPCGu2zFaMkf67k8HZ4gdQbRDr"] - CERC_RELAY_NODES=[] - - # Set of multiaddrs to be avoided while dialling - CERC_DENY_MULTIADDRS=[] - - # Also add if running MobyMask app: - - # Watcher endpoint used by the app for GQL queries - CERC_APP_WATCHER_URL="http://127.0.0.1:3001" - - # Set deployed MobyMask contract address to be used in MobyMask app's config - CERC_DEPLOYED_CONTRACT= - - # L2 Chain ID used by mobymask web-app for L2 txs - CERC_CHAIN_ID=42069 - - # (Optional) Type of pubsub to be used ("floodsub" | "gossipsub") - CERC_PUBSUB="" - - # Set Nitro addresses - CERC_NA_ADDRESS= - CERC_VPA_ADDRESS= - CERC_CA_ADDRESS= - - # Nitro account address to make the query and mutation payments to - CERC_PAYMENT_NITRO_ADDRESS= - - # Endpoint for Mobymask snap installation - CERC_SNAP_URL= - ``` - -### Deploy the stack - -```bash -laconic-so --stack mobymask-v3 deploy --cluster mobymask_v3 --include mobymask-app-v3 --env-file up - -# Runs the MobyMask v3 app on host port 3004 -``` - -To list down and monitor the running containers: - -```bash -laconic-so --stack mobymask-v3 deploy --cluster mobymask_v3 --include mobymask-app-v3 ps - -# With status -docker ps -a - -# Check logs for a container -docker logs -f -``` - -## Clean up - -Stop all services running in the background: - -```bash -laconic-so --stack mobymask-v3 deploy --cluster mobymask_v3 --include mobymask-app-v3 down -``` diff --git a/app/data/stacks/test/deploy/commands.py b/app/data/stacks/test/deploy/commands.py index 0a836037..3e90e1ef 100644 --- a/app/data/stacks/test/deploy/commands.py +++ b/app/data/stacks/test/deploy/commands.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/deploy.py b/app/deploy.py index 51749ff9..e58c3d83 100644 --- a/app/deploy.py +++ b/app/deploy.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/deploy_types.py b/app/deploy_types.py index 63f32762..4a328d82 100644 --- a/app/deploy_types.py +++ b/app/deploy_types.py @@ -1,4 +1,4 @@ -# Copyright © 2023 Vulcanize +# Copyright © 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/deploy_util.py b/app/deploy_util.py index 2f5f0188..9ead8b2a 100644 --- a/app/deploy_util.py +++ b/app/deploy_util.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/deployment.py b/app/deployment.py index 8c860e46..1035d36b 100644 --- a/app/deployment.py +++ b/app/deployment.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/deployment_create.py b/app/deployment_create.py index 837aaa61..f5db318b 100644 --- a/app/deployment_create.py +++ b/app/deployment_create.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -178,18 +178,16 @@ def _get_mapped_ports(stack: str, map_recipe: str): ports_array = ports[service] for x in range(0, len(ports_array)): orig_port = ports_array[x] - # Strip /udp suffix if present - bare_orig_port = orig_port.replace("/udp", "") random_port = random.randint(20000, 50000) # Beware: we're relying on luck to not collide if map_recipe == "any-variable-random": # This is the default so take no action pass elif map_recipe == "localhost-same": # Replace instances of "- XX" with "- 127.0.0.1:XX" - ports_array[x] = f"127.0.0.1:{bare_orig_port}:{orig_port}" + ports_array[x] = f"127.0.0.1:{orig_port}:{orig_port}" elif map_recipe == "any-same": # Replace instances of "- XX" with "- 0.0.0.0:XX" - ports_array[x] = f"0.0.0.0:{bare_orig_port}:{orig_port}" + ports_array[x] = f"0.0.0.0:{orig_port}:{orig_port}" elif map_recipe == "localhost-fixed-random": # Replace instances of "- XX" with "- 127.0.0.1::XX" ports_array[x] = f"127.0.0.1:{random_port}:{orig_port}" diff --git a/app/setup_repositories.py b/app/setup_repositories.py index c14dccb4..ddd920e2 100644 --- a/app/setup_repositories.py +++ b/app/setup_repositories.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/stack_state.py b/app/stack_state.py index 180a9084..d4e3e7af 100644 --- a/app/stack_state.py +++ b/app/stack_state.py @@ -1,4 +1,4 @@ -# Copyright © 2023 Vulcanize +# Copyright © 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/util.py b/app/util.py index 9d9eaa33..42a4673e 100644 --- a/app/util.py +++ b/app/util.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022, 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/app/version.py b/app/version.py index 5a5c33d4..4dd55086 100644 --- a/app/version.py +++ b/app/version.py @@ -1,4 +1,4 @@ -# Copyright © 2023 Vulcanize +# Copyright © 2023 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/cli.py b/cli.py index 21f8a8b5..119eb88f 100644 --- a/cli.py +++ b/cli.py @@ -1,4 +1,4 @@ -# Copyright © 2022, 2023 Vulcanize +# Copyright © 2022 Cerc # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/setup.py b/setup.py index 86050fbc..562914eb 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,8 @@ setup( install_requires=[requirements], python_requires='>=3.7', include_package_data=True, - package_data={'': ['data/**']}, + # See: https://github.com/pypa/setuptools/issues/1806 + package_data={'': ['data/*', 'data/*/*', 'data/*/*/*', 'data/*/*/*/*', 'data/*/*/*/*/*']}, classifiers=[ "Programming Language :: Python :: 3.8", "Operating System :: OS Independent",