Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ragnar dannesk gold on February 20, 2019, 02:53:22 AM



Title: How to re-verify blockchain using imported data
Post by: ragnar dannesk gold on February 20, 2019, 02:53:22 AM
I wanted to see how long my machine would take to re-verify the Bitcoin blockchain, but without having bandwidth limitations (so I still want to use the blockchain I have downloaded).

Is there a way to get Bitcoin core to use this data, but to not trust it? And re-verify from block 1?

I'm guessing I'd have to delete a file (possibly 'chainstate' folder?) and start Core again.

Any help is much appreciated!


Title: Re: How to re-verify blockchain using imported data
Post by: ragnar dannesk gold on February 20, 2019, 03:14:26 AM
I see it will be:

-reindex-chainstate   Rebuild chain state from the currently indexed blocks
-reindex   Rebuild chain state and block index from the blk*.dat files on disk


I'm guessing reindex? Although I'm not sure of the difference. Anyone?


Title: Re: How to re-verify blockchain using imported data
Post by: ragnar dannesk gold on February 20, 2019, 03:44:55 AM
-reindex:


-reindex

Method not found (code -32601)

And

-verifychain  checks something but only takes 5 seconds to do.


Title: Re: How to re-verify blockchain using imported data
Post by: JeromeTash on February 20, 2019, 05:47:42 AM
So sad no one is able to instantly help you from this board. Could you please try moving the topic to Bitcoin Technical Support (https://bitcointalk.org/index.php?board=4.0)?
You could easily get someone there with much more experience to help you out.
The move topic button is on the bottom left of your page. I hope you get helped out ASAP.


Title: Re: How to re-verify blockchain using imported data
Post by: ragnar dannesk gold on February 20, 2019, 08:58:59 AM
Thanks Jerome. I figured it out.

In case anyone else has this question, my problem was because I was using '-reindex' in the console, rather than adding it to the bitcoin-qt.exe to run (via command line- "Z:\Bitcoin\bitcoin-qt -reindex").

I am not sure whether deleting chainstate would have cause issues, but it does seem that reindex has done that and synced from block 1 to (currently) August 2018 in 3 hours using only 13MB of bandwidth. HDD bottlenecked for the first 8 years, and CPU for the last 2 years worth.

Edit - Finished reindex in ~4 Hours on a 5 year old PC (7200rpm HDD, i5 4690 CPU, 16gb RAM (dbcache set to 12,000)).


Title: Re: How to re-verify blockchain using imported data
Post by: KingZee on February 21, 2019, 05:16:46 AM
Thanks Jerome. I figured it out.

In case anyone else has this question, my problem was because I was using '-reindex' in the console, rather than adding it to the bitcoin-qt.exe to run (via command line- "Z:\Bitcoin\bitcoin-qt -reindex").

I am not sure whether deleting chainstate would have cause issues, but it does seem that reindex has done that and synced from block 1 to (currently) August 2018 in 3 hours using only 13MB of bandwidth. HDD bottlenecked for the first 8 years, and CPU for the last 2 years worth.

Its nice you figured that on your own :) I was about to write a post telling you it's a runtime parameter, but here's a merit. Good luck running your node!