Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
apt update && apt upgrade -y
apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
Installing Go
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 $HOME/.bash_profile && \
go version
Build
git clone https://github.com/andromedaprotocol/andromedad.git
cd andromedad
git checkout andromeda-1-v0.1.0
make install
andromedad version
Init your node
andromedad init <YOUR_MONIKER> --chain-id andromeda-1
Create or recover your wallet
#NEW WALLET
andromedad keys add <WALLET_NAME>
#RECOVER OLD WALLET
andromedad keys add <WALLET_NAME> --recover
Download Genesis
curl -Ls https://github.com/andromedaprotocol/mainnet/blob/release/genesis.json > $HOME/.andromeda/config/genesis.json
Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"1000000uandr\"/;" ~/.andromeda/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.andromeda/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.andromeda/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.andromeda/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 40/g' $HOME/.andromeda/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 20/g' $HOME/.andromeda/config/config.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.andromeda/config/config.toml
Download addrbook
wget -O $HOME/.andromeda/config/addrbook.json "https://raw.githubusercontent.com/nodersteam/cosmos-adrbook/main/andromeda/addrbook.json"
Create a service file
sudo tee /etc/systemd/system/andromedad.service > /dev/null <<EOF
[Unit]
Description=andromedad
After=network-online.target
[Service]
User=$USER
ExecStart=$(which andromedad) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Use our StateSync
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.andromeda/config/config.toml
SNAP_RPC=
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 500)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
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/.andromeda/config/config.toml
Start your node
systemctl daemon-reload
systemctl enable andromedad
systemctl restart andromedad && journalctl -u andromedad -f -o cat
Wait for full synchronization and create a validator
andromedad tx staking create-validator \
--chain-id andromeda-1 \
--commission-rate 0.05 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.1 \
--min-self-delegation "1000000" \
--amount 1000000uandr \
--pubkey $(andromedad tendermint show-validator) \
--moniker "<YOUR_MONIKER>" \
--from <WALLET_NAME> \
--fees 10000uandr \
--gas 300000 -y
If you want to delete a node
systemctl stop andromedad
systemctl disable andromedad
rm /etc/systemd/system/andromedad.service
systemctl daemon-reload
cd $HOME
rm -rf .andromeda andromeda
rm -rf $(which andromedad)
Last updated