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
- Testnet
- Local
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
zigchaind tx staking create-validator /tmp/your_validator.txt \
--from=zuser1 \
--chain-id="zigchain-1" \
--gas="auto" \
--gas-prices="0.00025uzig" \
--gas-adjustment=1.5
Confirm transaction and get your validator address
- Testnet
- Local
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')
zigchaind query tx $TXHASH --chain-id="zigchain-1" | grep raw_log
VALIDATOR_OP_ADDRESS=$(zigchaind q tx $TXHASH --output json | jq -r '.tx.body.messages[0].validator_address')
Check your validator status
- Testnet
- Local
zigchaind query staking validator $VALIDATOR_OP_ADDRESS --chain-id="zig-test-2"
zigchaind query staking validator $VALIDATOR_OP_ADDRESS --chain-id="zigchain-1"
Check if the validator is part of the active set
- Testnet
- Local
zigchaind query tendermint-validator-set --chain-id="zig-test-2" | grep "$(zigchaind tendermint show-address)"
zigchaind query tendermint-validator-set --chain-id="zigchain-1" | 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
- Testnet
- Local
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"
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="zigchain-1" \
--from=zuser1 \
--gas-adjustment=1.5 \
--gas auto \
--gas-prices="0.00025uzig"
Know when your validator will be unjailed
- Testnet
- Local
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"
zigchaind query slashing signing-info $VALIDATOR_CON_ADDRESS --chain-id="zigchain-1"
zigchaind query slashing signing-info $(zigchaind tendermint show-validator) --chain-id="zigchain-1"
Unjail your validator
- Testnet
- Local
zigchaind tx slashing unjail --chain-id="zig-test-2" \
--gas="auto" \
--gas-prices="0.00025uzig" \
--from=zuser1 \
--gas-adjustment=1.5
zigchaind tx slashing unjail --chain-id="zigchain-1" \
--gas="auto" \
--gas-prices="0.00025uzig" \
--from=zuser1 \
--gas-adjustment=1.5
Get your validator's operator address
- Testnet
- Local
zigchaind query staking validator --chain-id="zig-test-2"
zigchaind query staking validator --chain-id="zigchain-1"
Get your slashing info and unjail period end
- Testnet
- Local
zigchaind query slashing signing-info $(zigchaind tendermint show-validator) --chain-id="zig-test-2"
zigchaind query slashing signing-info $(zigchaind tendermint show-validator) --chain-id="zigchain-1"
Get the rewards of your validator
- Testnet
- Local
zigchaind query distribution commission $VALIDATOR_OP_ADDRESS --chain-id="zig-test-2"
zigchaind query distribution commission $VALIDATOR_OP_ADDRESS --chain-id="zigchain-1"
Get the rewards of your validator and the self-bonded rewards
- Testnet
- Local
zigchaind query distribution validator-distribution-info $VALIDATOR_OP_ADDRESS --chain-id="zig-test-2"
zigchaind query distribution validator-distribution-info $VALIDATOR_OP_ADDRESS --chain-id="zigchain-1"
Withdraw your rewards
- Testnet
- Local
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"
zigchaind tx distribution withdraw-rewards $VALIDATOR_OP_ADDRESS \
--chain-id="zigchain-1" \
--from z \
--gas-adjustment=1.5 \
--gas auto \
--gas-prices="0.00025uzig"