Join The Public Testnet

Hardware Requirements

  • Minimal
    • 4GB RAM
    • 100GB SSD
    • 2 vCPU
  • Recommended
    • 8GB RAM
    • 200GB SSD
    • 4 vCPU

Installation Steps

Install dependencies:
1
cd $HOME
2
sudo apt update
3
sudo apt install make clang pkg-config libssl-dev build-essential git jq ncdu bsdmainutils -y < "/dev/null"
Copied!
Install Go:
1
cd $HOME
2
wget -O go1.17.3.linux-amd64.tar.gz https://golang.org/dl/go1.17.3.linux-amd64.tar.gz
3
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz && rm go1.17.3.linux-amd64.tar.gz
4
echo 'export GOROOT=/usr/local/go' >> $HOME/.bashrc
5
echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
6
echo 'export GO111MODULE=on' >> $HOME/.bashrc
7
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bashrc && . $HOME/.bashrc
8
go version
Copied!
Clone git repository:
1
git clone --depth 1 --branch public-testnet-v2 https://github.com/stafihub/stafihub
Copied!
Install:
1
cd $HOME/stafihub && make install
Copied!
Download genesis (replace YOUR_NODE_NAME):
1
stafihubd init YOUR_NODE_NAME --chain-id stafihub-public-testnet-2
2
wget -O $HOME/.stafihub/config/genesis.json "https://raw.githubusercontent.com/stafihub/network/main/testnets/stafihub-public-testnet-2/genesis.json"
3
stafihubd tendermint unsafe-reset-all --home ~/.stafihub
Copied!
Configure your node:
1
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.01ufis\"/" $HOME/.stafihub/config/app.toml
2
sed -i '/\[grpc\]/{:a;n;/enabled/s/false/true/;Ta};/\[api\]/{:a;n;/enable/s/false/true/;Ta;}' $HOME/.stafihub/config/app.toml
4
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.stafihub/config/config.toml
Copied!
Start the node in the background:
1
stafihubd start
Copied!
Or install service to run the node:
1
echo "[Unit]
2
Description=StaFiHub Node
3
After=network.target
4
5
[Service]
6
User=$USER
7
Type=simple
8
ExecStart=$(which stafihubd) start
9
Restart=on-failure
10
LimitNOFILE=65535
11
12
[Install]
13
WantedBy=multi-user.target" > $HOME/stafihubd.service
14
sudo mv $HOME/stafihubd.service /etc/systemd/system
15
sudo tee <<EOF >/dev/null /etc/systemd/journald.conf
16
Storage=persistent
17
EOF
18
sudo systemctl restart systemd-journald
19
sudo systemctl daemon-reload
20
sudo systemctl enable stafihubd
21
sudo systemctl restart stafihubd
Copied!
Check your node logs:
1
journalctl -u stafihubd -f
Copied!

Generate keys

1
stafihubd keys add YOUR_WALLET_NAME --keyring-backend file
Copied!
You can recover your keys with --recover flag if you have mnemonic

Faucet

You can ask for tokens in the #faucet Discord channel.
1
!faucet send YOUR_WALLET_ADDRESS
Copied!

Create validator

Use the following command (do not forget to replace YOUR_NODE_NAME and YOUR_WALLET_NAME):
1
stafihubd tx staking create-validator -y --amount=1000000ufis --pubkey=$(stafihubd tendermint show-validator) --moniker=YOUR_NODE_NAME --commission-rate=0.10 --commission-max-rate=0.20 --commission-max-change-rate=0.01 --min-self-delegation=1 --from=YOUR_WALLET_NAME --chain-id=stafihub-public-testnet-2 --gas-prices=0.025ufis --keyring-backend file
Copied!

Explorer

Explorer available here.