May 10, 2023

Гайд по установке ноды Andromeda

ℹ️ Наш Telegram-канал: https://t.me/pronodes

Требования к серверу

  • 2 core
  • 8 RAM
  • 200 GB SSD

1. Устанавливаем необходимые пакеты

sudo apt update
sudo apt install -y make gcc jq curl git lz4 build-essential chrony unzip

2. Устанавливаем Golang

if ! [ -x "$(command -v go)" ]; then
 ver="1.20.3" && \ 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" >> $HOME/.bash_profile 
  source .bash_profile
fi

3. Устанавливаем ноду

git clone https://github.com/andromedaprotocol/andromedad.git
cd andromedad
git checkout galileo-3-v1.1.0-beta1
make install

4. Инициализируем ноду

andromedad init <Моникер> --chain-id galileo-3

5. Скачиваем генезис файл

curl -s https://raw.githubusercontent.com/andromedaprotocol/testnets/galileo-3/genesis.json > $HOME/.andromedad/config/genesis.json

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

sudo tee /etc/systemd/system/andromedad.service > /dev/null << EOF
[Unit]
Description=Andromeda testnet Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which andromedad) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF

7. Настраиваем StateSync

SNAP_RPC="https://andromeda-testnet.nodejumper.io:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height)
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000))
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

PEERS="9d058b4c4eb63122dfab2278d8be1bf6bf07f9ef@andromeda-testnet.nodejumper.io:26656"
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.andromedad/config/config.toml

sed -i 's|^enable *=.*|enable = true|' $HOME/.andromedad/config/config.toml
sed -i 's|^rpc_servers *=.*|rpc_servers = "'$SNAP_RPC,$SNAP_RPC'"|' $HOME/.andromedad/config/config.toml
sed -i 's|^trust_height *=.*|trust_height = '$BLOCK_HEIGHT'|' $HOME/.andromedad/config/config.toml
sed -i 's|^trust_hash *=.*|trust_hash = "'$TRUST_HASH'"|' $HOME/.andromedad/config/config.toml

8. Запускаем ноду

sudo systemctl daemon-reload
sudo systemctl enable andromedad
sudo systemctl start andromedad

9. Проверяем логи

sudo journalctl -fu andromedad -o cat

Готово!


👾 Наш валидатор - https://stakeme.io/

🔥 New-Ноды под ключ-https://nodesme.io

💬 Чат- https://t.me/+IhRoXgkqO28yNDVi

✅ Twitter (eng) - https://twitter.com/ProNodes_val

✅ Twitter (ru) - https://twitter.com/pro_nodes

✅ Teletype (eng) - https://teletype.in/@stakeme.io

✅ Teletype (ru) - https://teletype.in/@pronodes

✅ Mirror (eng) -https://mirror.xyz/0x58fC64C4d35049dD0Da5a762E325c6B1D9bC9Fa0

✅ Our telegram - https://t.me/pronodes