*: add metric with sync message cohorts#4587
Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds observability for sync committee sync-message “head disagreement” by grouping peers into cohorts (by head block root) and exposing cohort rank as a Prometheus metric, plus improved logging around inconsistent sync messages to aid triage.
Changes:
- Adds
core_tracker_parsig_cohort_rank_totalmetric to count per-peer cohort-rank occurrences for sync messages. - Introduces cohort computation and reporting logic for sync-message duties, with a dedicated warning log when multiple head roots are observed.
- Adds unit tests and a benchmark for cohort computation and cohort metric emission.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/metrics.md | Documents the new cohort-rank metric. |
| core/tracker/tracker.go | Implements cohort computation + sync-message specific reporting/logging. |
| core/tracker/tracker_internal_test.go | Adds tests/benchmark for cohort computation and reporting. |
| core/tracker/metrics.go | Registers the new Prometheus counter vec for cohort rank. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `core_tracker_inclusion_delay` | Gauge | Cluster`s average attestation inclusion delay in slots. Available only when attestation_inclusion feature flag is enabled. | | | ||
| | `core_tracker_inclusion_missed_total` | Counter | Total number of broadcast duties never included in any block by type | `duty` | | ||
| | `core_tracker_inconsistent_parsigs_total` | Counter | Total number of duties that contained inconsistent partial signed data by duty type | `duty` | | ||
| | `core_tracker_parsig_cohort_rank_total` | Counter | Total sync committee partial signatures per peer per cohort rank (0=largest cohort), for detecting head disagreement | `duty, peer_idx, rank` | |
| Namespace: "core", | ||
| Subsystem: "tracker", | ||
| Name: "parsig_cohort_rank_total", | ||
| Help: "Total sync committee partial signatures per peer per cohort rank (0=largest cohort), for detecting head disagreement", |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4587 +/- ##
==========================================
+ Coverage 57.34% 57.37% +0.02%
==========================================
Files 245 245
Lines 33554 33610 +56
==========================================
+ Hits 19243 19284 +41
- Misses 11875 11885 +10
- Partials 2436 2441 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Add a metric to showcase the different "cohorts" of sync message partial sigs. This will help us triage the nodes that usually drift from the majority. Note that this metric is assuming the majority are submitting the correct head, as it's checking each peer's submission against the majority.
Also improved the log for sync messages.
Those changes are visible in the mock "Grafana panel".
category: feature
ticket: none