/networks

Genesis data for Mars Hub mainnet and testnet(s)

Primary LanguageTypeScript

Mars Networks

This repo contains instructions for genesis validators to create genesis staking transactions (gentxs) to start the Mars Hub network.

Instructions

Install Go 1.18+. On Ubuntu this can be done by:

wget -q -O - https://go.dev/dl/go1.19.2.linux-amd64.tar.gz | sudo tar xvzf - -C /usr/local

Configure relevant environment variables:

cat <<EOT >> $HOME/.bashrc
export GOROOT=/usr/local/go
export GOPATH=$HOME/.go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
EOT

Download Mars Hub daemon source code and compile. This will generate a marsd executable under your $GOBIN directory:

git clone https://github.com/mars-protocol/hub.git
cd hub
git checkout v1.0.0
make install

Initialize your node. This will generate your validator signing key at ~/.mars/priv_validator_key.json; make sure to backup this file:

marsd init

Create your validator operator key:

marsd keys add validator

Add your operator key to the genesis state:

marsd genesis add-account validator 1000000umars

Note that the chain id is mars-1 and set the self-bond amount to 1000000umars:

marsd genesis gentx validator 1000000umars \
  --pubkey "$(marsd tendermint show-validator)" \
  --chain-id mars-1 \
  --commission-rate "..." \
  --commission-max-rate "..." \
  --commission-max-change-rate "..." \
  --moniker "..." \
  --identity "..." \
  --details "..." \
  --website "..." \
  --security-contact "..."

The gentx can be found in ~/.mars/config/gentx/gentx-<hash>.json. Add the file to this repository under the mars-1/gentxs folder by making a PR.