Validator Nodes
Synced Node
Before creating a validator, ensure you have first followed the instructions on how to Setup & Run a Node.
Initialize Wallet Keyring
If you decide you want to turn your node into a validator, you will first need to add a wallet to your keyring.
While you can add an existing wallet through a seed phrase or importing a private key, the example shows how to create a new wallet (replace $KEY_NAME with a name of your choosing):
mantrachaind keys add $KEY_NAMEThe above command will produce the following output:
- 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 humanEnsure you write down the mnemonic as you can not recover the wallet without it. To ensure your wallet was saved to your keyring, you can verify that the wallet is listed by using the following command:
mantrachaind keys listImport keys
Alternatively, if you already have an existing mnemonic that you'd like to use, then run the following:
mantrachaind keys add $KEY_NAME --recoverKEEP THE MNEMONIC PHRASE IN A SAFE PLACE!
View Validator Public Key
The last thing needed before initialising the validator is to obtain your validator public key which was created when you first initialized your node. To obtain your validator pubkey:
mantrachaind tendermint show-validatorCreate Validator Command
Ensure you have a small amount of OM on the wallet address you are using on your keyring in order to successfully send a transaction. Once you have have a balance on the address on your keyring, you can now send the create-validator transaction.
Here is the same command but with example values and an example of how certain parameters can be loaded from an external file, i.e. validator.json:
echo "{
\"pubkey\": $(mantrachaind tendermint show-validator),
\"amount\": \"10000uom\",
\"moniker\": \"MANTRA Chain Foundation\",
\"identity\": \"xxxxxx\",
\"website\": \"https://mantrachain.io\",
\"security\": \"[email protected]\",
\"details\": \"MANTRA is a purpose-built RWA Layer 1 Blockchain, capable of adherence to real world regulatory requirements.\",
\"commission-rate\": \"0.1\",
\"commission-max-rate\": \"0.2\",
\"commission-max-change-rate\": \"0.01\",
\"min-self-delegation\": \"1\"
}
" > validator.json
mantrachaind tx staking create-validator validator.json --from $KEY_NAME --chain-id mantra-dukong-1 --gas="auto" --gas-adjustment 2 --gas-prices="0.01uom"If you need further explanation for each of these command flags:
the
fromflag is the$KEY_NAMEyou created when initialising the key on your keyringthe
amountflag is the amount you will place in your own validator inuomthe
pubkeyis the validator public key found earlierthe
monikeris a human readable name you choose for your validatorthe
security-contactis an email your delegates are able to contact you atthe
chain-idis the active chain with to which you will connect (i.e.mantra-1for mainnet,mantra-dukong-1for public testnet.)the
commission-rateis the rate you will charge your delegates for the privilege of running the validator on their behalfthe
commission-max-rateis the most you are allowed to charge your delegatesthe
commission-max-change-rateis how much you can increase your commission rate in a 24 hour periodthe
min-self-delegationis the lowest amount of personal funds the validator is required to have in their own validator to stay bondedthe
gas-pricesis the amount of gas used to send thiscreate-validatortransaction
Last updated