Author

Topic: How to duplicate BTC blockchain to use it with BCH wallet please ? (Read 546 times)

sr. member
Activity: 263
Merit: 250
Thank you for your answers :-)
staff
Activity: 3458
Merit: 6793
Just writing some code
You cannot and should not delete any files. If your Bitcoin Core datadir is after the fork, DO NOT use it with Bitcoin ABC. Using a datadir built from after the fork will result in unknown and unexpected behavior as it will be using Bitcoin Core's chainstate which is invalid to ABC. Do not delete any files as that can and will corrupt your databases.

You can create a new Bitcoin ABC datadir and copy only the blocks folder (and everything in it) to the ABC datadir. Then start ABC with the --reindex option so that it builds its own databases and chainstate from scratch.

If your Armory is synced up with Core past the fork point, DO NOT use the Armory databases when trying to switch to Bitcoin ABC. That will result in unknown and unexpected behavior. Instead, just let Armory build its databases off of ABC once ABC has fully synced.
member
Activity: 83
Merit: 10
You need to understand there's two software pieces at work.... Armory relies on bitcoind (nominally, Bitcoin Core) for it's block history and transaction and block validation.

You'll need to download the hardfork node software (BitcoinABC I believe it's called), create a copy of your existing bitcoind data directory, and configure bitcoinABC to work against the copied data directory.  I would expect (as much as I expect anything in bullshit-hardfork-land to work) that bitcoinABC would start up, validate the blockchain, hit the point where they hardforked, then reach out to the network and fetch the new hardfork blocks.

Once the new bitcoind is synced up and happy, you'll need to take a copy of your armory environment, and point that copy at the new bitcoind. That will let you see your balances on the BCH chain.  Note that Armory is currently not capable of creating valid BCH transactions, so you will not be able to spend the coins yet.

You need to be very careful here. Ideally you want each of these pieces running in its own VM.  If you run a misconfigured bitcoinABC instance on a machine with a normal Core installation, bitcoinABC will munge Core's data directory.  Likewise, if you take an Armory instance and flip-flop it between Core and ABC, you're likely to break Armory's understanding of history and will have to re-scan the blockchain to have a correct transaction history and spendable balance.
sr. member
Activity: 263
Merit: 250
Hi

To avoid downloading the whole BCH blockchain, I think I can copy my BTC up to date blockchain, delete the updates after the fork, and tell BCH wallet to use the duplicated blockchain with the -datadir option, yes ?

But in the duplicated blockchain folders, what files and folder must I delete to go back at before fork state, please ?

Once the files deleted, when I'll start BCH wallet, it should update blockchain quite fast, starting to download blocks from a few days ago only, right ?

Many thanks !
Jump to: