From 083051da556866ecdaa5924d7fef21c3a8991c74 Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Thu, 21 Sep 2023 12:25:39 +0300 Subject: [PATCH 1/9] feat: adding RLN support for nwaku-compose --- docker-compose.yml | 5 +- .../dashboards/nwaku-monitoring.json | 1076 +++++++++++++++-- run_node.sh | 11 + 3 files changed, 1000 insertions(+), 92 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0d30f30..fb13d11 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,8 @@ 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: @@ -62,6 +62,7 @@ services: 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..6f78fd4 100644 --- a/run_node.sh +++ b/run_node.sh @@ -41,6 +41,12 @@ if [ "${NODEKEY}" != "" ]; then NODEKEY=--nodekey=${NODEKEY} fi +RLN_RELAY_CONTRACT_ADDRESS="0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4" # Sepolia Testnet +RLN_TREE_PATH="/etc/rln_tree" +ETH_CLIENT_ADDRESS= # Add a WebSockets endpoint to your Eth Node or an Infura WebSockets URL + # https://docs.infura.io/networks/ethereum/how-to/choose-a-network + # Make sure to use an URL for the same network than the relay contract + exec /usr/bin/wakunode\ --relay=true\ --topic=/waku/2/default-waku/proto\ @@ -69,6 +75,11 @@ 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="${RLN_TREE_PATH}"\ ${DNS_WSS_CMD}\ ${NODEKEY}\ ${EXTRA_ARGS} From bb2271acdcbce78e27f20d1052d2c6b2f5dd97e5 Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Thu, 21 Sep 2023 15:28:39 +0300 Subject: [PATCH 2/9] Changing new parameters to env variables and updating README --- README.md | 2 ++ docker-compose.yml | 2 ++ run_node.sh | 13 ++++++------- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 35f1fbc..16cb97d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ 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 `0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4` on Sepolia testnet +* `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) * `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 fb13d11..e095e79 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,6 +57,8 @@ services: environment: DOMAIN: ${DOMAIN} NODEKEY: ${NODEKEY} + RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4} + ETH_CLIENT_ADDRESS: ${ETH_CLIENT_ADDRESS} EXTRA_ARGS: ${EXTRA_ARGS} <<: *pg_env volumes: diff --git a/run_node.sh b/run_node.sh index 6f78fd4..8da0cf5 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 -e "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= @@ -41,12 +46,6 @@ if [ "${NODEKEY}" != "" ]; then NODEKEY=--nodekey=${NODEKEY} fi -RLN_RELAY_CONTRACT_ADDRESS="0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4" # Sepolia Testnet -RLN_TREE_PATH="/etc/rln_tree" -ETH_CLIENT_ADDRESS= # Add a WebSockets endpoint to your Eth Node or an Infura WebSockets URL - # https://docs.infura.io/networks/ethereum/how-to/choose-a-network - # Make sure to use an URL for the same network than the relay contract - exec /usr/bin/wakunode\ --relay=true\ --topic=/waku/2/default-waku/proto\ @@ -79,7 +78,7 @@ exec /usr/bin/wakunode\ --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="${RLN_TREE_PATH}"\ + --rln-relay-tree-path="/etc/rln_tree"\ ${DNS_WSS_CMD}\ ${NODEKEY}\ ${EXTRA_ARGS} From 91e860220d424178045d85b71792ddcbf3d3a030 Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Thu, 21 Sep 2023 18:40:27 +0300 Subject: [PATCH 3/9] Improving README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 16cb97d..a04f734 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,20 @@ cd nwaku-compose Edit the environment variables present at the beginning of the `docker-compose.yml` file. +Get a node's URL: + +It is required to set the `ETH_CLIENT_ADDRESS` environment variable before starting the instance. + +`ETH_CLIENT_ADDRESS` must be a WebSockets URL for your Ethereum Node. +For the current default contract, it must 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/) + +You can set the environment variable from inside the `docker-compose.yml` file or you can simply run + +```console +export ETH_CLIENT_ADDRESS= +``` + Start everything: `nwaku`, `postgres`, `prometheus`, and `grafana`. ```console docker-compose up -d From 1ef2aa550399aa5d9cfbec478920ffab5e23a036 Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Fri, 22 Sep 2023 11:45:45 +0300 Subject: [PATCH 4/9] Refactoring and adding optional rln env variables --- README.md | 10 +--------- docker-compose.yml | 11 +++++++++-- run_node.sh | 14 ++++++++++++-- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a04f734..d20216b 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,12 @@ cd nwaku-compose Edit the environment variables present at the beginning of the `docker-compose.yml` file. -Get a node's URL: - It is required to set the `ETH_CLIENT_ADDRESS` environment variable before starting the instance. `ETH_CLIENT_ADDRESS` must be a WebSockets URL for your Ethereum Node. -For the current default contract, it must a node for the Sepolia network. +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/) -You can set the environment variable from inside the `docker-compose.yml` file or you can simply run - -```console -export ETH_CLIENT_ADDRESS= -``` - Start everything: `nwaku`, `postgres`, `prometheus`, and `grafana`. ```console docker-compose up -d diff --git a/docker-compose.yml b/docker-compose.yml index e095e79..d5fdd64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,13 @@ 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} @@ -57,10 +64,10 @@ services: environment: DOMAIN: ${DOMAIN} NODEKEY: ${NODEKEY} - RLN_RELAY_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4} - ETH_CLIENT_ADDRESS: ${ETH_CLIENT_ADDRESS} + ETH_CLIENT_ADDRESS: *eth_client_address EXTRA_ARGS: ${EXTRA_ARGS} <<: *pg_env + <<: *rln_env volumes: - ./run_node.sh:/opt/run_node.sh:Z - ./certs:/etc/letsencrypt/:Z diff --git a/run_node.sh b/run_node.sh index 8da0cf5..fe432cf 100644 --- a/run_node.sh +++ b/run_node.sh @@ -3,7 +3,7 @@ echo "I am a nwaku node" if [ -z "${ETH_CLIENT_ADDRESS}" ]; then - echo -e "Missing Eth client address, please refer to README.md for detailed instructions" + echo "Missing Eth client address, please refer to README.md for detailed instructions" exit 1 fi @@ -42,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\ @@ -81,5 +89,7 @@ exec /usr/bin/wakunode\ --rln-relay-tree-path="/etc/rln_tree"\ ${DNS_WSS_CMD}\ ${NODEKEY}\ + ${RLN_RELAY_CRED_PATH}\ + ${RLN_RELAY_CRED_PASSWORD}\ ${EXTRA_ARGS} From ecdad6526621dcf61eb59ec2bc296e38c2c524ef Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Fri, 22 Sep 2023 11:54:05 +0300 Subject: [PATCH 5/9] Updating README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d20216b..6f8e288 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ There are multiple environment variables you can configure to modify behaviour o * `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 `0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4` on Sepolia testnet * `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 From 1e4d5a31df27e0a84985e07bf4365083fe58be6a Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Fri, 22 Sep 2023 14:10:57 +0300 Subject: [PATCH 6/9] Improving style --- README.md | 4 ++-- run_node.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6f8e288..e60f5ac 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ 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 before starting the instance. +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. @@ -42,7 +42,7 @@ 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 `0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4` on Sepolia testnet +* `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 diff --git a/run_node.sh b/run_node.sh index fe432cf..397a0fd 100644 --- a/run_node.sh +++ b/run_node.sh @@ -87,9 +87,9 @@ exec /usr/bin/wakunode\ --rln-relay-eth-contract-address="${RLN_RELAY_CONTRACT_ADDRESS}"\ --rln-relay-eth-client-address="${ETH_CLIENT_ADDRESS}"\ --rln-relay-tree-path="/etc/rln_tree"\ - ${DNS_WSS_CMD}\ - ${NODEKEY}\ ${RLN_RELAY_CRED_PATH}\ ${RLN_RELAY_CRED_PASSWORD}\ + ${DNS_WSS_CMD}\ + ${NODEKEY}\ ${EXTRA_ARGS} From 99454e3b5095e1934fe006e4ed6ad97541a8b973 Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Thu, 12 Oct 2023 10:25:58 +0300 Subject: [PATCH 7/9] fixing RLN contract address --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d5fdd64..d05bd94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ x-logging: &logging 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_CONTRACT_ADDRESS: ${RLN_RELAY_CONTRACT_ADDRESS:-0xF1935b338321013f11068abCafC548A7B0db732C} 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 "-" From 2c071a484213a7922de41901beacccc88246a641 Mon Sep 17 00:00:00 2001 From: Gabriel Mermelstein Date: Tue, 31 Oct 2023 13:12:42 +0200 Subject: [PATCH 8/9] Fixing contract address and updating nwaku image --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d05bd94..9973ebe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ x-logging: &logging 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:-0xF1935b338321013f11068abCafC548A7B0db732C} + 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 "-" @@ -48,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 From 7869e2a3277bdce4725d98861eda7176eb36ba36 Mon Sep 17 00:00:00 2001 From: alrevuelta Date: Wed, 1 Nov 2023 16:14:01 +0100 Subject: [PATCH 9/9] Use cluster-id=1 for the waku network --- docker-compose.yml | 5 +++-- run_node.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9973ebe..aaa458f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -66,8 +66,9 @@ services: NODEKEY: ${NODEKEY} ETH_CLIENT_ADDRESS: *eth_client_address EXTRA_ARGS: ${EXTRA_ARGS} - <<: *pg_env - <<: *rln_env + <<: + - *pg_env + - *rln_env volumes: - ./run_node.sh:/opt/run_node.sh:Z - ./certs:/etc/letsencrypt/:Z diff --git a/run_node.sh b/run_node.sh index 397a0fd..e534dc8 100644 --- a/run_node.sh +++ b/run_node.sh @@ -63,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\