Bitcoin Forum
November 25, 2026, 03:07:07 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Guide] Run your own Bitcoin Core node on testnet5  (Read 26 times)
nullama (OP)
Legendary
*
Offline

Activity: 1652
Merit: 1028



View Profile
Today at 11:54:58 AM
 #1

Let's start by defining what Testnet5 is. It's a public network defined for testing Bitcoin applications, defined by BIP 95, to replace testnet4. Notably, it doesn't have any weird timing rules like the previous test networks. It's the latest iteration of the testing network, this means that if you want to test your Bitcoin application, you should probably use testnet5.

Now, testnet5 is already up and running since a few days ago (Genesis block mined on 2026-11-14 05:03 UTC), but if you try to connect to it with the latest release of Bitcoin Core (v32.1.0) you won't find a way to do it. The application only shows testnet3 and testnet4:

Code:
./bitcoin-cli --version
Bitcoin Core RPC client version v32.1.0
Copyright (C) 2009-2026 The Bitcoin Core developers

Code:
./bitcoin-cli --help | grep testnet
       Connect to JSON-RPC on <port> (default: 8332, testnet: 18332, testnet4:
       testnet4, signet, regtest
  -testnet
       Use the testnet3 chain. Equivalent to -chain=test. Support for testnet3
       Consider moving to testnet4 now by using -testnet4.
  -testnet4
       Use the testnet4 chain. Equivalent to -chain=testnet4.

So, in this guide I'll show you how to connect to testnet5 with Bitcoin Core, which would be useful until they release a new version that supports it.

Let's start by installing the required libraries, as described in the official documentation: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

Code:
sudo apt-get install git build-essential cmake python3 libboost-dev libsqlite3-dev libcapnp-dev capnproto libzmq3-dev pkgconf systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools qt6-tools-dev-tools libgl-dev qt6-wayland libqrencode-dev

Now we're going to create a folder that will contain everything so that you can just remove it all when you're done if you want to:

Code:
mkdir ~/bitcoin_testnet5
mkdir ~/bitcoin_testnet5/data

Now, in that folder we're going to grab a specific version of the Bitcoin Core source code, specifically the one where the testnet5 is added, and build it:

Code:
cd ~/bitcoin_testnet5
git clone https://github.com/bitcoin/bitcoin.git bitcoin-core-for-testnet5
cd bitcoin-core-for-testnet5
git fetch origin pull/35861/head:testnet5
git checkout testnet5
cmake -B build
cmake --build build -j"$(nproc)"

That should take about 10 minutes or so. Meanwhile that's running (or after it's done), let's create a configuration file called bitcoin_testnet5.conf in our folder (inside ~/bitcoin_testnet5)  with :

Quote from: bitcoin_testnet5.conf
chain=testnet5
[testnet5]
addnode=lapis.erisian.com.au:18353
rpcuser=YOUR_RPC_USERNAME
rpcpassword=YOUR_RPC_PASSWORD

This specifies that we want to connect to testnet5 and provides a peer to connect to. This particular node is run by Anthony Towns. You can read more about this here: https://gist.github.com/ajtowns/ebb148819c6028387271e6f0dce5e1da
Some other well known nodes you might want to connect to come from the libbitcoin project: https://libbitcoin.org/configuration/public.html

Code:
carmine.libbitcoin.net:18353
wormer.libbitcoin.net:18353

I selected only the original erisian node and it went well. The next step is to make sure everything looks fine, in particular that we have the option for testnet5:

Code:
cd ~/bitcoin_testnet5
./bitcoin-core-for-testnet5/build/bin/bitcoind --help | grep testnet5
       testnet5:
       testnet4: 127.0.0.1:48334=onion, testnet5: 127.0.0.1:18354=onion,
       testnet4: 48333, testnet5: 18353, signet: 38333, regtest: 18444).
       testnet4, testnet5, signet, regtest
  -testnet5
       Use the testnet5 chain. Equivalent to -chain=testnet5.
       18332, testnet4: 48332, testnet5: 18352, signet: 38332, regtest:

We're ready to start the node now and let it sync (all data will be written to the data folder):

Code:
cd ~/bitcoin_testnet5
./bitcoin-core-for-testnet5/build/bin/bitcoind -conf=/home/user/bitcoin_testnet5/bitcoin_testnet5.conf -datadir=/home/user/bitcoin_testnet5/data

It should not take too long to sync as the testnet5 network is quite new. After it is synced, leave it there running (you can stop it with CTRL-C) and open a new terminal and query it:

Code:
cd ~/bitcoin_testnet5/bitcoin-core-for-testnet5/build/bin
./bitcoin-cli -conf=/home/user/bitcoin_testnet5/bitcoin_testnet5.conf -getinfo

