βοΈInstallation
Manual Installation
# Update & 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 htop tmux chrony liblz4-tool -y
# Install Go
cd $HOME
VER="1.22.2"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
3sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version
#PORT=25
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export STRUCTS_CHAIN_ID="structstestnet-100"" >> $HOME/.bash_profile
echo "export STRUCTS_PORT="25"" >> $HOME/.bash_profile
source $HOME/.bash_profile
# Install Ignite
sudo curl https://get.ignite.com/cli! | bash
sudo mv ignite /usr/local/bin/
ignite version
# Download Binary
cd $HOME
git clone --branch v0.5.0-beta https://github.com/playstructs/structsd.git
cd structsd
ignite chain build
# Config and Init App
structsd init $MONIKER --chain-id $STRUCTS_CHAIN_ID
# Add Genesis File and Addrbook
wget -O $HOME/.structs/config/genesis.json https://files.shazoe.xyz/testnets/structs/genesis.json
wget -O $HOME/.structs/config/addrbook.json https://files.shazoe.xyz/testnets/structs/addrbook.json
#Configure Seeds and Peers
SEEDS=""
PEERS="[email protected]:14456,[email protected]:32656,[email protected]:10656,[email protected]:26656,[email protected]:26656,[email protected]:11656,[email protected]:26656,[email protected]:26696,[email protected]:26656,[email protected]:60856"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.structs/config/config.toml
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0alpha"/g' $HOME/.structs/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.structs/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.structs/config/config.toml
# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.structs/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.structs/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.structs/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.structs/config/app.toml
# Set Custom Port
sed -i.bak -e "s%:1317%:${STRUCTS_PORT}317%g;
s%:8080%:${STRUCTS_PORT}080%g;
s%:9090%:${STRUCTS_PORT}090%g;
s%:9091%:${STRUCTS_PORT}091%g;
s%:8545%:${STRUCTS_PORT}545%g;
s%:8546%:${STRUCTS_PORT}546%g;
s%:6065%:${STRUCTS_PORT}065%g" $HOME/.structs/config/app.toml
sed -i.bak -e "s%:26658%:${STRUCTS_PORT}658%g;
s%:26657%:${STRUCTS_PORT}657%g;
s%:6060%:${STRUCTS_PORT}060%g;
s%:26656%:${STRUCTS_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${STRUCTS_PORT}656\"%;
s%:26660%:${STRUCTS_PORT}660%g" $HOME/.structs/config/config.toml
sed -i \
-e 's|^chain-id *=.*|chain-id = "structstestnet-100"|' \
-e 's|^node *=.*|node = "tcp://localhost:25657"|' \
$HOME/.structs/config/client.toml
# Set Service File
sudo tee /etc/systemd/system/structsd.service > /dev/null <<EOF
[Unit]
Description=structs-testnet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which structsd) start --home $HOME/.structs
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
# Enable and Start Service
sudo systemctl daemon-reload && \
sudo systemctl enable structsd && \
sudo systemctl start structsd & sudo systemctl status structsd && \
sudo journalctl -u structsd -f --no-hostname -o cat
Last updated