The wallet command line arguments are a mixture of start-up actions, wallet creation options, updatable wallet parameters and wallet module modes. This is a proposal on how to rationalize the different types of arguments.
Current wallet arguments
-addresstype
(What type of addresses to use)-changetype
(What type of change to use)-disablewallet
(Do not load the wallet and disable wallet RPC calls)-discardfee=<amt>
(The fee rate that indicates your tolerance for discarding change by adding it to the fee)-fallbackfee=<amt>
(A fee rate that will be used when fee estimation has insufficient data)-keypool=<n>
(Key pool size)-mintxfee=<amt>
(Fees smaller than this are considered zero fee for transaction creation)-paytxfee=<amt>
(Fee to add to transactions you send)-rescan
(Rescan the block chain for missing wallet transactions on startup));-salvagewallet
(Attempt to recover private keys from a corrupt wallet on startup));-spendzeroconfchange
(Spend unconfirmed change when sending transactions)-txconfirmtarget=<n>
(If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks)-upgradewallet
(Upgrade wallet to latest format on startup));-wallet=<path>
(Specify wallet database path. Can be specified multiple times to load multiple wallets.)-walletbroadcast
(Make the wallet broadcast transactions))-walletdir=<dir>
(Specify directory to hold wallets)-walletnotify=<cmd>
(Execute command when a wallet transaction changes)-walletrbf
(Send transactions with full-RBF opt-in enabled)-zapwallettxes=<mode>
(Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup)-dblogsize=<n>
(DEBUG) (Flush wallet database activity from memory to disk log every megabytes)-flushwallet
(DEBUG) (Run a thread to flush wallet periodically)-privdb
(DEBUG) (Sets the DB_PRIVATE flag in the wallet db environment)-walletrejectlongchains
(DEBUG) (Wallet will not create transactions that violate mempool chain limits)
These can be categorised as follows:
Wallet module options
These act on the wallet software module, not on individual wallets:
- disablewallet
rescanRemoved in #23123- wallet (included here because it tells the wallet module which individual wallets to load)
- walletdir
- walletnotify
- dblogsize (DEBUG)
- flushwallet (DEBUG)
- privdb (DEBUG)
- walletrejectlongchains (DEBUG)
Wallet creation options
Currently none, but these options have been proposed in PRs:
externalhd (#9728)(PR closed without merging)disableprivatekeys (#9662)(PR changed to makedisableprivatekeys
acreatewallet
RPC argument)
Prior to V0.16:
usehd (whether to make this an HD wallet)Removed in #14282
Wallet startup actions
These act on an individual wallet at node startup (cannot currently be used in multiwallet mode)
Wallet config options
These are all currently treated as global wallet module options, but logically should be per-wallet config:
- addresstype
- changetype
- keypool
discardfee(Changed to per-wallet config in #12909)fallbackfee(Changed to per-wallet config in #12909)mintxfee(Changed to per-wallet config in #12909)paytxfee(Changed to per-wallet config in #12909)- spendzeroconfchange
- txconfirmtarget
- walletrbf
This is treated as per-wallet config, but there is currently no way to specify different config for different wallets at startup:
- walletbroadcast
Proposed plan
- Wallet startup actions should be removed as command line args and added to an external wallet tool (#8745). We shouldn’t need to spin up a full node to carry out these actions.
- Wallet creation options should not be added as command line args. These should be added as arguments to a new
createwallet
RPC (and as options in a new ‘Create Wallet’ dialog in qt). - Wallet config options should be moved to be class members in CWallet, saved to/loaded from BDB wallet.dat, and updated via a
walletsettings
RPC and ‘Wallet Settings` dialog in qt. Once that’s in place, these should be removed as command line args. - Wallet module options should remain as command line args, except
rescan
, which should be removed as a command-line argument.