dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

CBlockPolicyEstimator::Read() potential error #968

Closed castarco closed 5 years ago

castarco commented 5 years ago

After a recompilation from master & a node restart, I found this error message in the logs. ERROR: CBlockPolicyEstimator::Read(): up-version (149900) fee estimate file

Although I'm not sure there's a real error, we should find what happened here.

2019-04-12 08:33:53 [            ] init message: Loading block index...
2019-04-12 08:33:53 [            ] Opening LevelDB in /home/castarco/Templates/unit-e/TESTNETDATA/testnet/blocks/index
2019-04-12 08:33:53 [            ] Opened LevelDB successfully
2019-04-12 08:33:53 [            ] Using obfuscation key for /home/castarco/Templates/unit-e/TESTNETDATA/testnet/blocks/index: 0000000000000000
2019-04-12 08:33:53 [            ] Opening LevelDB in /home/castarco/Templates/unit-e/TESTNETDATA/testnet/votes
2019-04-12 08:33:53 [            ] Opened LevelDB successfully
2019-04-12 08:33:53 [            ] Using obfuscation key for /home/castarco/Templates/unit-e/TESTNETDATA/testnet/votes: 0000000000000000
2019-04-12 08:33:53 [finalization] Restoring vote recorder from disk
2019-04-12 08:33:53 [finalization] Loaded 1188 vote records
2019-04-12 08:33:53 [            ] LoadBlockIndexDB: last block file = 25
2019-04-12 08:33:53 [            ] LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=231, size=67047168, heights=7423...7746, time=2019-04-12...2019-04-12)
2019-04-12 08:33:53 [            ] Checking all blk files are present...
2019-04-12 08:33:53 [            ] LoadBlockIndexDB: transaction index disabled
2019-04-12 08:33:53 [            ] Opening LevelDB in /home/castarco/Templates/unit-e/TESTNETDATA/testnet/chainstate
2019-04-12 08:33:53 [            ] Opened LevelDB successfully
2019-04-12 08:33:53 [            ] Using obfuscation key for /home/castarco/Templates/unit-e/TESTNETDATA/testnet/chainstate: 0ad02ce027b4c108
2019-04-12 08:33:53 [            ] Loaded best chain: hashBestChain=b2f3fcd14165738a787b4b78b8f5fe8e7c5517a3f43d2d8abada35fe315b10c3 height=7746 date=2019-04-12 08:33:24 progress=1.000000
2019-04-12 08:33:53 [            ] init message: Rewinding blocks...
2019-04-12 08:33:53 [finalization] Flushing 0 finalization states to the disk
2019-04-12 08:33:53 [finalization] Restoring state repository from disk, last_finalized_epoch=153
2019-04-12 08:33:53 [finalization] Loaded 48 states
2019-04-12 08:33:53 [finalization] Trimming state repository for height < 7700
2019-04-12 08:33:53 [finalization] States after recovering: 48
2019-04-12 08:33:53 [            ] init message: Verifying blocks...
2019-04-12 08:33:53 [            ] Verifying last 6 blocks at level 3
2019-04-12 08:33:53 [            ] [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
2019-04-12 08:33:54 [            ] No coin database inconsistencies in last 7 blocks (569 transactions)
2019-04-12 08:33:54 [            ]  block index             525ms
2019-04-12 08:33:54 [            ] ERROR: CBlockPolicyEstimator::Read(): up-version (149900) fee estimate file
2019-04-12 08:33:54 [            ] init message: Loading wallet...
2019-04-12 08:33:54 [            ] nFileVersion = 10000
2019-04-12 08:33:54 [            ] Keys: 4004 plaintext, 0 encrypted, 4004 w/ metadata, 4004 total
2019-04-12 08:33:54 [            ]  wallet                   38ms
2019-04-12 08:33:54 [            ] keypool added 1 keys (1 internal), size=2000 (1000 internal)
2019-04-12 08:33:54 [            ] setKeyPool.size() = 2000
2019-04-12 08:33:54 [            ] mapWallet.size() = 17
2019-04-12 08:33:54 [            ] mapAddressBook.size() = 1
2019-04-12 08:33:54 [            ] mapBlockIndex.size() = 7769
2019-04-12 08:33:54 [            ] nBestHeight = 7746
2019-04-12 08:33:54 [            ] AddLocal([2a02:8109:9e40:3d10::468f]:17182,1)
2019-04-12 08:33:54 [            ] torctrl thread start

To Reproduce I was not able to reproduce this error message.

Expected behavior The error message should not appear.

Environment Probably irrelevant (Ubuntu 18.04).

Additional context Testnet.

cornelius commented 5 years ago

There is some version comparison logic which seems to need adaption to the version change. There also is this check https://github.com/dtr-org/unit-e/blob/master/src/policy/fees.cpp#L938 which now probably is wrong.

Did you start with a fresh datadir?