lighthouse/beacon_node
divma fc07cc3fdf Sync metrics (#1975)
## Issue Addressed
- Add metrics to keep track of peer counts by sync type
- Add metric to keep track of the number of syncing chains in range

## Proposed Changes
Plugin to the network metrics update interval and update too the counts for peers wrt to their sync status with us

## Additional Info
For the peer counts
- By the way it is implemented the numbers won't always match to the total peer count in the `libp2p` metric.
- Updating the gauge with every change is messy because it requires to be updated on connection (in the `eth2_libp2p` crate, while metrics are defined in the `network` crate) on Goodbye sent (for an `IrrelevantPeer`) either in the `beacon_processor` or the `peer_manager`, and on disconnection. Since this is not a critical metric I think counting once every second is enough. If you think more accuracy is needed we can do it too, but it would be harder to maintain)

ATM those look like this
![image](https://user-images.githubusercontent.com/26765164/100275387-22137b00-2f60-11eb-93b9-94b0f265240c.png)
2020-11-26 05:23:17 +00:00
..
beacon_chain Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
client Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
eth1 Expand eth1 block cache, add more logs (#1938) 2020-11-21 00:26:15 +00:00
eth2_libp2p Sync metrics (#1975) 2020-11-26 05:23:17 +00:00
genesis Return eth1-related data via the API (#1797) 2020-11-02 00:37:30 +00:00
http_api Bump to v1.0.0, run cargo update 2020-11-25 02:02:19 +11:00
http_metrics Add metrics to VC (#1954) 2020-11-26 01:10:51 +00:00
network Sync metrics (#1975) 2020-11-26 05:23:17 +00:00
operation_pool Update pool/attestations and committees endpoints (#1899) 2020-11-18 23:31:39 +00:00
src Change --testnet flag to --network (#1751) 2020-11-23 23:54:03 +00:00
store Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
tests Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
timer Upgrade discovery and restructure task execution (#1693) 2020-10-05 18:45:54 +11:00
websocket_server Update external deps (#1711) 2020-10-05 08:22:19 +00:00
Cargo.toml Bump to v1.0.0, run cargo update 2020-11-25 02:02:19 +11:00