Skip to content

mcve/validators-contest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haqq

Prepare to launch intensivized testnet Haqq

🟢 Instructions for those who do not transfer node to another server

Update binary haqqd to v1.2.0

cd $HOME/haqq && \
git fetch && \
git checkout v1.2.0 && \
make install && \
haqqd version --long | head

name: haqq
server_name: haqqd
version: '"1.2.0"'
commit: 40935b70fb1da4ee28f1d91e8601060e533f6fd0
...

Remove old genesis and download genesis.json to your server in .haqqd folder

rm -rf $HOME/.haqqd/config/genesis.json && cd $HOME/.haqqd/config/ && wget https://raw.githubusercontent.com/haqq-network/validators-contest/master/genesis.json

Check genesis.json

sha256sum $HOME/.haqqd/config/genesis.json
8c79dda3c8f0b2b9c0f5e770136fd6044ea1a062c9272d17665cb31464a371f7

Create a service file

sudo tee /etc/systemd/system/haqqd.service > /dev/null <<EOF
[Unit]
Description=Haqq Node
After=network.target

[Service]
User=$USER
Type=simple
ExecStart=$(which haqqd) start
Restart=on-failure
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Insertion of peers

seeds="62bf004201a90ce00df6f69390378c3d90f6dd7e@seed2.testedge2.haqq.network:26656,23a1176c9911eac442d6d1bf15f92eeabb3981d5@seed1.testedge2.haqq.network:26656"
peers="[email protected]:33656,[email protected]:29656,[email protected]:26556,[email protected]:29956,[email protected]:20116,[email protected]:45656,[email protected]:36656,[email protected]:26656,[email protected]:26656,[email protected]:36656,[email protected]:32656"
sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.haqqd/config/config.toml

Run the service file and see the logs of your node

sudo systemctl daemon-reload && \
sudo systemctl enable haqqd && \
sudo systemctl restart haqqd && \
sudo journalctl -u haqqd -f -o cat

If you run a node at the beginning of the testnet and you are on genesis, you will get this message

Genesis time is in the future. Sleeping until then... genTime=...

🔴 Instructions for those who transfer the node to another server

If you want to move to another server - make sure you have saved the mnemonic and priv_validator_key.json from the server where you did the gentx

Update packages and install required packages

sudo apt update && sudo apt upgrade -y && \
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y

Install Go 1.18.3

wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz; \
rm -rv /usr/local/go; \
tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz && \
rm -v go1.18.3.linux-amd64.tar.gz && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version > /dev/null

Install binary project

cd $HOME && git clone https://github.com/haqq-network/haqq && \
cd haqq && \
git checkout v1.2.0 && \
make install && \
haqqd version --long | head

name: haqq
server_name: haqqd
version: '"1.2.0"'
commit: 40935b70fb1da4ee28f1d91e8601060e533f6fd0
...

Also init your node

haqqd init <YOURMONIKER> --chain-id haqq_54211-2 && \
haqqd config chain-id haqq_54211-2

Recover your wallet

haqqd keys add <YOURWALLET> --recover

📥 Upload the saved priv_validator_key.json to your server. The path should look like this /.haqqd/config/priv_validator_key.json

Remove old genesis.json and download genesis.json to your server in .haqqd folder

rm -rf $HOME/.haqqd/config/genesis.json && cd $HOME/.haqqd/config/ && wget https://raw.githubusercontent.com/haqq-network/validators-contest/master/genesis.json

Check genesis.json

sha256sum $HOME/.haqqd/config/genesis.json
8c79dda3c8f0b2b9c0f5e770136fd6044ea1a062c9272d17665cb31464a371f7

Create a service file

sudo tee /etc/systemd/system/haqqd.service > /dev/null <<EOF
[Unit]
Description=Haqq Node
After=network.target

[Service]
User=$USER
Type=simple
ExecStart=$(which haqqd) start
Restart=on-failure
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Insertion of peers

seeds="62bf004201a90ce00df6f69390378c3d90f6dd7e@seed2.testedge2.haqq.network:26656,23a1176c9911eac442d6d1bf15f92eeabb3981d5@seed1.testedge2.haqq.network:26656"
peers="[email protected]:33656,[email protected]:29656,[email protected]:26556,[email protected]:29956,[email protected]:20116,[email protected]:45656,[email protected]:36656,[email protected]:26656,[email protected]:26656,[email protected]:36656,[email protected]:32656"
sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.haqqd/config/config.toml

Run the service file and see the logs of your node

sudo systemctl daemon-reload && \
sudo systemctl enable haqqd && \
sudo systemctl restart haqqd && \
sudo journalctl -u haqqd -f -o cat

If you run a node at the beginning of the testnet and you are on genesis, you will get this message

Genesis time is in the future. Sleeping until then... genTime=...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%