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

Optionally Save Wallet Password on Web Onboarding #7930

Merged
merged 9 commits into from
Nov 23, 2020

Conversation

rauljordan
Copy link
Contributor

What type of PR is this?

Feature

What does this PR do? Why is it needed?

cc @dapplion

End Goal:

  • To allow validator clients to launch with --web without requiring any prompt interaction
  • To not need to manage individual --wallet-password-file files for validators on dappnode machines

Approach:

  • On rpc.WalletCreate() which is called from the frontend during the onboarding flow, store the wallet password as a text file with standard user read permissions inside of the wallet directory (the directory already has safe permissions) and let the user know the file was written there
  • On validator --web start, check if the user has a default wallet password in the wallet directory, and use that to unlock the validator keys and start things up. This refactoring is done inside of validator/node/node.go as that's where the logic of initializing the wallet occurs on startup.
  • No changes need to be made to the UI for this feature
  • Gate the feature behind the validator flag: --write-wallet-password-on-web-onboarding

Which issues(s) does this PR fix?

Fixes #7929

@rauljordan rauljordan added Ready For Review A pull request ready for code review web-ui labels Nov 23, 2020
@rauljordan rauljordan requested a review from a team as a code owner November 23, 2020 19:16
@rauljordan rauljordan self-assigned this Nov 23, 2020
@rauljordan rauljordan added this to the Diamond milestone Nov 23, 2020
@prylabs-bulldozer prylabs-bulldozer bot merged commit dc897a2 into master Nov 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the save-password-on-rpc-onboarding branch November 23, 2020 22:11
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.

Persist wallet password to file on web onboarding
2 participants