July 21, 2022
Stride установка ноды
УСТАНОВКА
Обновляем и устанавливаем необходимые пакеты:
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="Имя вашей ноды"
Далее сохраняем переменные в баш:
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile echo "export WALLET=wallet" >> $HOME/.bash_profile echo "export CHAIN_ID=STRIDE-TESTNET-4" >> $HOME/.bash_profile source $HOME/.bash_profile
Скачиваем и устанавливаем бинарник:
cd $HOME git clone https://github.com/Stride-Labs/stride.git cd stride && git checkout cf4e7f2d4ffe2002997428dbb1c530614b85df1b make build chmod +x ./build/strided && mv ./build/strided /usr/local/bin/strided
strided init $NODENAME --chain-id $CHAIN_ID
Записываем чейн и keyring-backend в конфиг
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
SEEDS="d2ec8f968e7977311965c1dbef21647369327a29@seedv2.poolparty.stridenet.co:26656" PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26639,[email protected]:16656,[email protected]:54356"
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
Эксплорер можете найти здесь
strided keys add $WALLET
Кран - Заходим в дискорд, ветка #token-faucet
пишем следующее $faucet:ваш_адрес
Создаем переменную с адресом для удобства
ADDRESS=$(strided keys show $WALLET -a)
echo 'export ADDRESS='${ADDRESS} >> $HOME/.bash_profile
strided query bank balances $ADDRESS
Создаем переменную с валопер адресом для удобства
VALOPER=$(strided keys show $WALLET --bech val -a)
echo 'export VALOPER='${VALOPER} >> $HOME/.bash_profile source $HOME/.bash_profile
strided 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
Редактируем информацию у валидатора (по желанию)
strided tx staking edit-validator \ --from=$WALLET \ --website="САЙТ" \ --identity="ID с keybase.io" \ --details="любые_детали" \ --chain-id=$CHAIN_ID \ --gas-adjustment="1"
ОБНОВЛЕНИЕ
На блоке 155420 потребуется обновление
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
ПОЛЕЗНЫЕ КОМАНДЫ
Проверяем синк, верный статус 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
Авторский канал: https://t.me/cryptorussianbears
Мой чат для обсуждения: https://t.me/russianbears1