-
Notifications
You must be signed in to change notification settings - Fork 811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Attestion Inclusion Distance in the HTTP API #4097
Comments
Maybe I could try this one? @AgeManning |
Yep sure if you want to take it on. I'm not sure how much you know about lighthouse and the HTTP API. We are using warp, which makes the types kind of tricky. I think the idea of this issue is to add an average attestation inclusion distance as an extension (or extra field) to this: #3760 You could look at that PR to figure out how to extend it. I've not yet looked into whether we store the inclusion distance in the metrics, but we could add it. Let me know if you have any questions. I think @macladson will also be able to help out and have thoughts on how this could be implemented. |
VALIDATOR_MONITOR_PREV_EPOCH_ON_CHAIN_INCLUSION_DISTANCE seems to be the metric we want to expose, but actually it's the min attestation inclusion distance. We should try to write some code to calculate the average distance, this method maybe a good place. WDYT? @AgeManning |
I think min inclusion distance is the right choice, the min is per validator so it just accounts for the same attestation being included in multiple blocks. E.g. if my attestation is included after 1 slot and then again after 3 slots in a different block the min distance will be 1 |
Yep. If we can report the min for the last epoch in the API returned value, the UI (which will consume this endpoint) can calculate averages and stuff for us for periods greater than 1 epoch. Just going to cc @rickimoore in on this too. |
Maybe Because the
@AgeManning WDYT? |
Using the metrics is preferable to using the analysis endpoint because they're basically "free" to compute, and will work for modern forks (nobody uses |
If use metrics, maybe we could just use min_inclusion_distance of the latest epoch. Because for other metrics like @michaelsproul WDYT? |
Yeah I think that would be OK, just the min delay per validator for the most recent epoch, added to |
## Issue Addressed #4097 ## Proposed Changes Add attestation inclusion distance in http api, extend `/lighthouse/ui/validator_metrics` to include it. ## Usage ``` curl -X POST "http://localhost:8001/lighthouse/ui/validator_metrics" -d '{"indices": [1]}' -H "Content-Type: application/json" | jq ``` ``` { "data": { "validators": { "1": { "attestation_hits": 3, "attestation_misses": 1, "attestation_hit_percentage": 75, "attestation_head_hits": 3, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 3, "attestation_target_misses": 0, "attestation_target_hit_percentage": 100, "attestation_inclusion_distance": 1 } } } } ``` ## Additional Info NA
Resolved in #4148 |
## Issue Addressed sigp#4097 ## Proposed Changes Add attestation inclusion distance in http api, extend `/lighthouse/ui/validator_metrics` to include it. ## Usage ``` curl -X POST "http://localhost:8001/lighthouse/ui/validator_metrics" -d '{"indices": [1]}' -H "Content-Type: application/json" | jq ``` ``` { "data": { "validators": { "1": { "attestation_hits": 3, "attestation_misses": 1, "attestation_hit_percentage": 75, "attestation_head_hits": 3, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 3, "attestation_target_misses": 0, "attestation_target_hit_percentage": 100, "attestation_inclusion_distance": 1 } } } } ``` ## Additional Info NA
## Issue Addressed sigp#4097 ## Proposed Changes Add attestation inclusion distance in http api, extend `/lighthouse/ui/validator_metrics` to include it. ## Usage ``` curl -X POST "http://localhost:8001/lighthouse/ui/validator_metrics" -d '{"indices": [1]}' -H "Content-Type: application/json" | jq ``` ``` { "data": { "validators": { "1": { "attestation_hits": 3, "attestation_misses": 1, "attestation_hit_percentage": 75, "attestation_head_hits": 3, "attestation_head_misses": 0, "attestation_head_hit_percentage": 100, "attestation_target_hits": 3, "attestation_target_misses": 0, "attestation_target_hit_percentage": 100, "attestation_inclusion_distance": 1 } } } } ``` ## Additional Info NA
It probably would be nice to add the attestation inclusion distance for monitored validators to display in the GUI.
This is a tracking issue for this
The text was updated successfully, but these errors were encountered: