*: 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.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4587 +/- ##
==========================================
+ Coverage 57.40% 57.49% +0.08%
==========================================
Files 245 245
Lines 33560 33653 +93
==========================================
+ Hits 19265 19348 +83
- Misses 11856 11859 +3
- Partials 2439 2446 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
33bed1e to
bece19c
Compare
|



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