Republic Ai | Install
System Specs
Section titled “System Specs”| Hardware | Requirement |
|---|---|
| CPU | 4 Cores |
| RAM | 8 GB |
| Disk | 250 GB SSD |
Install Validator Testnet Republic Ai
Section titled “Install Validator Testnet Republic Ai”1. System Preparation
Section titled “1. System Preparation”sudo apt update && sudo apt upgrade -ysudo apt install docker.io -y2. Pull the published image
Section titled “2. Pull the published image”docker pull ghcr.io/republicai/republicd:0.1.03. Initialize data and fetch genesis
Section titled “3. Initialize data and fetch genesis”REPUBLIC_HOME="$HOME/.republic"mkdir -p "$REPUBLIC_HOME"
docker run --rm \ --user 0:0 \ -v "$REPUBLIC_HOME:/home/republic/.republic" \ ghcr.io/republicai/republicd:0.1.0 \ init my-node --chain-id raitestnet_77701-1 --home /home/republic/.republic
sudo curl -s https://raw.githubusercontent.com/RepublicAI/networks/main/testnet/genesis.json -o "$REPUBLIC_HOME/config/genesis.json"4. Configure state sync (recommended for faster sync)
Section titled “4. Configure state sync (recommended for faster sync)”SNAP_RPC="https://statesync.republicai.io"LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height)BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000))TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
sudo sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" "$REPUBLIC_HOME/config/config.toml"
PEERS="e281dc6e4ebf5e32fb7e6c4a111c06f02a1d4d62@3.92.139.74:26656,cfb2cb90a241f7e1c076a43954f0ee6d42794d04@54.173.6.183:26656,dc254b98cebd6383ed8cf2e766557e3d240100a9@54.227.57.160:26656"sudo sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" "$REPUBLIC_HOME/config/config.toml"5. Custom port (optional, if needed)
Section titled “5. Custom port (optional, if needed)”PORT=170sed -i -e "s%:26657%:${PORT}57%" $REPUBLIC_HOME/config/client.tomlsed -i -e "s%:26658%:${PORT}58%; s%:26657%:${PORT}57%; s%:6060%:${PORT}60%; s%:26656%:${PORT}56%; s%:26660%:${PORT}61%" $REPUBLIC_HOME/config/config.tomlsed -i -e "s%:1317%:${PORT}17%; s%:9090%:${PORT}90%" $REPUBLIC_HOME/config/app.toml
sed -i \-e 's|^pruning *=.*|pruning = "custom"|' \-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \-e 's|^pruning-interval *=.*|pruning-interval = "10"|' \$REPUBLIC_HOME/config/app.toml
sed -i 's|^indexer *=.*|indexer = "null"|' $REPUBLIC_HOME/config/config.toml6. Fix ownership to match container user (UID 1001)
Section titled “6. Fix ownership to match container user (UID 1001)”sudo chown -R 1001:1001 "$REPUBLIC_HOME"7. Run the node
Section titled “7. Run the node”docker run -d --name republicd \ --network host \ -v "$REPUBLIC_HOME:/home/republic/.republic" \ ghcr.io/republicai/republicd:0.1.0 \ start --home /home/republic/.republic --chain-id raitestnet_77701-18. Check logs
Section titled “8. Check logs”docker logs -f republicd9. Create wallet
Section titled “9. Create wallet”docker exec -it republicd bashrepublicd keys add wallet
#get pubkey (save)republicd comet show-validator
exit10. Create validator.json
Section titled “10. Create validator.json”nano $HOME/.republic/validator.json
#fill your info{ "pubkey": {your_pubkey}, "amount": "1000000000000000000arai", "moniker": "your_moniker", "identity": "your_keybase", "website": "your_website", "security": "your_email", "details": "your_detail_validator", "commission-rate": "0.05", "commission-max-rate": "0.2", "commission-max-change-rate": "0.05", "min-self-delegation": "1"}11. Create validator
Section titled “11. Create validator”docker exec -it republicd bash
republicd tx staking create-validator .republic/validator.json \ --chain-id=raitestnet_77701-1 \ --gas=auto \ --gas-adjustment=1.5 \ --gas-prices="2500000000arai" \ --from=wallet