Bitcoin Forum
November 28, 2026, 02:23:24 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Guide] Solo mine on testnet5 with your own node using CPU, GPU, and ASIC  (Read 12 times)
nullama (OP)
Legendary
*
Offline

Activity: 1666
Merit: 1052



View Profile
Today at 12:23:20 PM
 #1

I have been recently experimenting with testnet5, and wrote a guide about how to run a Bitcoin Core node on testnet5 here: https://bitcointalk.org/index.php?topic=5600889.msg67381265#msg67381265

Go to that post if you don't have a testnet5 address for the payouts. You will need that later.

We are going to use libbitcoin which provides a stratum v1 interface and testnet5 out of the box, so that you can use any kind of miner with it.

First, let's start by installing the required libraries: https://libbitcoin.org/start/index.html

Code:
sudo apt install build-essential git autoconf automake libtool pkg-config curl

Now we should be ready to build libbitcoin server, but it's not really that obvious, so, copy this script to anywhere you have write access to, like ~/llibbitcoin-for-testnet5/build.sh for example. The latest master source was giving me an error, so I'm using here the version that worked for me:

Code:
ROOT="$(cd "$(dirname "$0")" && pwd)"
PREFIX="$ROOT/libbitcoin"
SRC="$ROOT/src"
SERVER_TAG=v4.0.3957

mkdir -p "$SRC"
cd "$SRC"

if [[ ! -d libbitcoin-server/.git ]]; then
  git clone --branch "$SERVER_TAG" --depth 1 \
    https://github.com/libbitcoin/libbitcoin-server.git
fi
cd libbitcoin-server

# install-cmake.sh defaults each library TAG to "master"; override to the release set.
export libbitcoin_system_TAG=v4.0.10624
export libbitcoin_database_TAG=v4.0.4969
export libbitcoin_network_TAG=v4.0.7596
export libbitcoin_node_TAG=v4.0.4531
export libbitcoin_server_TAG="$SERVER_TAG"

# IMPORTANT: --prefix must be an absolute path. Relative prefixes break when
# later packages look for earlier ones under a different build cwd.
./builds/cmake/install-cmake.sh \
  --prefix="$PREFIX" \
  --build-config=release \
  --build-link=static \
  --build-skip-tests

echo
echo "Installed: $PREFIX/bin/bs"
"$PREFIX/bin/bs" -v || true

Then make it executable and run it:

Code:
cd ~/llibbitcoin-for-testnet5
chmod +x build.sh
./build.sh

Once that finished after a few minutes you should see something like:

Code:
'libbitcoin-server' installation complete.
Completed successfully.

Installed: /home/user/libbitcoin-for-testnet5/libbitcoin/bin/bs
Version Information...
secp256k1............ internal
tls.................. internal tls 1.3
libbitcoin-system.... 4.0.1 1c52e5d9
libbitcoin-database.. 4.0.1 91f24e1d
libbitcoin-network... 4.0.1 92135a50
libbitcoin-node...... 4.0.1 74ae401e
libbitcoin-server.... 4.0.1 cee5cf80
compiled schema...... 4.0.34

Let's now create a data folder to hold the testnet5 blockchain data:

Code:
mkdir ~/libbitcoin-for-testnet5/data

Now let's create a config file for our bitcoin server. Create a text file at ~/libbitcoin-for-testnet5/libbitcoin-testnet5.cfg with these contents:

Code:
[bitcoin]
network = testnet5

[folders]
root = data

[stratum_v1]
bind = 0.0.0.0:58880
connections = 10
expiration_minutes = 0
inactivity_minutes = 60
payout_address = YOUR_TESTNET5_ADDRESS

Now it's time for us to start mining! Let's run this first so that our server is listening:

Code:
cd ~/libbitcoin-for-testnet5
./libbitcoin/bin/bs -c libbitcoin-testnet5.cfg -a
Now the server is ready. The next thing is just to point your miner to it.

If you want to mine with CPU and GPU, you would need to use bfgminer, you can read how to set it up in a previous guide I did: https://bitcointalk.org/index.php?topic=5415861.0

Once it is built, you can run it like this:
Code:
       ./bfgminer \
       -o stratum+tcp://127.0.0.1:58880 \
       -u rig1 -p x \
       -S cpu:auto -S opencl:auto

You will see something like this:



Now, for an ASIC, I'm using cgminer from kano with a Compac F, you might want to read the compilation bits from my previous guide here:
https://bitcointalk.org/index.php?topic=5415335.0
(ignore the other repo and the source code changes as things have changed, just use kano github and look at the build steps). Then you can just run cgminer like this:

Code:
sudo ./cgminer \
  -o stratum+tcp://127.0.0.1:58880 \
  -u rig1 \
  -p x



Or if you have a different miner, you can just point it to your local testnet5 stratum v1 url, and that's it!, you will be solo mining testnet5!

Happy testing, solo mining, or whatever you want to do with testnet5!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!