-
Notifications
You must be signed in to change notification settings - Fork 725
[RPC] Upgrade to HD wallet. #1399
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
[RPC] Upgrade to HD wallet. #1399
Conversation
835f948 to
9c56e03
Compare
Fuzzbawls
left a comment
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.
Mostly minor changes, otherwise looking good
9c56e03 to
23fd758
Compare
|
Done, comments tackled. |
Fuzzbawls
left a comment
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.
Functionally done and good. two log output nits in the functional test that i missed last night.
Otherwise, this is an ACK
test/functional/wallet_upgrade.py
Outdated
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.
nit: to avoid confusion, i think this should be changed to something like
self.log.info("## Testing the upgrade via RPC now, stopping the node...")rationale: "runtime" (or "at runtime") is typically used to describe something that happens automatically when the wallet is started. That would be a good term to use for the -upgradewallet startup flag, but not for the upgradewallet RPC command, which requires post-startup action.
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.
"at startup" is something that happens automatically when the wallet is started, "at runtime" denotes an action that is performed when the software is running at any time (the "runtime" concept applies to actions that occurs during the software execution).
Side from that, agree that we can just put "upgrade via RPC now" and done.
test/functional/wallet_upgrade.py
Outdated
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.
nit: per above, would probably change this to something like
self.log.info("Upgrade via RPC completed, all good :)")23fd758 to
9fcc576
Compare
random-zebra
left a comment
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.
Code looks good. A couple of styling nits.
Upgrade wallet functionality to bump the wallet features to the latest supported version. Upgrading from non-HD to HD wallet.
9fcc576 to
c859f0c
Compare
|
Updated following the comments. |
random-zebra
left a comment
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.
ACK c859f0c
Fuzzbawls
left a comment
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.
ACK c859f0c
0e969f1 [GUI] Launch upgrade wallet dialog at the wallet's startup. (furszy) 7c468ce [Trivial] Method brackets jump lines. (furszy) 42ed283 [GUI] Upgrade wallet to HD functionality connected. (furszy) c29d34e [GUI] isHDEnabled & upgradeWallet methods created. (furszy) Pull request description: This was built on top of PIVX-Project#1399. Essentially connecting the HD wallet upgrade to the GUI as it was defined in the release-notes in PIVX-Project#1327. ACKs for top commit: random-zebra: ACK 0e969f1 Fuzzbawls: ACK 0e969f1 Tree-SHA512: 8d6ee4a5c53b2bead2303b8fd241ef7404ee5cb62599118e3328073b7ce6b5b63d7555bb5d26e5d3b266514476d81d1deb3f42c738216ea788c87babc019cf88
The rationality behind this work is that locked wallets, as them are encrypted, are not able to upgrade to HD wallet. The keystore and thereby keys are not available to perform any action at initialization time.
This PR solves it adding a new JSON-RPC command
upgradewalletto be able to upgrade the wallet at runtime, requesting the wallet passphrase if it's needed.A functional test verifying the new command was included inside the
wallet_upgrade.pytest.