Below you will find the instructions for joining testnet7 using a Windows machine. This guide is for farmers that want to run the testnet on the same machine as their mainnet. If you want to do it on a seperate device, please see https://github.com/Chia-Network/chia-blockchain/wiki/How-to-connect-to-the-Testnet for simple instructions.
First, we need to create a Windows Subsystem for Linux (WSL).
wsl –set-default-version 1
. WSL1 better supports access to your ntfs-formatted windows drives through the automatic mount points /mnt/<drive letter>
, including network shares, which makes file transfers and access between Linux and Windows much easier when we start plotting.You are now able to use the Linux CLI in Windows!
Make sure to install the latest updates for your security with
sudo apt update
and sudo apt full-upgrade
.
For more information see: https://www.windowscentral.com/install-windows-subsystem-linux-windows-10
You may now proceed to follow the procedure outlined in the Chia Network wiki install instructions.
Note: you don’t need to install the GUI parts, as our CLI obviously won’t have a use for it.
Below you find the relevant code:
# Install Git sudo apt install git -y # Checkout the source and install git clone https://github.com/Chia-Network/chia-blockchain.git -b latest --recurse-submodules cd chia-blockchain sh install.sh . ./activate
chia init
chia configure -t t
Now comes a tricky part. Using chia configure -t t
doesn’t change all the ports instantly.
the previous step only changed the target network from mainnet to testnet7 and the external port from 8444 to 58444 in config.yaml. All other internal TCP ports are 8XXX, just like your Windows running the mainnet instance. This will lead to TCP ports conflicts.
To change this, we need to go to the config.yaml file and change all 8xxx ports to 58xxx ports (about 10 occurences), change the 55400 to 58400 (2 occurences) and change the 9256 port to 59256 (1 occurence). You can do this by
nano ~/.chia/mainnet/config/config.yaml
in the Linux CLI (use the arrow keys to navigate).Safe your changes using ctrl+O and then hit enter. Use ctrl+X to close the nano instance and return to your Linux CLI.
\\wsl$\Ubuntu 20.04\home\<username>\ .chia\mainnet\config\config.yaml
and changing the config.yaml using Notepad.
Safe the config.yaml file after the edits.
It’s time to start synching the testnet7 blockchain and the wallet. This is done by using
chia start farmer
.
At this point, if you get an error try to retrace the previous steps. Still having issues? Our experts will support you in our Discord channel
See if all processes started correctly by using ps -Af | grep chia
use the command chia show -s -c
to see how far you have synched and to see your connected peers.
add chia show -a testnet-node.chia.net:58444
to add a fast peer.
Now it is time to get up to speed on the testnet blockchain. There are two ways to sync the testnet blockchain:
chia stop -d all
ps -Af | grep chia
cd ~/.chia/mainnet/db
mv blockchain_v1_mainnet.sqlite blockchain_v1_mainnet.sqlite.bak
(to make a backup of the current db)~/.chia/mainnet/db
(two ways to do this)\\wsl$\<distro name>\home\<user>\.chia\db
as the target path of the copy;D:\Temp
, that would be cp /mnt/d/Temp/blockchain_v1_mainnet.sqlite ~/.chia/mainnet/db/
When you are done copying, you can restart all the Chia processes by using chia start farmer
If the node restarts properly, don't forget to cleanup the database backup rm ~/.chia/mainnet/db/blockchain_v1_mainnet.sqlite.bak
For this method you have to do nothing but wait.
Keep tracking your synchronization progress by using command chia show -s -c
to see how far you have synched and to see your connected peers.
Once you are fully synched, you can start making (pool) plots and interact with testnet. In the meantime, try to get your hands on some TXCH (testnet Chia) by asking your friends. Don’t have friends? No problem, you can always ask us on Discord. You can find your keys by using chia keys show
.
An community built explorer for testnet can be found here: https://xch-testnet7.flaxexplorer.org/ You may join the SpaceFarmer testnet pool by asking in our Discord.