Run a Layer Validator

Follow the steps to become a Layer testnet validator.

Prerequisites

You will need a node that's fully synced and an account that has a balance (loya).

Creating your Validator

1) Change directory to ~/layer/binaries/v5.0.0 and check if your address has funds:

cd ~/layer/binaries/v5.0.0 && ./layerd query bank balance YOUR_ACCOUNT_NAME loya

This outputs something like:

balance:
  amount: "0"
  denom: loya

2) Retrieve your Node's Pubkey

This is a unique identifier for a node running on your computer:

./layerd comet show-validator

This returns your validator pubkey. It should look like this:

{"@type":"/cosmos.crypto.ed25519.PubKey","key":"FX9cKNl+QmxtLcL926P5yJqZw7YyuSX3HQAZboz3TjM="}

Copy this output for the next step.

3) Edit the Validator Configuration File

Create (or edit) the validator.json file:

nano validator.json

Edit or add the following code:

{
    "pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"c+EuycPpudgiyVl6guYG9oyPSImHHJz1z0Pg4ODKveo="},
    "amount": "69666420loya",
    "moniker": "yourmoniker",
    "identity": "optional identity signature (ex. UPort or Keybase)",
    "website": "validator's (optional) website",
    "security": "validator's (optional) security contact email",
    "details": "validator's (optional) details",
    "commission-rate": "0.1",
    "commission-max-rate": "0.2",
    "commission-max-change-rate": "0.01",
    "min-self-delegation": "1"
}
  • Edit "pubkey" to match yours from step 4.

  • Edit "amount" to be the amount of testnet TRB that you would like to stake with 6 decimals and the "loya" denom. (For example: if you want to stake 99 TRB use "amount": "99000000loya")

  • Edit "moniker" with a name you choose for your validator node.

  • Edit identity, website, security, and details with your identifying information. (optional)

  • Edit commission-rate, commission-max-rate, commission-max-change-rate, and min-self-delegation if desired. (these can be changed later using the edit-validator command).

4) Create your validator.

Run the following command to create-validator:

./layerd tx staking create-validator ./validator.json --chain-id layertest-4 --from YOUR_ACCOUNT_NAME --fees 5loya --yes

5) Verify that creation was successful.

Use the command:

./layerd query staking validator YOUR_ACCOUNT_NAME

If status: 3,you are staked and validating!

If status is 1, It means that you are not bonded. This can happen If you accidentally made your "amount" in step 4 too small. Check that you are staking at least 1 TRB (1000000loya). If status is 2, It means that your validator is jailed. If this happens, check if the node process is running on your host machine.

You can unjail with steps shown in the next section.

Last updated