ChainSafe / ChainSafe/lodestar
Wrong validators connected metric
Open
scope-metrics
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 150
Description
**Describe the bug**
Once a validator is connected to a beacon node, beacon node always count that validator as "connected" forever event through the validator is turned off or switched to another beacon node

Metric name is `validator_monitor_validators`
For the context: https://discord.com/channels/593655374469660673/743858262864167062/1072481654158938173
**Expected behavior**
Should not count the validator if it's disconnected from the beacon node for a while
See https://github.com/ChainSafe/lodestar/blob/f4057cfc3f74e62cdf7452dd4215b482cffd756d/packages/beacon-node/src/metrics/validatorMonitor.ts#L195
Contributor guide
Assessment
This issue has not been assessed yet.