Skip to content

Commit 19b723c

Browse files
authored
chore: add request next epoch proposal duties panel (#5815)
* chore: add request next epoch proposal duties panel * fix: track new proposal duties detected
1 parent 0c440c1 commit 19b723c

File tree

3 files changed

+145
-36
lines changed

3 files changed

+145
-36
lines changed

dashboards/lodestar_block_production.json

+139-35
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"__inputs": [
33
{
4-
"description": "",
5-
"label": "Prometheus",
64
"name": "DS_PROMETHEUS",
5+
"type": "datasource",
6+
"label": "Prometheus",
7+
"description": "",
78
"pluginId": "prometheus",
8-
"pluginName": "Prometheus",
9-
"type": "datasource"
9+
"pluginName": "Prometheus"
1010
}
1111
],
1212
"annotations": {
@@ -181,30 +181,6 @@
181181
}
182182
}
183183
]
184-
},
185-
{
186-
"__systemRef": "hideSeriesFrom",
187-
"matcher": {
188-
"id": "byNames",
189-
"options": {
190-
"mode": "exclude",
191-
"names": [
192-
"errors"
193-
],
194-
"prefix": "All except:",
195-
"readOnly": true
196-
}
197-
},
198-
"properties": [
199-
{
200-
"id": "custom.hideFrom",
201-
"value": {
202-
"legend": false,
203-
"tooltip": false,
204-
"viz": true
205-
}
206-
}
207-
]
208184
}
209185
]
210186
},
@@ -892,6 +868,8 @@
892868
"mode": "palette-classic"
893869
},
894870
"custom": {
871+
"axisCenteredZero": false,
872+
"axisColorMode": "text",
895873
"axisLabel": "",
896874
"axisPlacement": "auto",
897875
"barAlignment": 0,
@@ -934,10 +912,12 @@
934912
"legend": {
935913
"calcs": [],
936914
"displayMode": "list",
937-
"placement": "bottom"
915+
"placement": "bottom",
916+
"showLegend": true
938917
},
939918
"tooltip": {
940-
"mode": "single"
919+
"mode": "single",
920+
"sort": "none"
941921
}
942922
},
943923
"pluginVersion": "8.0.6",
@@ -989,6 +969,8 @@
989969
"mode": "palette-classic"
990970
},
991971
"custom": {
972+
"axisCenteredZero": false,
973+
"axisColorMode": "text",
992974
"axisLabel": "",
993975
"axisPlacement": "auto",
994976
"barAlignment": 0,
@@ -1031,10 +1013,12 @@
10311013
"legend": {
10321014
"calcs": [],
10331015
"displayMode": "list",
1034-
"placement": "bottom"
1016+
"placement": "bottom",
1017+
"showLegend": true
10351018
},
10361019
"tooltip": {
1037-
"mode": "single"
1020+
"mode": "single",
1021+
"sort": "none"
10381022
}
10391023
},
10401024
"pluginVersion": "8.0.6",
@@ -1092,6 +1076,8 @@
10921076
"mode": "palette-classic"
10931077
},
10941078
"custom": {
1079+
"axisCenteredZero": false,
1080+
"axisColorMode": "text",
10951081
"axisLabel": "",
10961082
"axisPlacement": "auto",
10971083
"barAlignment": 0,
@@ -1134,10 +1120,12 @@
11341120
"legend": {
11351121
"calcs": [],
11361122
"displayMode": "list",
1137-
"placement": "bottom"
1123+
"placement": "bottom",
1124+
"showLegend": true
11381125
},
11391126
"tooltip": {
1140-
"mode": "single"
1127+
"mode": "single",
1128+
"sort": "none"
11411129
}
11421130
},
11431131
"pluginVersion": "8.0.6",
@@ -1194,7 +1182,7 @@
11941182
"text": {},
11951183
"textMode": "auto"
11961184
},
1197-
"pluginVersion": "8.0.6",
1185+
"pluginVersion": "9.3.2",
11981186
"targets": [
11991187
{
12001188
"exemplar": false,
@@ -1206,6 +1194,122 @@
12061194
],
12071195
"title": "Attached Proposers",
12081196
"type": "stat"
1197+
},
1198+
{
1199+
"datasource": {
1200+
"type": "prometheus",
1201+
"uid": "${DS_PROMETHEUS}"
1202+
},
1203+
"fieldConfig": {
1204+
"defaults": {
1205+
"color": {
1206+
"mode": "palette-classic"
1207+
},
1208+
"custom": {
1209+
"axisCenteredZero": false,
1210+
"axisColorMode": "text",
1211+
"axisLabel": "",
1212+
"axisPlacement": "auto",
1213+
"barAlignment": 0,
1214+
"drawStyle": "line",
1215+
"fillOpacity": 0,
1216+
"gradientMode": "none",
1217+
"hideFrom": {
1218+
"legend": false,
1219+
"tooltip": false,
1220+
"viz": false
1221+
},
1222+
"lineInterpolation": "linear",
1223+
"lineWidth": 1,
1224+
"pointSize": 5,
1225+
"scaleDistribution": {
1226+
"type": "linear"
1227+
},
1228+
"showPoints": "auto",
1229+
"spanNulls": false,
1230+
"stacking": {
1231+
"group": "A",
1232+
"mode": "none"
1233+
},
1234+
"thresholdsStyle": {
1235+
"mode": "off"
1236+
}
1237+
},
1238+
"mappings": []
1239+
},
1240+
"overrides": [
1241+
{
1242+
"__systemRef": "hideSeriesFrom",
1243+
"matcher": {
1244+
"id": "byNames",
1245+
"options": {
1246+
"mode": "exclude",
1247+
"names": [
1248+
"hit"
1249+
],
1250+
"prefix": "All except:",
1251+
"readOnly": true
1252+
}
1253+
},
1254+
"properties": [
1255+
{
1256+
"id": "custom.hideFrom",
1257+
"value": {
1258+
"legend": false,
1259+
"tooltip": false,
1260+
"viz": true
1261+
}
1262+
}
1263+
]
1264+
}
1265+
]
1266+
},
1267+
"gridPos": {
1268+
"h": 8,
1269+
"w": 12,
1270+
"x": 12,
1271+
"y": 40
1272+
},
1273+
"id": 537,
1274+
"options": {
1275+
"legend": {
1276+
"calcs": [],
1277+
"displayMode": "list",
1278+
"placement": "bottom",
1279+
"showLegend": true
1280+
},
1281+
"tooltip": {
1282+
"mode": "multi",
1283+
"sort": "none"
1284+
}
1285+
},
1286+
"targets": [
1287+
{
1288+
"datasource": {
1289+
"type": "prometheus",
1290+
"uid": "${DS_PROMETHEUS}"
1291+
},
1292+
"editorMode": "code",
1293+
"expr": "rate(lodestar_duties_request_next_epoch_proposal_duties_hit_total[$rate_interval])",
1294+
"legendFormat": "hit",
1295+
"range": true,
1296+
"refId": "A"
1297+
},
1298+
{
1299+
"datasource": {
1300+
"type": "prometheus",
1301+
"uid": "${DS_PROMETHEUS}"
1302+
},
1303+
"editorMode": "code",
1304+
"expr": "lodestar_duties_request_next_epoch_proposal_duties_miss_total",
1305+
"hide": false,
1306+
"legendFormat": "miss",
1307+
"range": true,
1308+
"refId": "B"
1309+
}
1310+
],
1311+
"title": "Request Next Epoch Proposal Duties",
1312+
"type": "timeseries"
12091313
}
12101314
],
12111315
"refresh": "10s",

packages/validator/src/metrics.ts

+5
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ export function getMetrics(register: MetricsRegister, gitData: LodestarGitData)
236236
help: "Total count of instances the proposer duties dependant root changed",
237237
}),
238238

239+
newProposalDutiesDetected: register.gauge({
240+
name: "vc_new_proposal_duties_detected_total",
241+
help: "Total count of times new proposal duties were detected",
242+
}),
243+
239244
// IndicesService
240245

241246
indices: register.gauge({

packages/validator/src/services/blockDuties.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class BlockDutiesService {
158158
if (additionalBlockProducers.length > 0) {
159159
this.notifyBlockProductionFn(currentSlot, additionalBlockProducers);
160160
this.logger.debug("Detected new block proposer", {currentSlot});
161-
this.metrics?.proposerDutiesReorg.inc();
161+
this.metrics?.newProposalDutiesDetected.inc();
162162
}
163163
}
164164

0 commit comments

Comments
 (0)