-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
fix!: update validator liveness API to be spec compliant #5667
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
@nflaig could you look into why the API spec tests did not catch this? |
@dapplion yeah was wondering the same, haven't investigated it yet but will do. It might also be worth to see if we can validate pattern to ensure we are encoding correctly to prevent issues like the graffiti not being hex encoded. |
ef64e04
to
99f17e4
Compare
for (const response of previousEpochLiveness) { | ||
if (response.epoch !== previousEpoch) { | ||
// Server sending bad data | ||
throw Error(`Inconsistent livenessResponseData epoch ${response.epoch} != ${previousEpoch}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Epoch is no longer part of response, no need to check this
99f17e4
to
4a781e2
Compare
@dapplion this was not caught because our oapi spec tests check against v2.3.0 and not the latest spec (v2.4.1)
This seems to be validated already
|
🎉 This PR is included in v1.10.0 🎉 |
Motivation
Current implementation of validator liveness API is not spec compliant, see getLiveness.
The API was initially introduced in
and further updated here
Description
Update validator liveness API to conform with latest beacon API spec (liveness.yaml)
/eth/v1/validator/liveness/{epoch}
ApiError
instead of normalError
to improve error handling/loggingThis change is breaking as it introduces an incompatibility with older Lodestar versions but due to the fact that our implementation was never spec compliant I doubt it will cause any issues with other downstream tooling.