Docs
ValidatorsSetup

Set up vald and tofnd

Install the validator companion processes, create your keys, and launch them.

Axelar validators run two companion processes next to axelard: vald, which votes and signs on behalf of your validator, and tofnd, which holds the key shares used for threshold signing.

Install vald and tofnd

Similar to Node setup, run setup-validator.sh to download and configure vald and tofnd binaries. In the axelerate-community repo do:

./scripts/setup-validator.sh -n [mainnet|testnet]

The binary tofnd is placed in your ${AXELARD_HOME}/bin directory. The binary vald is actually part of axelard.

Binaries are verified against the commonprefix PGP key by default; see Verifying binaries to verify them manually.

Create and back up accounts and keys

You must store backup copies of the following data in a safe place:

  1. Tendermint validator secret key
  2. validator account secret mnemonic
  3. broadcaster account secret mnemonic
  4. tofnd secret mnemonic

Back up your Tendermint validator secret key

As described in Basic node management BACKUP the file ${AXELARD_HOME}/config/priv_validator_key.json.

Create and back up accounts

Each validator needs two accounts, which we call validator and broadcaster. Create those accounts and back them up.

axelard keys add validator --home $AXELARD_HOME
axelard keys add broadcaster --home $AXELARD_HOME

As described in Basic node management, BACKUP the secret mnemonics for these accounts that are printed to stdout when you create them.

Create and back up the tofnd mnemonic

Similar to your Axelar keyring, your tofnd storage is encrypted with a password you choose. Your password must have at least 8 characters.

Set tofnd password and create tofnd mnemonic:

tofnd -m create -d ${AXELARD_HOME}/tofnd

BACKUP and DELETE ${AXELARD_HOME}/tofnd/export.

Launch tofnd

You may wish to redirect log output to a file. Enter the tofnd password on stdin after the process is launched.

$AXELARD_HOME/bin/tofnd -m existing -d $AXELARD_HOME/tofnd >> $AXELARD_HOME/logs/tofnd.log 2>&1

View your logs in real time:

tail -f $AXELARD_HOME/logs/tofnd.log

Launch vald

Learn the valoper address associated with your validator account:

$AXELARD_HOME/bin/axelard keys show validator --bech val -a --home $AXELARD_HOME

Let {VALOPER_ADDR} denote this address.

Launch vald. Here are two ways to do it:

  1. Basic.
$AXELARD_HOME/bin/axelard vald-start --validator-addr {VALOPER_ADDR} --chain-id $AXELARD_CHAIN_ID --log_level debug --home $AXELARD_HOME
  1. Redirect logs to file. The password prompt may not be visible because stdout is redirected to the log file. In this case you may wish to pipe in your keyring password. See Keyring backend for more info.
echo $KEYRING_PASSWORD | $AXELARD_HOME/bin/axelard vald-start --validator-addr {VALOPER_ADDR} --chain-id $AXELARD_CHAIN_ID --log_level debug --home $AXELARD_HOME >> ${AXELARD_HOME}/logs/vald.log 2>&1

View your logs in real time (if you selected option 2 above):

tail -f ${AXELARD_HOME}/logs/vald.log

Directory structure of a running validator

Later, after you've launched your companion processes and created your validator, your directory structure should look like:

.axelar
├── bin
│   ├── axelard -> /Users/gus/.axelar/bin/axelard-vx.y.z
│   ├── axelard-vx.y.z
│   ├── tofnd -> /Users/gus/.axelar/bin/tofnd-va.b.c
│   └── tofnd-va.b.c
├── config
│   ├── app.toml
│   ├── config.toml
│   ├── genesis.json
│   ├── node_key.json
│   ├── priv_validator_key.json
│   ├── priv_validator_state.json
│   └── seeds.toml
├── data
├── logs
├── tofnd
└── vald
    └── state.json

Relevant files:

  • priv_validator_key.json, node_key.json : Created when you first launched your node as described in Basic node management.
  • priv_validator_state.json : Last block height signed by the validator. This prevents double signing old blocks. If it’s content is {}, it’ll start signing from a synced node’s latest block
  • vald/state.json : State file specifying the last block processed. If it’s not present, or is too old, vald starts from the latest block instead.

On this page