diff --git a/doc/book/src/user/deprecation.md b/doc/book/src/user/deprecation.md index 3098e6842..73a9d2685 100644 --- a/doc/book/src/user/deprecation.md +++ b/doc/book/src/user/deprecation.md @@ -74,10 +74,3 @@ The following features are disabled by default, and will be removed in release 5 - `zcrawreceive` - The `zcrawreceive` RPC method is disabled. - `zcrawjoinsplit` - The `zcrawjoinsplit` RPC method is disabled. - `zcrawkeygen` - The `zcrawkeygen` RPC method is disabled. - -### Disabled in 5.0.1 - -The following features are disabled by default, and will be removed in release 5.3.0. - - - `dumpwallet` - The `dumpwallet` RPC method is disabled. - diff --git a/doc/book/src/user/wallet-backup.md b/doc/book/src/user/wallet-backup.md index 2e53d3737..5d6a48cdc 100644 --- a/doc/book/src/user/wallet-backup.md +++ b/doc/book/src/user/wallet-backup.md @@ -135,9 +135,3 @@ rescan: ```bash $ zcash-cli help importprivkey ``` - -### Using `dumpwallet` - -This command inherited from Bitcoin is deprecated and should not be used. It -will export private keys in a similar fashion as `z_exportwallet` but only for -transparent addresses. diff --git a/doc/release-notes.md b/doc/release-notes.md index b670013d9..7332e8bef 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -13,3 +13,10 @@ RPC Changes case, they would (properly) require that the transaction didn’t have any change, but this could be confusing, as the documentation stated that these two conditions (using "ANY\_TADDR" and disallowing change) wouldn’t coincide. + +[Deprecations](https://zcash.github.io/zcash/user/deprecation.html) +-------------- + +The following previously-deprecated features have been removed: + +- `dumpwallet` diff --git a/qa/rpc-tests/show_help.py b/qa/rpc-tests/show_help.py index e2f7bd773..d40703d86 100755 --- a/qa/rpc-tests/show_help.py +++ b/qa/rpc-tests/show_help.py @@ -38,8 +38,7 @@ Options: selected from among {"none", "addrtype", "getnewaddress", "getrawchangeaddress", "legacy_privacy", "wallettxvjoinsplit", "z_getbalance", "z_getnewaddress", "z_gettotalbalance", - "z_listaddresses", "dumpwallet", "zcrawjoinsplit", "zcrawkeygen", - "zcrawreceive"} + "z_listaddresses", "zcrawjoinsplit", "zcrawkeygen", "zcrawreceive"} -blocknotify= Execute command when the best block changes (%s in cmd is replaced by diff --git a/qa/rpc-tests/walletbackup.py b/qa/rpc-tests/walletbackup.py index 31a69ed2b..8ba009209 100755 --- a/qa/rpc-tests/walletbackup.py +++ b/qa/rpc-tests/walletbackup.py @@ -17,7 +17,7 @@ Then 5 iterations of 1/2/3 sending coins amongst themselves to get transactions in the wallets, and the miner mining one block. -Wallets are backed up using dumpwallet/backupwallet. +Wallets are backed up using z_exportwallet/backupwallet. Then 5 more iterations of transactions and mining a block. Miner then generates 101 more blocks, so any @@ -64,12 +64,7 @@ class WalletBackupTest(BitcoinTestFramework): ed2 = "-exportdir=" + self.options.tmpdir + "/node2" # nodes 1, 2,3 are spenders, let's give them a keypool=100 - extra_args = [ - ["-keypool=100", ed0, "-allowdeprecated=dumpwallet"], - ["-keypool=100", ed1, "-allowdeprecated=dumpwallet"], - ["-keypool=100", ed2, "-allowdeprecated=dumpwallet"], - [] - ] + extra_args = [["-keypool=100", ed0], ["-keypool=100", ed1], ["-keypool=100", ed2], []] self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) connect_nodes(self.nodes[0], 3) connect_nodes(self.nodes[1], 3) @@ -145,15 +140,15 @@ class WalletBackupTest(BitcoinTestFramework): logging.info("Backing up") tmpdir = self.options.tmpdir self.nodes[0].backupwallet("walletbak") - self.nodes[0].dumpwallet("walletdump") + self.nodes[0].z_exportwallet("walletdump") self.nodes[1].backupwallet("walletbak") - self.nodes[1].dumpwallet("walletdump") + self.nodes[1].z_exportwallet("walletdump") self.nodes[2].backupwallet("walletbak") - self.nodes[2].dumpwallet("walletdump") + self.nodes[2].z_exportwallet("walletdump") - # Verify dumpwallet cannot overwrite an existing file + # Verify z_exportwallet cannot overwrite an existing file try: - self.nodes[2].dumpwallet("walletdump") + self.nodes[2].z_exportwallet("walletdump") assert(False) except JSONRPCException as e: errorString = e.error['message'] diff --git a/src/deprecation.cpp b/src/deprecation.cpp index 2c81d0703..0f9eafd50 100644 --- a/src/deprecation.cpp +++ b/src/deprecation.cpp @@ -24,7 +24,6 @@ bool fEnableZCRawReceive = true; bool fEnableZCRawJoinSplit = true; bool fEnableZCRawKeygen = true; bool fEnableAddrTypeField = true; -bool fEnableDumpWallet = true; bool fEnableWalletTxVJoinSplit = true; #endif @@ -107,7 +106,6 @@ std::optional SetAllowedDeprecatedFeaturesFromCLIArgs() { fEnableZCRawJoinSplit = allowdeprecated.count("zcrawjoinsplit") > 0; fEnableZCRawKeygen = allowdeprecated.count("zcrawkeygen") > 0; fEnableAddrTypeField = allowdeprecated.count("addrtype") > 0; - fEnableDumpWallet = allowdeprecated.count("dumpwallet") > 0; fEnableWalletTxVJoinSplit = allowdeprecated.count("wallettxvjoinsplit") > 0; #endif diff --git a/src/deprecation.h b/src/deprecation.h index 4a8f7a558..196e50c07 100644 --- a/src/deprecation.h +++ b/src/deprecation.h @@ -39,7 +39,6 @@ static const std::set DEFAULT_ALLOW_DEPRECATED{{ }}; static const std::set DEFAULT_DENY_DEPRECATED{{ #ifdef ENABLE_WALLET - "dumpwallet", "zcrawreceive", "zcrawjoinsplit", "zcrawkeygen" @@ -59,7 +58,6 @@ extern bool fEnableZCRawReceive; extern bool fEnableZCRawJoinSplit; extern bool fEnableZCRawKeygen; extern bool fEnableAddrTypeField; -extern bool fEnableDumpWallet; extern bool fEnableWalletTxVJoinSplit; #endif diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index d8a7a02e5..2f175302e 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -348,12 +348,12 @@ UniValue importwallet(const UniValue& params, bool fHelp) if (fHelp || params.size() != 1) throw runtime_error( "importwallet \"filename\"\n" - "\nImports taddr keys from a wallet dump file (see dumpwallet).\n" + "\nImports taddr keys from a wallet dump file (see z_exportwallet).\n" "\nArguments:\n" "1. \"filename\" (string, required) The wallet file\n" "\nExamples:\n" "\nDump the wallet\n" - + HelpExampleCli("dumpwallet", "\"nameofbackup\"") + + + HelpExampleCli("z_exportwallet", "\"nameofbackup\"") + "\nImport the wallet\n" + HelpExampleCli("importwallet", "\"path/to/exportdir/nameofbackup\"") + "\nImport using the json rpc call\n" @@ -546,31 +546,7 @@ UniValue z_exportwallet(const UniValue& params, bool fHelp) UniValue dumpwallet(const UniValue& params, bool fHelp) { - if (!EnsureWalletIsAvailable(fHelp)) - return NullUniValue; - - if (!fEnableDumpWallet) - throw runtime_error( - "dumpwallet is DEPRECATED and will be removed in a future release\n" - "\nUse z_exportwallet instead, or restart with `-allowdeprecated=dumpwallet`\n" - "if you require backward compatibility.\n" - "See https://zcash.github.io/zcash/user/deprecation.html for more information."); - - if (fHelp || params.size() != 1) - throw runtime_error( - "dumpwallet \"filename\"\n" - "\nDEPRECATED. Please use the z_exportwallet RPC instead.\n" - "\nDumps taddr wallet keys in a human-readable format. Overwriting an existing file is not permitted.\n" - "\nArguments:\n" - "1. \"filename\" (string, required) The filename, saved in folder set by zcashd -exportdir option\n" - "\nResult:\n" - "\"path\" (string) The full path of the destination file\n" - "\nExamples:\n" - + HelpExampleCli("dumpwallet", "\"test\"") - + HelpExampleRpc("dumpwallet", "\"test\"") - ); - - return dumpwallet_impl(params, false); + throw JSONRPCError(RPC_METHOD_NOT_FOUND, "dumpwallet has been removed. Use z_exportwallet instead."); } UniValue dumpwallet_impl(const UniValue& params, bool fDumpZKeys)