SAFROCHAIN VALIDATOR

Safrochain Node Setup

Complete guide to deploying and managing a high-performance Safrochain validator node on testnet

NETWORK STATUS: ACTIVE

System Requirements

Component Minimum Recommended
OS Ubuntu 20.04 Ubuntu 22.04 LTS
CPU 4 vCPU 8+ Cores
RAM 8GB 16GB+
Storage 200GB SSD 500GB SSD/NVMe
Network 10Mbps 100Mbps+

Manual Installation

Step 1: Install Dependencies

bash
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

Step 2: Install Go

bash
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

Step 3: Install Safrochain Node

bash
cd $HOME
rm -rf safrochain-node
git clone https://github.com/Safrochain-Org/safrochain-node.git
cd safrochain-node
git checkout v0.1.0
make install

# Verify installation
safrochaind version  # Output should be: v0.1.0

Step 4: Initialize Node

bash
safrochaind init Your_Node_Name --chain-id safro-testnet-1

Step 5: Download Genesis and Addrbook

bash
# Download Genesis
curl -L https://genesis.safrochain.com/testnet/genesis.json > $HOME/.safrochain/config/genesis.json

# Download Addrbook
curl -L https://snapshot-t.vinjan.xyz/safrochain/addrbook.json > $HOME/.safrochain/config/addrbook.json

Step 6: Configure Node

bash
# Set custom ports
PORT=12
sed -i -e "s%:26657%:${PORT}657%" $HOME/.safrochain/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/.safrochain/config/config.toml
sed -i -e "s%:1317%:${PORT}317%; s%:9090%:${PORT}090%" $HOME/.safrochain/config/app.toml

# Configure seeds
seeds="d5944634c5d9b3f00a84a4640df3764b82f5a36b@94.130.143.184:12656"
sed -i -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.safrochain/config/config.toml

# Set minimum gas price
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001usaf\"/" $HOME/.safrochain/config/app.toml

# Disable indexer
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.safrochain/config/config.toml

Validator Configuration

Create or Recover Wallet

bash
# Create new wallet
safrochaind keys add wallet --keyring-backend test

# Recover existing wallet
safrochaind keys add wallet --recover --keyring-backend test

⚠️ Securely backup your mnemonic phrase!

Create Validator

bash
safrochaind tx staking create-validator \
  --amount 1500000usaf \
  --pubkey $(safrochaind tendermint show-validator) \
  --moniker "Your_Moniker" \
  --identity "your identity" \
  --website "https://onenov.xyz" \
  --details "stake with me" \
  --commission-rate 0.05 \
  --commission-max-rate 0.20 \
  --commission-max-change-rate 0.01 \
  --min-self-delegation 1 \
  --from wallet \
  --chain-id safro-testnet-1 \
  --keyring-backend test \
  --gas auto --gas-adjustment 1.3 \
  --fees 5000usaf \
  -y

Service Configuration

Step 1: Create Systemd Service

bash
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

Step 2: Enable and Start Service

bash
sudo systemctl daemon-reload
sudo systemctl enable safrochaind
sudo systemctl restart safrochaind

# Check status
sudo systemctl status safrochaind

# View logs (Ctrl+C to exit)
sudo journalctl -u safrochaind -f -o cat

Upgrade Binary

Upgrade Information

Coming Soon

Upgrade instructions will be provided here when a new version is released.

Check back later or join our Telegram channel for updates.

Sync/Snapshot Options

Sync Information

Coming Soon

Snapshot and state sync instructions will be provided here when available.

Check back later or join our Telegram channel for updates.

Public API/RPC Endpoints

API/RPC Information

Coming Soon

Public API/RPC endpoints will be provided here when available.

Check back later or join our Telegram channel for updates.

CLI Cheatsheet

Wallet Operations

bash
# List all wallets
safrochaind keys list --keyring-backend test

# Check balance
safrochaind query bank balances $(safrochaind keys show wallet -a --keyring-backend test) --node tcp://localhost:12657

# Send tokens
safrochaind tx bank send wallet [to-address] [amount]usaf --from wallet --chain-id safro-testnet-1 --keyring-backend test --gas auto --gas-adjustment 1.3 --fees 5000usaf -y

Node Management

bash
# Start node
sudo systemctl start safrochaind

# Stop node
sudo systemctl stop safrochaind

# Restart node
sudo systemctl restart safrochaind

# Check logs
journalctl -u safrochaind -f --no-pager

# Check sync status
safrochaind status | jq .SyncInfo

Validator Operations

bash
# Check validator status
safrochaind query staking validator $(safrochaind keys show wallet --bech val -a --keyring-backend test)

# Delegate to validator
safrochaind tx staking delegate [validator-address] [amount]usaf --from wallet --chain-id safro-testnet-1 --keyring-backend test --gas auto --gas-adjustment 1.3 --fees 5000usaf -y

# Withdraw rewards
safrochaind tx distribution withdraw-all-rewards --from wallet --chain-id safro-testnet-1 --keyring-backend test --gas auto --gas-adjustment 1.3 --fees 5000usaf -y

# Unbond from validator
safrochaind tx staking unbond [validator-address] [amount]usaf --from wallet --chain-id safro-testnet-1 --keyring-backend test --gas auto --gas-adjustment 1.3 --fees 5000usaf -y

Governance

bash
# List proposals
safrochaind query gov proposals

# View proposal details
safrochaind query gov proposal [proposal-id]

# Vote on proposal
safrochaind tx gov vote [proposal-id] [yes/no/no_with_veto/abstain] --from wallet --chain-id safro-testnet-1 --keyring-backend test --gas auto --gas-adjustment 1.3 --fees 5000usaf -y