Сервера и ноды
March 10
Babylon Testnet 3
Берем сервер конфигурации минимум vCPU8 16GB RAM 120GB SSD/NVMe.
sudo apt update && sudo apt upgrade -y sudo apt install snapd -y sudo snap install lz4 sudo apt -qy install curl git jq lz4 build-essential
sudo rm -rvf /usr/local/go/ wget https://golang.org/dl/go1.21.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz rm go1.21.1.linux-amd64.tar.gz
export GOROOT=/usr/local/go export GOPATH=$HOME/go export GO111MODULE=on export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
git clone https://github.com/babylonchain/babylon.git babylon cd babylon git checkout v0.8.3 make install
Замените YOUR_MONIKER на имя вашей ноды, придумайте любое, но запомните его
babylond init YOUR_MONIKER --chain-id bbn-test-3
wget https://github.com/babylonchain/networks/raw/main/bbn-test-3/genesis.tar.bz2 tar -xjf genesis.tar.bz2 && rm genesis.tar.bz2 mv genesis.json ~/.babylond/config/genesis.json
sed -i 's/seeds = ""/seeds = "ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:20656"/' ~/.babylond/config/config.toml
# Create Cosmovisor Folders mkdir -p ~/.babylond/cosmovisor/genesis/bin mkdir -p ~/.babylond/cosmovisor/upgrades # Load Node Binary into Cosmovisor Folder cp ~/go/bin/babylond ~/.babylond/cosmovisor/genesis/bin
Вставляем все одним текстом. Это одна большая команда
sudo tee /etc/systemd/system/babylond.service > /dev/null <<EOF [Unit] Description="babylon node" After=network-online.target [Service] User=USER ExecStart=/home/USER/go/bin/cosmovisor start Restart=always RestartSec=3 LimitNOFILE=4096 Environment="DAEMON_NAME=babylond" Environment="DAEMON_HOME=/home/USER/.babylond" Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false" Environment="DAEMON_RESTART_AFTER_UPGRADE=true" Environment="UNSAFE_SKIP_BACKUP=true" [Install] WantedBy=multi-user.target
wget -O babylon_83451.tar.lz4 https://snapshots.polkachu.com/testnet-snapshots/babylon/babylon_83451.tar.lz4 --inet4-only
rm -r ~/.babylond/wasm lz4 -c -d babylon_83451.tar.lz4 | tar -x -C $HOME/.babylond rm -v babylon_83451.tar.lz4
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.00001ubbn\"|" $HOME/.babylond/config/app.toml sed -i \ -e 's|^pruning *=.*|pruning = "custom"|' \ -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \ -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \ -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \ $HOME/.babylond/config/app.toml
sudo systemctl enable babylon.service sudo service babylon start sudo journalctl -u babylon -f