Bitcoin Forum
May 25, 2019, 08:29:13 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is "Unknown wallet records" >0 normal?  (Read 271 times)
jnano
Member
**
Offline Offline

Activity: 245
Merit: 23


View Profile
March 05, 2019, 01:27:19 AM
Merited by ETFbitcoin (1), LoyceV (1)
 #1

Since upgrading from v0.15 to v0.17 the log shows:
Unknown wallet records: 1

Can this be considered normal? What might the unknown record be?
PLAY OVER 3000 GAMES
LIGHTNING FAST WITHDRAWALS
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1558772953
Hero Member
*
Offline Offline

Posts: 1558772953

View Profile Personal Message (Offline)

Ignore
1558772953
Reply with quote  #2

1558772953
Report to moderator
Pmalek
Hero Member
*****
Offline Offline

Activity: 952
Merit: 1033



View Profile
March 05, 2019, 03:42:13 PM
 #2

I am not sure what you are trying to do when you get this error. That error seems to appear when you try to load too many wallets in bitcoin core due to limitations in memory. If you have too many wallets you might have ran out of memory to store them. 

Have a look at this and see if this is what you are doing as well.
https://bitcoin.stackexchange.com/questions/82954/bitcoin-core-0-17-fails-after-loading-too-many-wallets

.FORTUNE.JACK.
      ▄▄███████▄▄
   ▄████▀▀ ▄ ██████▄
  ████ ▄▄███ ████████
 █████▌▐███▌ ▀▄ ▀█████
███████▄██▀▀▀▀▄████████
█████▀▄▄▄▄█████████████
████▄▄▄▄ █████████████
 ██████▌ ███▀████████
  ███████▄▀▄████████
   ▀█████▀▀███████▀
      ▀▀██████▀▀
         
         █
...FortuneJack.com                                             
...THE BIGGEST BITCOIN GAMBLING SITE
       ▄▄█████████▄▄
    ▄█████████████████▄
  ▄█████████████████████▄
 ▄██
█████████▀███████████▄
██████████▀   ▀██████████
█████████▀       ▀█████████
████████           ████████
████████▄   ▄ ▄   ▄████████
██████████▀   ▀██████████
 ▀██
█████████████████████▀
  ▀██
███████████████████▀
    ▀█████████████████▀
       ▀▀█████████▀▀
#JACKMATE
WIN 1 BTC
▄█████████████████████████▄
███████████████████████████
███████████████████████████
██████████▀█████▀██████████
███████▀░░▀░░░░░▀░░▀███████
██████▌░░░░░░░░░░░░░▐██████
██████░░░░██░░░██░░░░██████
█████▌░░░░▀▀░░░▀▀░░░░▐█████
██████▄░░▄▄▄░░░▄▄▄░░▄██████
████████▄▄███████▄▄████████

███████████████████████████
███████████████████████████
▀█████████████████████████▀
jnano
Member
**
Offline Offline

Activity: 245
Merit: 23


View Profile
March 06, 2019, 12:03:39 AM
 #3

2 wallet files.

It's logged on every startup of Core.

khaled0111
Sr. Member
****
Offline Offline

Activity: 714
Merit: 347

Does people really read this!


View Profile
March 06, 2019, 12:50:36 AM
 #4

Maybe because the wallet is encrypted.

I think this code is the one generating the message you got:

Code:
LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u\n",
           wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys, wss.m_unknown_records);

debug log number of unknown wallet records on load #12888

█▀▀█
██▄█
All my support to bestmixer
█▀▀█
██▄█
jnano
Member
**
Offline Offline

Activity: 245
Merit: 23


View Profile
March 06, 2019, 02:51:50 AM
 #5

Yeah, it's encrypted, with 0 plaintext keys.
How does this lead to the unknown one?
Heisenberg_Hunter
Sr. Member
****
Offline Offline

Activity: 518
Merit: 359


View Profile
March 11, 2019, 06:48:00 AM
Merited by LoyceV (4), bones261 (2), ETFbitcoin (1)
 #6

