A version of this article originally appeared on Average.
The light at some impressive recent happenings in the bitcoin mining sphere, I was inspired to set up my own little four million hashes per second (MH/s) solo mining operation and see how I could improve it. A few of the aspects that I think could use some work are related to connectivity and making my most ‘pure’ setup in the sense of decentralization and non-trust.
So, I first started digging into exactly how solo mining is done in today’s highly industrialized mining world. I’m not interested in pay-per-share shared mining, as it drains all the fun of solo mining and instills some confidence. I want to contribute directly to the security of the pure hash rate of the Bitcoin network.
Note: I assume the reader knows that solo mining is incredibly difficult and you are more than likely never to generate a block. Just full disclosure here. Having said that…
Years ago, solo mining required setting up a full, industrial-grade pool designed for thousands of remote individual miners pooling their hash rates. I remember trying to set one up using Eligius code or one of the other lesser known pool projects on GitHub and it was difficult to get all the individual software components working. Knowing that, let’s just say I didn’t expect solo mining to be any easier today.
CK Pool has its own “solo” counterpart (which I honestly love that it exists), and it’s kind of a pseudo-solo mining pool where individual miners get 98% of the block reward (by paying a fee 2%) when they generate a block and other pool participants get 0%. Contrast this with typical pool mining where all hash rate contributors receive a share of the block reward. The Solo CK Pool is great, but ultimately using the pool introduces a certain confidence that shouldn’t exist in a pure solo mining setup. There is some incompatibility with the latest version of Bitcoin Core and the newest CK Pool code as well, based on my attempt to use it for this mining setup.
After browsing DuckDuckGo and GitHub issues, I came across BFGMiner’s ability to communicate with a local bitcoind for solo mining purposes (!). I had no idea this feature existed since BFGMiner was typically used to interface with GPUs or ASIC hardware when mining.
Note: CGMiner also has this feature. Thanks Con!
So, with this new knowledge of BFGMiner, we can eliminate any hard-to-configure pool software, or any trusted pool, and rely only on BFGMiner and a full Bitcoin Core node. This fits the bill for my purist solo mining setup.
That leaves the improvements to connectivity. How this can be reinforced by using Blockstream Satellite to supplement the set of peers my node uses while my ISP is running, and as a failover in case my ISP becomes unstable and drops my connection. This way my mining hardware can know which block is the last block to build on and no effort is wasted.
A search domain is block exit, yet. Options exist like Starlink or Iridium which can be used to broadcast a newly found block. Starlink is probably overkill in terms of cost due to the likelihood of solo mining a block, and the blocks themselves being relatively small in size. But it is a good option. SMS is another option that I will explore in future blog posts.
How to mine solo like a boss
The guide assumes Ubuntu 20.04. Warning: a compilation is necessary.
It’s really very easy now. It is no longer necessary to set up a full-fledged mining pool. BFGMiner can handle everything we need. So let’s put everything in place.
Configure Blockstream Satellite
Follow Blockstream’s excellent guide to assemble a satellite dish, align it, and install all necessary software to start receiving Bitcoin data via a geosynchronous satellite.
Install blocksat-cli and Bitcoin Satellite, the patched Bitcoin Core node that Blockstream maintains for satellite connectivity.
Configure BFGMiner
BFGMiner is a GPU/ASIC mining software that also supports solo mining using local bitcoind!
This software will link our mining hardware to our local Bitcoin satellite node.
$ git clone https://github.com/luke-jr/bfgminer && cd bfgminer
For Ubuntu, all you have to do is install the dependencies and then compile normally.
$ sudo apt install automake autoconf libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev
So build it.
$ ./autogen.sh
$ ./configure
$ do
With your bitcoind synced and receiving data via satellite (debug.log should produce bitrate data if received successfully), point BFGMiner at your local node. Make sure to set server=1 and rpcuser=user rpcpassword=pass in bitcoin.conf
$ ./bfgminer -T -D -P -o ‘127.0.0.1:8332’ -O user:pass –stratum-port 3334 –generate-to
This will tell BFGMiner to fetch data from your node and on which port to listen for stratum miners (essentially all modern ASICs use stratum).
Once BFGminer is running, simply point your hardware ASIC to the IP address your bitcoind and BFGMiner are running on (port 3334) instead of a normal mining pool like Slush Pool. You should start seeing low difficulty shares submitted by the mining hardware in the BFGminer console output. That’s it! You mine solo like a boss and have a backup blockchain data source via a geosynchronous satellite. How awesome is that? Good luck with mining!
Learn more about Blockstream Satellite here:
This is a guest post from Grubles. The opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.