March 6, 2023
Тестнет Kyve сеть Kaon-1
Обновляем и устанавливаем необходимые пакеты:
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.20.1" 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="Имя вашей ноды"
Далее сохраняем переменные в баш:
PORT=16 echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile echo "export WALLET=wallet" >> $HOME/.bash_profile echo "export KCHAIN_ID=kaon-1" >> $HOME/.bash_profile echo "export KPORT=${KPORT}" >> $HOME/.bash_profile source $HOME/.bash_profile
Скачиваем и устанавливаем бинарник:
git clone https://github.com/KYVENetwork/chain.git cd chain git fetch git checkout v1.0.0-rc0 make build chmod +x ./build/kyved && mv ./build/kyved /usr/local/bin/kyved
kyved init $NODENAME --chain-id $KCHAIN_ID
Записываем чейн и keyring-backend в конфиг, меняем порт
kyved config chain-id $KCHAIN_ID kyved config keyring-backend test kyved config node tcp://localhost:${KPORT}657
wget -qO $HOME/.kyve/config/genesis.json "https://raw.githubusercontent.com/KYVENetwork/networks/c59a8300bc10aa0e28834ecd61ec54c417e95acc/kaon-1/genesis.json"
wget -qO $HOME/.kyve/config/addrbook.json "https://snapshot.yeksin.net/kyve/addrbook.json"
pruning="custom" pruning_keep_recent="100" pruning_keep_every="0" pruning_interval="50"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.kyve/config/app.toml sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.kyve/config/app.toml sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.kyve/config/app.toml sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.kyve/config/app.toml
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${KPORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${KPORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${KPORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${KPORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${KPORT}660\"%" $HOME/.kyve/config/config.toml sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${KPORT}317\"%; s%^address = \":8080\"%address = \":${KPORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${KPORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${KPORT}091\"%" $HOME/.kyve/config/app.toml
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.kyve/config/config.toml
seeds="" peers="664e06d2d6110c5ba93f8ecfee66f150bad981bf@kyve-testnet-peer.itrocket.net:28656,[email protected]:28656,[email protected]:26656,[email protected]:34156,[email protected]:26656,[email protected]:27656,[email protected]:54600,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.kyve/config/config.toml
kyved tendermint unsafe-reset-all
sudo tee /etc/systemd/system/kyved.service > /dev/null <<EOF [Unit] Description=kyvedNode After=network-online.target [Service] User=$USER ExecStart=$(which kyved) start Restart=on-failure RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload && sudo systemctl enable kyved && sudo systemctl restart kyved
sudo journalctl -u kyved -f -o cat
Эксплорер можете найти здесь
kyved keys add $WALLET --recover
Создаем переменную с адресом для удобства
ADDRESS=$(kyved keys show $WALLET -a)
echo 'export ADDRESS='${ADDRESS} >> $HOME/.bash_profile
kyved query bank balances $ADDRESS
Создаем переменную с валопер адресом для удобства
VALOPER=$(kyved keys show $WALLET --bech val -a)
echo 'export VALOPER='${VALOPER} >> $HOME/.bash_profile source $HOME/.bash_profile
kyved tx staking create-validator \ --amount=2490000000tkyve \ --pubkey=$(kyved tendermint show-validator) \ --moniker=$NODENAME \ --chain-id=$KCHAIN_ID \ --commission-rate="0.05" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ --min-self-delegation="1000000" \ --gas="auto" \ --fees=2003839tkyve \ --from=$WALLET
Редактируем информацию у валидатора (по желанию)
kyved tx staking edit-validator \ --from=$WALLET \ --website="site" \ --identity="pgb keys" \ --details="any details" \ --chain-id=$KCHAIN_ID \ --fees=5000tkyve \ --gas-adjustment="1"
ПОЛЕЗНЫЕ КОМАНДЫ
Проверяем синк, верный статус false
kyved status 2>&1 | jq .SyncInfo
kyved tx staking delegate $VALOPER 10000000tkyve --from=$WALLET --chain-id=$KCHAIN_ID
kyved tx slashing unjail --from $WALLET --chain-id $KCHAIN_ID
sudo systemctl stop kyved && sudo systemctl disable kyved sudo rm -rf /etc/systemd/system/kyved sudo rm -rf /usr/local/bin/kyved sudo rm -rf $HOME/.kyve sudo rm -rf $HOME/chain
Авторский канал: https://t.me/cryptoriachannel1
Мой чат для обсуждения: https://t.me/cryptoriachat