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

Remove Keymanageropts Pattern from Wallets and Remove Enable/Disable Feature for V1 CLI #7831

Merged
merged 27 commits into from
Nov 17, 2020

Conversation

rauljordan
Copy link
Contributor

@rauljordan rauljordan commented Nov 16, 2020

No tracking issue. This PR removes the legacy KeymanagerOpts pattern we used in our wallets. We were basically storing a json file full of versioning and configuration options for a wallet that is underutilized and ultimately unnecessary in Prysm. This leads to more complex code in our wallet and makes it harder for people to programmatically manipulate their wallet accounts on disk in cloud deployments. This PR completely removes the pattern.

This PR also adds comprehensive tests to accounts enable + disable, but opts to remove the features from our CLI entrypoints for Prysm v1 until we have confidence in prod. cc @fabdarice

@rauljordan rauljordan requested a review from a team as a code owner November 16, 2020 22:06
@rauljordan rauljordan marked this pull request as draft November 16, 2020 22:07
@@ -387,30 +378,6 @@ func (w *Wallet) ReadKeymanagerConfigFromDisk(_ context.Context) (io.ReadCloser,

}

// LockWalletConfigFile lock read and write to wallet file in order to prevent
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now we don't have anything to lock. Slashing protection will take care of this. Additionally, we allow importing keys dynamically at runtime which would be invalidated by a lock

@rauljordan rauljordan marked this pull request as ready for review November 17, 2020 01:53
@rauljordan rauljordan self-assigned this Nov 17, 2020
@rauljordan rauljordan added Accounts Cleanup Code health! Ready For Review A pull request ready for code review Security Security Related Issues labels Nov 17, 2020
@@ -0,0 +1,65 @@
package imported
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please review carefully

@@ -0,0 +1,240 @@
package imported
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please review these tests

@rauljordan rauljordan changed the title Remove Keymanageropts Pattern from Wallets Remove Keymanageropts Pattern from Wallets and Remove Enable/Disable Feature for V1 CLI Nov 17, 2020
prestonvanloon
prestonvanloon previously approved these changes Nov 17, 2020
prestonvanloon
prestonvanloon previously approved these changes Nov 17, 2020
prestonvanloon
prestonvanloon previously approved these changes Nov 17, 2020
@fabdarice
Copy link
Contributor

Thanks for cc me. This is much better indeed!

prestonvanloon
prestonvanloon previously approved these changes Nov 17, 2020
@prylabs-bulldozer prylabs-bulldozer bot merged commit f75a8ef into master Nov 17, 2020
@delete-merged-branch delete-merged-branch bot deleted the bye-km-opts branch November 17, 2020 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Code health! Ready For Review A pull request ready for code review Security Security Related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants