Skip to main content
Version: 1.0.0

Validator Quick Sheet

This quick sheet provides essential commands for managing validators on ZIGChain, including setup, status checks, and reward management.

Quick Commands

Get your node validator pub key

zigchaind tendermint show-validator

Create a file with your validator info

PUBKEY=$(zigchaind tendermint show-validator)
bash -c "cat > /tmp/your_validator.txt" << EOM
{
"pubkey": $PUBKEY,
"amount": "1000000uzig",
"moniker": "validator's name",
"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": "10"
}
EOM

Create your validator

zigchaind tx staking create-validator /tmp/your_validator.txt \
--from=zuser1 \
--chain-id="zig-test-2" \
--gas="auto" \
--gas-prices="0.00025uzig" \
--gas-adjustment=1.5

Confirm transaction and get your validator address

zigchaind query tx $TXHASH --chain-id="zig-test-2" | grep raw_log
VALIDATOR_OP_ADDRESS=$(zigchaind q tx $TXHASH --output json | jq -r '.tx.body.messages[0].validator_address')

Check your validator status

zigchaind query staking validator $VALIDATOR_OP_ADDRESS --chain-id="zig-test-2"

Check if the validator is part of the active set

zigchaind query tendermint-validator-set --chain-id="zig-test-2" | grep "$(zigchaind tendermint show-address)"

Get your validator's consensus address

zigchaind comet show-address
VALIDATOR_CON_ADDRESS=$(zigchaind comet show-address)

Edit your validator information

zigchaind tx staking edit-validator \
--commission-rate 0.05 \
--details "YOUR_DETAILS" \
--identity "YOUR_KEYBASE_ID" \
--min-self-delegation "100" \
--new-moniker "Your new moniker name" \
--website "YOUR_WEBSITE_URL" \
--security-contact "YOUR_EMAIL" \
--chain-id="zig-test-2" \
--from=zuser1 \
--gas-adjustment=1.5 \
--gas auto \
--gas-prices="0.00025uzig"

Know when your validator will be unjailed

zigchaind query slashing signing-info $VALIDATOR_CON_ADDRESS --chain-id="zig-test-2"
zigchaind query slashing signing-info $(zigchaind tendermint show-validator) --chain-id="zig-test-2"

Unjail your validator

zigchaind tx slashing unjail --chain-id="zig-test-2" \
--gas="auto" \
--gas-prices="0.00025uzig" \
--from=zuser1 \
--gas-adjustment=1.5

Get your validator's operator address

zigchaind query staking validator --chain-id="zig-test-2"

Get your slashing info and unjail period end

zigchaind query slashing signing-info $(zigchaind tendermint show-validator) --chain-id="zig-test-2"

Get the rewards of your validator

zigchaind query distribution commission $VALIDATOR_OP_ADDRESS --chain-id="zig-test-2"

Get the rewards of your validator and the self-bonded rewards

zigchaind query distribution validator-distribution-info $VALIDATOR_OP_ADDRESS --chain-id="zig-test-2"

Withdraw your rewards

zigchaind tx distribution withdraw-rewards $VALIDATOR_OP_ADDRESS \
--chain-id="zig-test-2" \
--from z \
--gas-adjustment=1.5 \
--gas auto \
--gas-prices="0.00025uzig"