Skip to content

Conversation

@furszy
Copy link

@furszy furszy commented Mar 11, 2020

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 upgradewallet to 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.py test.

@furszy furszy self-assigned this Mar 11, 2020
@furszy furszy force-pushed the 2020_rpc_upgrade_wallet branch 2 times, most recently from 835f948 to 9c56e03 Compare March 11, 2020 21:19
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a 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

@furszy furszy force-pushed the 2020_rpc_upgrade_wallet branch from 9c56e03 to 23fd758 Compare March 12, 2020 14:13
@furszy
Copy link
Author

furszy commented Mar 12, 2020

Done, comments tackled.

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a 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

Copy link
Collaborator

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.

Copy link
Author

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.

Copy link
Collaborator

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 :)")

Copy link

@random-zebra random-zebra left a 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.

furszy added 2 commits March 13, 2020 19:05
Upgrade wallet functionality to bump the wallet features to the latest supported version. Upgrading from non-HD to HD wallet.
@furszy furszy force-pushed the 2020_rpc_upgrade_wallet branch from 9fcc576 to c859f0c Compare March 13, 2020 22:20
@furszy
Copy link
Author

furszy commented Mar 13, 2020

Updated following the comments.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

ACK c859f0c

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK c859f0c

@Fuzzbawls Fuzzbawls merged commit eb8cb62 into PIVX-Project:master Mar 14, 2020
random-zebra added a commit to random-zebra/PIVX that referenced this pull request Mar 18, 2020
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
@random-zebra random-zebra added this to the 4.1.0 milestone Apr 16, 2020
@furszy furszy deleted the 2020_rpc_upgrade_wallet branch November 29, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants