-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spontaneous blockchain corruption #198
Comments
Checking back through the debug.log, I see a bunch of errors that were apparently allowed to pass unchecked:
I guess this is related to the corruption I'm now seeing. |
Is there a safe way to go back from 1.5 to 1.4? Is the wallet.dat from 1.5 compatible with 1.4? It's worrying seeing corruption like this happen in 1.5. |
That's pretty gross. The wallets should be completely compatible. This is the same type of issue you were running into in your comments in #159 ? |
This bit is identical:
but in one case it causes dogecoind to fail to start up, whereas in the other case the error is pretty much ignored (other than being logged) and causes incorrect results to be reported. I have a few different wallets which I often switch between. I make sure to close down dogecoind before switching the wallet.dat files in and out. It seems to be when I put a new one in place and run dogecoind that this error first happens, when it's rescanning the new blocks (new to this wallet, that is) at the start. (Each wallet 'remembers' how many blocks were in the chain the last time it was used, so dogecoind knows which blocks it has to scan for new transactions when you start it up). |
I have switched back to version 1.4 now. At first I couldn't get it to start up. I kept seeing this:
when using the .dogecoin/ directory as v1.5 had left it. But fortunately I made a backup of ~/.dogecoin/ before running v1.5 for the first time, so restored from that backup and then v1.4 would start up happily. I'm having to sync 2 days' worth of blocks from the network again, but that's to be expected. I guess things will be back to normal once that sync is done. |
Looks a bit like it could be file permission problem. |
The blockchain db was switched from Berkeley DB to Level DB in the change from 1.4 to 1.5. This wasn't our choice, it was a part of the update to the 0.8x litecoin core. So the 1.4 and 1.5 blockchains are not compatible, but the wallet.dat should be, as Billy said already. |
Jesus, I'm glad I haven't upgraded yet on my live wallet. @dooglus what about setting checklevel to a higher value? |
@asadhaider The problem seems to be noticed when reading the db already. ie. the level is high enough. Notice it's unable to 'ReadFromDisk' or 'deserialize', which suggests it's not an internal consistency error, but rather some more fundamental corruption. I should have posted this log, which is how I initially noticed the problem: Checking those transaction IDs on dogechain.info shows they are confirmed. I finally switched back to v1.4. It wouldn't open the blockchain, so I went back to an old backup of the blockchain I have, written by v1.4. It took hours to sync the last 2 days' worth of blocks, and once it had, account balances were still wrong. I was using the wallet that had been used by v1.5. Then I did a 'dogecoind -rescan' and that fixed the account balances. Now the only sign that anything's still wrong is that I see things like this from 'listtransaction':
I'm pretty sure I never saw garbage in the comment field before. And I don't remember seeing "timesmart" before, either. I guess these fields were written to the wallet by v1.5, and they've not gone away when switching back to v1.4. I need the 'move' transactions I made using v1.5 to be in my wallet, so can't just go back to the v1.4 backup of the wallet unless I manually re-add all the move transactions back in. |
Are you still experiencing this issue on 1.5.1 @dooglus ? |
I'm currently running v1.5 still, and haven't had the issue since I went back to a backup of my v1.4 data directory, deleted just the It seems possible that my |
I upgraded to v1.5.1 on the live server, stopped v1.5, deleted I see:
So the problem is still present in v1.5.1 unfortunately. |
@dooglus Any sign of this in 1.6/1.7? |
I've not tried 1.7 (didn't know there was a 1.7, actually), and haven't had any trouble with 1.6. I've tried to limit the number of times I've started and stopped the server though to reduce the number of problems I have. |
1.7 is in beta, but ready for widespread testing, so trying to encourage anyone who's seen issues before to check 1.7 :) Can this be closed, or want to leave it open a bit longer in case it recurs? |
I can still post to it if it's closed, so that's good enough for me. |
I don't know what just happened, but it's not good...
I upgraded from v1.4 to v1.5 recently. The first time I tried, it appeared to work OK but when I restarted it complained of a read error checking the block index. So I ran again with -reindex, and it was then fine for over 24h.
Now, however, when I ran a 'listaccounts' (which I do often) I see one of my accounts is negative. This never should happen, since I wait for accounts to become positive (via receiving deposits) then 'move' their balance to the default account, leaving the balance at zero. I run 'listaccounts' with an argument of 10, meaning it only counts deposits with 10 or more confirmations.
So one account is showing negative. "listtransactions" on that account shows me that two of the deposits have 0 confirmations. But dogechain.info tells me they were confirmed a couple of days ago. They're both in the same block.
Comparing the output of "getblockhash 80086" on two different machines, I see the same hash as dogechain.info reports. So it's not a fork issue, or a non-synced issue.
Then running "getblock 4fae16eaa18cded69c88ec88a8c3b8e86b2c2b980a1d1001ee4c07cba5b7799f" (that's the block hash) on the affected machine, I see:
whereas on a working server I see:
ie. the last 28 transactions in the list are the same, and the one before the last 28 is wrong.
The tx list on both servers includes the two transactions which are appearing unconfirmed on my local server.
Do I need to reindex the blockchain? Or redownload it?
The text was updated successfully, but these errors were encountered: