diff --git a/dappnode_package.json b/dappnode_package.json index 1b1a68f..eab670f 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "juno.dnp.dappnode.eth", - "version": "2.0.2", - "shortDescription": "StarkNet full node", + "version": "2.0.3", + "shortDescription": "StarkNet full node and validator", "description": "Nethermind Starknet Node Client Juno", "type": "service", "author": "DAppNode Association (https://github.com/dappnode)", @@ -18,8 +18,8 @@ "upstreamRepo": "NethermindEth/juno", "links": { "homepage": "https://github.com/dappnode/DAppNodePackage-juno-generic#readme", - "api": "http://juno.dappnode:6060/", - "websocket": "ws://juno.dappnode:6061/" + "api": "http://juno.juno.dappnode:6060/", + "websocket": "ws://juno.juno.dappnode:6061/" }, "repository": { "type": "git", diff --git a/docker-compose.yml b/docker-compose.yml index 05a6a4b..6fa18e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: context: juno args: UPSTREAM_VERSION: v0.15.12 - image: juno.dnp.dappnode.eth:2.0.2 + image: juno.dnp.dappnode.eth:2.0.3 security_opt: - seccomp:unconfined environment: @@ -16,5 +16,16 @@ services: volumes: - juno_data:/var/lib/juno restart: unless-stopped + staking: + image: nethermind/starknet-staking-v2:v0.2.9 + command: + ["--metrics", "--metrics-host", "0.0.0.0", "--metrics-port", "9090"] + environment: + PROVIDER_HTTP_URL: http://juno:6060/rpc/v0_8 + PROVIDER_WS_URL: ws://juno:6061/ws/v0_8 + SIGNER_OPERATIONAL_ADDRESS: "" + SIGNER_PRIVATE_KEY: "" + SIGNER_EXTERNAL_URL: "" + restart: unless-stopped volumes: juno_data: {} diff --git a/juno/entrypoint.sh b/juno/entrypoint.sh index c0bf87b..9e354ed 100755 --- a/juno/entrypoint.sh +++ b/juno/entrypoint.sh @@ -49,7 +49,7 @@ juno \ --http-port ${HTTP_PORT:-6060} \ --http-host 0.0.0.0 \ --db-path $JUNO_DIR \ - --metrics \ + --metrics \ --metrics-port 9090 \ --metrics-host 0.0.0.0 \ $ethnode $wsopts $EXTRA_OPTS diff --git a/package_variants/mainnet/dappnode_package.json b/package_variants/mainnet/dappnode_package.json index c79b152..2ffad40 100644 --- a/package_variants/mainnet/dappnode_package.json +++ b/package_variants/mainnet/dappnode_package.json @@ -1,11 +1,11 @@ { "name": "juno.dnp.dappnode.eth", - "version": "0.1.0", + "version": "2.0.3", "shortDescription": "StarkNet full node", "links": { "homepage": "https://github.com/dappnode/DAppNodePackage-juno-generic#readme", - "api": "http://juno.dappnode:6070/", - "websocket": "ws://juno.dappnode:6071/" + "api": "http://juno.juno.dappnode:6070/", + "websocket": "ws://juno.juno.dappnode:6071/" }, "exposable": [ { @@ -19,4 +19,4 @@ "port": 6061 } ] -} +} \ No newline at end of file diff --git a/package_variants/mainnet/docker-compose.yml b/package_variants/mainnet/docker-compose.yml index a9eb854..b72f043 100644 --- a/package_variants/mainnet/docker-compose.yml +++ b/package_variants/mainnet/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.8" services: juno: - image: juno.dnp.dappnode.eth:2.0.2 + image: juno.dnp.dappnode.eth:2.0.3 ports: - "6060:6060" - "6061:6061" @@ -10,3 +10,13 @@ services: NETWORK: sepolia HTTP_PORT: 6060 WS_PORT: 6061 + staking: + image: nethermind/starknet-staking-v2:v0.2.9 + command: + ["--metrics", "--metrics-host", "0.0.0.0", "--metrics-port", "9090"] + environment: + PROVIDER_HTTP_URL: http://juno:6060/rpc/v0_8 + PROVIDER_WS_URL: ws://juno:6061/ws/v0_8 + SIGNER_OPERATIONAL_ADDRESS: "" + SIGNER_PRIVATE_KEY: "" + SIGNER_EXTERNAL_URL: "" diff --git a/package_variants/mainnet/prometheus-targets.json b/package_variants/mainnet/prometheus-targets.json index 82f4e3a..99c4660 100644 --- a/package_variants/mainnet/prometheus-targets.json +++ b/package_variants/mainnet/prometheus-targets.json @@ -5,7 +5,16 @@ "service": "juno" }, "targets": [ - "juno.dappnode:9090" + "juno.juno.dappnode:9090" + ] + }, + { + "labels": { + "package": "juno.dnp.dappnode.eth", + "service": "staking" + }, + "targets": [ + "staking.juno.dappnode:9090" ] } -] +] \ No newline at end of file diff --git a/package_variants/sepolia/dappnode_package.json b/package_variants/sepolia/dappnode_package.json index 31b786d..63af915 100644 --- a/package_variants/sepolia/dappnode_package.json +++ b/package_variants/sepolia/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "juno-sepolia.dnp.dappnode.eth", - "version": "0.1.0", + "version": "2.0.3", "shortDescription": "StarkNet full node in Sepolia", "links": { "homepage": "https://github.com/dappnode/DAppNodePackage-juno-generic#readme", @@ -19,4 +19,4 @@ "port": 6071 } ] -} +} \ No newline at end of file diff --git a/package_variants/sepolia/docker-compose.yml b/package_variants/sepolia/docker-compose.yml index bcb3563..58b473e 100644 --- a/package_variants/sepolia/docker-compose.yml +++ b/package_variants/sepolia/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.8" services: juno: - image: juno.dnp.dappnode.eth:2.0.2 + image: juno.dnp.dappnode.eth:2.0.3 ports: - "6070:6070" - "6071:6071" @@ -10,3 +10,13 @@ services: NETWORK: sepolia HTTP_PORT: 6070 WS_PORT: 6071 + staking: + image: nethermind/starknet-staking-v2:v0.2.9 + command: + ["--metrics", "--metrics-host", "0.0.0.0", "--metrics-port", "9090"] + environment: + PROVIDER_HTTP_URL: http://juno-sepolia:6060/rpc/v0_8 + PROVIDER_WS_URL: ws://juno-sepolia:6061/ws/v0_8 + SIGNER_OPERATIONAL_ADDRESS: "" + SIGNER_PRIVATE_KEY: "" + SIGNER_EXTERNAL_URL: "" diff --git a/package_variants/sepolia/prometheus-targets.json b/package_variants/sepolia/prometheus-targets.json index 6bc8cb6..c9180fe 100644 --- a/package_variants/sepolia/prometheus-targets.json +++ b/package_variants/sepolia/prometheus-targets.json @@ -5,7 +5,16 @@ "service": "juno" }, "targets": [ - "juno-sepolia.dappnode:9090" + "juno.juno-sepolia.dappnode:9090" + ] + }, + { + "labels": { + "package": "juno-sepolia.dnp.dappnode.eth", + "service": "staking" + }, + "targets": [ + "staking.juno-sepolia.dappnode:9090" ] } -] +] \ No newline at end of file diff --git a/staking-grafana-dashboard.json b/staking-grafana-dashboard.json new file mode 100644 index 0000000..0c45028 --- /dev/null +++ b/staking-grafana-dashboard.json @@ -0,0 +1,1686 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 585, + "links": [], + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 300, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Displays OK vs LOW BALANCE status based on threshold. Shows whether the attestation signer has sufficient STRK balance to continue operations.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 1, + "text": "OK" + }, + "1": { + "color": "dark-red", + "index": 0, + "text": "LOW BALANCE" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "dark-red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 405, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_signer_below_threshold{network=~\"$network\"}", + "instant": true, + "legendFormat": "Balance Status", + "range": false, + "refId": "A" + } + ], + "title": "Signer Balance Status", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Current STRK token balance of the attestation signer account. Monitor this to ensure sufficient funds for transaction fees.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "STRK" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 18, + "x": 6, + "y": 1 + }, + "id": 404, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_signer_balance{network=~\"$network\"}", + "instant": true, + "legendFormat": "STRK balance", + "range": false, + "refId": "A" + } + ], + "title": "Signer Balance", + "type": "stat" + } + ], + "title": "Health", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 100, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Latest block number seen by the validator on the Starknet network.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 313, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_starknet_latest_block_number{network=~\"$network\"}", + "instant": true, + "legendFormat": "Latest Block", + "range": false, + "refId": "A" + } + ], + "title": "Starknet Latest Block", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Displays the first block number of the current epoch.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 8 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_current_epoch_starting_block_number{network=~\"$network\"}", + "instant": true, + "legendFormat": "Epoch Start Block", + "range": false, + "refId": "A" + } + ], + "title": "Epoch Start Block", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "The specific block number within the current epoch for which the validator is assigned to attest.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 8 + }, + "id": 314, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_current_epoch_assigned_block_number{network=~\"$network\"}", + "range": true, + "refId": "A" + } + ], + "title": "Assigned Attestation Block", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Shows the ID of the current epoch the validator is participating in.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(13, 115, 189, 0.89)", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 8 + }, + "id": 7, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_current_epoch_id{network=~\"$network\"}", + "instant": true, + "legendFormat": "Current Epoch ID", + "range": false, + "refId": "A" + } + ], + "title": "Current Epoch ID", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Visualizes the validator's progress through the current epoch.", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": 0 + }, + { + "color": "green", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 12 + }, + "id": 203, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(\n (\n validator_attestation_starknet_latest_block_number{network=~\"$network\"} \n - \n validator_attestation_current_epoch_starting_block_number{network=~\"$network\"}\n ) / validator_attestation_current_epoch_length{network=~\"$network\"}\n) * 100", + "instant": true, + "legendFormat": "Epoch Progress", + "range": false, + "refId": "A" + } + ], + "title": "Epoch Progress", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Progress towards next attestation duty. Shows how close the current block is to the assigned attestation block for this epoch.", + "fieldConfig": { + "defaults": { + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 312, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "clamp_max(\n (\n (validator_attestation_starknet_latest_block_number{network=~\"$network\"} - validator_attestation_current_epoch_starting_block_number{network=~\"$network\"})\n /\n (validator_attestation_current_epoch_assigned_block_number{network=~\"$network\"} - validator_attestation_current_epoch_starting_block_number{network=~\"$network\"})\n ) * 100,\n 100\n)", + "instant": true, + "legendFormat": "Progress to Attestation", + "range": false, + "refId": "A" + } + ], + "title": "Progress to Attestation", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Blocks remaining until the validator's assigned attestation duty for the current epoch.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 12 + }, + "id": 311, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_current_epoch_assigned_block_number{network=~\"$network\"} - validator_attestation_starknet_latest_block_number{network=~\"$network\"}", + "instant": true, + "legendFormat": "Blocks Until Attestation", + "range": false, + "refId": "A" + } + ], + "title": "Blocks Until Attestation", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Indicates the total length (in blocks) of the current epoch.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 12 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_current_epoch_length{network=~\"$network\"}", + "instant": true, + "legendFormat": "Epoch Length", + "range": false, + "refId": "A" + } + ], + "title": "Current Epoch Length", + "type": "stat" + } + ], + "title": "Current Epoch & Network Status", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 102, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "The Unix timestamp (in seconds) of the last successful attestation submission, converted to minutes ago.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 60 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "m" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 21 + }, + "id": 301, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(time() - validator_attestation_last_attestation_timestamp_seconds{network=~\"$network\"}) / 60", + "instant": true, + "legendFormat": "Minutes Ago", + "range": false, + "refId": "A" + } + ], + "title": "Last Successful Attestation", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "The total number of attestations submitted by the validator since startup.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 21 + }, + "id": 401, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(validator_attestation_attestation_submitted_count{network=~\"$network\"}[$__range])", + "instant": true, + "legendFormat": "Total Submitted", + "range": false, + "refId": "A" + } + ], + "title": "Attestations Submitted", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "The total number of attestations that have been confirmed on the network since validator startup.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 21 + }, + "id": 402, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(validator_attestation_attestation_confirmed_count{network=~\"$network\"}[$__range])", + "instant": true, + "legendFormat": "Total Confirmed", + "range": false, + "refId": "A" + } + ], + "title": "Attestations Confirmed", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "The percentage of submitted attestations that have been successfully confirmed.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 21 + }, + "id": 315, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "(\n increase(validator_attestation_attestation_confirmed_count{network=~\"$network\"}[$__range])\n /\n (\n increase(validator_attestation_attestation_confirmed_count{network=~\"$network\"}[$__range])\n +\n (\n increase(validator_attestation_attestation_failure_count{network=~\"$network\"}[$__range])\n or\n (increase(validator_attestation_attestation_confirmed_count{network=~\"$network\"}[$__range]) * 0)\n )\n )\n) * 100", + "instant": true, + "legendFormat": "Success Rate", + "range": false, + "refId": "A" + } + ], + "title": "Attestation Success Rate", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "The total number of attestation transaction submission failures encountered by the validator since startup.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "red", + "value": 5 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 25 + }, + "id": 403, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(validator_attestation_attestation_failure_count{network=~\"$network\"}[$__range])", + "instant": true, + "legendFormat": "Total Failures", + "range": false, + "refId": "A" + } + ], + "title": "Attestation Failures", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Trend of total attestations confirmed over time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 2, + "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": 0 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 25 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_attestation_confirmed_count{network=~\"$network\"}", + "instant": false, + "legendFormat": "Confirmed", + "range": true, + "refId": "A" + } + ], + "title": "Attestations Confirmed (Total Trend)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Trend of total attestations submitted over time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 2, + "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": 0 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 25 + }, + "id": 1, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_attestation_submitted_count{network=~\"$network\"}", + "instant": false, + "legendFormat": "Submitted", + "range": true, + "refId": "A" + } + ], + "title": "Attestations Submitted (Total Trend)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Time since the last successful attestation was submitted by any validator instance.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "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": 0 + }, + { + "color": "yellow", + "value": 300 + }, + { + "color": "red", + "value": 600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "time() - validator_attestation_last_attestation_timestamp_seconds{network=~\"$network\"}", + "instant": false, + "legendFormat": "Time Since Last Attestation", + "range": true, + "refId": "A" + } + ], + "title": "Time Since Last Attestation Trend", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Trend of total attestation submission failures over time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": 0 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "validator_attestation_attestation_failure_count{network=~\"$network\"}", + "instant": false, + "legendFormat": "Failures", + "range": true, + "refId": "A" + } + ], + "title": "Attestation Failures (Total Trend)", + "type": "timeseries" + } + ], + "title": "Attestation Performance Overview", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 103, + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "${datasourceLog}" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 10, + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${datasourceLog}" + }, + "direction": "backward", + "editorMode": "code", + "expr": "{job=~\".*validator.*\"}", + "queryType": "range", + "refId": "A" + } + ], + "title": "All", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "${datasourceLog}" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 45 + }, + "id": 104, + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "12.1.0-90058", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${datasourceLog}" + }, + "direction": "backward", + "editorMode": "code", + "expr": "{job=~\".*validator.*\"} |~ \"ERR|panic|error|fail\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "Errors", + "type": "logs" + } + ], + "title": "Logs", + "type": "row" + } + ], + "preload": false, + "refresh": "30s", + "schemaVersion": 41, + "tags": [ + "starknet", + "validator", + "sepolia" + ], + "templating": { + "list": [ + { + "current": { + "text": "Default Prometheus Datasource", + "value": "default-prometheus-datasource" + }, + "label": "datasource", + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "type": "datasource" + }, + { + "current": { + "text": "", + "value": "" + }, + "label": "datasourceLog", + "name": "datasourceLog", + "options": [], + "query": "loki", + "refresh": 1, + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "text": [ + "SN_SEPOLIA" + ], + "value": [ + "SN_SEPOLIA" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(validator_attestation_starknet_latest_block_number, network)", + "description": "Starknet network (e.g., SN_SEPOLIA, SN_MAINNET)", + "includeAll": true, + "label": "Network", + "multi": true, + "name": "network", + "options": [], + "query": { + "query": "label_values(validator_attestation_starknet_latest_block_number, network)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Starknet Validator Dashboard", + "uid": "starknet-validator", + "version": 2 +} \ No newline at end of file