The primary question is "Are you trying to upgrade the wallet and that is when this error comes in the debug.log?"
If not, what are you trying to achieve?
The unknown wallet records has occured in v0.17 due to the fact that there has been significant changes in the code between 0.15 and 0.17

The v0.15 code didn't consist of the unknown wallet record line and they were like

Code:
nKeys = nCKeys = nWatchKeys = nKeyMeta = 0;
...
LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total\n",
           wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys);

While in the v0.17, unknown wallet records has been added replacing the older lines and they were like

Code:
nKeys = nCKeys = nWatchKeys = nKeyMeta = m_unknown_records = 0;
...
} else if (strType != "bestblock" && strType != "bestblock_nomerkle"){
            wss.m_unknown_records++;
...
LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u\n",
           wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys, wss.m_unknown_records);

Going by the code, the unknown records are initially assigned to 0, but if the string type is not equal to the bestblock and bestblock_nomerkle value, unknown records seems to increase to 1 value and as such they are printed in the Unknown Wallet Records in the below line. (I am not completely sure of this, if this seems to be wrong someone try to correct me)

You should post the debug.log file here, so that we can get a clear insight on what is happening.
Probably if the wallet is encrypted, upgradewallet command will not work.

jnano
Member
**
Offline Offline

Activity: 245
Merit: 23


View Profile
March 12, 2019, 01:59:20 AM
 #7

I'm not trying to achieve anything other than understand the root cause.

The wallet was created in v0.15. I never ran with -upgradewallet (not explicitly anyway), though since the second start with v0.17 the wallet files have nFileVersion = 170001. Each wallet file shows an equal number (for that wallet) of "encrypted", "w/ metadata", and "total" records, and 0 plaintext.
Do I need to manually -upgradewallet to fully enable v0.16/0.17/segwit features?

If that's the reason for a single unknown record, how would one go about upgrading an encrypted wallet?
Issue #14422 doesn't suggest a solution.

Yes, I know the log message format was changed in the newer version, I can read the nearby code fine. But that doesn't clarify the core reason because I've no idea whether or not the presence of other strTypes is normal or expected. If it's simply the result of using an encrypted wallet file created before v0.16, that's a misleading log message that should, perhaps, be improved.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1778
Merit: 2399


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


View Profile WWW
March 12, 2019, 04:33:16 AM
Merited by Foxpup (4), bones261 (3), LoyceV (2)
 #8

This is a known bug and has been fixed: https://github.com/bitcoin/bitcoin/pull/13967. The error is nothing to be worried about and can be safely ignored. All that happened is that we forgot a to handle a record type in the main wallet database reading loop (the record is read before this loop) in the change that adds logging of unknown records in that loop.

jnano
Member
**
Offline Offline

Activity: 245
Merit: 23


View Profile
March 13, 2019, 01:11:20 AM
Merited by LoyceV (1)
 #9

Thanks for explaining.

Is doing a manual -upgradewallet normally necessary, and if so, is encryption a hindrance?
nFileVersion has changed by itself between 0.15 and 0.17, so by the looks of it it's automatic in this case.

achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1778
Merit: 2399


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


View Profile WWW
March 13, 2019, 04:14:17 AM
Merited by ETFbitcoin (1), jnano (1)
 #10

The warning you are seeing has nothing to do with whether or not your wallet has been upgraded. That warning is simply the result of new error logging code. In fact, the record that is unknown is one that has been in Bitcoin Core for an extremely long time. It may even be present in the very first version of the Bitcoin client.

Is doing a manual -upgradewallet normally necessary,
Yes. The wallet will not be upgraded automatically for you.

and if so, is encryption a hindrance?
No.

nFileVersion has changed by itself between 0.15 and 0.17, so by the looks of it it's automatic in this case.
nFileVersion is completely unrelated to wallet upgrades. It is in fact completely unused and only kept around for backwards compatibility reasons. It only indicates the highest version client that has opened a wallet file (because that was important in the past).

jnano
Member
**
Offline Offline

Activity: 245
Merit: 23


View Profile
March 13, 2019, 07:45:18 PM
 #11

I know the wallet.dat version is unrelated, I just thought I'd ask since it was brought up earlier.
I'd best start a new thread.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!