Validator Status API
Summary
We built a network-wide validator status monitoring tool that will send out alerts in case your node starts losing blocks. Join/follow the #mainnet-alerts channel to get these updates.
How it works/how we built it
Our block explorer (BigDipper) exposes a GraphQL endpoint. This GraphQL endpoint is what the block explorer front-end uses when showing validator conditions on the overall/per-validator page.
To simplify parsing the output from the GraphQL endpoint, we did a simple wrapper using Cloudflare Workers to parse the GraphQL output into simple JSON.
Alerting
To simplify the task of alerting via various channels (and to keep it extensible to other channels), we take the output of our validator status API and parse it via Zapier. This is done as a two-stage process via two separate “Zaps”.
Collating a list of validators missing blocks
Schedule by Zapier to wake up the “Zap” every hour
Run custom JavaScript code using Code by Zapier to parse the JSON output
Filter by Zapier to check if there are entries generated in the compromised validator list. If not, then terminate Zap execution.
If the execution has reached this stage, Looping by Zapier with the following sub-steps:
Formatter by Zapier to carry out text/number formatting.
Digest by Zapier to push the formatted bullet-list item with validator details into a compiled digest.
Sending an alert to designated alert channel: A separate Zap triggers and sends alerts to designated channels. Right now, our setup sends these details to the cheqd Community Slack and the cheqd Community Discord.
Similar to above, Schedule by Zapier to wake the Zap up every hour
“Release” any unreleased digests by using the manual release feature in Digest by Zapier.
Filter by Zapier to check if there are any entries populated in the digest. If not, terminate execution of any further steps at this stage.
If execution has proceeded to this step, use the Zapier App for Slack and Zapier App for Discord to send a message (with formatting) to designated alert channels.
You can copy this Zap to configure a similar setup for other alert channels, such as SMS by Zapier or Email by Zapier.
Last updated