Validator Cheat Sheet
Validator Cheat Sheet
🖨 🍝 instructions to get you up and running with a Validator
on Pocket Network ✅
See the Validator Walkthrough if you want to understand what's happening under the hood.
Table of Contents
Prerequisites
- CLI: Make sure to install the
poktrolld
CLI. - Full Node: Make sure you have followed the Full Node Cheat Sheet to install and run a Full Node first.
poktroll
userIf you followed Full Node Cheat Sheet, you can switch
to user running the full node (which has poktrolld
installed) like so:
su - poktroll # or a different user if you used a different name
Account Setup
Create the Validator Account
Create a new key pair for the validator like so:
poktrolld keys add validator
Prepare your environment
Run the following commands to set up your environment:
cat << 'EOT' > ~/.poktrollrc
export NODE="https://shannon-testnet-grove-rpc.beta.poktroll.com"
export NODE_FLAGS="--node=https://shannon-testnet-grove-rpc.beta.poktroll.com"
export TX_PARAM_FLAGS="--gas=auto --gas-prices=1upokt --gas-adjustment=1.5 --chain-id=pocket-beta --yes"
export VALIDATOR_ADDR=$(poktrolld keys show validator -a)
EOT
echo "source ~/.poktrollrc" >> ~/.bashrc
Fund the Validator account
Run the following command to get the Validator
:
echo "Validator address: $VALIDATOR_ADDR"
Then use the Shannon Beta TestNet faucet to fund the validator account.
Afterwards, you can query the balance using the following command:
poktrolld query bank balances $VALIDATOR_ADDR $NODE_FLAGS
If you know someone at Grove who maintains Beta TestNet, you can ask them to run this command:
pkd_beta_tx tx bank send faucet_beta $VALIDATOR_ADDR 6900000000042upokt
Configure the Validator
Get the Validator's PubKey
Run the following command to get the pubkey
of your validator:
poktrolld comet show-validator
This will output something like:
{ "@type": "/cosmos.crypto.ed25519.PubKey", "key": "YourPublicKeyHere" }
Create the Validator JSON File
Create a JSON file named validator.json
with the content below while make these changes:
- Replace the
"pubkey"
value with the output frompoktrolld comet show-validator
. - Update the
"amount"
field with the amount you wish to stake (e.g.,"1000000upokt"
). - Set the
"moniker"
to your validator's name (validator
is the default we provided). - You can optionally fill in
"identity"
,"website"
,"security"
, and"details"
.
cat << 'EOF' > validator.json
{
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "YdlQyhjtrq9pk7afmz6oQ275L4FElzjzEJvB1fj3e1w="
},
"amount": "1000000upokt",
"moniker": "validator",
"identity": "",
"website": "",
"security": "",
"details": "",
"commission-rate": "0.100000000000000000",
"commission-max-rate": "0.200000000000000000",
"commission-max-change-rate": "0.010000000000000000",
"min-self-delegation": "1"
}
EOF
Create the Validator
Run the following command to create the validator:
poktrolld tx staking create-validator ./validator.json --from=validator $TX_PARAM_FLAGS $NODE_FLAGS
Verify the Validator Status
Verify the status of your validator by running:
poktrolld query staking validator $VALIDATOR_ADDR