May 17, 2023

BonusBlock

ССЫЛКИ:

УСТАНОВКА НОДЫ

Устанавливаем (актуальные) бинарные файлы:

git clone https://github.com/BBlockLabs/BonusBlock-chain && cd BonusBlock-chain 
git checkout v0.1.39 
make install

Инициализируем ноду (MONIKER меняем на свой):

bonus-blockd init MONIKER --chain-id blocktopia-01

Скачиваем genesis.json:

wget -O $HOME/.bonusblock/config/genesis.json "https://anode.team/BonusBlock/test/genesis.json"

Скачиваем addrbook.json:

wget -O $HOME/.bonusblock/config/addrbook.json "https://anode.team/BonusBlock/test/addrbook.json"

Прописываем chain-id в config.toml:

bonus-blockd config chain-id blocktopia-01

Настраиваем минимальную цену за газ в app.toml:

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ubonus\"/;" ~/.bonusblock/config/app.toml

Создаем сервисный файл:

tee /etc/systemd/system/bonus-blockd.service > /dev/null <<EOF
[Unit] 
Description=bonus-blockd 
After=network-online.target 

[Service] 
User=$USER 
ExecStart=$(which bonus-blockd) start 
Restart=on-failure 
RestartSec=3 
LimitNOFILE=65535 

[Install] 
WantedBy=multi-user.target 
EOF
systemctl daemon-reload && systemctl enable bonus-blockd 
systemctl restart bonus-blockd && journalctl -u bonus-blockd -f-o cat

State-Sync:

SNAP_RPC=65.108.199.120:47357 && \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
peers="f526b6405d841c689182de56df829b95baf70bce@65.108.199.120:47356" 
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.bonusblock/config/config.toml
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.bonusblock/config/config.toml
curl -o - -L https://anode.team/BonusBlock/test/anode.team_bonusblock_wasm.tar.lz4 | lz4 -c -d - | tar -x -C$HOME/.bonusblock/
systemctl restart bonus-blockd && journalctl -u bonus-blockd -f -o cat

Создаем или восстанавливаем кошелек (NAME_WALLET меняем на свое):

bonus-blockd keys add NAME_WALLET

или

bonus-blockd keys add NAME_WALLET --recover

Создаем валидатора:

bonus-blockd tx staking create-validator \
  --amount=1000000ubonus \
  --pubkey=$(bonus-blockd tendermint show-validator) \
  --moniker="<moniker>" \
  --identity="<identity>" \
  --website="<website>" \
  --details="<details>" \
  --security-contact="<contact>" \
  --chain-id="blocktopia-01" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --from=<wallet_name>