Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
sudo apt update && sudo apt upgrade -y
apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
Installing Go
ver="1.20.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"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
Build
cd $HOME
git clone https://github.com/stratosnet/stratos-chain.git
cd stratos-chain
git checkout v0.11.0
make install
stchaind version
Init your node
stchaind init <MONIKER> --chain-id=stratos-1
Create or recover your wallet
#NEW WALLET
stchaind keys add <WALLET_NAME>
#RECOVER OLD WALLET
stchaind keys add <WALLET_NAME> --recover
Download Genesis
wget -O $HOME/.stchaind/config/genesis.json "https://raw.githubusercontent.com/stratosnet/stratos-chain/21cefa368132da7702598d7a556b2a7945c02e85/networks/local/cluster-config-sample/node/stchaind/config/genesis.json"
Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0wei\"|" $HOME/.stchaind/config/app.toml
sed -i -e "s|^pruning *=.*|pruning = \"custom\"|" $HOME/.stchaind/config/app.toml
sed -i -e "s|^pruning-keep-recent *=.*|pruning-keep-recent = \"113\"|" $HOME/.stchaind/config/app.toml
sed -i -e "s|^pruning-keep-every *=.*|pruning-keep-every = \"0\"|" $HOME/.stchaind/config/app.toml
sed -i -e "s|^pruning-interval *=.*|pruning-interval = \"17\"|" $HOME/.stchaind/config/app.toml
sed -i -e "s|^snapshot-interval *=.*|snapshot-interval = \"0\"|" $HOME/.stchaind/config/app.toml
sed -i -e "s|^snapshot-keep-recent *=.*|snapshot-keep-recent = \"2\"|" $HOME/.stchaind/config/app.toml
Download addrbook
wget -O $HOME/.stchaind/config/addrbook.json "https://raw.githubusercontent.com/nodersteam/cosmos-adrbook/main/stratos/addrbook.json"
Create a service file
sudo tee /etc/systemd/system/stchaind.service > /dev/null <<EOF
[Unit]
Description=stchaind Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which stchaind) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Use our StateSync
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.stchaind/config/config.toml
SNAP_RPC=http://stratos.rpc.nodersteam.com:26657
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 500)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
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\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.stchaind/config/config.toml
Start your node
systemctl daemon-reload
systemctl enable stchaind
systemctl restart stchaind && journalctl -u stchaind -f -o cat
Wait for full synchronization and create a validator
stchaind tx staking create-validator \
--amount 100000000000000wei \
--commission-max-change-rate "0.1" \
--commission-max-rate "0.20" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--details <YOUR_DETAILS> \
--pubkey=$(stchaind tendermint show-validator) \
--moniker <YOUR_MONIKER> \
--chain-id stratos-1 \
--fees 1000000wei \
--node http://<YOURIP>:<YOURPORT> \
--from <WALLET_NAME>
If you want to delete a node
systemctl stop stchaind
systemctl disable stchaind
rm /etc/systemd/system/stchaind.service
systemctl daemon-reload
cd $HOME
rm -rf .stchaind stchaind
rm -rf $(which stchaind)
Last updated