Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: MaxHillebrand on December 31, 2017, 02:25:22 PM



Title: Moving BitcoinCore from Windows to Raspberry Pi - Raspbian
Post by: MaxHillebrand on December 31, 2017, 02:25:22 PM
Hi,
I've been running a BitcoinCore Client for about a year on my Windows 10 machine and now I want to move it over to my Raspberry Pi 3.
I've followed the great and thorough instructions by http://raspnode.com/diyBitcoin.html (http://raspnode.com/diyBitcoin.html) and I can start BitcoinCore just fine [both the GUI and the daemon].
However, downloading the entire Blockchain over the Raspberry is pretty much impossible from what I've heard.

I tried copying the blocks and chainstate directory from the Windows Client on the HDD [I know that a SSD is preferable, but I think the HDD works as well] I use for the Raspberry.
Are there any issues copying from a Windows client to a Raspbian client?

When running bitcion-qt with the -datadir tag pointing to the mounted HDD following error shows: Error opening block database.
I've deleted the chainstate directory from the HDD, that resolved the error, but I have to redownload the current chainstate from the Pi, which is not ideal...
Any way I can work around this issue?

So now I only have the blocks directory on the HDD and when I run bitcoin-qt it says it is reindexing blocks on disk. Does this mean that it is only verifying if the available blocks are correct? And once the reindexing is finished, are there any other steps necessary?


I would be delighted to get help - thanks in advance!
And a prosperous new year to all of you!!


Title: Re: Moving BitcoinCore from Windows to Raspberry Pi - Raspbian
Post by: aleksej996 on December 31, 2017, 02:50:10 PM
I don't know why transferring the chainstate didn't work for you.
I don't think that chainstate has that much to do with verifying blocks as much as extracting current balance of the addresses from blocks (not really, it just saves UTXOs).
There are no other steps needed after reindexing blocks. Your node should be ready after that.


Title: Re: Moving BitcoinCore from Windows to Raspberry Pi - Raspbian
Post by: xdrpx on December 31, 2017, 02:52:35 PM
Hi I use my same blockchain data on both my Windows 10 and Raspberry PI2. Yes you're right that downloading the entire blockchain on the pi will consume a lot of memory and may take a lot of time (I've faced so many issues synchronizing on it and the daemon used to freeze after a while). So what I did was the same, I copied the fully synchronized blockchain from my desktop PC running windows 10 to my Raspberry PI 2's external HDD, mounted the drive (it automounts on boot), set the --datadir path on it and it was working fine. The raspberry pi2 only had to download 1-2 blocks from the time I moved it till I got it running.

If you're having chainstate issues, I suggest you download a couple of blocks more on your windows, safely shut it down and re-copy it to your PI's external HDD and try again. I'm pretty sure it should work fine.


Title: Re: Moving BitcoinCore from Windows to Raspberry Pi - Raspbian
Post by: MaxHillebrand on December 31, 2017, 03:25:10 PM
That sounds great!
It's currently still reindexing - it took ~ 1 hour for the first 4 years, which I think is normal.

Yes, the chainstate is a LevelDB database and just the mempool + some meta date.
I think it should be updated once the reindexing is finished, however, I'm not sure on that... Let's see after it's finished.

I tried the fix described here https://www.reddit.com/r/Bitcoin/comments/3ywfyq/got_error_opening_block_database_in_bitcoinqt/ (https://www.reddit.com/r/Bitcoin/comments/3ywfyq/got_error_opening_block_database_in_bitcoinqt/), but this didn't work for me - I was too lazy to troublshoot - thus I decided to scrap the entire chainstate  ;D

Thanks @xdrpx and @aleksej996 for the fast reply! Have a good one!!