Guide
Here is a node installation guide (Simplified and manual)
Preparing the server for installation
sudo apt update && sudo apt upgrade -y && \
sudo apt install curl tar wget clang pkg-config libssl-dev libleveldb-dev jq build-essential bsdmainutils git make ncdu htop screen unzip bc fail2ban htop -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/haqq-network/haqq
cd haqq
git checkout 1.7.2
make install
Init your node
haqqd init <YOUR_MONIKER> --chain-id=haqq_11235-1
haqqd config chain-id haqq_11235-1
Create or recover your wallet
#NEW WALLET
haqqd keys add <WALLET_NAME>
#RECOVER OLD WALLET
haqqd keys add <WALLET_NAME> --recover
Download Genesis
wget -O $HOME/.haqqd/config/genesis.json "https://raw.githubusercontent.com/haqq-network/mainnet/master/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 = \"0.0025aISLM\"/;" ~/.haqqd/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.haqqd/config/config.toml
seeds=""
peers=""
sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.haqqd/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.haqqd/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.haqqd/config/config.toml
Download addrbook
wget -O $HOME/.haqqd/config/addrbook.json "https://raw.githubusercontent.com/haqq-network/mainnet/master/addrbook.json"
Create a service file
sudo tee /etc/systemd/system/haqqd.service > /dev/null <<EOF
[Unit]
Description=haqqd
After=network-online.target
[Service]
User=$USER
ExecStart=$(which haqqd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Use our StateSync
sudo systemctl stop haqqd
SNAP_RPC=http://haqq.rpc.nodersteam.com:19657
cp $HOME/.haqqd/data/priv_validator_state.json $HOME/.haqqd/priv_validator_state.json.backup
sed -i -e "/seeds =/ s/= .*/= \"$SEEDS\"/" $HOME/.haqqd/config/config.toml
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 100)); \
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/.haqqd/config/config.toml
Start your node
sudo systemctl daemon-reload &&
sudo systemctl enable haqqd &&
sudo systemctl restart haqqd && sudo journalctl -u haqqd -f -o cat
Wait for full synchronization and create a validator
haqqd tx staking create-validator \
--amount 1000000000000000000aISLM \
--from <WALLET_NAME> \
--commission-max-change-rate "0.1" \
--commission-max-rate "0.20" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE>" \
--pubkey $(haqqd tendermint show-validator) \
--moniker "<YOUR_MONIKER>" \
--chain-id haqq_11235-1 \
--gas 300000 -y
If you want to delete a node
sudo systemctl stop haqqd
sudo systemctl disable haqqd
rm /etc/systemd/system/haqqd.service
sudo systemctl daemon-reload
cd $HOME
rm -rf .haqqd
rm -rf haqq
rm -rf $(which haqqd)
Last updated