Обучение
September 8, 2022

How to make a gentx file

A gentx is a special transaction included in the genesis file that accomplishes three things:

  1. Registers your validator account as a validator operator account.
  2. Self-delegates the specified amount tokens for staking.
  3. Links the validator operator account with a Tendermint node pubkey used to sign blocks.

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 && \
make install && \
haqqd version

Enter your variables

MONIKER=<your moniker>
WALLET=<your wallet>
CHAINID=haqq_54211-2

Init moniker and set chainid

haqqd init $MONIKER --chain-id $CHAINID && \
haqqd config chain-id $CHAINID

Create wallet

haqqd keys add $WALLET
haqqd keys add $WALLET --recover

Add genesis account

haqqd add-genesis-account $WALLET 10000000000000000000aISLM

Create gentx

haqqd gentx $WALLET 10000000000000000000aISLM \
--chain-id=$CHAINID \
--moniker="$MONIKER" \
--commission-max-change-rate 0.1 \
--commission-max-rate 1 \
--commission-rate 0.1 \
--pubkey $(haqqd tendermint show-validator) \
--website="https://starnodes.ru" \
--identity="starnodes"

Your validator account address:

haqqd keys show $WALLET —bech val

After executing this command, you have a gentx. Submit a pull request (gentx folder) with the given gentx

File Genesis transaction written to «/.haqqd/config/gentx/gentx-xxx.json»

Fork the github repository

Add a new file

Name your *.json according to the project documentation, paste the contents of the file and hit «Commit new file»

Send pull request: Contribute > Open pull request:

Now create.

Everything is ready. Follow further testnet instructions.

@starnodes_ru - наш канал в Telegram с новостями и гайдами по тестнетам.