Skip to content

Creating a gentx

Dan Connolly edited this page Aug 16, 2021 · 10 revisions

part of: Validator Guide for Incentivized Testnet

Note Well: ag-chain-cosmos and ag-cosmos-helper use different directories. Keys are managed with ag-cosmos-helper, usually, so we need to tell ag-chain-cosmos where to find those keys with the --keyring-dir argument:

NOTE: The agorictest-16 release should work for generating a gentx for the launch of agorictest-17.

First, stop your node and copy the contents of $HOME/.ag-chain-cosmos to keep a backup of it.

myKey=<your key name (the one you specified with `keys add`) or address (agoric1...)>
myMoniker="<the actual value you want to use as your validator's moniker>"
chainName=agorictest-17

# Stop your node.
systemctl stop ag-chain-cosmos

# Keep a backup of your old validator directory.
cp -a ~/.ag-chain-cosmos ~/backup-before-$chainName

# Reset your genesis state.
ag-chain-cosmos init --overwrite "$myMoniker"

# This following command solves
# Error: failed to validate account in genesis: account agoric1... does not have a balance in the genesis state
ag-chain-cosmos add-genesis-account $myKey 50000000ubld --keyring-dir=$HOME/.ag-cosmos-helper

# Create the gentx.
# Note, your gentx will be rejected if you use any amount greater than 50000000ubld.
ag-chain-cosmos gentx $myKey 50000000ubld --output-document=gentx.json \
  --chain-id=$chainName \
  --keyring-dir=$HOME/.ag-cosmos-helper \
  --moniker="$myMoniker" \
  --website=<your-node-website> \
  --details=<your-node-details> \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1"

The result should look something like this sample gentx file. For reference: gaia gentx docs.

Submit the contents via the portal.

Clone this wiki locally