Skip to main content

Slash Avoidance

Validators nodes get slashed (lose POKT they've staked) if they fail to sign blocks. Here are some common reasons why a validator might not be signing blocks properly.

  • The node's validator might not be set to itself.
    • Use curl http://localhost:26657/status to check the status of your validator, and make sure the "id" and "address" fields are the same as the validator address.
    • When you run pocket accounts get-validator, is the node's own address returned? If not, you'll need to run pocket accounts set-validator.
    • Is your data-directory connected to your pocket-core instance --datadir?
    • Does your priv_val_key.json contain the same key as node_key.json? If not, try deleting them (and priv_val_state.json) before running pocket accounts set-validator and restarting the instance.
  • The process might be too much for your environment.
    • If the process exits due to "Too many open files", make sure your ulimit is set to the correct limit.
    • If the process exists due to "Invalid app hash", make sure you are running the correct version of pocket-core and that your system meets the minimum resource requirements.
    • Making sure your system meets the minium resource requirements is critical for avoiding several issues:
      • Data/WAL-corruption
      • Having the shut down and restart the process often
  • Your node might not be connected to the rest of the network.
    • If your node is at the latest height, it might be having trouble finding good peers, which it causing its height to fall behind and it to not process blocks. Check your number of peers. There should be <MaxInbound + MaxOutbound> (which can be found in your config.json) peers. If not:
      • If you have less than 3 peers, shut down your node, delete your address book, and replace it with the address book of a healthy node, and restart. You can get a healthy address book from any working node (can reach out to the community).
      • Check the logs for the words CONSENSUS FAILURE with module=consensus. If you see this, reach out to the Pocket Network. This is a larger issue, not on you.
      • Don't increase the number of max peers in your config. You want good peers, not lots of peers. Connect your nodes together (add them as persistent and/or unconditional peers) (in your .pocket/config/config.json). Whenever you add a persistent peer, reduce you min in and min out peers by 1 each.
      • You can find your number of peer (n_peers) using curl http://localhost:26657/net_info
  • Your data might be corrupted.
    • Make reguarly backups of your ~/.pocket/data folder.
    • Sometimes errors will occur where the data gets corupted. Just delete the chain data and resync the chain data.

Other checks

  • To avoiding being slashed to the point of force unstake, have an alert to notify when you get near the minimum 15,000 POKT.
  • Use curl http://<your node ip>:26657/status and make sure latest_block_height and latest_block_time are updated to the latest time in UTC.
  • Make sure your ulimit is set high enough.
  • Make sure your system meets the minimum resource requirements for both the Pocket node and the other blockchain nodes you are running.
  • Make sure your ServiceURI (the RPC endpoint to talking to your Pocket node) is publicly accessible.
  • If you update your node, make sure you re-add your custom configurations (mainily your persistent peers and peer settings) to the newly generated config.json
  • Make sure all nodes are synced and up-to-date before you start joining sessions.