Nolus Docs
Network

Validators

Create, restore, and unjail a Nolus validator.

Create a Validator

1. Create (Or Restore) A Local Key Pair

Prior to creating your validator, you must first create your application key. Note that this is not your consensus key and will not be used for signing consensus votes. Instead, it is used to sign transactions.

Create a new key pair

nolusd keys add <key-name>

Restore an existing Nolus wallet by providing a BIP39 mnemonic

nolusd keys add <key-name> --recover

Get your public address from the keystore

nolusd keys show <key-name> -a

Feel free to replace <key-name> with a name of your choice. After creating a new key, its information will be shown alongside the seed phrase. Make sure to write it down, as it is the only way to restore your keys.

2. Upgrade to a Validator

Do not attempt to upgrade your node to a validator until the node is fully in sync after you have started the nolusd binary, as shown in the previous section.

Since you need to send a transaction to be part of the validator set, you need to have a small amount of NLS tokens in the wallet address you are using on your keyring. Once you have a positive balance, you can send the create-validator transaction. For this, you would need to specify validator-related details, such as self-stake and commission, in a JSON file (named validator_details.json in the example below) that is to be passed as a parameter in the command:

Contents of validator_details.json:
{
	"pubkey": <your-nodes-public-key>,
	"amount": "1000000unls",
	"moniker": "<the-name-of-your-node>",
	"identity": "<optional-identity-signature-keybase>",
	"website": "<optional-validator-website>",
	"security": "<optional-security-contact-email>",
	"details": "<optional-validator-details>",
	"commission-rate": "0.05",
	"commission-max-rate": "0.1",
	"commission-max-change-rate": "0.01",
	"min-self-delegation": "1"
}
nolusd tx staking create-validator validator_details.json --chain-id "pirin-1" --fees 1000unls --from <key-name>

If you need further explanation for each of these validator-related parameters:

  • the amount is the amount you will place in your own validator in unls as self-stake (in the example, 1000000unls is 1 NLS)
  • the commission rate is the rate you will charge your delegates (in the example above, 5 percent)
  • the commission-max-rate is the most you are allowed to charge your delegates (in the example above, 10 percent)
  • the commission-max-change-rate is how much you can increase your commission rate in a 24-hour period (in the example above, 1 percent per day until reaching the max rate)
  • min-self-delegation is a strictly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. In the example above, this is equal to 1 NLS or 1000000unls
  • the pubkey is the validator public key that could be obtained via running "nolusd tendermint show-validator"
  • the chain-id is whatever chain-id you are working with (in the Nolus mainnet case, it is pirin-1)
  • the fees is the gas fee used to send this create-validator transaction
  • the from flag is the KEY_NAME you created when initializing the key on your keyring

3. Confirm That Your Validator Is Active

If running the following command returns something, your validator is active:

nolusd query tendermint-validator-set | grep "$(nolusd tendermint show-address)"

You are looking for the bech32 encoded address in the ~/.nolusd/config/priv_validator.json file with a nolusvalcons prefix.

4. Secure Your Keys

In general, a Nolus validator needs to do two things:

  • Sign and commit blocks (using the Tendermint Consensus key)
  • Conduct on-chain operations such as voting on Governance proposals (using an Application Operator Key) Take good care of those two keys to mitigate hardware or software failures.

Restore a Validator

A validator can be completely restored on a new Nolus node with the following set of keys:

  • The Consensus key, stored in ~/.nolus/config/priv_validator.json
  • The mnemonic to the validator wallet (application key) Danger! Before proceeding, ensure that the existing validator is not active. Double voting has severe slashing consequences.

To restore a validator:

  • Set up a full Nolus node synced up to the latest block. Check the previous section.
  • Replace the ~/.nolus/config/priv_validator.json file of the new node with the associated file from the old node, then restart your node.

Unjail a Validator

If your validator fails to sign at least 5% of the last 10000 blocks, it will get jailed. To unjail it so that it can continue to sign blocks and respectively earn staking rewards, you can submit the following transaction:

nolusd tx slashing unjail --from <yourKey> --chain-id pirin-1 --fees 500unls

On this page