Skip to content

feat: check attestation stats per validator name pattern - #238

Open
barnabasbusa wants to merge 1 commit into
masterfrom
bbusa/attestation-stats-validator-pattern
Open

barnabasbusa wants to merge 1 commit into
masterfrom
bbusa/attestation-stats-validator-pattern

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

check_consensus_attestation_stats only had network-wide thresholds, so a client pair whose validators stopped voting hid under the overall percentage when the other pairs carried participation, which is exactly what client interop runs need to catch. This adds validatorNamePattern to restrict the duties and votes to matching validators (same idea as in check_consensus_block_proposals), so a run_task_matrix over validatorPairNames checks every pair against its own target and head thresholds, and makes the progress and failure messages say which threshold missed, e.g. epoch 14 failed: target votes 94.00% < 98%, instead of a bare "check failed". Verified on a local Lodestar/Prysm crossed devnet.

Examples

Check every client pair against its own thresholds:

- name: run_task_matrix
  configVars:
    matrixValues: "validatorPairNames"
  config:
    runConcurrent: true
    matrixVar: "validatorPairName"
    task:
      name: check_consensus_attestation_stats
      title: "Votes of ${validatorPairName}"
      configVars:
        validatorNamePattern: "validatorPairName"
      config:
        minTargetPercent: 95
        minHeadPercent: 90
        minCheckedEpochs: 3

Only the validators of one pair:

- name: check_consensus_attestation_stats
  config:
    validatorNamePattern: "^3-"
    minTargetPercent: 98
    failOnCheckMiss: true

Progress and failure messages now name the missed threshold:

before: Waiting for attestation stats... (attempt 4)
        attestation stats check failed for epoch 14
after:  Waiting for attestation stats, epoch 14 failed: target votes 94.00% < 98% (attempt 4)
        attestation stats check failed for epoch 14: target votes 94.00% < 98%
        attestation stats check failed for epoch 14: no active validators match

@barnabasbusa
barnabasbusa force-pushed the bbusa/attestation-stats-validator-pattern branch from 3f71c32 to db31609 Compare October 13, 2026 10:57
@barnabasbusa
barnabasbusa changed the base branch from master to bbusa/pin-staticcheck October 13, 2026 10:57
@barnabasbusa
barnabasbusa force-pushed the bbusa/attestation-stats-validator-pattern branch from db31609 to 71d2856 Compare October 13, 2026 11:14
@barnabasbusa
barnabasbusa changed the base branch from bbusa/pin-staticcheck to bbusa/go-1.26 October 13, 2026 11:14
@barnabasbusa
barnabasbusa force-pushed the bbusa/attestation-stats-validator-pattern branch from 71d2856 to 5db2912 Compare October 13, 2026 11:16

@redpandabot redpandabot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds a validatorNamePattern regex to check_consensus_attestation_stats that scopes both the active-balance denominator and the counted attestation votes to matching validators, plus human-readable per-threshold failure reasons. The filtering is applied carefully (duties keep all validators with a matches flag so Electra aggregation-bit offsets remain aligned), is backwards compatible when no pattern is set, and guards the previous 0/0 division. I found no real defects.


Reviewed 5 changed file(s) @ 5db2912f — no blocking issues found.
"Hope is not a strategy." — Google SRE

Base automatically changed from bbusa/go-1.26 to master October 13, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant