How to join Pactus Testnet?

How to join Pactus Testnet?

Preface

The Pactus testnet is a public testing environment that replicates the functionality of the mainnet but uses test coins with no real-world value. Running a node on the testnet allows you to experiment safely, test applications, and support the stability of the network. It also helps the development team test and improve Pactus more effectively.

This document provides a step-by-step guide on how to join the Pactus testnet.

Setup node

To set up a Testnet node, first download the latest version of Pactus. The Testnet uses the same software as the Mainnet, but it must be configured to connect to the Testnet.

Running Testnet with Pactus Daemon (CLI)

Pou can also use the Pactus Daemon (CLI) to join the Testnet. To join the Testnet, you need to explicitly specify the --testnet flag when initializing the node:

./pactus-daemon init --working-dir=~/pactus/testnet --testnet

This command creates your wallet and setup the working directory at ~/pactus/testnet.

pactus-daemon.exe init --working-dir=%USERPROFILE%\pactus\testnet --testnet

This command creates your wallet and setup the working directory at C:\Users\<USER_NAME>\pactus\testnet.

Here’s what the flags mean:

  • --working-dir: Specifies the directory where node data (e.g., blockchain data, configuration files) will be stored.
  • --testnet: Configures the node to connect to the Testnet instead of the Mainnet.

After initializing the node, you can optionally import the latest blockchain data and run the Testnet in pruned mode. This helps you sync faster and reduces storage usage:

./pactus-daemon import --working-dir=~/pactus/testnet
pactus-daemon.exe import --working-dir=%USERPROFILE%\pactus\testnet

Now, start the node:

./pactus-daemon start --working-dir=~/pactus/testnet
pactus-daemon.exe start --working-dir=%USERPROFILE%\pactus\testnet

This command starts your node and connects it to the Pactus Testnet.

Running Testnet with Pactus GUI

You can also run the Testnet using the Pactus GUI. Open a terminal (or command prompt on Windows) and start Pactus GUI with:

./pactus-gui -working-dir=~/pactus/testnet -testnet
pactus-gui.exe start -working-dir=%USERPROFILE%\pactus\testnet -testnet

The GUI will initialize and connect to the Testnet using the specified working directory.

Obtaining Test Coins

To interact with the Pactus Testnet, you will need test coins (tPAC). These coins have no real-world value but are required for testing transactions, applications, and validator operations. You can request up to 5 tPAC per day from the Pagu Project faucet, which is a convenient way to experiment with your projects or applications.

If you intend to run a validator on the Testnet permanently, you can reach out to the Pactus team to receive stake coins for your validator.

Last updated on