Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POI Monitor Service: Real-time POI Discrepancy Notification System #108

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

MoonBoi9001
Copy link
Member

@MoonBoi9001 MoonBoi9001 commented Jan 10, 2025

This PR introduces a new service to the graphix project that notifies about discrepancies/reuse in Proof of Indexing (POI) submissions that indexers submit across The Graph network.

New Service Overview

The POI Monitor/Notification service:

  • Detects when indexers submit different POIs for the same deployment/block
  • Identifies POI reuse across different deployments/blocks
  • Sends notifications to Slack when discrepancies are found (via webhook)
  • Prevents duplicate notifications through POI set tracking

Integration with Existing Services

  • Uses the existing GraphQL API exposed by the Rust service
  • Queries indexers and poiAgreementRatios endpoints
  • No changes required to the Rust service or its configuration
  • Runs as a separate container alongside the main service

New Files and Structure

services/poi_monitor/
├── Dockerfile                  # Container configuration
├── README.md                   # Service documentation
├── migrations/                 # Database migrations
├── src/                        # Source code
│   ├── analyzer.py             # POI analysis logic
│   ├── database.py             # Database operations
│   ├── migration.py            # Migration handling
│   ├── monitor.py              # Main service loop
│   └── notification.py         # Slack notifications
└── tests/                      # Test suite

Configuration Changes

  • Added compose/dev.dependencies.yml for service configuration
  • Added environment variable templates (.env.example)
  • Updated .gitignore for new service patterns

Testing

  • Test suite with >75% coverage
  • Added GitHub workflow for automated testing
  • Integration tests for database operations and POI analysis

Documentation

  • Detailed README with setup instructions
  • Technical implementation details
  • Service limitations and behavior documentation

@MoonBoi9001 MoonBoi9001 force-pushed the samuel/poiMonitor branch 6 times, most recently from 7c9b55a to f15d1c5 Compare January 10, 2025 18:25
@MoonBoi9001 MoonBoi9001 requested review from leoyvens and removed request for leoyvens January 14, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant