lighthouse/beacon_node/http_api/src
Mac L 104e3104f9 Add API to compute block packing efficiency data (#2879)
## Issue Addressed
N/A

## Proposed Changes
Add a HTTP API which can be used to compute the block packing data for all blocks over a discrete range of epochs.

## Usage
### Request
```
curl "http:localhost:5052/lighthouse/analysis/block_packing_efficiency?start_epoch=57730&end_epoch=57732"
```
### Response
```
[
  {
    "slot": "1847360",
    "block_hash": "0xa7dc230659802df2f99ea3798faede2e75942bb5735d56e6bfdc2df335dcd61f",
    "proposer_info": {
      "validator_index": 1686,
      "graffiti": ""
    },
    "available_attestations": 7096,
    "included_attestations": 6459,
    "prior_skip_slots": 0
  },
  ...
]
```
## Additional Info

This is notably different to the existing lcli code:
- Uses `BlockReplayer` #2863 and as such runs significantly faster than the previous method.
- Corrects the off-by-one #2878
- Removes the `offline` validators component. This was only a "best guess" and simply was used as a way to determine an estimate of the "true" packing efficiency and was generally not helpful in terms of direct comparisons between different packing methods. As such it has been removed from the API and any future estimates of "offline" validators would be better suited in a separate/more targeted API or as part of 'beacon watch': #2873 
- Includes `prior_skip_slots`.
2022-02-21 23:21:02 +00:00
..
attestation_performance.rs Add API to compute discrete validator attestation performance (#2874) 2022-01-27 22:58:31 +00:00
attester_duties.rs Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
block_id.rs Use the forwards iterator more often (#2376) 2021-05-31 04:18:20 +00:00
block_packing_efficiency.rs Add API to compute block packing efficiency data (#2879) 2022-02-21 23:21:02 +00:00
block_rewards.rs Implement API for block rewards (#2628) 2022-01-27 01:06:02 +00:00
database.rs Implement checkpoint sync (#2244) 2021-09-22 00:37:28 +00:00
lib.rs Add API to compute block packing efficiency data (#2879) 2022-02-21 23:21:02 +00:00
metrics.rs Metrics and DEBG log for late gossip blocks (#2533) 2021-08-23 00:59:14 +00:00
proposer_duties.rs Allow proposer duties request for the next epoch (#2963) 2022-02-18 05:32:00 +00:00
state_id.rs Fork schedule api (#2525) 2021-08-24 01:36:27 +00:00
sync_committees.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
validator_inclusion.rs Validator monitor support for sync committees (#2476) 2021-08-31 23:31:36 +00:00
version.rs Add API version headers and map_fork_name! (#2745) 2021-10-28 01:18:04 +00:00