Testnet
This document outlines the steps to join an existing testnet.
Pick a Testnet
You specify the network you want to join by setting the genesis file.
| Testnet Chain ID | Genesis File | Branch / Tag | Status |
|---|---|---|---|
guru_631-1 | guru_631-1 | v2.0.1 | Live |
- RPC Node:
https://trpc.gurufin.ioClients&Ports
Server Timezone Configuration
Make sure your server timezone configuration is UTC.
To know what is your current timezone, run the timedatectl command.
Having a different timezone configuration
may cause a LastResultsHash mismatch error.
This will take down your node!
Install gurud
Follow the installation document to install the Guru binary gurud.
Make sure you have the right version of gurud installed.
Initialize Node
We need to initialize the node to create all the necessary validator and node configuration files:
gurud init <your_custom_moniker> --chain-id guru_631-1
Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.
By default, the init command creates your ~/.gurud (i.e $HOME) directory with subfolders config/ and data/.
In the config directory, the most important files for configuration are app.toml and config.toml.
Genesis
Copy the Genesis File
Check the genesis.json file from the archive
and copy it over to the config directory: ~/.gurud/config/genesis.json. This is
a genesis file with the chain-id and genesis accounts balances.
wget -O $HOME/.gurud/config/genesis.json https://raw.githubusercontent.com/gurufinglobal/testnet/refs/heads/main/genesis.json
Then verify the correctness of the genesis configuration file:
gurud genesis validate
Add Persistent Peers
We can set the persistent_peers field in ~/.gurud/config/config.toml to specify peers that your node will maintain persistent
connections with.
PEERS="d36c5074078b71ea0a3cb53096fd8f1cd0c9da0e@trpc-state1.gurufin.io:26656,fcb10968c4877f1747e55d1d8bd71a9cd7754122@trpc-state2.gurufin.io:26656"
Use sed to include them into the configuration. You can also add them manually:
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.gurud/config/config.toml
Run a Testnet Validator
Claim your testnet gxn on the faucet using your validator account address and submit your validator account address:
For more details on how to run your validator, follow these instructions.
# Get the validator's pubkey
gurud comet show-validator
# Create a validator JSON file
cat > validator.json << EOF
{
"pubkey": [Validator's PUB_KEY],
"amount": "100000000000000000000000agxn",
"moniker": "new-validator-moniker",
"identity": "",
"website": "https://www.new-validator.com",
"security": "",
"details": "validator's details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
EOF
gurud tx staking create-validator validator.json \
--chain-id=guru_631-1 \
--gas="auto" \
--gas-prices=<gas_price> \
--gas-adjustment 1.5 \
--from=<key_name>
Start testnet
The final step is to start the nodes. Once enough voting power (+2/3) from the genesis validators is up-and-running, the testnet will start producing blocks.
gurud start
Upgrading Your Node
These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet version.
Reset Data
If the version you are upgrading to is not breaking from the previous one, you should not reset the data. If this is the case you can skip to Restart
First, remove the outdated files and reset the data.
rm $HOME/.gurud/config/addrbook.json
gurud comet unsafe-reset-all --home $HOME/.gurud
Your node is now in a pristine state while keeping the original priv_validator.json and config.toml. If you had
any sentry nodes or full nodes setup before,
your node will still try to connect to them, but may fail if they haven't also
been upgraded.
Make sure that every node has a unique priv_validator.json. Do not copy the priv_validator.json
from an old node to multiple new nodes. Running two nodes with the same priv_validator.json
will cause you to double sign.
Restart
To restart your node, just type:
gurud start
Share your Peer
To get your Node ID use
gurud comet show-node-id
State Syncing a Node
If you want to join the network using State Sync (quick, but not applicable for archive nodes), check our State Sync page