Using Testnet Guide

last updated for testnet2


Why Use Testnet?

The testnet is a wonderful place where you can experiment with the Decred applications without worrying that a mistake will cost you real money. It is actually recommended that people use the testnet to learn the basics of the Decred software and any new features.

Decred is currently on its 2nd Testnet, also known as testnet2. Testnets are periodically reset to help keep a manageable blockchain file size.


How to Run a Testnet Node

Running a testnet2 node is incredibly easy. You application of choice will need to download the testnet2 blockchain, and you will need to create a new wallet file for testnet2 use. Your mainnet blockchain and wallet files will remain untouched. Switching between the two is incredibly easy.


Paymetheus

To launch Paymetheus on testnet2, simply launch the Decred Testnet application instead of the usual Decred application. You will then be walked through the wallet creation (the same steps in the Paymetheus Setup guide). After dcrd finishes syncing in the background, you’ll then be able to fill your Paymetheus wallet with testnet DCR and familiarize yourself with the software.


Decrediton

You can switch Decrediton between mainnet and testnet by changing the “Network” setting in the Settings tab, and then pressing the save button. You will have to close Decrediton and open it again for the change to take effect.


Command-Line Suite

To launch dcrd and dcrwallet on testnet, simply add the --testnet flag to your launch command. Alternatively, you could put testnet=1 in all of your config files, but it’s usually much faster to use the startup flag.

On the first launch of dcrd --testnet, dcrd will begin downloading the testnet2 blockchain to the data/testnet2 folder of dcrd‘s home directory.

Before you’re able to launch dcrwallet with the --testnet flag, you must create a separate testnet wallet using the dcrwallet --testnet --create command. The steps are the same as those found in the dcrwallet Setup Guide.

To issue commands to both dcrwallet and dcrd, you must also add the --testnet flag to any of the dcrctl commands that you use. E.g. you would issue the dcrctl --testnet --wallet getbalance command to check your testnet balance.


Acquiring Testnet Coins

You can acquire coins through the Decred Testnet Faucet. Please return any coins to the address listed at the bottom of that page when you’re done playing with the testnet.