Mainnet

Chain ID: haqq_11235-1 | Node Version: v1.7.3

Node Installation Guide

Update system and install build tools

sudo apt update

sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y

Install Go

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version

Install Node

cd $HOME

rm -rf haqq

git clone https://github.com/haqq-network/haqq.git

cd haqq

git checkout v1.7.3

make install

haqqd version

Initialize Node

Replace NodeName with your own moniker.

haqqd init NodeName --chain-id=haqq_11235-1

Download Genesis

curl -Ls https://ss.haqq.nodestake.org/genesis.json > $HOME/.haqqd/config/genesis.json 

Download addrbook

curl -Ls https://ss.haqq.nodestake.org/addrbook.json > $HOME/.haqqd/config/addrbook.json

Create Service

sudo tee /etc/systemd/system/haqqd.service > /dev/null <<EOF
[Unit]
Description=haqqd Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which haqqd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable haqqd

Download Snapshot(optional)

SNAP_NAME=$(curl -s https://ss.haqq.nodestake.org/ | egrep -o ">20.*\.tar.lz4" | tr -d ">")

curl -o - -L https://ss.haqq.nodestake.org/${SNAP_NAME}  | lz4 -c -d - | tar -x -C $HOME/.haqqd

Launch Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

If you have any questions, please reach out to our Discord

 

https://rpc.haqq.nodestake.org

 

https://api.haqq.nodestake.org

 

grpc.haqq.nodestake.org:9090

Chain Name: Haqq
RPC: https://jsonrpc.haqq.nodestake.org/
Chain ID: 11235
Symbol: ISLM
Explorer: https://explorer.haqq.network/

https://ss.haqq.nodestake.org/genesis.json

Download Genesis File

curl -Ls https://ss.haqq.nodestake.org/genesis.json > $HOME/.haqqd/config/genesis.json 

https://ss.haqq.nodestake.org/addrbook.json

Download Addrbook

curl -Ls https://ss.haqq.nodestake.org/addrbook.json > $HOME/.haqqd/config/addrbook.json 

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

b8c30704df8a9e4314c6c4392c7974a170a8fdaf@rpc.haqq.nodestake.org:666

Set Seed Node

seed="b8c30704df8a9e4314c6c4392c7974a170a8fdaf@rpc.haqq.nodestake.org:666"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.haqqd/config/config.toml

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

Set Peers

peers=$(curl -s https://ss.haqq.nodestake.org/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.haqqd/config/config.toml

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

Stop Node And Reset

sudo systemctl stop haqqd

haqqd tendermint unsafe-reset-all --home ~/.haqqd/ --keep-addr-book

Configure State Sync

SNAP_RPC="https://rpc.haqq.nodestake.org:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \

BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \

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\"\"|" ~/.haqqd/config/config.toml

more ~/.haqqd/config/config.toml | grep 'rpc_servers'

more ~/.haqqd/config/config.toml | grep 'trust_height'

more ~/.haqqd/config/config.toml | grep 'trust_hash'

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

Install lz4

sudo apt update

sudo apt-get install snapd lz4 -y

Off State Sync

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.haqqd/config/config.toml

Stop Node and Reset Date

sudo systemctl stop haqqd

cp $HOME/.haqqd/data/priv_validator_state.json $HOME/.haqqd/priv_validator_state.json.backup

rm -rf $HOME/.haqqd/data

haqqd tendermint unsafe-reset-all --home ~/.haqqd/ --keep-addr-book

Download Snapshot

SNAP_NAME=$(curl -s https://ss.haqq.nodestake.org/ | egrep -o ">20.*\.tar.lz4" | tr -d ">")

curl -o - -L https://ss.haqq.nodestake.org/${SNAP_NAME}  | lz4 -c -d - | tar -x -C $HOME/.haqqd

mv $HOME/.haqqd/priv_validator_state.json.backup $HOME/.haqqd/data/priv_validator_state.json

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

If you have any questions, please reach out to our Discord

Testnet

Chain ID: haqq_54211-3 | Node Version: v1.4.1

Node Installation Guide

Update system and install build tools

sudo apt update

sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y

Install Go

rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version

Install Node

cd $HOME

rm -rf haqq

git clone https://github.com/haqq-network/haqq

cd haqq

git checkout v1.4.1

make install

haqqd version

Initialize Node

Replace NodeName with your own moniker.

haqqd init NodeName --chain-id=haqq_54211-3

Download Genesis

curl -Ls https://ss-t.haqq.nodestake.top/genesis.json > $HOME/.haqqd/config/genesis.json 

Download addrbook

curl -Ls https://ss-t.haqq.nodestake.top/addrbook.json > $HOME/.haqqd/config/addrbook.json

Create Service

sudo tee /etc/systemd/system/haqqd.service > /dev/null <<EOF
[Unit]
Description=haqqd Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which haqqd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable haqqd

Download Snapshot(optional)

SNAP_NAME=$(curl -s https://ss-t.haqq.nodestake.top/ | egrep -o ">20.*\.tar.lz4" | tr -d ">")

curl -o - -L https://ss-t.haqq.nodestake.top/${SNAP_NAME}  | lz4 -c -d - | tar -x -C $HOME/.haqqd

Launch Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

If you have any questions, please reach out to our Discord

 

https://rpc-t.haqq.nodestake.top

 

https://api-t.haqq.nodestake.top

 

https://grpc-t.haqq.nodestake.top:443

Chain Name: Haqq Testnet
RPC: https://jsonrpc-t.haqq.nodestake.top/
Chain ID: 54211
Symbol: ISLM
Explorer: 

https://ss-t.haqq.nodestake.top/genesis.json

Download Genesis File

curl -Ls https://ss-t.haqq.nodestake.top/genesis.json > $HOME/.haqqd/config/genesis.json 

https://ss-t.haqq.nodestake.top/addrbook.json

Download Addrbook

curl -Ls https://ss-t.haqq.nodestake.top/addrbook.json > $HOME/.haqqd/config/addrbook.json 

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

271993fffcfa81c8cb9498cc2a6249b880488ccf@rpc-t.haqq.nodestake.top:666

Set Seed Node

seed="271993fffcfa81c8cb9498cc2a6249b880488ccf@rpc-t.haqq.nodestake.top:666"
sed -i.bak -e "s/^seed *=.*/seed = \"$seed\"/" ~/.haqqd/config/config.toml

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

Set Peers

peers=$(curl -s https://ss-t.haqq.nodestake.top/peers.txt)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.haqqd/config/config.toml

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

Stop Node And Reset

sudo systemctl stop haqqd

haqqd tendermint unsafe-reset-all --home ~/.haqqd/ --keep-addr-book

Configure State Sync

SNAP_RPC="https://rpc-t.haqq.nodestake.top:443"

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \

BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \

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\"\"|" ~/.haqqd/config/config.toml

more ~/.haqqd/config/config.toml | grep 'rpc_servers'

more ~/.haqqd/config/config.toml | grep 'trust_height'

more ~/.haqqd/config/config.toml | grep 'trust_hash'

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

We make the node snapshot every 6h

Install lz4

sudo apt update

sudo apt-get install snapd lz4 -y

Off State Sync

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1false|" ~/.haqqd/config/config.toml

Stop Node and Reset Date

sudo systemctl stop haqqd

cp $HOME/.haqqd/data/priv_validator_state.json $HOME/.haqqd/priv_validator_state.json.backup

rm -rf $HOME/.haqqd/data

haqqd tendermint unsafe-reset-all --home ~/.haqqd/ --keep-addr-book

Download Snapshot

SNAP_NAME=$(curl -s https://ss-t.haqq.nodestake.top/ | egrep -o ">20.*\.tar.lz4" | tr -d ">")

curl -o - -L https://ss-t.haqq.nodestake.top/${SNAP_NAME}  | lz4 -c -d - | tar -x -C $HOME/.haqqd

mv $HOME/.haqqd/priv_validator_state.json.backup $HOME/.haqqd/data/priv_validator_state.json

Restart Node

sudo systemctl restart haqqd
journalctl -u haqqd -f

If you have any questions, please reach out to our Discord