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

Ensure Slashing Protection Exports and Keymanager API Work According to Spec #9938

Merged
merged 21 commits into from
Dec 2, 2021

Conversation

rauljordan
Copy link
Contributor

@rauljordan rauljordan commented Nov 24, 2021

As defined in the validator keymanager API standard, there are a few intricate details that we must ensure we support and behave as required. This PR adds a few fixes to ensure the behavior is up to spec:

For ImportKeystores

  • Ensure that every keystore in the ImportKeystores endpoint has a corresponding password. Even if using one password to encrypt everything, we should just duplicate that password N times in the request where N = len(keystores)

For DeleteKeystores

  • If a key is in the DB but not found in the wallet, we should return NOT_ACTIVE
  • We should return slashing protection history only for the keys that are in the request

keys []*keyCase
wantStatuses []ethpbservice.DeletedKeystoreStatus_Status
}{
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Table driven test to match what the specification wants

@rauljordan rauljordan marked this pull request as ready for review November 24, 2021 22:45
@rauljordan rauljordan requested a review from a team as a code owner November 24, 2021 22:45
@rauljordan rauljordan self-assigned this Dec 2, 2021
@rauljordan rauljordan added the Ready For Review A pull request ready for code review label Dec 2, 2021
@rauljordan
Copy link
Contributor Author

Ready @james-prysm

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.

will deprecate in favor of keystore standards in the future after implementation is done.

@rauljordan rauljordan merged commit d3c97da into develop Dec 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the api-fixes branch December 2, 2021 14:58
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

2 participants