A lightweight and simple Cosmos network validator monitoring and alerting tool. The primary goal of Titan is to trigger simple configurable alerts when monitored events occur. These events include global (non validator specific) events such as new governance proposals and governance proposals that have transitioned into a voting phase. In addition, Titan will track when a specific validator(s) misses signing (pre-committing) a block, becomes jailed or double signs a block.
Titan aims to be a minimal utility ran as a daemon alongside a validator. It uses BadgerDB as an embedded key/value store and SendGrid for alerting email and SMS messages.
The latest release of Titan currently operates and supports v0.24.2 of the
Cosmos SDK and the
gaia-8001 testnet.
Nice-to-have features down the line:
- Allow more flexible alerting targets and filters
- More granular monitoring of when validators miss a certain % of pre-commits/signatures
- Monitor when a validator gets slashed
- NOTE: We can monitor when a validator decreases in power, but this would get very noisy.
To build the binary, which will get all tools and vendor dependencies:
$ makeTitan has a simple CLI. To run the binary:
$ titan --config=path/to/config.toml --out=path/to/log/file --debug=true|falseSee $ titan --help for further usage.
Note:
- Titan by default looks for configuration in
$HOME/.titan/config.toml. - Titan operates through a series of provided LCD clients. More than a single client should be provided and each client should be up-to-date and trusted.
Titan also exposes a very simple JSON REST service exposing information on the
latest monitor execution. This service is exposed on listen_addr and has a single
endpoint of: executions/latest.
See config/template.go for the full configuration template.
poll_interval = 15
monitors = [
"new_proposals",
"active_proposals",
"jailed_validators",
"double_signing",
"missing_signatures"
# or you can simply pass "*" to enable all monitors
]
[database]
data_dir = "/path/to/.titan/data"
[network]
# Address to run JSON REST service
listen_addr = "0.0.0.0:36655"
# NOTE: These will be used in a round-robin fashion
clients = ["https://gaia-seeds.interblock.io:1317"]
[targets]
sms_recipients = ["+11234567890"]
email_recipients = ["[email protected]"]
[filters]
[filters.validator]
operator = "cosmosaccaddr1rvm0em6w3qkzcwnzf9hkqvksujl895dfww4ecn"
address = "EBC613967F66F4EC306852CDF58B4F151CF16738"
[integrations]
[integrations.sendgrid]
api_key = "your-API-key"
from_name = "Cosmos Titan"To run unit tests and linting:
$ make test- Fork it
- Create your feature branch (
git checkout -b feature/my-new-feature) - Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/my-new-feature) - Create a new Pull Request