Skip to main content
logo

Becoming a Validator

Server Requirements

A production-ready server typically requires:

  • 8-core x86 CPU
  • 64 GB RAM - Cosmos apps typically use less than 32 GB under normal conditions, but during events such as chain upgrades, up to 64 GB is usually needed.
  • 4 TB NVME SSD - Hard drive I/O speed is crucial! Validators who run on HDD or SATA SSD often find themselves missing blocks. The requirement for disk space can depend on your pruning settings, but generally, at least 2 TB is recommended.
  • Linux or macOS operating system
  • Go v1.19+

Note that hardware requirements may be significantly lower for Mars during the chains early stages. As the blockchain matures, a higher performing server will be needed.

Run a Node

To learn more about setting up a node, visit the Node Operators docs.

Register your Node as a Validator

Once synced up, register your node as a validator:


marsd tx staking create-validator \
--pubkey $(marsd tendermint show-validator) \
--moniker "the moniker for your validator" \
--details "a description of your validator" \
--identity "your keybase.io PGP key (block explorers will use your keybase pfp)" \
--website "http://homepage.validator.com" \
--security-contact "contact@your.email" \
--min-self-delegation 1 \
--commission-rate "0.05" \
--commission-max-rate "0.20" \
--commission-max-change-rate "0.01" \
--amount 1000000umars \
--from <operator-key-name> \
--chain-id mars-1 \
--gas auto \
--gas-adjustment 1.4 \
--gas-prices 0umars

Lets go through each flag:

Let’s go through each flag:

  • pubkey: The public key of the validator being created, which is obtained by running the command marsd tendermint show-validator and then passing the output to this parameter.
  • moniker: The name or alias of the validator.
  • details: A description of the validator.
  • identity: The Keybase PGP key associated with the validator's keybase.io account. This key will be used by block explorers to identify the validator. The only exception is MintScan, for which you need to add your pfp to this repo via a pull request (PR).
  • website: The website associated with the validator.
  • security-contact: The email address of the person responsible for the validator's security.
  • min-self-delegation: The minimum amount of the validator's own tokens that the validator must hold in order to remain active. If you withdraw your self-delegation below this threshold, your validator will be immediately removed from the active set. Your validator will not be slashed, but will stop earning staking rewards. This is considered the proper way for a validator to voluntarily cease operation. NOTE: If you intend to shut down your Validator, make sure to communicate with your delegators at least 14 days before withdrawing your self-delegation so that they have sufficient time to redelegate and not miss out on staking rewards.
  • commission-rate: The percentage of rewards that the validator charges for its services.
  • commission-max-rate: The maximum percentage that the validator can charge for its services. This number can not be changed and is meant to increase trust between you and your delegators. If you wish to go above this limit, you will have to create a new validator.
  • commission-max-change-rate: The maximum percentage that the validator can increase or decrease its commission rate by.
  • amount: The amount of umars (the cryptocurrency used on the Mars network) that the validator will stake as part of its candidacy.
  • from: The name of the account that will submit the transaction to create the validator.
  • chain-id: The ID of the Mars blockchain network.
  • gas: The maximum amount of gas (computational resources) that the transaction can consume.
  • gas-adjustment: A factor that adjusts the gas limit based on the estimated gas usage of the transaction.
  • gas-prices: The price of gas in umars per unit of gas consumed.

Once the tx is confirmed, run the following query:


marsd query staking validator $(marsd keys show validator --bech val --address) --output json | jq

The output should look like:


{
"operator_address": "cosmosvaloper1...",
"jailed": false,
"status": "BOND_STATUS_BONDED",
"tokens": "...",
// ...
}

Your status should be "bonded"; if not, the most likely reason is you do not have enough delegation to enter the active set.

If you're bonded, restart your node by running sudo restart marsd. You should see a log message that looks like:

If you're bonded, restart your node by:


sudo systemctl restart marsd

You should see a log message that looks like:


INF This node is a validator addr=[...] module=consensus pubKey=[...]

This means your validator is now successfully registered and active!

Let's check whether your node is properly signing blocks:


marsd query block | jq

This will display the latest block in JSON format. Scroll down to the block.signatures section, you should see an array of items in this format:


{
"block": {
"signature": [
{
"block_id_flag": ...,
"validator_address": "...",
"timestamp": "...",
"signature": "..."
}
]
}
}

validator_address is the validator's hex address. Your hex address can be found by running marsd status | jq.

If your validator's signature shows up in the list, congrats your validator has been successfully registered & is operating!