Mainnet from Snapshot
Overview
The current HAQQ version of mainnet is v1.8.5.
Sources of all scripts are here github
Quickstart
Battle tested on Ubuntu LTS 22.04
You can follow these steps to set up your environment:
Install packages:
sudo apt-get update && \
sudo apt-get install curl git make gcc liblz4-tool build-essential jq aria2 -y
Preresquisites for compile from source
make&gccGo 1.21+
Easy GO compiler and HAQQ Node installation
bash <(curl -s https://raw.githubusercontent.com/haqq-network/mainnet/master/install_go.sh) && \
source $HOME/.bash_profile && \
bash <(curl -s https://raw.githubusercontent.com/haqq-network/mainnet/master/install_haqq.sh)
Do the same manually:
Download latest binary for your arch: https://github.com/haqq-network/haqq/releases/tag/v1.8.5
Build from source:
cd $HOME
git clone -b v1.8.5 https://github.com/haqq-network/haqq
cd haqq
make install
Verify Binary Version:
haqq@haqq-node:~# haqqd -v
haqqd version 1.8.5 9ddfca4b98943e106de99fd525b6bb05bfe66d34
Initialize
Run script:
export CUSTOM_MONIKER="mainnet_node"
export HAQQD_DIR="$HOME/.haqqd" # default haqq home folder
haqqd config chain-id haqq_11235-1 && \
haqqd init $CUSTOM_MONIKER --chain-id haqq_11235-1
# Prepare genesis file for mainet(haqq_11235-1)
curl -L https://raw.githubusercontent.com/haqq-network/mainnet/master/genesis.json -o $HAQQD_DIR/config/genesis.json
# Prepare addrbook
curl -L https://raw.githubusercontent.com/haqq-network/mainnet/master/addrbook.json -o $HAQQD_DIR/config/addrbook.json
After that need to download a haqq node snapshot from one of our providers:
Example download command via aria2(via polkachu):
aria2c https://snapshots.polkachu.com/snapshots/haqq/haqq_12345540.tar.lz4
And decompress to HAQQD_DIR and start node(archive name is just for example use actual name from provider)
Example for Polkachu format:
lz4 -c -d haqq_12345540.tar.lz4  | tar -x -C $HAQQD_DIR
Example for Publicnode format:
lz4 -c -d haqq-pruned-12345957-12345967.tar.lz4  | tar -x -C $HAQQD_DIR
After decompress you can try to start the node:
haqqd start
Upgrade to Validator Node
You now have an active full node. What's the next step? You can upgrade your full node to become a Haqq Validator. The top 150 validators have the ability to propose new blocks to the Haqq Network. Continue onto the Run a Validator.