Safrochain Testnet

Minimum Hardware

NODE CPU RAM SSD OS
safrochaind 4 8 400 GB Ubuntu 22.04 LTS

Install Dependencies

				
					sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
				
			

Install Go

				
					ver="1.23.4"
cd $HOME
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"
echo "export PATH=\$PATH:/usr/local/go/bin:\$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
go version
				
			

Download Binary

				
					cd $HOME
rm -rf safrochain-node
git clone https://github.com/Safrochain-Org/safrochain-node.git
cd safrochain-node
git checkout v0.1.0
go build -o safrochaind ./cmd/safrochaind
sudo cp safrochaind /usr/local/bin/
safrochaind version
export HOME_NODE="$HOME/.safrochain"

cd ~/safrochain-node
make build

which safrochaind
sudo cp /root/go/bin/safrochaind /usr/local/bin/
safrochaind version
				
			

Config and Init App

				
					safrochaind init test --chain-id safro-testnet-1
				
			

Download Genesis and Addrbook

				
					curl -L -o ~/.safrochain/config/genesis.json https://genesis.safrochain.com/testnet/genesis.json
				
			

Seeds and Peers

				
					SEEDS=
PEERS="0f85ddad45882ba2f770de01308dafcc833abe81@94.130.23.254:30756,1edeedc5f5c3d08a1999a7c334e11ad10d252039@88.99.136.168:26656,d1c934296c3e3f6379677a94a06e944e3dec17f3@94.130.143.184:17656,ad0b77cb312cd848b3debe7fbef677ef480beb75@116.202.210.177:22656,a2cac656019665fcd03d3039fee5940e77a035c4@37.27.239.10:26656,cd26df61f5d469d574fd89e3c8a08a323187090f@18.191.254.213:26656,2fe5e18e23c24accacfa9fada0f2683b9721cb0c@95.217.77.229:30756,54bb17ce612313b941ec6aee00413d6a08032e69@64.203.83.66:26656,d5519e378247dfb61dfe90652d1fe3e2b3005a5b@213.239.207.162:16956,9ed3e540ca5ff2d57a58cd9b62128a48f0fe01c3@65.109.59.22:30756"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.lumera/config/config.toml
				
			

Custom Ports

				
					PORT=25
sed -i -e "s%:26657%:${PORT}657%" $HOME_NODE/config/client.toml
sed -i -e "s%:26658%:${PORT}658%; s%:26657%:${PORT}657%; s%:6060%:${PORT}060%; s%:26656%:${PORT}656%; s%:26660%:${PORT}660%" $HOME_NODE/config/config.toml
sed -i -e "s%:1317%:${PORT}317%; s%:9090%:${PORT}090%" $HOME_NODE/config/app.toml
				
			

Pruning, Gas and Prometheus

				
					sed -i 's|^indexer *=.*|indexer = "null"|' $HOME_NODE/config/config.toml
				
			

Create Service File

				
					sudo tee /etc/systemd/system/safrochaind.service > /dev/null << EOF
[Unit]
Description=safrochain
After=network-online.target

[Service]
User=$USER
ExecStart=$(which safrochaind) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
				
			

Start

				
					sudo systemctl daemon-reload
sudo systemctl enable safrochaind
sudo systemctl restart safrochaind && sudo journalctl -u safrochaind -f -o cat
				
			

Snapshot

				
					-
				
			

State Sync

				
					-
				
			

Create and Restore Address

				
					# create wallet
safrochaind keys add wallet
# Restore wallet
safrochaind keys add wallet --recover
# List
safrochaind keys list
				
			

Check Balance

				
					safrochaind q bank balances $(safrochaind keys show wallet -a)
				
			

Create Validator

				
					PUBKEY=$(safrochaind tendermint show-validator | jq -r .key)

cat > $HOME/.safrochain/validator.json << EOF
{
  "pubkey": {
    "@type": "/cosmos.crypto.ed25519.PubKey",
    "key": "$PUBKEY"
  },
  "amount": "20000000usaf",
  "moniker": "catsmile",
  "identity": "",
  "website": "",
  "security": "",
  "details": "Powering Decentralized Infrastructure with Precision",
  "commission-rate": "0.05",
  "commission-max-rate": "0.2",
  "commission-max-change-rate": "0.01",
  "min-self-delegation": "1"
}
EOF

safrochaind tx staking create-validator $HOME/.safrochain/validator.json \
  --from wallet \
  --chain-id safro-testnet-1 \
  --gas auto \
  --gas-adjustment 1.3 \
  --gas-prices 0.1usaf \
  --yes
				
			

Delegate to own

				
					safrochaind tx staking delegate $(safrochaind keys show wallet --bech val -a) 20000000usaf \
  --from wallet \
  --chain-id safro-testnet-1 \
  --fees 20000usaf \
  --gas auto \
  --gas-adjustment 1.3 \
  --yes
				
			

Unjail Validator

				
					safrochaind tx slashing unjail \
  --from wallet \
  --chain-id safro-testnet-1 \
  --fees 20000usaf \
  --gas auto \
  --gas-adjustment 1.3 \
  --yes
				
			

Vote

				
					safrochaind tx gov vote (proposal_id) yes \
  --from wallet \
  --chain-id safro-testnet-1 \
  --fees 20000usaf \
  --gas auto \
  --gas-adjustment 1.3 \
  --yes
				
			

Upgrade

				
					-
				
			

Delete node

				
					cd $HOME
sudo systemctl stop safrochaind
sudo systemctl disable safrochaind
sudo rm /etc/systemd/system/safrochaind.service
sudo systemctl daemon-reload
rm -f $(which safrochaind)
rm -rf $HOME/.safrochaind
rm -rf $HOME/safrochain-node