Since we're using the same configuration file, everything is already setup, so you should see something like this:

Code:
Chain: testnet5
Blocks: 8257
Headers: 8257
Verification progress: 100.0000%
Difficulty: 226589193.0599006

Network: in 0, out 3, total 3
Version: 320100
Time offset (s): 0
Proxies: n/a
Min tx relay fee rate (BTC/kvB): 0.00000100

Warnings: (none)

That's great!, now let's create a wallet, and name it t5wallet (you can change that):

Code:
./bitcoin-cli -conf=/home/user/bitcoin_testnet5/bitcoin_testnet5.conf createwallet t5wallet

You should see something like this:

Code:
{
  "name": "t5wallet"
}

Now, let's get an address from it:

Code:
./bitcoin-cli -conf=/home/user/bitcoin_testnet5/bitcoin_testnet5.conf -rpcwallet=t5wallet getnewaddress

You will see your new address, starting with tb1.

That's it!, you now have a fully working node connected to testnet5 and a wallet you can use.

Happy testing!
NotATether
Legendary
*
Offline

Activity: 2520
Merit: 10761


┻┻ ︵㇏(°□°㇏)


View Profile WWW
Today at 12:38:18 PM
Merited by athanred (1)
 #2

Thanks for sharing!

But I guess in order to run faucets, we have to mine this chain don't we.

So I'm guessing only ASICs like BitAxe are profitable doing this? There's unfortunately no slow blocks I can take advantage of it seems (allowed me to mine so many testnet4 blocks)

▄▄████████████████████▄▄
▄███████▀▀██████▀▀███████▄
█████▀██████████████▀█████
████████▄▄██████▄▄████▀███

██████████████████████████
██▄▄██████████████▄▄██████
██▀▀██████████████████▄▄██
██████▀▀██████████████▀▀██
██████████████████████████
███▄████▀▀██████▀▀████████
█████▄██████████████▄█████
▀███████▄▄██████▄▄███████▀
▀▀████████████████████▀▀
 
 DΞX.fo 
▄▄██████
█████████
██████████
██████████
██████████
█████████
▀▀██████

▄███████
▄██████████
████████████
█████████████
█████████████
|
▄▄█
▄████▀
▄███▀█▄
▄██▀█▄██
█████▀▀█
████████
████████
▀██▄████
▄████▄▄█
▄█████▀███
▄█████▀████▀
█████▀███████
▀██▀█████████
|..BTC......XMR...
..USDT.....LTC...
....Fees  0.8%.....
athanred
Full Member
***
Offline

Activity: 227
Merit: 453


View Profile
Today at 01:11:55 PM
 #3

Quote
But I guess in order to run faucets, we have to mine this chain don't we.
Yes. If you want to have testnet5 coins, then you need to mine them, or to receive them from someone else. For example, you can try to ask Garlo Nicon, if he knows you. Maybe he will send you some coins, because he sent 10 to some users here and there.

The current difficulty, at the time of writing, is 226589193.1 for testnet5, and something around 250k for P2Poolv2 sharechain.

Quote
So I'm guessing only ASICs like BitAxe are profitable doing this?
Usually yes, unless someone will prepare some easier puzzles for CPUs. Saint Wenhao previously wrote, that he has no plans of mining testnet5, so maybe that challenge won't be replicated there, we will see. But if you don't care about the amount, then it should be possible to get a few satoshis with some CPU or GPU. And if you care more about testing, than about having "official testnet5 coins", then you can transact inside sharechain as well, and then, it can be settled on testnet5 later, if there will be enough miners, willing to push your tests there.

Quote
There's unfortunately no slow blocks I can take advantage of it seems
You can have as easy blocks as you want, P2Poolv2 sharechain is one example, with 10 seconds per block, and much easier difficulty: https://testnet5.p2poolv2.org/dashboard

However, it is a matter of pegging-out, that can consume some time, if you will be mining on a sharechain with a low hashrate. Because currently, many people can mine in P2Poolv2, and receive sharechain coins quite easily, but to actually peg-out, the sharechain will still need to make a real testnet5 block at some point in time.

Quote
allowed me to mine so many testnet4 blocks
Well, people wanted a new network without that rule, so they have it. That rule was there for a reason. Maybe if someone will point a lot of hashrate on testnet5, and leave, then some people will understand, why that rule was needed, and how it should be improved. However, if nothing like that will be there, and if no challenges for CPUs or GPUs will allow getting dust-like amounts, then many users will just use a different network, without bothering about getting testnet5 coins. Unless they will be happy with just a sharechain, that can be moved forward, even if testnet5 is stuck, and then, when it will produce a real testnet5 block, then things will be settled on a real testnet5 chain.
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!