Skip to content

Install

Website

Twitter

Discord

GitHub

Explorer


Chain ID: structstestnet-101 Latest Version: 0.6.0-beta Custom Port: 144
Section titled “Chain ID: Latest Version: Custom Port: ”
Specify the name of your “MONIKER” (validator) which will be visible in the explorer
Section titled “Specify the name of your “MONIKER” (validator) which will be visible in the explorer”
MONIKER="YOUR_MONIKER_NAME"
sudo apt update && sudo apt upgrade -y
sudo apt install curl build-essential git jq lz4 ncdu btop -y
cd $HOME
version="1.23.6"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
curl https://get.ignite.com/cli! | bash
ignite version
cd $HOME
git clone https://github.com/playstructs/structsd.git
cd structsd
ignite chain build
structsd version --long | grep -e commit -e version
# Set node configuration
structsd config set client chain-id structstestnet-101
structsd config set client keyring-backend test
structsd config set client node tcp://localhost:14457
# Initialize node
structsd init $MONIKER --chain-id structstestnet-101
# Download genesis and addrbook
curl -Ls https://snapshots.moonbridge.org/testnet/structs/genesis.json > $HOME/.structs/config/genesis.json
curl -Ls https://snapshots.moonbridge.org/testnet/structs/addrbook.json > $HOME/.structs/config/addrbook.json
# Set seeds and peers
SEEDS=""
PEERS="f9ff152e331904924c26a4f8b1f46e859d574342@155.138.142.145:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.structs/config/config.toml
# Setting minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ualpha\"|" $HOME/.structs/config/app.toml
# Setting pruning
sed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.structs/config/app.toml
sed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.structs/config/app.toml
sed -i -e 's|^pruning-interval *=.*|pruning-interval = "10"|' $HOME/.structs/config/app.toml
# Disable indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.structs/config/config.toml
# Enable Prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.structs/config/config.toml
# Setting custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:14458\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:14457\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:14460\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:14456\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):14456\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":14466\"%" $HOME/.structs/config/config.toml
sed -i -e "s%:1317%:14417%g; s%:8080%:14480%g; s%:9090%:14490%g; s%:9091%:14491%g; s%:8545%:14445%g; s%:8546%:14446%g; s%:6065%:14465%g" $HOME/.structs/config/app.toml
mkdir -p $HOME/.structs/cosmovisor/genesis/bin
mkdir -p $HOME/.structs/cosmovisor/upgrades
cp $HOME/go/bin/structsd $HOME/.structs/cosmovisor/genesis/bin/
sudo tee /etc/systemd/system/structsd.service > /dev/null << EOF
[Unit]
Description=Structs Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_NAME=structsd"
Environment="DAEMON_HOME=$HOME/.structs"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable structsd
curl -o - -L https://snapshots.moonbridge.org/testnet/structs/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -C $HOME/.structs
[[ -f $HOME/.structs/data/upgrade-info.json ]] && cp $HOME/.structs/data/upgrade-info.json $HOME/.structs/cosmovisor/genesis/upgrade-info.json
sudo systemctl start structsd && sudo journalctl -u structsd -f --no-hostname -o cat
structsd keys add wallet
structsd q bank balances $(structsd keys show wallet -a)

Get pubkey

structsd comet show-validator
cd $HOME/.structs/config
nano validator.json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"lR1d7YBVK5jYijOfWVKRFoWCsS4dg3kagT7LB9GnG8I="},
"amount": "1000000ualpha",
"moniker": "YOUR_MONIKER_NAME",
"identity": "YOUR_KEYBASE_ID",
"details": "YOUR_DETAILS",
"website": "YOUR_WEBSITE_URL",
"security": "YOUR_EMAIL_ADDRESS",
"commission-rate": "0.10",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
structsd tx staking create-validator $HOME/.structs/config/validator.json \
--from wallet \
--gas auto \
-y
sudo systemctl stop structsd
sudo systemctl disable structsd
sudo rm -rf /etc/systemd/system/structsd.service
sudo systemctl daemon-reload
sudo rm -f $(which structsd)
sudo rm -rf $HOME/.structs
sudo rm -rf $HOME/structsd