Stratos 0.6.2 Update

Stratos SDS

# Обновите систему
sudo apt update && sudo apt upgrade -y

# Установите git, snap и make
sudo apt install git build-essential curl snapd --yes
# создаём папку для 'stratos', скачиваем файлы ноды одной командой
mkdir $HOME/stratos; cd $HOME/stratos; \\
wget <https://github.com/stratosnet/stratos-chain/releases/download/v0.6.1/stchaincli> && \\
wget <https://github.com/stratosnet/stratos-chain/releases/download/v0.6.1/stchaind>

# проверяем
md5sum stchain*

## Expected output 
## 55f7454c2998542d08fcd624f043c7db  stchaincli
## 9bf3a165386b6d5d5b056661b4da3cc5  stchaind

# делаем файлы исполняемыми и создаём ссылки
chmod +x stchaincli stchaind && \\
ln -s $HOME/stratos/stchaincli /usr/bin/ && \\
ln -s $HOME/stratos/stchaind /usr/bin/

echo 'export PATH="$HOME:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

# проверяем версию
stchaincli version && stchaind version
# добавляем значение переменной
echo "export STR_NODENAME="имя_ноды"" >> ~/.bash_profile
echo "export STR_WALLET="имя_кошелька"" >> ~/.bash_profile
source ~/.bash_profile

# проверим значение переменной, выведя её на экран
echo $STR_NODENAME

# Инициализируем ноду
cd $HOME
stchaind init $STR_NODENAME
# удаляем старые файлы генезиса и конфига, скачиваем новые одной командой
rm -vf $HOME/.stchaind/config/genesis* $HOME/.stchaind/config/config.toml && \\
wget -P $HOME/.stchaind/config/ <https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/genesis.json> && \\
wget -P $HOME/.stchaind/config/ <https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/config.toml>

# добавляем имя ноды в конфиг
nano $HOME/.stchaind/config/config.toml

# меняем [moniker = "node"] на название наше ноды [moniker = "AlxVoy"]
# Ctrl + X
# Y
# Enter

Untitled

# создаём файл сервиса для запуска ноды
sudo tee <<EOF >/dev/null /etc/systemd/system/stratosd.service
[Unit]
Description=Stratos Chain Node
After=network-online.target
[Service]
User=$USER
ExecStart=/usr/bin/stchaind start --home=$HOME/.stchaind
Restart=on-failure
RestartSec=3
LimitNOFILE=8192
[Install]
WantedBy=multi-user.target
EOF
# включаем сервис
sudo systemctl daemon-reload
sudo systemctl enable stratosd
sudo systemctl restart stratosd

# проверяем логи
sudo journalctl -fu stratosd -o cat

# проверить статус
systemctl status stratosd

curl localhost:26657/status
# получаем статус синхронизации ноды, если falce значить синхронезировались
stchaincli status 2>&1 \\
--node `cat "$HOME/.stchaind/config/config.toml" \\
| grep -oPm1 "(?<=^laddr = \\")([^%]+)(?=\\")"` \\
| jq ."sync_info"."catching_up"
# выполняем команду создания тестового кошелька
stchaincli keys add $STR_WALLET --hd-path="m/44'/606'/0'/0/0" --keyring-backend=test

# либо восстанавливаем старый по мнемонике
stchaincli keys add $STR_WALLET --recover --hd-path="m/44'/606'/0'/0/0" --keyring-backend=test

# запрашиваем токены на адрес, подставить смой адрес кошелька
curl -X POST <https://faucet-tropos.thestratos.org/faucet/st1e85y4ze6qzfpu98c88usz9fjat6vl7sv3dse2m>

# проверяем баланс из командной строки, подставить свой адрес
stchaincli query account st1e85y4ze6qzfpu98c88usz9fjat6vl7sv3dse2m
# Создаём валидатор
stchaincli tx staking create-validator \\
--amount="99999000000ustos" \\
--pubkey=$(stchaind tendermint show-validator) \\
--moniker=$STR_NODENAME \\
--website="" \\
--identity="" \\
--details="" \\
--chain-id=tropos-1 \\
--commission-max-change-rate="0.1" \\
--commission-max-rate="0.5" \\
--commission-rate="0.1" \\
--min-self-delegation="1" \\
--gas="auto" \\
--gas-adjustment=1.5 \\
--gas-prices="0.5ustos" \\
--keyring-backend=test \\
--from=$STR_WALLET

# Посмотрим информацию о валидаторе
stchaincli query staking validator $(stchaincli keys show $STR_WALLET \\
--bech val --address --keyring-backend test) \\
--trust-node \\
--node `cat "$HOME/.stchaind/config/config.toml" \\
| grep -oPm1 "(?<=^laddr = \\")([^%]+)(?=\\")"`
# эксплорер
[<https://explorer-tropos.thestratos.org/validators>](<https://explorer-tropos.thestratos.org/validators>)
[<https://big-dipper-tropos.thestratos.org/validators>](<https://big-dipper-tropos.thestratos.org/validators>)

# офф гайд
[<https://github.com/stratosnet/sds/wiki/Tropos-Incentive-Testnet>](<https://github.com/stratosnet/sds/wiki/Tropos-Incentive-Testnet>)