August 12, 2022
How to run a Stride node
Update and install the required packages:
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
ver="1.18.2" 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
NODENAME="Your node name"
Next, save the variables in bash:
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile echo "export WALLET=wallet" >> $HOME/.bash_profile echo "export CHAIN_ID=STRIDE-TESTNET-2" >> $HOME/.bash_profile source $HOME/.bash_profile
Downloading and installing bin:
cd $HOME git clone https://github.com/Stride-Labs/stride.git cd stride && git checkout 3cb77a79f74e0b797df5611674c3fbd000dfeaa1 make build chmod +x ./build/strided && mv ./build/strided /usr/local/bin/strided
strided init $NODENAME --chain-id $CHAIN_ID
Write the chain and keyring-backend to the config
strided config chain-id $CHAIN_ID strided config keyring-backend test
wget -qO $HOME/.stride/config/genesis.json "https://raw.githubusercontent.com/Stride-Labs/testnet/main/poolparty/genesis.json"
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ustrd\"/" $HOME/.stride/config/app.toml
pruning="custom" pruning_keep_recent="100" pruning_keep_every="0" pruning_interval="50"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.stride/config/app.toml sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.stride/config/app.toml sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.stride/config/app.toml sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.stride/config/app.toml
We put seeds and write them down
SEEDS="c0b278cbfb15674e1949e7e5ae51627cb2a2d0a9@seedv2.poolparty.stridenet.co:26656" PEERS="d6583df382d418872ab5d71d45a1a8c3d28ff269@138.201.139.175:21016,05d7b774620b7afe28bba5fa9e002b436786d4c3@195.201.165.123:20086,d28cfff8b2fe03b597f67c96814fbfd19085b7c3@168.119.124.158:26656,a9687b78c13d39d2f96ec0905c6aa201671f61f0@78.107.234.44:25656,6922feb0ca2eab2be07d60fbfd275319bcd83ec9@77.244.66.222:26656,48b1310bc81deea3eb44173c5c26873c23565d33@34.135.129.186:26656,a3afae256ad780f873f85a0c377da5c8e9c28cb2@54.219.207.30:26656,dd93bd24192d8d3151264424e44b0f213d2334dc@162.55.173.64:26656,d46c3c3de3aacb7c75bbbbf1fe5c168f0c100f26@135.181.131.116:26683,c765007c489ddbcb80249579534e63d7a00407d0@65.108.225.158:22656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.stride/config/config.toml
strided tendermint unsafe-reset-all
sudo tee /etc/systemd/system/strided.service > /dev/null <<EOF [Unit] Description=strideNode After=network-online.target [Service] User=$USER ExecStart=$(which strided) start Restart=on-failure RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload && sudo systemctl enable strided && sudo systemctl restart strided
sudo journalctl -u strided -f -o cat
Explorer is here здесь
strided keys add $WALLET
Faucet #token-faucet
пишем следующее $faucet-atom:your adress
Create a variable with an address for convenience
ADDRESS=$(strided keys show $WALLET -a)
echo 'export ADDRESS='${ADDRESS} >> $HOME/.bash_profilestrided query bank balances $ADDRESS
We create a variable with a valoper address for convenience
VALOPER=$(strided keys show $WALLET --bech val -a)
echo 'export VALOPER='${VALOPER} >> $HOME/.bash_profile
source $HOME/.bash_profilestrided tx staking create-validator \ --amount 10000000ustrd \ --from $WALLET \ --commission-max-change-rate "0.01" \ --commission-max-rate "0.2" \ --commission-rate "0.07" \ --min-self-delegation "1" \ --pubkey $(strided tendermint show-validator) \ --moniker $NODENAME \ --chain-id $CHAIN_ID
Editing information at the validator (optional)
strided tx staking edit-validator \ --from=$WALLET \ --website="САЙТ" \ --identity=any details" \ --chain-id=$CHAIN_ID \ --gas-adjustment="1"
Updates
systemctl stop strided && cd stride git pull git checkout 4ec1b0ca818561cef04f8e6df84069b14399590e make build chmod +x ./build/strided && mv ./build/strided /usr/local/bin/strided systemctl restart strided && journalctl -u strided -f -o cat
USEFUL COMMANDS
We check the sync, the correct status is false
strided status 2>&1 | jq .SyncInfo
strided tx staking delegate $VALOPER 10000000ustrd --from=$WALLET --chain-id=$CHAIN_ID
strided tx slashing unjail --from $WALLET --chain-id $CHAIN_ID
sudo systemctl stop strided && sudo systemctl disable strided sudo rm -rf /etc/systemd/system/strided sudo rm -rf /usr/local/bin/strided sudo rm -rf $HOME/.strided sudo rm -rf $HOME/stride sudo rm -rf $HOME/.stride