Bitcoin Forum
November 02, 2024, 01:31:29 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Upgrade? *Semi-Resolved*  (Read 771 times)
KB5988 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile
November 07, 2012, 11:46:03 PM
Last edit: November 13, 2012, 12:53:26 AM by KB5988
 #1

So when I started up BitcoinQt today to continue syncing I got a message across the bottom telling me:

'Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.'

I'm quite certain that the issue is on my end. As well, it doesn't seem like it is actually syncing anymore. So my question is whether I can upgrade without losing what I've synced so far, and how to do so?

For the record, I'm running Ubuntu 12.04 LTS.

16uHktGZQ427svZ9SPd3LbctfXCyddGDMR
cabin
Sr. Member
****
Offline Offline

Activity: 604
Merit: 250


View Profile
November 08, 2012, 01:07:16 AM
 #2

To be safe backup your wallet, but in general you can upgrade your bitcoin and the db will be fine too. If it gets corrupted and doesn't start downloading again you may need to re-download the blockchain fresh.
KB5988 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile
November 08, 2012, 01:17:45 AM
 #3

To be safe backup your wallet, but in general you can upgrade your bitcoin and the db will be fine too. If it gets corrupted and doesn't start downloading again you may need to re-download the blockchain fresh.

It's not the wallet I'm worried about, there isn't anything in it yet. It's the blockchain that I'm worried about, I've been trying to get it synced for nearly 2 weeks now and would rather not have to start it all over again.

16uHktGZQ427svZ9SPd3LbctfXCyddGDMR
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1036



View Profile WWW
November 08, 2012, 02:40:51 AM
 #4

I suspect that the reason you are seeing this message is that there is some problem with your local blockchain database. Failure to synchronize, to download new blocks, is the problem. However, you should check the version that you are currently using; if you used the Ubuntu software center, it still has version 0.3.24, which is a year and a half old.

Close Bitcoin, and open a terminal window to perform these operations.

Let's make a wallet backup just for the fun of it:

cp ~/.bitcoin/wallet.dat ~/wallet.backup.Nov2012

First check your version:

bitcoin-qt --help | grep version

You should see a line with the version number, here's the most recent:

Bitcoin-Qt version v0.7.1.0-geb49457-beta

If you do not have the latest version, lets get it and add it to the updates that will be automatically checked by Ubuntu (enter password when requested):

sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoin-qt


Check the version again; if it is not current, you may have previously downloaded another copy of Bitcoin to your home directory you will need to find and remove.


Now lets start Bitcoin in a way that will upgrade your wallet version and also perform a validation of some important files:

bitcoin-qt -upgradewallet -checkblocks=0 -checklevel=2 -printtoconsole &

(note:You will get to see all of Bitcoin's messages on the console instead of having them logged if you use -printtoconsole)

Messages after the long validation should start looking like this, indicating new blocks are coming:

received block 00000000000000981dbc
SetBestChain: new best=00000000000000981dbc  height=206625  work=580312196692094599432  date=11/05/12 18:57:21
ProcessBlock: ACCEPTED
received block 000000000000043fa333
SetBestChain: new best=000000000000043fa333  height=206626  work=580326389011294426460  date=11/05/12 19:01:40
ProcessBlock: ACCEPTED
received block 0000000000000340e55b
SetBestChain: new best=0000000000000340e55b  height=206627  work=580340581330494253488  date=11/05/12 19:03:42
ProcessBlock: ACCEPTED
received block 000000000000022e5c93
SetBestChain: new best=000000000000022e5c93  height=206628  work=580354773649694080516  date=11/05/12 19:23:54
ProcessBlock: ACCEPTED



This is what bad output might look like, and if so, we will need to do some fixing:

received block 00000000000000888968
ERROR: AcceptBlock() : AddToBlockIndex failed
ERROR: ProcessBlock() : AcceptBlock FAILED
received block 00000000000001064014
ERROR: AcceptBlock() : AddToBlockIndex failed
ERROR: ProcessBlock() : AcceptBlock FAILED
received block 00000000000002e26a33
ERROR: AcceptBlock() : AddToBlockIndex failed
ERROR: ProcessBlock() : AcceptBlock FAILED



If Bitcoin doesn't start downloading blocks after the above steps even with several connections, then we likely need to do further repairing. We will re-import all of the previously downloaded blockchain blocks, which may take several hours but won't need the network:

With Bitcoin shut down, we will rename the blockchain files:


cd ~/.bitcoin
mv blkindex.dat blkindex.bak
mv blk0001.dat blk0001.bak
mv blk0002.dat blk0002.bak


Now start Bitcoin with a command to re-import all data from the old blocks.

bitcoin-qt -loadblock=blk0001.bak -loadblock=blk0002.bak &

Bitcoin should start up with the message "Importing blockchain data file". This will take a long time to complete. After Bitcoin starts up, it should be syncronizing with the network again.
KB5988 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile
November 08, 2012, 07:03:45 AM
 #5

Thanks deepceleron, started doing what you posted. Been stuck at the level 2 verifying of the 183xxx blocks I had for a few hours now, so can't sure if that's a good sign or not. Hopefully it'll work in the end.

16uHktGZQ427svZ9SPd3LbctfXCyddGDMR
zxyzxy
Full Member
***
Offline Offline

Activity: 133
Merit: 100


View Profile
November 13, 2012, 12:25:01 AM
 #6

for the future, you can use a different client or an online wallet
KB5988 (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile
November 13, 2012, 12:43:50 AM
 #7

Indeed I can, but I tried to use Armory originally without knowing enough and can't access those coins until the blockchain is up to date from what I can gather.

Anyhow, I wound up fixing this by deleting the blockchain and wallet from the folder and then starting over.

16uHktGZQ427svZ9SPd3LbctfXCyddGDMR
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!