Daemon · Go

cometduty

Open-source monitoring daemon and operations CLI for validators on cosmos/evm chains and CometBFT networks. Real-time consensus participation watchdog.

v0.2.0 GitHub
Go 1.26+
Runtime
19
Alert Types
7
Notifiers
0
Dependencies
01

Features

  • Per-block sign classification (proposed, signed, prevote-only, missed)
  • Consecutive-miss tracking and slashing-window percentage
  • Jailed and tombstoned validator detection
  • Chain stall and execution-layer anomaly detection
  • RPC endpoint health assessment
02

Architecture

Pipeline
  • CometBFT RPC → Block Watcher → Sign Machine → Alert Engine → Notifiers
Alert Processing
  • Alert deduplication for noise reduction
  • Flap suppression to prevent alert storms
  • Auto-resolution when conditions clear
Observability
  • Durable JSONL audit trail
  • Prometheus metrics endpoint
  • Grafana dashboard
03

Dependencies

  • CometBFT v0.34 through v1.x
  • Supports ed25519, secp256k1, secp256r1, ethsecp256k1 key types
  • Compatible with x/staking and x/slashing modules
04

Notifiers

PagerDuty Events API v2
Slack Webhooks
Discord Webhooks
Telegram Bot API
Webhooks Generic HTTP
ntfy Push notifications
Opsgenie Alert API
05

Quick Start

# Clone repository
git clone https://github.com/abhijitkrm/cometduty.git
cd cometduty

# Build
go build -o cometduty ./cmd/cometduty

# Initialize config
./cometduty init --config ~/.cometduty/config.toml

# Run daemon
./cometduty start --config ~/.cometduty/config.toml
06

Testing

E2E Testing
  • Fake CometBFT RPC + websocket server for end-to-end testing
  • Simulates block production and validator participation
Concurrency Safety
  • Race detection enabled for concurrent safety
  • All tests run with -race flag