ChainSafe / ChainSafe/lodestar
Client monitoring peer count is broken
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 156
Description
**Describe the bug**
Client monitoring peer count is broken as it relied on libp2p metrics which are no longer accessible.
https://github.com/ChainSafe/lodestar/blob/8023e3f7f50642ee4955561341f53417e396aded/packages/beacon-node/src/monitoring/clientStats.ts#L128
The metric was broken when we move libp2p to worker thread
- https://github.com/ChainSafe/lodestar/pull/5229
as the registry passed to monitoring service no longer has access to those metrics
https://github.com/ChainSafe/lodestar/blob/8023e3f7f50642ee4955561341f53417e396aded/packages/beacon-node/src/node/nodejs.ts#L194
**Expected behavior**
Should correctly report peer count on beaconchai.in monitoring app.
**Steps to Reproduce**
Enable client monitoring via `--monitoring.endpoint` pointed to beaconcha.in and look into mobile app (network tab).
**Screenshots**
Upgrading v1.8.0 to v1.9.0-rc.0

Contributor guide
Research direction
Start in packages/beacon-node/src/monitoring/clientStats.ts around the peer-count metric, then inspect packages/beacon-node/src/node/nodejs.ts where the monitoring registry is passed. Reproduce with --monitoring.endpoint pointed at beaconcha.in and check the network tab. Done means the beaconcha.in monitoring app correctly reports the client peer count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100