e05142b798
## Issue Addressed N/A ## Proposed Changes Add a HTTP API which can be used to compute the attestation performances of a validator (or all validators) over a discrete range of epochs. Performances can be computed for a single validator, or for the global validator set. ## Usage ### Request The API can be used as follows: ``` curl "http://localhost:5052/lighthouse/analysis/attestation_performance/{validator_index}?start_epoch=57730&end_epoch=57732" ``` Alternatively, to compute performances for the global validator set: ``` curl "http://localhost:5052/lighthouse/analysis/attestation_performance/global?start_epoch=57730&end_epoch=57732" ``` ### Response The response is JSON formatted as follows: ``` [ { "index": 72, "epochs": { "57730": { "active": true, "head": false, "target": false, "source": false }, "57731": { "active": true, "head": true, "target": true, "source": true, "delay": 1 }, "57732": { "active": true, "head": true, "target": true, "source": true, "delay": 1 }, } } ] ``` > Note that the `"epochs"` are not guaranteed to be in ascending order. ## Additional Info - This API is intended to be used in our upcoming validator analysis tooling (#2873) and will likely not be very useful for regular users. Some advanced users or block explorers may find this API useful however. - The request range is limited to 100 epochs (since the range is inclusive and it also computes the `end_epoch` it's actually 101 epochs) to prevent Lighthouse using exceptionally large amounts of memory. |
||
---|---|---|
.. | ||
account_utils | ||
clap_utils | ||
compare_fields | ||
compare_fields_derive | ||
deposit_contract | ||
directory | ||
eth2 | ||
eth2_config | ||
eth2_interop_keypairs | ||
eth2_network_config | ||
eth2_wallet_manager | ||
fallback | ||
filesystem | ||
hashset_delay | ||
lighthouse_metrics | ||
lighthouse_version | ||
lockfile | ||
logging | ||
lru_cache | ||
malloc_utils | ||
monitoring_api | ||
sensitive_url | ||
slot_clock | ||
target_check | ||
task_executor | ||
test_random_derive | ||
validator_dir | ||
warp_utils | ||
README.md |
eth2
Common crates containing eth2-specific logic.