This repository contains a setup for solo mining Bitcoin using a Python listener and a Go-based miner. The mining pool used is solo.ckpool.org. This guide will walk you through the setup and execution steps for the solo mining process.
Before you begin, ensure you have the following installed on your system:
- Python 3.x
- Go (Golang) 1.x
-
Clone the Repository:
git clone <repository-url> cd <repository-directory>
-
Build the Go Miner:
go build go_solo_block.go
-
Create and Configure the Environment File:
- Copy the example environment file:
cp .env.example .env
- Open
.env
in your favorite text editor and update theADDRESS
with your Bitcoin address and set theDIRECTORY
path where you want to store log and data files. This directory setting helps avoid errors when running the miner as a cron job.
- Copy the example environment file:
-
Run the Mining Process:
- Start the mining process with the desired number of workers (e.g., 8 workers):
sh go_test.sh 8
- Start the mining process with the desired number of workers (e.g., 8 workers):
Before you start actual mining, you can test the hashing speed by configuring the environment file.
- Open the
.env
file. - Set the value of
SHOW_HASHRATE
to1
to display the hashrate for each worker.
- Logging: The Python listener logs important events and errors in the
miner.log
file located in the directory specified in the.env
file. - Directory Path: Ensure the directory path specified in the
.env
file is correct and writable. This is crucial for the smooth operation of the cron job and file handling.