Republic Testnet Validator
Republic is a decentralized system that leverages blockchain technology to coordinate and verify computational tasks.
| Chaind ID | Last Version Tag |
|---|---|
| raitestnet_77701-1 | v0.3.0 |
Binary Upgrade
Fetching network status...
Upgrade to v0.3.0
Target block: 326250
Download & Extract Binary
bash
cd $HOME
rm -rf republic
mkdir -p republic
cd republic
wget https://github.com/RepublicAI/networks/releases/download/v0.3.0/republicd-linux-amd64 -O republicd
chmod +x republicdStart a new tmux session
bash
tmux new -s republic-upgradeRun the auto-upgrade script.
⚠️ NOTE: Make sure you adjust the following according to your setup:
- RPC port: use your own RPC endpoint after -r (default is http://localhost:26657)
- API port: use your own REST API endpoint after -a (default is http://localhost:1317)
bash
UPGRADE_SCRIPT="https://raw.githubusercontent.com/astrostake/scripts/refs/heads/main/upgrade_binary.sh"
curl -sL $UPGRADE_SCRIPT | bash -s -- \
-b "republicd" \
-t "326250" \
-n "$HOME/republic/republicd" \
-p "/usr/local/bin" \
-r "http://localhost:15657" \
-i "3" \
-a "http://localhost:15317" \
-d "https://discord.com/api/webhooks/xxx/yyy" \ # optional
--progress-interval 0Flag explanation:
| Flag | Name | Description |
|---|---|---|
-b | binary-name | Name of the running daemon (e.g. republicd) |
-t | target-block | Block height at which the upgrade should happen |
-n | new-binary-path | Full path to the new binary |
-p | install-path | Path where the current binary is installed (default: $HOME/go/bin) |
-r | rpc-url | RPC endpoint used to monitor current block height |
-i | proposal-id | (Optional) Proposal ID to validate governance status |
-a | api-url | (Optional) API endpoint used to fetch proposal status |
Auto Installer
bash
bash <(curl -sL https://raw.githubusercontent.com/astrostake/scripts/refs/heads/main/republic-testnet/installer.sh)Installation
- Install Dependencies
bash
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
bash
cd $HOME
VER="1.22.3"
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 Vars
Configuration:
Generated Code:
Loading...- Download Binary
bash
wget https://github.com/RepublicAI/networks/releases/download/v0.3.0/republicd-linux-amd64 -O republicd
chmod +x republicd
sudo mv republicd /usr/local/bin/- Initialized
bash
republicd init $MONIKER --chain-id $REPUBLIC_CHAIN_ID
sed -i \
-e 's|^chain-id *=.*|chain-id = "raitestnet_77701-1"|' \
-e "s|^node *=.*|node = \"tcp://localhost:${REPUBLIC_PORT}657\"|" \
$HOME/.republic/config/client.toml- Download addrbook & genesis
bash
wget -O $HOME/.republic/config/genesis.json https://snapshots.linknode.org/republic-testnet/genesis
wget -O $HOME/.republic/config/addrbook.json https://snapshots.linknode.org/republic-testnet/addrbook- Configure Node
Configure peers
bash
SEEDS=""
PEERS="cd10f1a4162e3a4fadd6993a24fd5a32b27b8974@52.201.231.127:26656,f13fec7efb7538f517c74435e082c7ee54b4a0ff@3.208.19.30:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.republic/config/config.tomlUpdate app.toml ports
bash
sed -i.bak -e "s%:1317%:${REPUBLIC_PORT}317%g;
s%:8080%:${REPUBLIC_PORT}080%g;
s%:9090%:${REPUBLIC_PORT}090%g;
s%:9091%:${REPUBLIC_PORT}091%g;
s%:8545%:${REPUBLIC_PORT}545%g;
s%:8546%:${REPUBLIC_PORT}546%g;
s%:6065%:${REPUBLIC_PORT}065%g" $HOME/.republic/config/app.tomlUpdate config.toml ports
bash
sed -i.bak -e "s%:26658%:${REPUBLIC_PORT}658%g;
s%:26657%:${REPUBLIC_PORT}657%g;
s%:6060%:${REPUBLIC_PORT}060%g;
s%:26656%:${REPUBLIC_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${REPUBLIC_PORT}656\"%;
s%:26660%:${REPUBLIC_PORT}660%g" $HOME/.republic/config/config.tomlConfigure Pruning
Pruning Strategy
Select a strategy to manage your node's storage usage.
Recommended for Validators to fine-tune storage.
Number of recent blocks/states to keep in disk.
blocks
Frequency of deletion. E.g., 10 means prune every 10 blocks.
blocks
Loading...Set Minimum Gas Fee & Other Parameters
bash
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "2500000000arai"|g' $HOME/.republic/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.republic/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.republic/config/config.toml- Create Services
bash
sudo tee /etc/systemd/system/republicd.service > /dev/null <<EOF
[Unit]
Description=republic-testnet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which republicd) start --home $HOME/.republic
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF- Start Services
bash
sudo systemctl daemon-reload
sudo systemctl enable republicd
sudo systemctl restart republicd && sudo journalctl -u republicd -fo catUseful Commands
INFO
For a complete guide to creating a validator, visit our Cheat Sheet & Key Management page. It covers all the necessary commands and crucial steps for securing your keys.
Check logs
bash
sudo journalctl -u republicd -fo catCheck Sync
bash
curl -sL https://raw.githubusercontent.com/astrostake/scripts/refs/heads/main/cosmos_sync_monitor.sh | bash -s -- --directory $HOME/.republic --public-rpc https://republic-testnet-rpc.linknode.org --interval 5🛡️ Security
To apply a quick security baseline, you can configure your firewall like this:
bash
sudo ufw allow ${REPUBLIC_PORT}656/tcp comment 'REPUBLIC-TESTNET Node p2p Port'🔐 For a more secure and maintainable setup, check out our Essentials Guide, including SSH key setup, Fail2Ban protection, and a full VPS hardening checklist.
