Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
When starting bitcoind with an old wallet (created July 2019, probably v0.17.x or v0.18.x) the log records 2 errors and one warning that are not self-explanatory.
Might be related to #19051
Expected behaviour
No warning/errors are shown or the errors/warnings are more detailed as to what’s going on.
Steps to reproduce
Run v26.0 with a very old wallet.dat file. I wasn’t able to reproduce this with a wallet.dat file created in v0.12.x, v0.16.3 or v0.18.x. I’m not sure how to reproduce this without uploading the specific wallet.dat file (I’m not able to, sorry).
Relevant log output
Log from v26.0.0
 02023-12-18T13:24:00Z Bitcoin Core version v26.0.0 (release build)
 12023-12-18T13:24:00Z Using the 'x86_shani(1way,2way)' SHA256 implementation
 22023-12-18T13:24:00Z Using RdSeed as an additional entropy source
 32023-12-18T13:24:00Z Using RdRand as an additional entropy source
 4[..]
 52023-12-18T13:24:00Z Using at most 125 automatic connections (1024 file descriptors available)
 62023-12-18T13:24:00Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements
 72023-12-18T13:24:00Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements
 82023-12-18T13:24:00Z Script verification uses 7 additional threads
 92023-12-18T13:24:00Z scheduler thread start
10[..]
112023-12-18T13:24:00Z Using wallet directory /home/foobar/.bitcoin
122023-12-18T13:24:00Z init message: Verifying wallet(s)…
132023-12-18T13:24:00Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
142023-12-18T13:24:00Z Using wallet /home/foobar/.bitcoin/wallet.dat
152023-12-18T13:24:00Z BerkeleyEnvironment::Open: LogDir=/home/foobar/.bitcoin/database ErrorFile=/home/foobar/.bitcoin/db.log
16[..]
172023-12-18T13:24:00Z init message: Loading block index…
182023-12-18T13:24:00Z Assuming ancestors of block 00000000000000000001a0a448d6cf2546b06801389cc030b2b18c6491266815 have valid signatures.
192023-12-18T13:24:00Z Setting nMinimumChainWork=000000000000000000000000000000000000000052b2559353df4117b7348b64
202023-12-18T13:24:00Z Opening LevelDB in /home/foobar/.bitcoin/blocks/index
212023-12-18T13:24:00Z Opened LevelDB successfully
222023-12-18T13:24:00Z Using obfuscation key for /home/foobar/.bitcoin/blocks/index: 0000000000000000
232023-12-18T13:24:03Z LoadBlockIndexDB: last block file = 3945
242023-12-18T13:24:03Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=51, size=84327429, heights=817322...817411, time=2023-11-18...2023-11-19)
252023-12-18T13:24:03Z Checking all blk files are present...
262023-12-18T13:24:04Z Initializing chainstate Chainstate [ibd] @ height -1 (null)
272023-12-18T13:24:04Z Opening LevelDB in /home/foobar/.bitcoin/chainstate
282023-12-18T13:24:04Z Opened LevelDB successfully
292023-12-18T13:24:04Z Using obfuscation key for /home/foobar/.bitcoin/chainstate: 9735fc6504867afd
302023-12-18T13:24:04Z Loaded best chain: hashBestChain=0000000000000000000290f359a90a5d57160fd27954703351c6f1bf838941e0 height=816997 date=2023-11-16T10:24:28Z progress=0.983619
312023-12-18T13:24:04Z Opening LevelDB in /home/foobar/.bitcoin/chainstate
322023-12-18T13:24:04Z Opened LevelDB successfully
332023-12-18T13:24:04Z Using obfuscation key for /home/foobar/.bitcoin/chainstate: 9735fc6504867afd
342023-12-18T13:24:04Z [Chainstate [ibd] @ height 816997 (0000000000000000000290f359a90a5d57160fd27954703351c6f1bf838941e0)] resized coinsdb cache to 8.0 MiB
352023-12-18T13:24:04Z [Chainstate [ibd] @ height 816997 (0000000000000000000290f359a90a5d57160fd27954703351c6f1bf838941e0)] resized coinstip cache to 440.0 MiB
362023-12-18T13:24:04Z init message: Verifying blocks…
372023-12-18T13:24:04Z Verifying last 6 blocks at level 3
382023-12-18T13:24:04Z Verification progress: 0%
392023-12-18T13:24:05Z Verification progress: 16%
402023-12-18T13:24:05Z Verification progress: 33%
412023-12-18T13:24:05Z Verification progress: 50%
422023-12-18T13:24:05Z Verification progress: 66%
432023-12-18T13:24:05Z Verification progress: 83%
442023-12-18T13:24:06Z Verification progress: 99%
452023-12-18T13:24:06Z Verification: No coin database inconsistencies in last 6 blocks (26158 transactions)
462023-12-18T13:24:06Z  block index            5148ms
472023-12-18T13:24:06Z init message: Loading wallet…
482023-12-18T13:24:06Z BerkeleyEnvironment::Open: LogDir=/home/foobar/.bitcoin/database ErrorFile=/home/foobar/.bitcoin/db.log
492023-12-18T13:24:06Z [default wallet] Wallet file version = 10500, last client version = 220000
50
512023-12-18T13:24:06Z [default wallet] Error reading wallet database: keymeta found with unexpected path
522023-12-18T13:24:06Z [default wallet] Error reading wallet database: keymeta found with unexpected path
53
542023-12-18T13:24:06Z [default wallet] Legacy Wallet Keys: 657 plaintext, 0 encrypted, 657 w/ metadata, 657 total.
552023-12-18T13:24:06Z [default wallet] Descriptors: 0, Descriptor Keys: 0 plaintext, 0 encrypted, 0 total.
562023-12-18T13:24:06Z [default wallet] Wallet completed loading in               8ms
572023-12-18T13:24:06Z [default wallet] setKeyPool.size() = 600
582023-12-18T13:24:06Z [default wallet] mapWallet.size() = 51
592023-12-18T13:24:06Z [default wallet] m_address_book.size() = 100
60
612023-12-18T13:24:06Z Warning: Error reading /home/foobar/.bitcoin/wallet.dat! All keys read correctly, but transaction data or address metadata may be missing or incorrect.
62
632023-12-18T13:24:06Z Setting NODE_NETWORK on non-prune mode
642023-12-18T13:24:06Z block tree size = 821776
652023-12-18T13:24:06Z nBestHeight = 816997
662023-12-18T13:24:06Z initload thread start
672023-12-18T13:24:06Z torcontrol thread start
682023-12-18T13:24:06Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast
692023-12-18T13:24:06Z initload thread exit
702023-12-18T13:24:06Z Bound to 127.0.0.1:8334
712023-12-18T13:24:06Z Bound to [::]:8333
722023-12-18T13:24:06Z Bound to 0.0.0.0:8333
732023-12-18T13:24:06Z Loaded 1 addresses from "anchors.dat"
742023-12-18T13:24:06Z 1 block-relay-only anchors will be tried for connections.
752023-12-18T13:24:06Z init message: Starting network threads…
76[..]
Log from v25.1.0
The error/warning is slightly different.
Instead of
Warning: Error reading /home/foobar/.bitcoin/wallet.dat! All keys read correctly, but transaction data or address metadata may be missing or incorrect.
it logs
Warning: Error reading /home/foobar/.bitcoin/wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.
How did you obtain Bitcoin Core
Pre-built binaries
What version of Bitcoin Core are you using?
v26.0
Operating system and version
Ubuntu 22.04 LTS
Machine specifications
No response