Why did Bitcoin Core switch from wallet.dat, cold.dat, lukewarm.dat, etc., into "sub-dirs"? I've noticed that Bitcoin Core and its API now strongly prefers to make a separate sub-dir in your datadir for each wallet, such as &quot;lukewarm&quot;, which then contains a wallet.dat, instead of just having &quot;lukewarm.dat&quot; in the data dir.
Why was this change made? I can't tell you how much scary work it would be for me to update my own system into this new method. I refer to my wallets by their .dat filename and that's their internal label that I use to keep track of everything in my database.
I know that Bitcoin Core also supports the old way (different-named .dat files in the data dir), but for how long? And why was this change made to begin with? It seems to create some kind of log files or something which seem to contain nothing of value. What's that about? Am I missing out by clinging to the old way? I don't understand why it wants to segment wallets into wallet.dat files in their own sub-dirs.
The original move to a directory per wallet file was motivated due to an issue with the way Berkeley DB behaved when multiple databases were opened in the same database environment, which are tied to directories containing the database. In particular, the issue is that BDB creates a database environment log which contains data from all of the databases open. This creates issues with backing up and portability as database logs need to be backed up as well.
With the transition away from BDB to SQLite, it is possible that we move back to the old way. However current discussions around that seem to indicate that that move is unlikely.l