Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: cellard on December 09, 2017, 12:31:44 AM



Title: Corrupted blockchain
Post by: cellard on December 09, 2017, 12:31:44 AM
What a disaster. I took like a week to get a full Bitcoin ABC node synced on my laptop in order to access my Bitcoin Cash after the fork, I enabled prune mode on it, everything was good.

Then I wanted to use testnet on Bitcoin Core also on my laptop, to practice with raw transactions from one computer to another (I would also run testnet on my desktop).

Anyway, I installed the latest Core version on my laptop, opened it, and I got the "reconstructing UTXO" window. I was like "weird.. I renamed the Bitcoin folder on %appdata% so it's not the default "Bitcoin" one and my Bitcoin ABC uses a folder called "Bitcoin ABC". I closed it, opened testnet Core, then realized "testnet3" folder was created on the Bitcoin ABC folder. And then I realized that for some reason, Bitcoin Core was using my "Bitcoin ABC" folder as the default datadir folder... wtf??

Of course, since I opened it without tesnet the first time after the install and saw the "reconstructing UTXO" window, I realized how the Bitcoin ABC blockchain was modified during these minutes I saw that window. I confirmed it when I opened Bitcoin ABC and it gave me a "corrupted blockchain" message and then started from scratch. What a disaster. I will need to sync ABC again from day 1.

Why the hell did Bitcoin Core choose by default the "Bitcoin ABC" folder? that was weird. It should have created a "Bitcoin" folder in %appdata% as usual but it didn't. Also it didn't. I've had to add -datadir=D:\Bitcoin to put the blockchain files on a folder called "Bitcoin", otherwise it kept rewriting block files on "Bitcoin ABC" folder. It must be Bitcoin ABC's fault that confused Bitcoin Core or something. It didn't prompt me where to install the blockchain files or anything during install.


Title: Re: Corrupted blockchain
Post by: jackg on December 09, 2017, 01:33:09 AM
What a disaster. I took like a week to get a full Bitcoin ABC node synced on my laptop in order to access my Bitcoin Cash after the fork, I enabled prune mode on it, everything was good.

Then I wanted to use testnet on Bitcoin Core also on my laptop, to practice with raw transactions from one computer to another (I would also run testnet on my desktop).

Anyway, I installed the latest Core version on my laptop, opened it, and I got the "reconstructing UTXO" window. I was like "weird.. I renamed the Bitcoin folder on %appdata% so it's not the default "Bitcoin" one and my Bitcoin ABC uses a folder called "Bitcoin ABC". I closed it, opened testnet Core, then realized "testnet3" folder was created on the Bitcoin ABC folder. And then I realized that for some reason, Bitcoin Core was using my "Bitcoin ABC" folder as the default datadir folder... wtf??

Of course, since I opened it without tesnet the first time after the install and saw the "reconstructing UTXO" window, I realized how the Bitcoin ABC blockchain was modified during these minutes I saw that window. I confirmed it when I opened Bitcoin ABC and it gave me a "corrupted blockchain" message and then started from scratch. What a disaster. I will need to sync ABC again from day 1.

Why the hell did Bitcoin Core choose by default the "Bitcoin ABC" folder? that was weird. It should have created a "Bitcoin" folder in %appdata% as usual but it didn't. Also it didn't. I've had to add -datadir=D:\Bitcoin to put the blockchain files on a folder called "Bitcoin", otherwise it kept rewriting block files on "Bitcoin ABC" folder. It must be Bitcoin ABC's fault that confused Bitcoin Core or something. It didn't prompt me where to install the blockchain files or anything during .

This is a very well known issue (in most forked coins) as you are probably aware. Although, I thought that the problem had been fixed (it would be a mixup with the config files that point it in the other folder). Editing these config files will just redirect both of them. The forked clients always seem a bit badly made with minimal changes that cause errors like this one.

A solution, if you haven't found one yet, make a script or a shortcut (or a shortcut to a script) for each forked client you install - probably the only way to get around the error... And set each one equal to the corresponding datadir (shortcuts should run as scripts do). This is what I do to get past it anyway.


Title: Re: Corrupted blockchain
Post by: cellard on December 09, 2017, 08:00:42 PM
What a disaster. I took like a week to get a full Bitcoin ABC node synced on my laptop in order to access my Bitcoin Cash after the fork, I enabled prune mode on it, everything was good.

Then I wanted to use testnet on Bitcoin Core also on my laptop, to practice with raw transactions from one computer to another (I would also run testnet on my desktop).

Anyway, I installed the latest Core version on my laptop, opened it, and I got the "reconstructing UTXO" window. I was like "weird.. I renamed the Bitcoin folder on %appdata% so it's not the default "Bitcoin" one and my Bitcoin ABC uses a folder called "Bitcoin ABC". I closed it, opened testnet Core, then realized "testnet3" folder was created on the Bitcoin ABC folder. And then I realized that for some reason, Bitcoin Core was using my "Bitcoin ABC" folder as the default datadir folder... wtf??

Of course, since I opened it without tesnet the first time after the install and saw the "reconstructing UTXO" window, I realized how the Bitcoin ABC blockchain was modified during these minutes I saw that window. I confirmed it when I opened Bitcoin ABC and it gave me a "corrupted blockchain" message and then started from scratch. What a disaster. I will need to sync ABC again from day 1.

Why the hell did Bitcoin Core choose by default the "Bitcoin ABC" folder? that was weird. It should have created a "Bitcoin" folder in %appdata% as usual but it didn't. Also it didn't. I've had to add -datadir=D:\Bitcoin to put the blockchain files on a folder called "Bitcoin", otherwise it kept rewriting block files on "Bitcoin ABC" folder. It must be Bitcoin ABC's fault that confused Bitcoin Core or something. It didn't prompt me where to install the blockchain files or anything during .

This is a very well known issue (in most forked coins) as you are probably aware. Although, I thought that the problem had been fixed (it would be a mixup with the config files that point it in the other folder). Editing these config files will just redirect both of them. The forked clients always seem a bit badly made with minimal changes that cause errors like this one.

A solution, if you haven't found one yet, make a script or a shortcut (or a shortcut to a script) for each forked client you install - probably the only way to get around the error... And set each one equal to the corresponding datadir (shortcuts should run as scripts do). This is what I do to get past it anyway.

My idea was to never mix my main Bitcoin Core installation with any other fork, but I just wanted to launch the testnet of Core in another laptop, and then since I had ABC installed, things went south. I will just guarantee that I always set -datadir=D:\*NameOfTheForkHere* everytime that I install a new fork for testing purposes or just to dump the stupid thing on my laptop.

Once I have my proper Linux laptop set I will never install anything else but Bitcoin Core.


Title: Re: Corrupted blockchain
Post by: HCP on December 10, 2017, 05:11:42 AM
Why the hell did Bitcoin Core choose by default the "Bitcoin ABC" folder? that was weird. It should have created a "Bitcoin" folder in %appdata% as usual but it didn't. Also it didn't. I've had to add -datadir=D:\Bitcoin to put the blockchain files on a folder called "Bitcoin", otherwise it kept rewriting block files on "Bitcoin ABC" folder. It must be Bitcoin ABC's fault that confused Bitcoin Core or something. It didn't prompt me where to install the blockchain files or anything during install.
You should really be asking why the hell the "Bitcoin ABC" devs deliberately chose to use the same default install and data directory paths as Bitcoin Core... software which had been around for 8 years! ::) It would be like Internet Explorer installing itself to the same directories as Chrome.

This is not the fault of Bitcoin Core :P