Skip to main content

Join testnet

The Safrochain testnet (safro-testnet-1) is live and is the easiest way to exercise the full validator + node + wallet stack end-to-end.

Endpoints

See Networks → Testnet endpoints for the canonical list. Quick reference:

ServiceEndpoint
RPChttps://rpc.testnet.safrochain.com
RESThttps://rest.testnet.safrochain.com
gRPChttps://grpc.testnet.safrochain.com/
Faucethttps://faucet.safrochain.com/
Explorerhttps://explorer.safrochain.com/

Steps

1. Install safrochaind

If you haven't yet, follow Install.

2. Initialise the home directory

safrochaind init my-moniker --chain-id safro-testnet-1 --home ~/.safrochain-testnet

3. Replace the placeholder genesis with the testnet's

curl -L https://raw.githubusercontent.com/Safrochain-Org/safrochain-node/main/networks/safro-testnet-1/genesis.json \
-o ~/.safrochain-testnet/config/genesis.json

# verify
sha256sum ~/.safrochain-testnet/config/genesis.json

The expected SHA-256 is published on the network's GitHub release page.

4. Add seeds & peers

Edit ~/.safrochain-testnet/config/config.toml:

[p2p]
seeds = "<TESTNET_SEED_NODE_ID>@seed.testnet.safrochain.com:26656"
persistent_peers = ""
addr_book_strict = true
pex = true

(The seed node ID is published in the testnet's chain registry; see Chain registry.)

5. Set CLI defaults

safrochaind config chain-id safro-testnet-1
safrochaind config node https://rpc.testnet.safrochain.com:443
safrochaind config keyring-backend file
safrochaind config broadcast-mode sync
safrochaind config output json

6. (Optional) Statesync for fast catch-up

A fresh sync from genesis takes a long time even on testnet. Statesync catches up to a recent height in minutes. See Statesync.

7. Start

safrochaind start --home ~/.safrochain-testnet

Watch the height climb:

curl -s http://127.0.0.1:26657/status \
| jq '.result.sync_info | {latest_block_height, catching_up}'

When catching_up == false, you're synced.

8. Try the chain

# create a key
safrochaind keys add me --keyring-backend file --home ~/.safrochain-testnet
ME=$(safrochaind keys show me -a --home ~/.safrochain-testnet)

# fund it from the faucet
echo "Drip $ME at https://faucet.safrochain.com/"

# verify
safrochaind query bank balances "$ME" --home ~/.safrochain-testnet

You can now delegate, vote on proposals, and send IBC transfers on testnet without any cost.

Resetting

If the testnet is reset (announced on Discord), re-download the new genesis.json, run:

safrochaind comet unsafe-reset-all --home ~/.safrochain-testnet

…and restart.

Useful tip: run this as a systemd service

# /etc/systemd/system/safrochaind-testnet.service
[Unit]
Description=Safrochain testnet node
After=network-online.target

[Service]
Type=simple
User=safrochain
ExecStart=/home/safrochain/go/bin/safrochaind start --home /var/lib/safrochain-testnet
Restart=on-failure
RestartSec=5s
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now safrochaind-testnet
sudo journalctl -u safrochaind-testnet -f