Skip to content
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

Filter Errored Keys from Returned Slashing Protection History in Standard API #9968

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

rauljordan
Copy link
Contributor

As part of the validator keymanager API, in the DeleteKeystores endpoint: when we attempt to delete some keystores, say a, b, c, and a single keystore b, has an ERROR status when deleting, and a, c are deleted successfully, we only want to return slashing protection history for a, c.

NOTES: The Prysm delete keystores underlying logic never returns an error, so it is not possible to add a unit test for this logic, unfortunately. Nevertheless, we should still implement the expected behavior.

@rauljordan rauljordan requested a review from a team as a code owner December 2, 2021 02:58
@rauljordan rauljordan added OK to merge Ready For Review A pull request ready for code review labels Dec 2, 2021
@rauljordan
Copy link
Contributor Author

@james-prysm

@@ -90,7 +90,13 @@ func (s *Server) DeleteKeystores(
if err != nil {
return nil, status.Errorf(codes.Internal, "Could not delete keys: %v", err)
}
keysToFilter := req.PublicKeys
// We select keys that were deleted for retrieving slashing protection history.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a unit test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In description: The Prysm delete keystores underlying logic never returns an error, so it is not possible to add a unit test for this logic, unfortunately. Nevertheless, we should still implement the expected behavior.. So we cant add tests for this that would test this code branch, but it's important to have this logic

Copy link
Contributor

@james-prysm james-prysm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good after the name change

@prylabs-bulldozer prylabs-bulldozer bot merged commit 1d216a8 into develop Dec 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the filter-errored-deleted-keys branch December 2, 2021 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants