Creating A Validator

Before we proceed, we need to create a new Validator Wallet.

1. Creating A New Validator Wallet

You need to provide a local account name of your choice and provide a passphrase. When creating an account, the CLI will ask you to provide a passphrase to encrypt the keystore file: ./hmy keys add [LOCAL ACCOUNT NAME] --passphrase example :

./hmy keys add mylocalaccountname --passphrase

Remember your passphrase. You will need it to decrypt the account keystore in order to send transactions & perform other actions.

Also save your seed phrase (mnemonic) somewhere as well, in case you lose your keystore.

Backing Up Your Keystore File (Optional)

./hmy keys location

The command above will return the location of your account keystore. You may want to create a backup of this file.‌

You can check the list of wallets (local accounts) with the following command:

./hmy keys list

Example output from above command:

#NAME ADDRESS
example-account1 one1wh4p0kuc7unxez2z8f82zfnhsg4ty6dupqyjt2

Checking your account balance

If you are running a node and your node is synced to the latest block, use the following command to check your balance : ./hmy balances [ONE ADDRESS]. Ex:

./hmy balances one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd

If you are not running a node or your node is not synced, use the following command to check your balance : ./hmy --node="[API_endpoint]" balances [ONE ADDRESS] ex:

Mainnet
Testnet
Mainnet
./hmy --node="https://api.s0.t.hmny.io" balances one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd
Testnet
./hmy --node="https://api.s0.b.hmny.io" balances one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd

Wait for your node to sync before creating a validator.

Check your current block height with ./hmy blockchain latest-headers

Check chain block height with ./hmy blockchain latest-header --node=[endpoint]

2. Creating a Validator

For you to create a Validator successfully, it needs to have 10000 ONE tokens plus the necessary fees to create the validator transaction on chain. For this reason, we recommend that you send at least 10001 ONE tokens to your --validator-addrbefore you continue.

Replace everything in [ ] with your own data:

Mainnet
Testnet
Mainnet
./hmy --node="https://api.s0.t.hmny.io" staking create-validator \
--validator-addr [ONE ADDRESS] --amount 10000 \
--bls-pubkeys [BLS PUBLIC KEY1],[BLS PUBLIC KEY2] \
--name "[NAME]" --identity "[IDENTITY]" --details "DETAILS" \
--security-contact "CONTACT" --website "YOUR-WEBSITE.COM" \
--max-change-rate 0.1 --max-rate 0.1 --rate 0.1 \
--max-total-delegation 100000000 --min-self-delegation 10000 --passphrase
Testnet
./hmy --node="https://api.s0.b.hmny.io" staking create-validator \
--validator-addr [ONE ADDRESS] --amount 10000 \
--bls-pubkeys [BLS PUBLIC KEY1],[BLS PUBLIC KEY2] \
--name "[NAME]" --identity "[IDENTITY]" --details "DETAILS" \
--security-contact "CONTACT" --website "YOUR-WEBSITE.COM" \
--max-change-rate 0.1 --max-rate 0.1 --rate 0.1 \
--max-total-delegation 100000000 --min-self-delegation 10000 --passphrase

Copy the entire command. Extra white spaces in the command could cause errors.

Name, identity, details, security-contact and website need to be put in double quotes if there are more than one word separated by space (example --name "John the validator").

The CLI will prompt you to enter your BLS key file password.

--validator-addr is the validator ONE address (string)

--amount is the initial amount of ONE you want to stake (float)

--bls-pubkeys takes a comma-separated list of BLS public keys (string)

--name will be the name displayed on the Staking Explorer (string)

--identity unique identifier for the validator (string)

--details is the description of the validator (string)

--security-contact is security contact for the validator (string)

--website will be the website displayed on the Staking Explorer (string)

--max-change-rate is the maximum rate change the validator can do to their commission rate every epoch (float)

--max-rate is the maximum commission rate that the validator can set (float)

--rate is the commission rate of the validator (float)

--max-total-delegation is the maximum amount of ONE that can be delegated to this validator (float)

--min-self-delegation is the minimum amount of ONE the validator must stake to itself (float)

--max-rate and --max-change-rate cannot be changed later.

--min-self-delegation has to be at least 10,000 ONE.

--rate, --max-rate, and --max-change-rate accepts numbers between 0 and 1 representing percentages

If you have a Keybase account, we recommend you use your Keybase public key fingerprint as your validator's identity. The field is unique, ensuring that other validator's can not attempt to impersonate you. This data will also help with some awesome integrations & features in the future!

When does the validator participate in election?

A new validator will be eligible for the election for next epoch. You can see the time until the next epoch on the Staking Dashboard.

Once your validator is elected, the validator will receive rewards and you will be able to see "BINGO" in the logs.

tail -n 1000 latest/zerolog-validator-*.log | grep -i BINGO

Example output:

{"level":"info","port":"9000","ip":"213.136.79.89","blockNum":3916,"epochNum":26,"ViewId":3916,"blockHash":"0xca71fc9aa92f694f664aa34d7e3e82cf9b678e3a062d3bbbabebfbc5f0598d84","numTxns":0,"numStakingTxns":0,"caller":"/mnt/jenkins/workspace/harmony-release/harmony/node/node_handler.go:359","time":"2019-12-11T14:49:08.983338784+01:00","message":"BINGO !!! Reached Consensus"}

If you do not wish to participate anymore, you can turn your validator inactive using an Edit Validator transaction with--active false.