Getting Bismuth working on Linux (Debian 9)
So, based on this post by @joseph, I decided why not try out Bismuth on Debian. For more information on Bismuth, I refer you to his post, as it covers things far better than I can here.
All I am going to do here is outline the steps I took to get the Bismuth client working and mining on my Linux box, a Debian 9 laptop.
Note: this was written as I did stuff, so its in chronological order of actions taken, the issues I ran into, and how I solved them. Read the entire post before trying to reproduce what I did.
So, firstly I cloned the repo, linked here using Git.
$ git clone https://github.com/hclivess/Bismuth
Next, because this is Python, I created a virtualenv and activated it.
$ virtualenv -p python2 venv
$ source venv/bin/activate
Now, this next bit was the result of a LOT of trial and error, but here is how I got the dependencies installed.
$ sudo apt-get install python-tk
$ pip install pyqrcode simple-crypt six pysocks
With this, stuff seemed to work fine.
Genesis
Next, I ran the following command, and saved the output - it creates our private/public keypair, etc:
$ python genesis.py
Starting the GUI
This was quite simple. Screenshot below, basically just "python gui.py".
Mining...
Mining took me a couple of minutes to work out. First, I have to start a Node.
$ python node.py
Then, in another terminal window, I launched the miner.
$ source venv/bin/activate
$ python miner.py
Easy... Or so I thought.
Problems, and my disgustingly hacky workaround.
So, the next bit is troubleshooting. I noticed my mempool.db was broken, and that I was "beyond genesis". So, here is how I fixed that.
- I deleted mempool.db and static/ledger.db
- I re-ran genesis.py, saving the output.
- I re-downloaded the ledger database file.
- I relaunched the node, and GUI, and waited a while for the blockchain to resync...
- I launched the miner.
- Profit?
$ rm mempool.db static/ledger.db
$ cd static
$ wget https://github.com/hclivess/Bismuth/raw/master/static/ledger.db
Here is a screenshot of the whole thing working. I think. I haven't mined anything yet, but I figure I'll leave it a few hours and see what happens.
Any comments/corrections or showing me that I have done something horrendously wrong are appreciated!