diff --git a/README.md b/README.md index 35f1fbc..e60f5ac 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ cd nwaku-compose Edit the environment variables present at the beginning of the `docker-compose.yml` file. +It is required to set the `ETH_CLIENT_ADDRESS` environment variable within the `docker-compose.yml` file before starting the instance. + +`ETH_CLIENT_ADDRESS` must be a WebSockets URL for your Ethereum Node. +For the current default contract, it must be a node for the Sepolia network. +In case you're not running your own node, you can get it from [Infura](https://www.infura.io/) + Start everything: `nwaku`, `postgres`, `prometheus`, and `grafana`. ```console docker-compose up -d @@ -36,6 +42,10 @@ There are multiple environment variables you can configure to modify behaviour o * `NWAKU_IMAGE` - the image you want to use for the nwaku container (e.g. `NWAKU_IMAGE=statusteam/nim-waku:v0.19.0-rc.0`) * `DOMAIN` - domain name pointing to the IP address of your node, when configured the run script will request SSL certs from Let's Encrypt and run Waku node with WebSockets Secure (WSS) options enabled (e.g. `DOMAIN=waku.example.com`) * `NODEKEY` - this env variable allows you to provide a node key as described in [operators documentation](https://github.com/waku-org/nwaku/blob/master/docs/operators/how-to/configure-key.md) (e.g. `NODEKEY=9f439983aa4851346cfe6e17585e426f482871a43626812e23490895cd602c11`) +* `RLN_RELAY_CONTRACT_ADDRESS` - address of the RLN Relay Contract. It defaults to a Sepolia testnet address +* `ETH_CLIENT_ADDRESS` (**mandatory**) - URL to a WebSockets Ethereum node URL on the same network as the contract address. If you're not running your own node, you can get the URL at Infura with the following [instructions](https://docs.infura.io/networks/ethereum/how-to/choose-a-network) +* `RLN_RELAY_CRED_PATH` - path for peristing rln-relay credential +* `RLN_RELAY_CRED_PASSWORD` - password for encrypting RLN credentials * `EXTRA_ARGS` - this variable allows you to specify additional or overriding CLI option for the Waku node which will be appended to the `wakunode2` command. (e.g. `EXTRA_ARGS="--store=false --max-connections=3000`) ## Log monitoring and troubleshooting diff --git a/docker-compose.yml b/docker-compose.yml index 0d30f30..aaa458f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,12 +6,19 @@ x-logging: &logging max-size: 1000m # Environment variable definitions +x-eth-client-address: ð_client_address ${ETH_CLIENT_ADDRESS:-} # Add your ETH_CLIENT_ADDRESS after the "-" + +x-rln-environment: &rln_env + RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4} + RLN_RELAY_CRED_PATH: ${RLN_RELAY_CRED_PATH:-} # Optional: Add your RLN_RELAY_CRED_PATH after the "-" + RLN_RELAY_CRED_PASSWORD: ${RLN_RELAY_CRED_PASSWORD:-} # Optional: Add your RLN_RELAY_CRED_PASSWORD after the "-" + x-pg-pass: &pg_pass ${POSTGRES_PASSWORD:-test123} x-pg-user: &pg_user ${POSTGRES_USER:-postgres} x-pg-environment: &pg_env - POSTGRES_USER: *pg_user - POSTGRES_PASSWORD: *pg_pass + POSTGRES_USER: *pg_user + POSTGRES_PASSWORD: *pg_pass x-pg-exporter-env: &pg_exp_env environment: @@ -41,8 +48,8 @@ services: # For a pre-built release. See available releases: # github.com/waku-org/nwaku/releases - image: ${NWAKU_IMAGE:-statusteam/nim-waku:v0.20.0} - restart: on-failure:5 # Retry up to 5 times + image: ${NWAKU_IMAGE:-wakuorg/nwaku:v0.21.2-rc.0} + restart: on-failure ports: - 30304:30304/tcp - 30304:30304/udp @@ -57,11 +64,15 @@ services: environment: DOMAIN: ${DOMAIN} NODEKEY: ${NODEKEY} + ETH_CLIENT_ADDRESS: *eth_client_address EXTRA_ARGS: ${EXTRA_ARGS} - <<: *pg_env + <<: + - *pg_env + - *rln_env volumes: - ./run_node.sh:/opt/run_node.sh:Z - ./certs:/etc/letsencrypt/:Z + - ./rln_tree:/etc/rln_tree/:Z entrypoint: sh command: - /opt/run_node.sh diff --git a/monitoring/configuration/dashboards/nwaku-monitoring.json b/monitoring/configuration/dashboards/nwaku-monitoring.json index 844db05..6c005a1 100644 --- a/monitoring/configuration/dashboards/nwaku-monitoring.json +++ b/monitoring/configuration/dashboards/nwaku-monitoring.json @@ -85,7 +85,7 @@ "showUnfilled": true, "valueMode": "color" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -154,7 +154,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -216,7 +216,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -282,7 +282,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -323,6 +323,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -415,6 +416,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -537,7 +539,7 @@ }, "showHeader": true }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -617,7 +619,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -694,7 +696,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -759,7 +761,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -837,7 +839,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -902,7 +904,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -964,7 +966,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -1029,7 +1031,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -1062,7 +1064,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] } @@ -1090,7 +1093,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -1131,6 +1134,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1152,7 +1156,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1164,7 +1169,7 @@ "overrides": [] }, "gridPos": { - "h": 10, + "h": 9, "w": 6, "x": 0, "y": 31 @@ -1223,6 +1228,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1244,7 +1250,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1262,6 +1269,100 @@ "x": 6, "y": 31 }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(libp2p_network_bytes_total{direction=\"in\"}[$__rate_interval])", + "legendFormat": "traffic_{{direction}}", + "range": true, + "refId": "A" + } + ], + "title": "libp2p traffic (in)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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": 9, + "w": 6, + "x": 12, + "y": 31 + }, "id": 29, "options": { "legend": { @@ -1315,6 +1416,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1336,7 +1438,102 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 40 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "nim_gc_heap_instance_occupied_bytes{}", + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A" + } + ], + "title": "Heap allocation", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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", @@ -1408,6 +1605,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1429,25 +1627,25 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", "value": 80 } ] - }, - "unit": "binBps" + } }, "overrides": [] }, "gridPos": { - "h": 9, + "h": 8, "w": 6, - "x": 0, - "y": 41 + "x": 12, + "y": 40 }, - "id": 8, + "id": 128, "options": { "legend": { "calcs": [], @@ -1466,14 +1664,19 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "editorMode": "code", - "expr": "rate(libp2p_network_bytes_total{direction=\"in\"}[$__rate_interval])", - "legendFormat": "traffic_{{direction}}", + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_number_registered_memberships", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], - "title": "libp2p traffic (in)", + "title": "RLN Registered Memberships", "type": "timeseries" }, { @@ -1500,6 +1703,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -1521,25 +1725,25 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", "value": 80 } ] - }, - "unit": "decbytes" + } }, "overrides": [] }, "gridPos": { - "h": 8, + "h": 6, "w": 6, "x": 0, - "y": 50 + "y": 48 }, - "id": 20, + "id": 127, "options": { "legend": { "calcs": [], @@ -1558,14 +1762,705 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "editorMode": "code", - "expr": "nim_gc_heap_instance_occupied_bytes{}", + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_proof_generation_duration_seconds", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, "legendFormat": "{{__name__}}", "range": true, - "refId": "A" + "refId": "A", + "useBackend": false } ], - "title": "Heap allocation", + "title": "RLN Proof Generation (seconds)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 48 + }, + "id": 126, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_proof_verification_duration_seconds", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Proof Verification (seconds)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 48 + }, + "id": 135, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_membership_insertion_duration_seconds", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Membership Insertion (seconds)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 54 + }, + "id": 134, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_membership_credentials_import_duration_seconds", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Credentials Import (seconds)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 54 + }, + "id": 137, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_messages_total_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Messages Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 54 + }, + "id": 136, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_proof_verification_total_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Proof Verification Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 60 + }, + "id": 133, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_invalid_messages_total_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Invalid Messages Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "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 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 60 + }, + "id": 130, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "waku_rln_spam_messages_total_total", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{__name__}}", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "RLN Spam Messages Total", "type": "timeseries" }, { @@ -1574,7 +2469,7 @@ "h": 1, "w": 24, "x": 0, - "y": 58 + "y": 66 }, "id": 46, "panels": [], @@ -1613,7 +2508,7 @@ "h": 3, "w": 4, "x": 0, - "y": 59 + "y": 67 }, "id": 11, "links": [], @@ -1644,7 +2539,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1724,7 +2619,7 @@ "h": 3, "w": 4, "x": 4, - "y": 59 + "y": 67 }, "id": 84, "links": [], @@ -1755,7 +2650,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1836,7 +2731,7 @@ "h": 3, "w": 4, "x": 8, - "y": 59 + "y": 67 }, "id": 23, "links": [], @@ -1867,7 +2762,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1947,7 +2842,7 @@ "h": 6, "w": 4, "x": 12, - "y": 59 + "y": 67 }, "id": 16, "links": [], @@ -1963,7 +2858,7 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "expr": "sum(pg_stat_database_blks_hit{instance=~\"$Instance\"})/(sum(pg_stat_database_blks_hit{instance=~\"$Instance\"})+sum(pg_stat_database_blks_read{instance=~\"$Instance\"}))*100", @@ -2015,7 +2910,7 @@ "h": 6, "w": 4, "x": 16, - "y": 59 + "y": 67 }, "id": 9, "links": [], @@ -2031,7 +2926,7 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "expr": "sum(pg_stat_database_numbackends)/max(pg_settings_max_connections)", @@ -2083,7 +2978,7 @@ "h": 6, "w": 4, "x": 20, - "y": 59 + "y": 67 }, "id": 15, "links": [], @@ -2099,7 +2994,7 @@ "showThresholdLabels": false, "showThresholdMarkers": true }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "expr": "sum(pg_stat_database_xact_commit{instance=\"$Instance\"})/(sum(pg_stat_database_xact_commit{instance=\"$Instance\"}) + sum(pg_stat_database_xact_rollback{instance=\"$Instance\"}))", @@ -2148,7 +3043,7 @@ "h": 3, "w": 4, "x": 0, - "y": 62 + "y": 70 }, "id": 37, "links": [], @@ -2179,7 +3074,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2258,7 +3153,7 @@ "h": 3, "w": 4, "x": 4, - "y": 62 + "y": 70 }, "id": 14, "interval": "", @@ -2290,7 +3185,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2371,7 +3266,7 @@ "h": 3, "w": 4, "x": 8, - "y": 62 + "y": 70 }, "id": 93, "links": [], @@ -2402,7 +3297,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2470,7 +3365,7 @@ "h": 5, "w": 3, "x": 0, - "y": 65 + "y": 73 }, "id": 125, "options": { @@ -2487,7 +3382,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "targets": [ { "datasource": { @@ -2545,7 +3440,7 @@ "h": 3, "w": 4, "x": 8, - "y": 65 + "y": 73 }, "id": 102, "links": [], @@ -2576,7 +3471,7 @@ }, "textMode": "auto" }, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -2636,7 +3531,7 @@ "h": 9, "w": 12, "x": 12, - "y": 65 + "y": 73 }, "hiddenSeries": false, "id": 121, @@ -2668,7 +3563,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -2735,7 +3630,7 @@ "h": 9, "w": 12, "x": 0, - "y": 70 + "y": 78 }, "hiddenSeries": false, "id": 24, @@ -2767,7 +3662,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -2833,7 +3728,7 @@ "h": 9, "w": 12, "x": 12, - "y": 74 + "y": 82 }, "hiddenSeries": false, "id": 27, @@ -2855,7 +3750,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -2935,7 +3830,7 @@ "h": 9, "w": 12, "x": 0, - "y": 79 + "y": 87 }, "hiddenSeries": false, "id": 122, @@ -2960,7 +3855,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3032,7 +3927,7 @@ "h": 9, "w": 12, "x": 12, - "y": 83 + "y": 91 }, "hiddenSeries": false, "id": 111, @@ -3054,7 +3949,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3127,7 +4022,7 @@ "h": 9, "w": 12, "x": 0, - "y": 88 + "y": 96 }, "hiddenSeries": false, "id": 26, @@ -3148,7 +4043,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3221,7 +4116,7 @@ "h": 5, "w": 12, "x": 12, - "y": 92 + "y": 100 }, "hiddenSeries": false, "id": 30, @@ -3250,7 +4145,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3317,7 +4212,7 @@ "h": 10, "w": 12, "x": 0, - "y": 97 + "y": 105 }, "hiddenSeries": false, "id": 123, @@ -3344,7 +4239,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3408,7 +4303,7 @@ "h": 5, "w": 12, "x": 12, - "y": 97 + "y": 105 }, "hiddenSeries": false, "id": 31, @@ -3437,7 +4332,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3504,7 +4399,7 @@ "h": 10, "w": 12, "x": 0, - "y": 107 + "y": 115 }, "hiddenSeries": false, "id": 120, @@ -3527,7 +4422,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "10.0.3", + "pluginVersion": "10.1.2", "pointradius": 2, "points": false, "renderer": "flot", @@ -3586,9 +4481,10 @@ "list": [ { "current": { + "isNone": true, "selected": false, - "text": "postgres-exporter:9187", - "value": "postgres-exporter:9187" + "text": "None", + "value": "" }, "datasource": { "type": "prometheus", @@ -3643,15 +4539,15 @@ "auto_count": 30, "auto_min": "10s", "current": { - "selected": false, - "text": "10m", - "value": "10m" + "selected": true, + "text": "auto", + "value": "$__auto_interval_Interval" }, "hide": 0, "name": "Interval", "options": [ { - "selected": false, + "selected": true, "text": "auto", "value": "$__auto_interval_Interval" }, @@ -3666,7 +4562,7 @@ "value": "1m" }, { - "selected": true, + "selected": false, "text": "10m", "value": "10m" }, diff --git a/run_node.sh b/run_node.sh index 1455da9..e534dc8 100644 --- a/run_node.sh +++ b/run_node.sh @@ -2,6 +2,11 @@ echo "I am a nwaku node" +if [ -z "${ETH_CLIENT_ADDRESS}" ]; then + echo "Missing Eth client address, please refer to README.md for detailed instructions" + exit 1 +fi + MY_EXT_IP=$(wget -qO- https://api4.ipify.org) DNS_WSS_CMD= @@ -37,10 +42,18 @@ if [ -n "${DOMAIN}" ]; then DNS_WSS_CMD="${WS_SUPPORT} ${WSS_SUPPORT} ${WSS_CERT} ${WSS_KEY} ${DNS4_DOMAIN}" fi -if [ "${NODEKEY}" != "" ]; then +if [ -n "${NODEKEY}" ]; then NODEKEY=--nodekey=${NODEKEY} fi +if [ -n "${RLN_RELAY_CRED_PATH}" ]; then + RLN_RELAY_CRED_PATH=--rln-relay-cred-path=${RLN_RELAY_CRED_PATH} +fi + +if [ -n "${RLN_RELAY_CRED_PASSWORD}" ]; then + RLN_RELAY_CRED_PASSWORD=--rln-relay-cred-password=${RLN_RELAY_CRED_PASSWORD} +fi + exec /usr/bin/wakunode\ --relay=true\ --topic=/waku/2/default-waku/proto\ @@ -50,6 +63,7 @@ exec /usr/bin/wakunode\ --rpc-admin=true\ --keep-alive=true\ --max-connections=150\ + --cluster-id=1\ --dns-discovery=true\ --dns-discovery-url=enrtree://ANEDLO25QVUGJOUTQFRYKWX6P4Z4GKVESBMHML7DZ6YK4LGS5FC5O@prod.wakuv2.nodes.status.im\ --discv5-discovery=true\ @@ -69,6 +83,13 @@ exec /usr/bin/wakunode\ --store=true\ --store-message-db-url="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/postgres"\ --store-message-retention-policy=time:86400\ + --rln-relay=true\ + --rln-relay-dynamic=true\ + --rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\ + --rln-relay-eth-client-address="${ETH_CLIENT_ADDRESS}"\ + --rln-relay-tree-path="/etc/rln_tree"\ + ${RLN_RELAY_CRED_PATH}\ + ${RLN_RELAY_CRED_PASSWORD}\ ${DNS_WSS_CMD}\ ${NODEKEY}\ ${EXTRA_ARGS}