Doc – Republic Testnet
Minimum Hardware
| NODE | CPU | RAM | SSD | OS |
|---|---|---|---|---|
| republicd | 8 | 16 | 200 GB | Ubuntu 22.04 LTS |
Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Install Go
cd $HOME
VER="1.22.5"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
Set Var
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export REPUBLIC_CHAIN_ID="raitestnet_77701-1"" >> $HOME/.bash_profile
echo "export REPUBLIC_PORT="21"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Download Binary
cd $HOME
rm -rf republicd
wget https://github.com/RepublicAI/networks/raw/refs/heads/main/testnet/releases/v0.1.0/republicd-linux-amd64 -O republicd
chmod +x republicd
mv republicd $HOME/go/bin/
Config and Init App
republicd config node tcp://localhost:${REPUBLIC_PORT}657
REPUBLIC config keyring-backend os
REPUBLIC config chain-id raitestnet_77701-1
REPUBLIC init "test" --chain-id raitestnet_77701-1
Download Genesis and Addrbook
curl -L https://raw.githubusercontent.com/RepublicAI/networks/main/testnet/genesis.json > ~/.republicd/config/genesis.json
Pruning, Gas and Prometheus
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0arai"/' ~/.republicd/config/app.toml
Create Service File
sudo tee /etc/systemd/system/republicd.service > /dev/null << EOF
[Unit]
Description=Republic Node
After=network-online.target
[Service]
User=root
ExecStart=$(which republicd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Start
sudo systemctl daemon-reload
sudo systemctl enable republicd
sudo systemctl restart republicd && sudo journalctl -u republicd -fo cat
State Sync
# Stop node
sudo systemctl stop republicd
# Backup validator state
cp $HOME/.republic/data/priv_validator_state.json \
$HOME/.republic/priv_validator_state.json.backup
# Reset chain data
republicd comet unsafe-reset-all --home $HOME/.republic --keep-addr-book
# Download & extract snapshot
curl -L http://45.76.1.67/republic/latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.republic
# Restore validator state
mv $HOME/.republic/priv_validator_state.json.backup \
$HOME/.republic/data/priv_validator_state.json
# Start node
sudo systemctl start republicd
Create and Restore Address
Republicd keys add wallet
# Restore wallet
Republicd keys add wallet --recover
# List
Republicd keys list
Check Balance
Republicd q bank balances $(Republicd keys show wallet -a)
Create Validator
republicd comet show-validator
cat > $HOME/.republic/validator.json << EOF
{
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "$(republicd comet show-validator | jq -r .key)"
},
"amount": "1000000000000000000arai",
"moniker": " ",
"identity": " ",
"website": " ",
"security": " ",
"details": " ",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.05",
"min-self-delegation": "1"
}
EOF
republicd tx staking create-validator /root/.republic/validator.json --from wallet --chain-id raitestnet_77701-1 --gas-prices=2500000000arai --gas=300000 --yes
Delegate to own
republicd tx staking delegate $(republicd keys show wallet --bech val -a) 100000000000000000arai --from wallet --chain-id raitestnet_77701-1 --gas-prices=3500000000arai --gas-adjustment=1.5 --gas=auto --keyring-backend test --yes
Unjail Validator
republicd tx slashing unjail --from wallet --chain-id raitestnet_77701-1 --gas-prices=2500000000arai --gas=300000 --yes
Vote
Republicd tx gov vote 1 yes --from wallet--chain-id raitestnet_77701-1 --gas-prices=2500000000arai --gas=300000 --yes
Delete node
sudo systemctl stop republicd
sudo systemctl disable republicd
sudo rm /etc/systemd/system/republicd.service
sudo systemctl daemon-reload
rm -f $(which republicd)
rm -rf .republic