Title: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: NeonFlash on August 28, 2017, 06:08:41 AM Hi All,
I need some help. I am trying to import my wallet from Bitcoin Core to Bitcoin ABC wallet to get my BCC. I have already moved my Bitcoins from the original wallet of Bitcoin Core to a new instance of wallet in Bitcoin Core. Now, I need to import my original wallet into Bitcoin ABC wallet to get my BCC. Now, the issue is that Bitcoin ABC wallet is taking very long to synchronize the blockchain. It's been almost 1 week since it's running and till now only blocks till May 2016 have been synced. I still need to wait around 2 to 3 weeks more for the sychronization process to complete. So, I need an alternative solution now. I already have the completely synced blockchain for Bitcoin Core. I know that both the blockchains are not entirely same. The pre hard fork blockchain history is the same (prior to August 1st) however after August 1st the Bitcoin Core blockchain is not compatible with Bitcoin ABC wallet. Is there any way I can re-use the Bitcoin Core blockchain with Bitcoin ABC wallet so that Bitcoin ABC wallet recognizes the incompatible blocks, discards them and then starts synchronizing again from August 1st? It would save me a lot of time. Please suggest some alternatives. I don't think Bitcoin ABC wallet full sync is an option for me right now since it's taking very long. Thanks. Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: ranochigo on August 28, 2017, 08:20:25 AM Is there any way I can re-use the Bitcoin Core blockchain with Bitcoin ABC wallet so that Bitcoin ABC wallet recognizes the incompatible blocks, discards them and then starts synchronizing again from August 1st? It would save me a lot of time. Yes. Copy the Blockchain for Bitcoin over to another directory. Point Bitcoin ABC to that new directory using -datadir=[DIRECTORY] when starting up.Next, go to Help>Debug Window>Console. Type in this: Code: invalidateblock 00000000000000000019f112ec0a9982926f1258cdcc558dd7c3b7e5dc7fa148 Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: NeonFlash on August 28, 2017, 11:31:39 AM @ranochigo: Thanks. This information is very useful.
Can I copy over the entire Bitcoin data directory from Bitcoin Core to Bitcoin ABC wallet and not just specific files from it? There are a lot of dat files inside the data directory and I'm assuming that they should be valid for Bitcoin ABC wallet as well? Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: ranochigo on August 28, 2017, 11:41:28 AM @ranochigo: Thanks. This information is very useful. Yes. If you remove any of the files, the blockchain will be corrupted and you will have to download it again. Just asking, did you prune it?Can I copy over the entire Bitcoin data directory from Bitcoin Core to Bitcoin ABC wallet and not just specific files from it? There are a lot of dat files inside the data directory and I'm assuming that they should be valid for Bitcoin ABC wallet as well? Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: NeonFlash on August 28, 2017, 11:53:19 AM No I didn't prune it. I don't even know what means :D
So, I'm copying over the complete Data Directory from Bitcoin Core to Bitcoin ABC wallet as I'm writing this post. Should I enter the invalidateblock command in debug console after I've already pointed Bitcoin ABC to new data directory? Wouldn't Bitcoin ABC client just start syncing as soon as the client starts? Or maybe the invalidateblock command will make the client parse the block chain again? Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: ranochigo on August 28, 2017, 12:00:45 PM Should I enter the invalidateblock command in debug console after I've already pointed Bitcoin ABC to new data directory? Yup.Wouldn't Bitcoin ABC client just start syncing as soon as the client starts? Or maybe the invalidateblock command will make the client parse the block chain again? No. The way Bitcoin full nodes work is that they will always follow the longest valid proof of work chain. IIRC, Bitcoin currently has the longest proof of work chain and due to that, the clients will not synchronize with your peers. Once you invalidate that block, you are "deleting" all the blocks till the point of fork. The Bitcoin Cash blockchain will now be able to be synchronized with your peers.Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: NeonFlash on August 28, 2017, 12:34:54 PM I tried this method however I get an error from the Bitcoin ABC client when I attempt to start it.
Error Dialog box states: "Corrupted Block database detected. Do you want to rebuild the block database now?" And there are two options: "OK" and "Abort". If I select Abort, it exits the application and I don't get the opportunity to enter the invalidateblock command in debug console. Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: ranochigo on August 28, 2017, 12:38:00 PM I tried this method however I get an error from the Bitcoin ABC client when I attempt to start it. Weird. Are you pointing it to the correct data directory? Can you post the debug log?Error Dialog box states: "Corrupted Block database detected. Do you want to rebuild the block database now?" And there are two options: "OK" and "Abort". If I select Abort, it exits the application and I don't get the opportunity to enter the invalidateblock command in debug console. Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: NeonFlash on August 28, 2017, 12:42:27 PM Here are the debug logs corresponding to the session which gives the error:
Code: 2017-08-28 12:31:52 Bitcoin version v0.14.6.0-a46e63c Looks like it consistently fails at block 481890 with hash 000000000000000000752f7cdc3a89e9303c3f810bffe4ce9f73dfae8e0a9301. Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: ranochigo on August 28, 2017, 01:04:57 PM Here are the debug logs corresponding to the session which gives the error: Hmm, could you point Bitcoin Core at that directory? If it doesn't corrupt, it is likely an issue with the compatibility and you can just invalidateblocks using Bitcoin Core.-snip- If it does corrupt, try to copy it out again and try again. Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: NeonFlash on August 28, 2017, 01:35:41 PM I installed Bitcoin Core and pointed it to that Data Directory. It successfully opened and started synchronizing.
So, I went to debug console and typed in the invalidateblock command you mentioned before. However, in the debug console I don't see any output or response to this command. And the Bitcoin Core UI still shows it attempting to perform the synchronization. Did the invalidateblock command work? Title: Re: Reusing Bitcoin Core Blockchain with Bitcoin Cash wallet Post by: rovchris on August 28, 2017, 01:59:10 PM @ranochigo: Thanks. This information is very useful. Can I copy over the entire Bitcoin data directory from Bitcoin Core to Bitcoin ABC wallet and not just specific files from it? There are a lot of dat files inside the data directory and I'm assuming that they should be valid for Bitcoin ABC wallet as well? Make sure that you dont mess with any of the files as you may corrupt the entire blockchain. Funny how BCH blockchain can now get 8X more larger that BTC blockchain moving forward. |