From 7772e481fc5930270c129c1042512710b985a47b Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Wed, 23 Oct 2024 11:59:39 +0100 Subject: [PATCH 1/3] Add metric to track default validator configuration --- packages/validator/src/metrics.ts | 10 ++++++++++ packages/validator/src/validator.ts | 2 ++ 2 files changed, 12 insertions(+) diff --git a/packages/validator/src/metrics.ts b/packages/validator/src/metrics.ts index ca693056fc54..1f49c038a50d 100644 --- a/packages/validator/src/metrics.ts +++ b/packages/validator/src/metrics.ts @@ -1,3 +1,4 @@ +import {routes} from "@lodestar/api"; import {MetricsRegisterExtra} from "@lodestar/utils"; export enum MessageSource { @@ -38,6 +39,15 @@ export function getMetrics(register: MetricsRegisterExtra, gitData: LodestarGitD .set(gitData, 1); return { + defaultConfiguration: register.gauge<{ + builderSelection: routes.validator.BuilderSelection; + broadcastValidation: routes.beacon.BroadcastValidation; + }>({ + name: "vc_default_configuration", + help: "Default validator configuration", + labelNames: ["builderSelection", "broadcastValidation"], + }), + // Attestation journey: // - Wait for block or 1/3, call prepare attestation // - Get attestation, sign, call publish diff --git a/packages/validator/src/validator.ts b/packages/validator/src/validator.ts index 1d370c35cc33..09a3a80062da 100644 --- a/packages/validator/src/validator.ts +++ b/packages/validator/src/validator.ts @@ -329,6 +329,8 @@ export class Validator { strictFeeRecipientCheck, }); + metrics?.defaultConfiguration.set({builderSelection: defaultBuilderSelection, broadcastValidation}, 1); + // Instantiates block and attestation services and runs them once the chain has been started. return Validator.init(opts, genesis, metrics); } From a6355b7a25d213dca45eb2ca9e62a6c6de85e412 Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Wed, 23 Oct 2024 14:58:34 +0100 Subject: [PATCH 2/3] Update validator client dashboard --- dashboards/lodestar_validator_client.json | 91 ++++++++++++++++++++++- 1 file changed, 88 insertions(+), 3 deletions(-) diff --git a/dashboards/lodestar_validator_client.json b/dashboards/lodestar_validator_client.json index 5e4459d1d1b9..0f2abbf5039e 100644 --- a/dashboards/lodestar_validator_client.json +++ b/dashboards/lodestar_validator_client.json @@ -497,7 +497,7 @@ }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 12, "y": 2 }, @@ -552,8 +552,8 @@ }, "gridPos": { "h": 3, - "w": 6, - "x": 18, + "w": 3, + "x": 15, "y": 2 }, "id": 37, @@ -590,6 +590,91 @@ "title": "Heap used", "type": "stat" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 2 + }, + "id": 48, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "vc_default_configuration", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "client_name": true, + "group": true, + "host_type": true, + "instance": true, + "job": true, + "network": true, + "scrape_location": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "broadcastValidation": "Broadcast validation", + "builderSelection": "Builder selection strategy" + } + } + } + ], + "type": "table" + }, { "datasource": { "type": "prometheus", From 96afa15477ae0bb0c95e13105cede0795027a58c Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Wed, 23 Oct 2024 15:31:52 +0100 Subject: [PATCH 3/3] Rename column --- dashboards/lodestar_validator_client.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboards/lodestar_validator_client.json b/dashboards/lodestar_validator_client.json index 0f2abbf5039e..f954f0a04ccd 100644 --- a/dashboards/lodestar_validator_client.json +++ b/dashboards/lodestar_validator_client.json @@ -668,7 +668,7 @@ "indexByName": {}, "renameByName": { "broadcastValidation": "Broadcast validation", - "builderSelection": "Builder selection strategy" + "builderSelection": "Builder selection" } } }