Skip to main content

Testnet

The procedure for joining an active testnet is described in this document.

Pick a Testnet

By setting the genesis file and seeds, you can choose the network you want to join. Visit our testnets repository if you require additional details about previous networks.

Testnet Chain IDDescriptionSiteVersionStatus
humans_4139-1Humans_4139-1 TestnetHumans 4139-1v1.0.0Live

Server Timezone Configuration

Make sure UTC is set as the server timezone. Use the timedatectl command to find out what timezone you are currently in.

danger

🚨 DANGER: Having a different timezone configuration may cause a LastResultsHash mismatch error. This will take down your node!

Install humansd

To install the humansd binary, see to the installation guide.

danger

Make sure you have the correct installation of humansd.

Save Chain ID

We advise adding the testnet chain-id to the client.toml file for your humansd. As a result, you won't need to explicitly pass the chain-id flag with each CLI operation.

tip

For more information, see to the Official Chain IDs.

humansd config chain-id humans_4139-1

Initialize Node

To produce all the required validator and node configuration files, we must initialize the node:

humansd init <your_custom_moniker> --chain-id humans_4139-1
danger

Only ASCII characters are allowed in monikers. Your node won't be reachable if you use Unicode characters.

The init command generates your /.humansd (i.e. $HOME) directory by default, along with the subfolders config/ and data/. app.toml and config.toml are the two most crucial configuration files located in the config directory.

Genesis & Seeds

Copy the Genesis File

Check the genesis.json file from Github and copy it over to the config directory: ~/.humansd/config/genesis.json. This is a genesis file with the chain-id and genesis accounts balances.

sudo apt install -y unzip wget
wget -P ~/.humansd/config https://github.com/humansdotai/mainnet/blob/main/mainnet/1/genesis_1089-1.json

Then check the genesis configuration file's accuracy:

humansd validate-genesis

Add Seed Nodes

The ability to locate peers is a requirement for your node. You must add healthy seed nodes to '$HOME/.humansd/config/config.toml'. Links to various seed nodes can be found in the repository for testnets.

Change the seeds and the config.toml file under /.humansd/config/config.toml to the following:

#######################################################
### P2P Configuration Options ###
#######################################################
[p2p]

# ...

# Comma separated list of seed nodes to connect to
seeds = "<node-id>@<ip>:<p2p port>"

To obtain seeds from the repository and add them to your configuration, use the following code:

SEEDS=`curl -sL https://raw.githubusercontent.com/humansdotai/testnets/main/humans_4139-1/seeds.txt | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEEDS\"/" ~/.humansd/config/config.toml
tip

For more information on seeds and peers, you can the Tendermint P2P documentation.

Add Persistent Peers

We can define peers with whom your node will keep persistent connections by setting the 'persistent_peers' field in /.humansd/config/config.toml. You can get them from the testnets repository's list of available peers.

In the Humans.ai Discord, the #find-peers channel also provides a list of accessible persistent peers. By using the following command, you can randomly select 10 entries to add to the PEERS variable from the peers.txt file:

PEERS=`curl -sL https://raw.githubusercontent.com/humansdotai/testnets/main/humans_4139-1/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`

To add them to the configuration, use sed. You can also manually add them:

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.humansd/config/config.toml

Run a Testnet Validator

Claim your testnet HEART on the faucet using your validator account address and submit your validator account address:

tip

Please refer to these guidelines for more information on how to run your validator.

humansd tx staking create-validator \
--amount=1000000000000atheart\
--pubkey=$(humansd tendermint show-validator) \
--moniker="HumansValidator" \
--chain-id=<chain_id> \
--commission-rate="0.05" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1000000" \
--gas="auto" \
--gas-prices="0.025atheart" \
--from=<key_name>

Start testnet

The nodes must be started as the last step. The testnet will begin generating blocks as soon as the genesis validators have enough voting power (+2/3) to function.

humansd start

Upgrading Your Node

tip

These instructions are for fullnodes that have previously used older testnet versions and want to update to the newest one.

Reset Data

danger

You SHOULD NOT reset the data if the version <new_version> you are upgrading to does not break from the one you are currently using. If so, you can proceed directly to restart.

Reset the data after removing the old files.

rm $HOME/.humansd/config/addrbook.json $HOME/.humansd/config/genesis.json
humansd tendermint unsafe-reset-all --home $HOME/.humansd

Your node is now in a perfect condition while retaining the original versions of config.toml and priv_validator.json. If you previously put up any sentry nodes or full nodes, your node will continue attempt to connect to them, but if they haven't been upgraded, it might not succeed.

Warning

Each node's priv_validator.json needs to be distinct. It is not recommended to copy priv_validator.json from one old node to numerous new nodes. If two nodes use the same priv_validator.json file, you will double sign.

Restart

You can restart your node by typing:

humansd start

Share your Peer

You can post about your peer in the #find-peers channel in the Humans.ai Discord.

tip

Use this to obtain your Node ID.

humansd tendermint show-node-id

State Syncing a Node

Check out our State Sync page if you wish to quickly join the network using State Sync (not suitable for archive nodes, though).