Skip to content

rfc: Wallets should be in their own directory #11348

@laanwj

Description

@laanwj

With multi-wallet (both "parallel" RPC multiwallet and "serial" -wallet), the situation has become quite confusing. There is no way to list the wallets - the obvious ls ~/.bitcoin/*.dat will yield a combination of transient state files as well as wallets. This is quite annoying when doing backups, for example.

So at least for new installs I'd propose to set the wallet bdb root to ~/.bitcoin/wallets. If this directory does not exist, it should fall back to just using the data directory. Another option would be a one-time move, but that doesn't need to be in the first iteration.

Also it would be useful to override the wallet directory with an option, say -walletdir, for people that want to store the wallets on a separate file system without potentially hazardous symlink tricks. Implementing just this for a start, and not changing the default, would be fine too.

(Another idea would be to introduce a random component into the wallet-dir name, like firefox does with profile directories ~/.mozilla/firefox/1naf6a1d.default, this makes it slightly harder to steal a wallet file if all you can do is guess paths - but I digress)

(see also discussion in #10885 and #11343)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions