User Tools

Site Tools


network:chianetwork:testnet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network:chianetwork:testnet [2021/09/14 12:54] vleesbanaannetwork:chianetwork:testnet [2021/09/14 19:22] (current) vleesbanaan
Line 1: Line 1:
 =====How to use Testnet on Windows?===== =====How to use Testnet on Windows?=====
  
 +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.
  
 ====Step 1 - Create a Windows Subsystem for Linux (WSL)==== ====Step 1 - Create a Windows Subsystem for Linux (WSL)====
Line 26: Line 29:
 Below you find the relevant code: Below you find the relevant code:
  
-''# Install Git''+<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 
 +</code>
  
-''sudo apt install git -y'' 
  
-''# Checkout the source and install'' +====Step 3 - Prepare the config.yaml====
- +
-''git clone https://github.com/Chia-Network/chia-blockchain.git -b latest --recurse-submodules'' +
- +
-''cd chia-blockchain'' +
- +
-''sh install.sh'' +
- +
-''. ./activate'' +
- +
- +
-====Step 3 - Start Chia testnet7====+
   - Initialize the chia process by: ''chia init''   - Initialize the chia process by: ''chia init''
   - point to testnet7 instead of mainnet: ''chia configure -t t''   - point to testnet7 instead of mainnet: ''chia configure -t t''
Line 47: Line 46:
  
 Now comes a tricky part. Using ''chia configure -t t'' doesn’t change all the ports instantly.  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.+the previous step only changed the target network from mainnet to testnet7 and the external port from 8444 to **5**8444 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) and change the 55400 to 58400 (2 occurences). +To change this, we need to go to the config.yaml file and change all 8xxx ports to **5**8xxx ports (about 10 occurences)change the 55400 to 5**8**400 (2 occurences) and change the 9256 port to **5**9256 (1 occurence).
 You can do this by  You can do this by 
-  * using ''nano ~/.chia/mainnet/config/config.yaml'' in the Linux CLI+  * using ''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. Safe your changes using ctrl+O and then hit enter. Use ctrl+X to close the nano instance and return to your Linux CLI.
   * or by navigating in the Windows File Explorer to    * or by navigating in the Windows File Explorer to 
-\\wsl$\Ubuntu 20.04\home\<username>\ .chia\mainnet\config\config.yaml+''\\wsl$\Ubuntu 20.04\home\<username>\ .chia\mainnet\config\config.yaml''
 and changing the config.yaml using Notepad. and changing the config.yaml using Notepad.
 Safe the config.yaml file after the edits.  Safe the config.yaml file after the edits. 
  
 +==== Step 4 - Start Chia on testnet7 ====
 +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 [[https://discord.gg/EgnjUCnCCt|Discord channel]]
  
-It’s time to start synching the testnet7 blockchain and the wallet. This is done by using   
-''chia start farmer'' 
-If you get an error, try to retrace the previous steps. Still having issues? Our experts will support you in our [[https://discord.gg/EgnjUCnCCt|Discord channel]] 
 See if all processes started correctly by using ''ps -Af | grep chia'' See if all processes started correctly by using ''ps -Af | grep chia''
-use the command ''chia show -s -c'' to see how for you have synched and to see your connected peers. +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. add ''chia show -a testnet-node.chia.net:58444'' to add a fast peer.
  
-Now you need to wait until you finished synching to testnet7, this will take approximately one day.+====Step 5 - Syncing the testnet blockchain==== 
 +Now it is time to get up to speed on the testnet blockchain.  
 +There are two ways to sync the testnet blockchain: 
 +  * Downloading the db file from the Chia Github (+-12minutes) 
 +  * Synchronizing the blockchain through a peer-to-peer network (+-8 hours) 
 + 
 +===Downloading the testnet db=== 
 +  - You can download the testnet db file from the [[https://github.com/Chia-Network/chia-blockchain/wiki/How-to-connect-to-the-Testnet|chia github]]  
 +  - Stop all the chia processes with ''chia stop -d all'' 
 +  - Check all are gone with ''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) 
 +  - copy the downloaded db to ''~/.chia/mainnet/db'' (two ways to do this
 + 
 +  * do it from Windows in the File Explorer using ''\\wsl$\<distro name>\home\<user>\.chia\db'' as the target path of the copy; 
 +  * or do it from WSL, if you downloaded the db in e.g. ''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''
  
-In the meantimetry to get your hands on some TXCH (testnet Chia) by asking your friendsDon’t have friends? No problem, you can always ask us on [[https://discord.gg/EgnjUCnCCt|Discord]]You can find your keys by using chia keys show+If the node restarts properlydon't forget to cleanup the database backup  
 +rm ~/.chia/mainnet/db/blockchain_v1_mainnet.sqlite.bak
  
 +=== Synchronising peer-to-peer===
 +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. 
  
 +==== Step 6 - Using testnet ====
 +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 [[https://discord.gg/EgnjUCnCCt|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 [[https://discord.gg/EgnjUCnCCt|Discord]].
  
  
network/chianetwork/testnet.1631624066.txt.gz · Last modified: 2021/09/14 12:54 by vleesbanaan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki