🚨 We built a network-wide validator status monitoring tool for @Cosmos SDK chains that can monitor for validators that have missed too many blocks, and are likely to get jailed.
Check out the code on @cheqd_io's GitHub 👉 github.com/cheqd/validator-status
Here's how we went about it...
To provide some context here: proof-of-stake blockchains like @cosmos use a self-reinforcing mechanism to ensure nodes maintain good uptime.
You can see this on our block explorer: explorer.cheqd.io/validators
On our network, this is counted as “50% of the last 25,920 blocks”: if a validator misses more than this, it gets jailed and 1% of *all* staked tokens delegated to it is slashed/burned.
This works out to:
- 50% of 25,920 = 12,960 blocks
- 12,960 * 6s = approx. 21.6 hours
Most @cosmos monitoring tools are designed for use directly by a validator, i.e., Prometheus. github.com/cosmos/awesome#monitoring
This is great for validators who are running this kind of tool (e.g., we use @datadoghq), but it requires validators to run additional infra (many don't).
So we thought of a different way to do it: our BigDipper block explorer (built by the folks @forbole) exposes a GraphQL endpoint that shows validator status for *all* validators. We took this output, wrapped in a Cloudflare Worker (github.com/cheqd/validator-status), and voila!
Buuuuut...if a *different* @cosmos network wants to set up similar monitoring, or wants to alert to different channels, our setup makes it flexible to achieve this.
Including people being able to set up their own Zapier "zaps" to alert via SMS, email, etc 🤓