diff --git a/server/docker/metrics/dashboards/block-node-server.json b/server/docker/metrics/dashboards/block-node-server.json index d9f72774..0fc4ad67 100644 --- a/server/docker/metrics/dashboards/block-node-server.json +++ b/server/docker/metrics/dashboards/block-node-server.json @@ -18,7 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 1, + "id": 4, "links": [], "panels": [ { @@ -58,8 +58,8 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 8, + "h": 6, + "w": 6, "x": 0, "y": 1 }, @@ -160,9 +160,9 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 16, - "x": 8, + "h": 6, + "w": 18, + "x": 6, "y": 1 }, "id": 36, @@ -228,10 +228,10 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 8, + "h": 6, + "w": 6, "x": 0, - "y": 8 + "y": 7 }, "id": 37, "options": { @@ -343,10 +343,10 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 16, - "x": 8, - "y": 8 + "h": 6, + "w": 18, + "x": 6, + "y": 7 }, "id": 35, "options": { @@ -424,10 +424,10 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 8, + "h": 6, + "w": 6, "x": 0, - "y": 15 + "y": 13 }, "id": 39, "options": { @@ -543,10 +543,10 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 16, - "x": 8, - "y": 15 + "h": 6, + "w": 18, + "x": 6, + "y": 13 }, "id": 40, "options": { @@ -608,6 +608,10 @@ { "color": "green", "value": null + }, + { + "color": "dark-red", + "value": 1 } ] } @@ -615,10 +619,10 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 8, + "h": 6, + "w": 6, "x": 0, - "y": 22 + "y": 19 }, "id": 42, "options": { @@ -652,7 +656,7 @@ "useBackend": false } ], - "title": "Total Blocks Verified", + "title": "Total Failed Verifications", "type": "stat" }, { @@ -706,13 +710,9 @@ "color": "green", "value": null }, - { - "color": "#EAB839", - "value": 100000000 - }, { "color": "red", - "value": 500000000 + "value": 1 } ] }, @@ -721,10 +721,10 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 16, - "x": 8, - "y": 22 + "h": 6, + "w": 18, + "x": 6, + "y": 19 }, "id": 41, "options": { @@ -757,350 +757,349 @@ "type": "timeseries" }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 29 + "y": 25 }, "id": 16, - "panels": [ + "panels": [], + "title": "Errors", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 26 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.4.0", + "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 25 + "editorMode": "code", + "expr": "hedera_block_node_live_block_stream_mediator_error_total", + "instant": false, + "legendFormat": "Block Item Errors", + "range": true, + "refId": "A" + } + ], + "title": "Mediator Errors", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "id": 15, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "editorMode": "code", - "expr": "hedera_block_node_live_block_stream_mediator_error_total", - "instant": false, - "legendFormat": "Block Item Errors", - "range": true, - "refId": "A" - } - ], - "title": "Mediator Errors", - "type": "stat" + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 18, + "x": 6, + "y": 26 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": 1 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 18, - "x": 6, - "y": 25 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "editorMode": "code", + "expr": "rate( hedera_block_node_live_block_stream_mediator_error_total [$__rate_interval])", + "instant": false, + "legendFormat": "Mediator Errors", + "range": true, + "refId": "A" + } + ], + "title": "Rate of Mediator Errors", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "editorMode": "code", - "expr": "rate( hedera_block_node_live_block_stream_mediator_error_total [$__rate_interval])", - "instant": false, - "legendFormat": "Mediator Errors", - "range": true, - "refId": "A" - } + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 32 + }, + "id": 28, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "title": "Rate of Mediator Errors", - "type": "timeseries" + "fields": "", + "values": false }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.4.0", + "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 31 + "editorMode": "code", + "expr": "hedera_block_node_stream_persistence_handler_error_total", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Stream Persistence Errors", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "id": 28, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "hedera_block_node_stream_persistence_handler_error_total", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - ], - "title": "Stream Persistence Errors", - "type": "stat" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 18, + "x": 6, + "y": 32 + }, + "id": 29, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 18, - "x": 6, - "y": 31 - }, - "id": 29, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "rate(hedera_block_node_stream_persistence_handler_error_total [$__rate_interval])", - "instant": false, - "legendFormat": "Stream Persistence Errors", - "range": true, - "refId": "A" - } - ], - "title": "Rate of Stream Persistence Errors", - "type": "timeseries" + "editorMode": "code", + "expr": "rate(hedera_block_node_stream_persistence_handler_error_total [$__rate_interval])", + "instant": false, + "legendFormat": "Stream Persistence Errors", + "range": true, + "refId": "A" } ], - "title": "Errors", - "type": "row" + "title": "Rate of Stream Persistence Errors", + "type": "timeseries" }, { "collapsed": true, @@ -1108,7 +1107,7 @@ "h": 1, "w": 24, "x": 0, - "y": 30 + "y": 39 }, "id": 9, "panels": [ @@ -1650,7 +1649,7 @@ "h": 7, "w": 6, "x": 0, - "y": 38 + "y": 51 }, "id": 30, "options": { @@ -1749,7 +1748,7 @@ "h": 7, "w": 18, "x": 6, - "y": 38 + "y": 51 }, "id": 32, "options": { @@ -1825,7 +1824,7 @@ "h": 7, "w": 6, "x": 0, - "y": 51 + "y": 64 }, "id": 31, "options": { @@ -1924,7 +1923,7 @@ "h": 7, "w": 18, "x": 6, - "y": 51 + "y": 64 }, "id": 33, "options": { @@ -1993,7 +1992,7 @@ "h": 7, "w": 6, "x": 0, - "y": 58 + "y": 71 }, "id": 25, "options": { @@ -2066,7 +2065,7 @@ "h": 7, "w": 6, "x": 6, - "y": 58 + "y": 71 }, "id": 4, "options": { @@ -2112,7 +2111,7 @@ "h": 1, "w": 24, "x": 0, - "y": 31 + "y": 40 }, "id": 18, "panels": [ @@ -2143,7 +2142,7 @@ "h": 6, "w": 6, "x": 0, - "y": 40 + "y": 53 }, "id": 6, "options": { @@ -2249,7 +2248,7 @@ "h": 6, "w": 18, "x": 6, - "y": 40 + "y": 53 }, "id": 8, "options": { @@ -2292,7 +2291,7 @@ "h": 1, "w": 24, "x": 0, - "y": 32 + "y": 41 }, "id": 23, "panels": [ @@ -2625,7 +2624,7 @@ "h": 1, "w": 24, "x": 0, - "y": 33 + "y": 42 }, "id": 17, "panels": [ @@ -2981,6 +2980,6 @@ "timezone": "browser", "title": "Block-Node Server Dashboard", "uid": "edu86nutnxts0c", - "version": 2, + "version": 3, "weekStart": "" } diff --git a/server/src/main/java/com/hedera/block/server/verification/VerificationConfig.java b/server/src/main/java/com/hedera/block/server/verification/VerificationConfig.java index 12cc13d3..521e99f5 100644 --- a/server/src/main/java/com/hedera/block/server/verification/VerificationConfig.java +++ b/server/src/main/java/com/hedera/block/server/verification/VerificationConfig.java @@ -24,4 +24,20 @@ public record VerificationConfig( @ConfigProperty(defaultValue = "true") boolean enabled, @ConfigProperty(defaultValue = "ASYNC") BlockVerificationSessionType sessionType, - @ConfigProperty(defaultValue = "32") int hashCombineBatchSize) {} + @ConfigProperty(defaultValue = "32") int hashCombineBatchSize) { + + private static final System.Logger LOGGER = System.getLogger(VerificationConfig.class.getName()); + + public VerificationConfig { + // hashCombineBatchSize must be even and greater than 2 + if (hashCombineBatchSize % 2 != 0 || hashCombineBatchSize < 2) { + throw new IllegalArgumentException("hashCombineBatchSize must be even and greater than 2"); + } + + // Log the actual configuration + LOGGER.log(System.Logger.Level.INFO, "Verification configuration enabled: " + enabled); + LOGGER.log(System.Logger.Level.INFO, "Verification configuration sessionType: " + sessionType); + LOGGER.log( + System.Logger.Level.INFO, "Verification configuration hashCombineBatchSize: " + hashCombineBatchSize); + } +}