TLDR; Be cool, run bitcoin-qt from Bitcoin-Core and Bitcoin-ABC in Docker containers.
So, last week I thought it was finally time to split my Bitcoin wallet and check out Bitcoin Cash. Before I dove deeper into it, I naively expected there to be some application just supporting both. That would be awesome, wouldn't it? Apart from being very useful, it would also save around 140G of space on any computer using Bitcoin-Core and Bitcoin-ABC... but, hey, it's Open Source and I am sure someone will come up with a clever solution at some point.
Meanwhile, if you want to start using both, BTC and BCH (or BCC as it is referred to in Bitcoin-ABC) you have to be very careful, patient and creative... or lazy and cool and use Docker: Let's assume you have your Bitcoin-Core files in ~/.bitcoin and you are running Ubuntu (the latter is not too important for the general process).
- Create a directory for your Bitcoin-Cash files. I suggest
~/.bitcoin-bch
. - Copy your wallet from
~/.bitcoin/wallet.dat
in the directory created in step 1. - Optionally rename your
.bitcoin
directory to.bitcoin-btc
, just because it's more consistent and we all do love consistency, don't we?
So far, this is pretty straight forward. You can still access your old wallet on the BTC Blockchain using bitcoin-qt -datadir=~/.bitcoin-btc
. What I did next - and what you should not do - was to add the Bitcoin-ABC PPA from here [ https://launchpad.net/~bitcoin-abc/+archive/ubuntu/ppa] and install bitcoin-qt from there. Now, what I didn't expect was that it would just overwrite my Bitcoin-Core/usr/bin/bitcoin-qt
, thus leaving me without access to the BTC Blockchain. So, I started renaming the binary, removed the PPA again, uninstalled the Bitcoin-ABC package and finally installed bitcoin-qt from Bitcoin-Core again.
Now I had them both in non default locations. To make it at least a bit more comfortable and to avoid calling one binary without or with the wrong datadir, I created some wrapper scripts. Not pretty, but hacky and it worked. Kind of. The first annoyance of course it, that this way your Bitcoin* packages are not updated automatically by apt anymore and the second one I discovered when I started Bitcoin-Core and it showed up with my wallet with my BTCs; then I started Bitcoin-ABC and (after downloading the whole Blockchain) it showed my wallet with my BCHs; then I started both and of course that didn't work, because they both use the same network address... I guess, you could solve this by doing some network configuration, but how much cooler would it be to just run them in Docker containers? The answer is: Much cooler! So I started getting my container to work and everything worked very smoothly, until I actually run bitcoin-qt and display the GUI on my host system. For some reason that I still have to look into, QT applications are shy and need some special attention before they show you their buttons, namely you have to set ENV QT_GRAPHICSSYSTEM="native"
, otherwise you will just get empty windows.
Some detours later and very late on the weekend (aka Monday noon) I finally had a nice pair of clean working images.
Check them out!
[https://github.com/kschwank/bitcoin-abc-docker]
[https://github.com/kschwank/bitcoin-core-docker]
The images are automatically build on Docker Hub, so you can just download the scripts bitcoin-qt-btc.sh
and bitcoin-qt-bch.sh
, adjust the uid:gid and run them.
The scripts actually expect the files to be in ~/.bitcoin-btc
and ~/.bitcoin-bch
, so if you followed step 1-3 before then you are already good to go.
When starting bitcoin-bch it will download the whole Blockchain once again (~140GB), so that will take a while. During one of my detours I tried to just use a copy of the blockchain from .bitcoin, but that didn't work for me.
While I am pretty sure, the containers won't hurt your wallet files, please make a backups anyway and please always understand what you are doing, at least to the extend that you don't hurt yourself or others.
Also: Tell me how the containers work for you! There's probably still some room for improvement.
Congratulations @nodeboy! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You published your First Post
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit