lighthouse/beacon_node
Mac L 8cb9b5e126 Expose certain validator_monitor metrics to the HTTP API (#3760)
## Issue Addressed

#3724 

## Proposed Changes

Exposes certain `validator_monitor` as an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored.

### Usage

```bash
curl -X GET "http://localhost:5052/lighthouse/ui/validator_metrics" -H "accept: application/json" | jq
```

```json
{
  "data": {
    "validators": {
      "12345": {
        "attestation_hits": 10,
        "attestation_misses": 0,
        "attestation_hit_percentage": 100,
        "attestation_head_hits": 10,
        "attestation_head_misses": 0,
        "attestation_head_hit_percentage": 100,
        "attestation_target_hits": 5,
        "attestation_target_misses": 5,
        "attestation_target_hit_percentage": 50 
      }
    }
  }
}
```

## Additional Info

Based on #3756 which should be merged first.
2022-12-09 06:39:19 +00:00
..
beacon_chain Expose certain validator_monitor metrics to the HTTP API (#3760) 2022-12-09 06:39:19 +00:00
builder_client Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
client Health Endpoints for UI (#3668) 2022-11-15 05:21:26 +00:00
eth1 Lower deposit finalization error to warning (#3739) 2022-11-21 06:29:03 +00:00
execution_layer Improve debugging experience for builder proposals (#3725) 2022-11-29 05:51:42 +00:00
genesis Super small improvement: Remove unnecessary mut (#3736) 2022-11-21 03:15:54 +00:00
http_api Expose certain validator_monitor metrics to the HTTP API (#3760) 2022-12-09 06:39:19 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Optimize finalized chain sync by skipping newPayload messages (#3738) 2022-11-29 08:19:27 +00:00
network Optimize finalized chain sync by skipping newPayload messages (#3738) 2022-11-29 08:19:27 +00:00
operation_pool Fix rust 1.65 lints (#3682) 2022-11-04 07:43:43 +00:00
src Ipv6 bootnodes (#3752) 2022-11-30 03:21:35 +00:00
store Delete DB schema migrations for v11 and earlier (#3761) 2022-12-02 00:07:43 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml v3.3.0 (#3741) 2022-11-23 23:38:32 +00:00