Skip to content

Commit

Permalink
chore: add request next epoch proposal duties panel (#5815)
Browse files Browse the repository at this point in the history
* chore: add request next epoch proposal duties panel

* fix: track new proposal duties detected
  • Loading branch information
twoeths authored Jul 29, 2023
1 parent 0c440c1 commit 19b723c
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 36 deletions.
174 changes: 139 additions & 35 deletions dashboards/lodestar_block_production.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"__inputs": [
{
"description": "",
"label": "Prometheus",
"name": "DS_PROMETHEUS",
"type": "datasource",
"label": "Prometheus",
"description": "",
"pluginId": "prometheus",
"pluginName": "Prometheus",
"type": "datasource"
"pluginName": "Prometheus"
}
],
"annotations": {
Expand Down Expand Up @@ -181,30 +181,6 @@
}
}
]
},
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"errors"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
Expand Down Expand Up @@ -892,6 +868,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -934,10 +912,12 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.0.6",
Expand Down Expand Up @@ -989,6 +969,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -1031,10 +1013,12 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.0.6",
Expand Down Expand Up @@ -1092,6 +1076,8 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -1134,10 +1120,12 @@
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single"
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "8.0.6",
Expand Down Expand Up @@ -1194,7 +1182,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.0.6",
"pluginVersion": "9.3.2",
"targets": [
{
"exemplar": false,
Expand All @@ -1206,6 +1194,122 @@
],
"title": "Attached Proposers",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"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
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": []
},
"overrides": [
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"hit"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 40
},
"id": 537,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "rate(lodestar_duties_request_next_epoch_proposal_duties_hit_total[$rate_interval])",
"legendFormat": "hit",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "lodestar_duties_request_next_epoch_proposal_duties_miss_total",
"hide": false,
"legendFormat": "miss",
"range": true,
"refId": "B"
}
],
"title": "Request Next Epoch Proposal Duties",
"type": "timeseries"
}
],
"refresh": "10s",
Expand Down
5 changes: 5 additions & 0 deletions packages/validator/src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ export function getMetrics(register: MetricsRegister, gitData: LodestarGitData)
help: "Total count of instances the proposer duties dependant root changed",
}),

newProposalDutiesDetected: register.gauge({
name: "vc_new_proposal_duties_detected_total",
help: "Total count of times new proposal duties were detected",
}),

// IndicesService

indices: register.gauge({
Expand Down
2 changes: 1 addition & 1 deletion packages/validator/src/services/blockDuties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class BlockDutiesService {
if (additionalBlockProducers.length > 0) {
this.notifyBlockProductionFn(currentSlot, additionalBlockProducers);
this.logger.debug("Detected new block proposer", {currentSlot});
this.metrics?.proposerDutiesReorg.inc();
this.metrics?.newProposalDutiesDetected.inc();
}
}

Expand Down

0 comments on commit 19b723c

Please sign in to comment.