Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
apt update && 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.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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version
Build
curl https://get.ignite.com/cli! | bash
ignite version
ignite network chain install 74
structsd version --long | grep -e version -e commit
Init your node
structsd init <YOUR_MONIKER> --chain-id structstestnet-74
Create or recover your wallet
#NEW WALLET
structsd keys add <WALLET_NAME>
#RECOVER OLD WALLET
structsd keys add <WALLET_NAME> --recover
Download Genesis
wget -O $HOME/.structs/config/genesis.json "https://testnet-snapshot.genznodes.dev/structs/genesis.json"
Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers
structsd config chain-id structstestnet-74
structsd config keyring-backend os
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0alpha\"/;" ~/.structs/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.structs/config/config.toml
peers="4f1533fddf898ac488ecc8ccbd3ee692b1006ee4@204.16.202.181:26656,761ecc52d712827e66024cdc156c856fadd69fbf@95.217.89.202:11832,d036d13c72d470afaf217b5de0cde683dea96f9f@99.243.48.108:26656,4b91f30c824b66452b008d4e130a72ab3566e624@104.37.192.94:26656,537bc4af86c9140b90c8b55a9a0afc4e480462f1@51.79.82.227:13656,b252a084958f4eafc71030d49e9de1bfe275a2f9@50.24.247.232:26656,00f347e94e763dda6d96da5d817cf10382dfc13b@69.76.225.147:26656,880c489a51526bcc95402d82d7a379de12cfd6f2@143.47.235.98:26656,077a73c09eda5cca30e3280c588cca6188f5a8fc@94.130.220.233:23656,165b513c192eed40701c786689a2b8f25ca5a26c@65.109.122.105:14656,d73ccb796f0c6f1d2be1b4f0cd75df49fdba1267@192.155.91.61:26656,372e686bc84528d9beccf15429f94846cd0f54d8@159.69.193.68:26656,7bbe533102e0312d240607dc592b04e153e43919@130.162.187.250:26656,3cc8848306c8ca8214e878aee60a9b6750f67aab@204.14.17.23:26656,7a946f6d235e6197bbb3da6eff32873c2201a0ff@104.37.192.93:26656,bad0b99e60df4e46076665219eceb36a38fdbc0d@104.37.195.101:26656,681d83226da7040f6d46af82aead4af5bee8cf6e@193.26.159.34:4656,26a83388dce3d0deb2d57e0b793ab1fc54e95eff@76.174.198.246:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.structs/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.structs/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 40/g' $HOME/.structs/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 10/g' $HOME/.structs/config/config.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.structs/config/config.toml
Download addrbook
wget -O $HOME/.structs/config/addrbook.json "https://raw.githubusercontent.com/nodersteam/cosmos-adrbook/main/struckt/addrbook.json"
Create a service file
sudo tee /etc/systemd/system/structsd.service > /dev/null <<EOF
[Unit]
Description=structsd
After=network-online.target
[Service]
User=$USER
ExecStart=$(which structsd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Use our StateSync
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.structs/config/config.toml
SNAP_RPC=http://struckt.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/.structs/config/config.toml
Start your node
systemctl daemon-reload
systemctl enable structsd
systemctl restart structsd && journalctl -u structsd -f -o cat
Wait for full synchronization and create a validator
structsd tx staking create-validator \
--chain-id structstestnet-74 \
--commission-rate 0.05 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.1 \
--min-self-delegation "1" \
--amount 100alpha \
--pubkey $(structsd tendermint show-validator) \
--moniker "<YOUR_MONIKER>" \
--from <WALLET_NAME> \
--gas auto
If you want to delete a node
systemctl stop structsd
systemctl disable structsd
rm /etc/systemd/system/structsd.service
systemctl daemon-reload
cd $HOME
rm -rf .structs structsd
rm -rf $(which structsd)
Last updated