Giter Site home page Giter Site logo

haqq-net-konkus's Introduction

haqq-net-konkurs

testnet Haqq

๐ŸŸข Instructions for those who do not transfer node to another server

Update binary haqqd to v1.0.3

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

name: haqq
server_name: haqqd
version: '"1.0.3"'
commit: 58215364d5be4c9ab2b17b2a80cf89f10f6de38a
...

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.0.3 && \
make install && \
haqqd version --long | head

name: haqq
server_name: haqqd
version: '"1.0.3"'
commit: 58215364d5be4c9ab2b17b2a80cf89f10f6de38a
...

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=...

haqq-net-konkus's People

Contributors

antoninab4 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.