Skip to content

Emit per-subnet attestation aggregate coverage #398

Description

@MegaRedHand

Context

lean_attestation_aggregate_coverage_validators is defined with a subnet label, but only the subnet=combined total is ever emitted. The per-subnet breakdown (subnet=subnet_N) is reserved in the metric definition and not yet populated.

See the TODO in crates/blockchain/src/coverage.rs in cov_record, where set_attestation_aggregate_coverage_validators(section, "combined", ...) is called.

What's needed

cov_record already computes has_subnet (a per-subnet occupancy bitmap derived from vid % committee_count), but only reports the aggregate count. To populate the per-subnet series, emit one set_attestation_aggregate_coverage_validators(section, "subnet_<i>", count_i) per subnet alongside the existing subnet=combined total.

Notes

  • Watch label cardinality: series = sections × (subnets + 1). Bounded by ATTESTATION_COMMITTEE_COUNT, so it stays small, but worth confirming.
  • Docs already flag this gap in docs/metrics.md (Attestation Aggregate Coverage section).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions