Becoming a Validator & Useful Commands & Services

Crossfi Testnet Validator Node Setup Guide

Wallet Setup

Creating a New Wallet

To create a new wallet, execute the following command. Make sure to write down the mnemonic phrase securely - it's your backup!

crossfid keys add $WALLET

Recovering an Existing Wallet

If you need to recover your wallet using a seed phrase, use the following command and follow the prompts:

crossfid keys add $WALLET --recover

Listing Your Wallets

To see all wallets stored on your node, use:

crossfid keys list

Saving Wallet Information

To save your wallet address and your validator address for later use, run these commands:

CROSSFI_WALLET_ADDRESS=$(crossfid keys show $WALLET -a)
CROSSFI_VALOPER_ADDRESS=$(crossfid keys show $WALLET --bech val -a)
echo 'export CROSSFI_WALLET_ADDRESS='${CROSSFI_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export CROSSFI_VALOPER_ADDRESS='${CROSSFI_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile

Validator Operations

Checking Your Wallet Balance

Before creating a validator, you should ensure you have funds in your wallet:

crossfid query bank balances $CROSSFI_WALLET_ADDRESS

Creating a Validator

To become a validator, use the command below. Adjust the --amount based on how much you wish to self-delegate.

crossfid tx staking create-validator \
  --amount 1000000mpx \
  --from $WALLET \
  --commission-max-change-rate "0.1" \
  --commission-max-rate "0.2" \
  --commission-rate "0.1" \
  --min-self-delegation "1" \
  --pubkey $(crossfid tendermint show-validator) \
  --moniker $MYNODENAME \
  --chain-id $CROSSFI_CHAIN_ID \
  --gas auto \
  --gas-adjustment 1.5 \
  --gas-prices 10000000000000mpx

Verifying Validator Setup

To confirm that your validator has been set up correctly:

[[ $(crossfid q staking validator $CROSSFI_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(crossfid status | jq -r .ValidatorInfo.PubKey.value) ]] && echo "Validation Successful" || echo "Validation Failed"

Viewing Validator List

To see a list of active validators:

crossfid q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl

Useful Commands

Service Management

Check Logs

For checking the logs of your Crossfi node:

journalctl -fu crossfid -o cat

Start Node

To start your node's service:

sudo systemctl start crossfid

Stop Node

To stop your node:

sudo systemctl stop crossfid

Restart Node

To restart your node:

sudo systemctl restart crossfid

Node Information

Synchronization Info

For the synchronization status of your node:

crossfid status 2>&1 | jq .SyncInfo

Validator Info

For information on your node's validator:

crossfid status 2>&1 | jq .ValidatorInfo

Node Info

For general information on your node:

crossfid status 2>&1 | jq .NodeInfo

Show Node ID

To display your node's ID:

crossfid tendermint show-node-id

Wallet Operations

List of Wallets

To list all wallets on your node:

crossfid keys list

Recover Wallet

To recover a wallet from a mnemonic:

crossfid keys add $WALLET --recover

Delete Wallet

To delete a wallet from your node:

crossfid keys delete $WALLET

Get Wallet Balance

To check the balance of your wallet:

crossfid query bank balances $CROSSFI_WALLET_ADDRESS

Transfer Funds

To send funds to another wallet:

crossfid tx bank send $CROSSFI_WALLET_ADDRESS <TO_CROSSFI_WALLET_ADDRESS> 1000000mpx --gas auto --gas-adjustment 1.5 --gas-prices 10000000000000mpx

Validator Management

Edit Validator

To update your validator's information:

crossfid tx staking edit-validator \
  --moniker=$MYNODENAME \
  --identity=<your_keybase_id> \
  --website="<your_website>" \
  --details="<your_validator_description>" \
  --chain-id=$CROSSFI_CHAIN_ID \
  --from=$WALLET \
  --gas auto \
  --gas-adjustment 1.5 \
  --gas-prices 10000000000000mpx

Unjail Validator

If your validator is jailed due to downtime or double-signing, unjail it with:

crossfid tx slashing unjail \
  --broadcast-mode=block \
  --from=$WALLET \
  --chain-id=$CROSSFI_CHAIN_ID \
  --gas auto \
  --gas-adjustment 1.5 \
  --gas-prices 10000000000000mpx

Please replace <your_keybase_id>, <your_website>, and <your_validator_description> with your actual Keybase ID, website, and validator description, respectively. Also, substitute <TO_CROSSFI_WALLET_ADDRESS> and <Your_Nodename_Moniker> with the appropriate wallet addresses and your desired node moniker.

Last updated