Convert Node into a Validator

Configuring a node to be a validator

First, setup and deploy a generic node as specified. Once the node is running and sync'ed with the blockchain, the node can be converted into a Validator node via the following steps.

Create a MANTRA Chain account

Create your mantrachain account if you don't have one already. It will be used to operate your validator node. You can, either, create a new account or import an existing account.

Create keys

Create a key file.

mantrachaind config keyring-backend file

Generate a new public key with mnemonic phrase.

mantrachaind keys add <your-moniker-keys>

where <your-moniker-keys>is the moniker and can be any valid string name

(e.g. validator01-keys)

The above command will produce output like this:

- address: mantra1q55nrzygas0nespfu8mwt2yntq8gxll3kyug82
  name: validator-mchain-test-node-keys
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/YebpAX8AqUNcNXcqIy53fJo8BGFCSaQA5A0XQWMlCG"}'
  type: local
	
	
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
	
expect kid unfair uniform calm debris meadow despair vintage arrive walnut vast upset cart step funny truth vault naive note capable spray shine human

KEEP THE MNEMONIC PHRASE IN A SAFE PLACE!

Import keys

Alternatively, if you already have an existing mnemonic that you'd like to use, then run the following:

$ mantrachaind keys add <your-moniker-keys> --recover

Execute "create-validator" transaction.

You can create new validator from the public key of your node with the following command:

mantrachaind tx staking create-validator \
  --amount=1000000uom \
  --pubkey=$(mantrachaind tendermint show-validator) \
  --moniker=<MONIKER> \
  --chain-id=mantra-hongbai-1 \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1000000" \
  --gas="auto" \
  --gas-adjustment 2 \
  --gas-prices="0.0002uom" \
  --from=<KEY-NAME>

Execute "edit-validator" transaction.

You can edit your validator's public description. This info is to identify your validator and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below. If a flag is not included in the command the field will default to empty (--moniker defaults to the machine name) if the field has never been set or remain the same if it has been set in the past.

The specifies which validator you are editing. If you choose to not include some of the flags below, remember that the --from flag must be included to identify the validator to update.

mantrachaind tx staking edit-validator \
  --new-moniker=<NEW-MONIKER> \
  --website="https://your-website.com" \
  --details="Some impressive info about your validator." \
  --chain-id=mantra-hongbai-1 \
  --commission-rate="0.10" \
  --gas="auto" \
  --gas-adjustment 2 \
  --gas-prices="0.0002uom" \
  --from=<KEY-NAME>

Commission Rate: The percentage of rewards earned by your validator that will be deducted as a fee before distributing the remaining rewards to your delegators.

Self-delegation: The share of your own stake that you want to delegate to your validator.

You can edit your validator's public description. This info is to identify your validator and will be relied on by delegators to decide which validators to stake to. Make sure to provide input for every flag below. If a flag is not included in the command the field will default to empty (--moniker defaults to the machine name) if the field has never been set or remain the same if it has been set in the past.

The specifies which validator you are editing. If you choose to not include some of the flags below, remember that the --from flag must be included to identify the validator to update.

Last updated