November 6, 2022
Гайд по установке ноды Defund
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="Имя вашей ноды"
Далее сохраняем переменные в баш:
DPORT=12 echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile echo "export WALLET=wallet" >> $HOME/.bash_profile echo "export DCHAIN_ID=defund-private-2" >> $HOME/.bash_profile echo "export DPORT=${DPORT}" >> $HOME/.bash_profile source $HOME/.bash_profile
Скачиваем и устанавливаем бинарник:
cd $HOME git clone https://github.com/defund-labs/defund git checkout v0.1.0 cd defund make build chmod +x ./build/defundd && mv ./build/defundd /usr/local/bin/defundd
defundd init $NODENAME --chain-id $DCHAIN_ID
Записываем чейн и keyring-backend в конфиг, меняем порт
defundd config chain-id $DCHAIN_ID defundd config keyring-backend test defundd config node tcp://localhost:${DPORT}657
wget -qO $HOME/.defund/config/genesis.json "https://raw.githubusercontent.com/defund-labs/testnet/main/defund-private-2/genesis.json"
wget -qO $HOME/.defund/config/addrbook.json "http://65.108.6.45:8000/defund/addrbook.json"
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${DPORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${DPORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${DPORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${DPORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${DPORT}660\"%" $HOME/.defund/config/config.toml sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${DPORT}317\"%; s%^address = \":8080\"%address = \":${DPORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${DPORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${DPORT}091\"%" $HOME/.defund/config/app.toml
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.defund/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025ufetf\"/" $HOME/.defund/config/app.toml
pruning="custom" pruning_keep_recent="100" pruning_keep_every="0" pruning_interval="50"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.defund/config/app.toml sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.defund/config/app.toml sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.defund/config/app.toml sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.defund/config/app.toml
seeds="[email protected]:26656,[email protected]:11256" peers=""
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.defund/config/config.toml
defundd tendermint unsafe-reset-all
sudo tee /etc/systemd/system/defundd.service > /dev/null <<EOF [Unit] Description=defundNode After=network-online.target [Service] User=$USER ExecStart=$(which defundd) start Restart=on-failure RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF
sudo systemctl daemon-reload && sudo systemctl enable defundd && sudo systemctl restart defundd
sudo journalctl -u defundd -f -o cat
Эксплорер можете найти здесь
defundd keys add $WALLET
Кран - Заходим в дискорд, ветка #faucet
пишем следующее !faucet ваш_адрес
Создаем переменную с адресом для удобства
DADDRESS=$(defundd keys show $WALLET -a)
echo 'export DADDRESS='${DADDRESS} >> $HOME/.bash_profile
defundd query bank balances $DADDRESS
Создаем переменную с валопер адресом для удобства
DVALOPER=$(defundd keys show $WALLET --bech val -a)
echo 'export DVALOPER='${DVALOPER} >> $HOME/.bash_profile source $HOME/.bash_profile
defundd tx staking create-validator \ --amount 19500000ufetf \ --from $WALLET \ --commission-max-change-rate "0.01" \ --commission-max-rate "0.2" \ --commission-rate "0.07" \ --min-self-delegation "1" \ --pubkey $(defundd tendermint show-validator) \ --moniker $NODENAME \ --fees 500ufetf \ --chain-id $DCHAIN_ID
Редактируем информацию у валидатора (по желанию)
defundd tx staking edit-validator \ --from=$WALLET \ --website="САЙТ" \ --identity="ID с keybase.io" \ --details="любые_детали" \ --chain-id=$DCHAIN_ID \ --fees=500ufetf \ --gas-adjustment="1"
ПОЛЕЗНЫЕ КОМАНДЫ
Проверяем синк, верный статус false
defundd status 2>&1 | jq .SyncInfo
defundd tx staking delegate $EVALOPER 1000000umpwr --from=$WALLET --fees=6000umpwr --chain-id=$ECHAIN_ID
defundd tx slashing unjail --from $WALLET --chain-id $ECHAIN_ID
sudo systemctl stop defundd && sudo systemctl disable defundd sudo rm -rf /etc/systemd/system/defundd sudo rm -rf /usr/local/bin/defundd sudo rm -rf $HOME/.defund sudo rm -rf $HOME/defund
Авторский канал: https://t.me/cryptorussianbears
Мой чат для обсуждения: https://t.me/russianbears1