You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Issue being fixed or feature implemented
HD wallets are old-existsing feature, appeared in Dash years ago, but
enabling HD wallets is not trivial task that requires multiple steps and
command line/rpc calls.
Let's have them enabled by default.
## What was done?
- HD wallets are enabled by default. Currently behavior `dashd`,
`dash-qt` are similar to run with option `-usehd=1`
- the rpc `upgradewallet` do not let to upgrade from non-HD wallet to HD
wallet to don't encourage user use non-crypted wallets (postponed till
v21)
- the initialization of ScriptPubKey is updated to be sure that encypted
HD seed is never written on disk (if passphrase is provided)
- enabled and dashified a script `wallet_upgradewallet.py` which test
compatibility between different versions of wallet
## What is not done?
- wallet tool still does not support passhprase, HD seed can appear on
disk
- there's no dialog that show user a mnemonic phrase and encourage him
to make a paper backup
Before removing a command line 'usehd' (backport bitcoin#11250) need to
make at least one major release for fail-over option (if someone wish to
use non-HD wallets only).
## How Has This Been Tested?
Run unit and functional tests.
Enabled new functional test `wallet_upgradewallet.py` that has been
backported long time ago but waited this PR to be enabled.
## Breaking Changes
HD wallets are created by default.
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
---------
Co-authored-by: UdjinM6 <[email protected]>
In this release, we are taking a significant step towards enhancing the Dash wallet's usability by enabling Hierarchical Deterministic (HD) wallets by default. This change aligns the behavior of `dashd` and `dash-qt` with the previously optional `-usehd=1` flag, making HD wallets the standard for all users.
6
+
7
+
While HD wallets are now enabled by default to improve user experience, Dash Core still allows for the creation of non-HD wallets by using the `-usehd=0` flag. However, users should be aware that this option is intended for legacy support and will be removed in future releases. Importantly, even with an HD wallet, users can still import non-HD private keys, ensuring flexibility in managing their funds.
// If you are generating new mnemonic it is assumed that the addresses have never gotten a transaction before, so you don't need to rescan for transactions
Copy file name to clipboardExpand all lines: test/functional/wallet_upgradetohd.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,13 @@
21
21
classWalletUpgradeToHDTest(BitcoinTestFramework):
22
22
defset_test_params(self):
23
23
self.num_nodes=1
24
+
self.extra_args= [['-usehd=0']]
24
25
25
26
defskip_test_if_missing_module(self):
26
27
self.skip_if_no_wallet()
27
28
28
29
defsetup_network(self):
29
-
self.add_nodes(self.num_nodes)
30
+
self.add_nodes(self.num_nodes, self.extra_args)
30
31
self.start_nodes()
31
32
self.import_deterministic_coinbase_privkeys()
32
33
@@ -69,7 +70,8 @@ def run_test(self):
69
70
self.log.info("Should no longer be able to start it with HD disabled")
70
71
self.stop_node(0)
71
72
node.assert_start_raises_init_error(['-usehd=0'], "Error: Error loading %s: You can't disable HD on an already existing HD wallet"%self.default_wallet_name)
72
-
self.start_node(0)
73
+
self.extra_args= []
74
+
self.start_node(0, [])
73
75
balance_after=node.getbalance()
74
76
75
77
self.recover_non_hd()
@@ -188,7 +190,7 @@ def run_test(self):
188
190
node.stop()
189
191
node.wait_until_stopped()
190
192
self.start_node(0, extra_args=['-rescan'])
191
-
assert_raises_rpc_error(-14, "Cannot upgrade encrypted wallet to HD without the wallet passphrase", node.upgradetohd, mnemonic)
193
+
assert_raises_rpc_error(-13, "Error: Please enter the wallet passphrase with walletpassphrase first.", node.upgradetohd, mnemonic)
192
194
assert_raises_rpc_error(-14, "The wallet passphrase entered was incorrect", node.upgradetohd, mnemonic, "", "wrongpass")
193
195
assertnode.upgradetohd(mnemonic, "", walletpass)
194
196
assert_raises_rpc_error(-13, "Error: Please enter the wallet passphrase with walletpassphrase first.", node.dumphdinfo)
0 commit comments