Head back to Documentation
This guide will explain the installation and configuration of a TestNet node running on the latest QRL codebase.
Interacting with the QRL network while developing can present some complications, especially when dealing with live currency. There are situations where having a TestNet to interact with is beneficial.
There is no value associated with the Testnet QRL, It’s only used for testing.
The blockchain selection, MainNet or TestNet, is made through the configuration of the node. By passing a user configuration file to the node you can modify the blockchain that the node uses.
A TestNet node runs the same core code as a MainNet node with only user configuration changes differing. This allows full development and testing of the QRL network without fear of incompatibility when switching between codebases.
The basic requirements for a QRL TestNet node, typically run on a server.
Below are abridged instructions for installing QRL on Ubuntu. These instructions are identical to the full node setup. Please refer to the QRL Node Install Doc for further instructions on installing QRL.
# Update and Upgrade packages
sudo apt update && sudo apt upgrade -y
# Install Required dependencies
sudo apt-get -y install swig3.0 python3-dev python3-pip build-essential cmake pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev
# Make sure setuptools is the latest
pip3 install -U setuptools
# Install QRL
pip3 install -U qrl
Do not start the node yet! You need to setup the configuration first
Before you start using the TestNet chain, you need to connect to other nodes running the testnet. To define this variable you need to include a config.yml file in the default QRL directory.
Insert the following lines into ~/.qrl/config.yml
(You may need to create this directory)
peer_list: [ "18.130.83.207", "35.176.41.49", "18.130.187.220", "35.176.33.242" ]
genesis_prev_headerhash: 'The Testnet Genesis'
genesis_timestamp: 1530004179
genesis_difficulty: 5000
db_name: 'testnet-state'
The QRL node needs to know some information from the genesis of the blockchain. For a MainNet node, this information is installed by default. For a TestNet node you have to pass this to the node in a properly placed genesis.yml
file. This file lives in the same directory as the config.yml file.
Due to the size of this file, we have included it at the end of this document. You can grab a copy of this from the bottom of this page, from the QRL docs page at https://docs.theqrl.org/node/genesis.yml or with
wget -O ~/.qrl/genesis.yml https://docs.theqrl.org/node/testnet-genesis.yml
Now that we have QRL installed and the appropriate configuration you can start_qrl
and begin syncing the TestNet node.
start_qrl
The TestNet node will sync the entire blockchain to your computer, make sure you have enough space. after syncing the chain you will begin seeing blocks added. If your in a hurry you can grab the full chain in github and speed the process up a bunch. See the links below.
A TestNet node will operate exactly the same as the MainNstet node will, and all commands are the same. The command line interface is still accessed through calls to the qrl
program.
We have a ton of information on the usage of the node, wallet creation, and various API’s in our main Documentation. All of this information applies to a TestNet node as well.
Never use a QRL address on both networks! OTS keys should never be re-used.
You will need to generate a new TestNet wallet. Due to the way OTS keys work, the address has more likelihood to be compromised if the OTS key is exposed more than once on the blockchain.
If you are running a TestNet node you will need to keep up to date as we reset testnet periodically. Each time the network is updated you will need to refresh some files and restart the node. Look for messages from the QRL team in the team chat on Discord for updates to testnet.
Updating is simple.
~/.qrl/data
directory~/.qrl/genesis.yml
file with new details~/.qrl/config.yml
file with new instructionstart_qrl
This should start syncing the testnet network to your computer. Verify that the details match what you expect issuing the qrl state
command. The blockheight and network_id should be updated with the latest details.
We encourage people to set their nodes on TestNet to allow mining. This is a great way to earn some test QRL and helps the small network validate transactions and propagate blocks more efficiently.
To enable mining on your TestNet node, simply add the following to the ~/.qrl/config.yml
file and restart the node to pickup the changes.
mining_enabled: True
mining_address: ‘TESTNET_QRL_ADDRESS_HERE’
mining_thread_count: 0
If you are in need of some QRL for testing on the TestNet, head over to the faucet and enter your TestNet address. You can find the link below. You will also find a link to the testnet wallet below, in case you need one of those too.
Some helpful links for the TestNet network. Since this is a completely separate blockchain, we need to use the testnet wallet and block explorer.
The complete genesis.yml
file can be found below. Copy this in its entirety and place in the ~/.qrl/
directory. Note it’s long, and not easily human read.
genesisBalance:
- {address: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=, balance: '105000000000000000'}
header: {hashHeader: zTnPTGwZrMT+T1dxN/8mr2jArzsYatEQFFkboJJvfGg=, hashHeaderPrev: VGhlIFRlc3RuZXQgR2VuZXNpcw==,
merkleRoot: WI9TSXvP+6mAjffoX05uprLk/ace20rIN2iyLnYYyeU=, rewardBlock: '65000000000000000',
timestampSeconds: '1530004179'}
transactions:
- coinbase: {addrTo: AQUAP581PQiqk/bKCLX92e0qtLZSJSTIq41N4yZpPA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GcM4Jov87Y4HK/P/euEk+, AQUAdSDRJ+sbkEn562+2rTuRe9+oh7E40t2HTn4rM5I/HVAtDxOn,
AQUAJ/JiAyIcmLxiArWi9Wc0ioERD9SEEaTwPWCav25pnNipIshg, AQUAIpIoocpQTt8Ya7YH7gXrO3ArM/iyWt/RbD6eSTOqBdOoMMgS,
AQYAocRKrqQ8kKSrCY6qi1vsbCgwS9uebHQTKDeiQlWkampc+Ra6, AQUAs0fSxKHrpSdbYcN7LGakeXHVjdBsXnwNewjoYMl4ZYD74+/j,
AQUAfoSLiyaUrVmd5paF/z4sVW0qgXwWHtB0DedpHzzzrXV2Huur, AQUAY+xDh4hbJn2SPIHUrgeshkEtsWF+Em2jp9qo62IyT+DVcEDO,
AQUAi3RxgqQDsLccXFUPsj7NinQ8XjuX3ZcsB9fRXfibTa0tyy+W, AQUA2bjXCM0gQd406wvCbdsufuoUZ2QPG/N18IN95E2t6sXKRJ42,
AQUAjbzLqQvcLnkRXmRxzIzfTHEwsT7vRVW1jAAPkX6kArRBv45Q, AQUAWIZsC+m0CoqS1gbF3JCb/WyABRCddDQ36t77CEiHNf4/7v+1,
AQUAWBzM+xk/ywXCNm4FD5hP2yxTc5buOsRS0sfJL0VL2PPvGcQj, AQMA5vlJm3iJ7hX1pdU2srNNaOf9kVRzwq5Z5Qd7O0jHT5/ZkV2D,
AQYAJoas3IkIdHkQO2mhCUsbltqRZ1rcpJUqoW9Rsy2T1uG2vRDA]
amounts: ['70000000000000', '2000000000000', '500000000000000', '100000000000',
'50000000000', '1000000000000', '4000000000000', '10014000000000', '1715229300000',
'1100000000', '1000000000000', '540000000000', '5000000000', '55000000000',
'1000000000', '10000000000000', '100000000000', '1234000000000', '200000000000',
'1000000000000', '14804070700000', '10000000000000', '5000000000000', '1000000000',
'1000000000000', '60000000000000', '775000000000000']