A command-line tool for analyzing and reporting on Proof of Indexing (POI) data across Graph Protocol indexers. This tool helps monitor subgraph deployment health, compare POI values between indexers, and identify divergence points.
- Health Reports: Generate comprehensive health reports for subgraph deployments across all allocated indexers
- POI Analysis: Compare proof-of-indexing values between indexers at specific block numbers
- Bisection Analysis: Efficiently find the exact block where two indexers' POI values first diverge
- Indexer State Hash: Generate hashes of indexer states for finding indexers sharing graph-node
- Python 3.10 or higher
- uv (for dependency management)
git clone https://github.com/graphprotocol/graphprotocol-public-poi-tool.git
cd graphprotocol-public-poi-tool
uv sync
The tool requires access to Graph Protocol subgraph endpoints. Configure these via environment variables or command-line options:
export POITOOL_NETWORK_SUBGRAPH_ENDPOINT="https://gateway.network.thegraph.com/api/subgraphs/id/..."
export POITOOL_EBO_SUBGRAPH_ENDPOINT="https://gateway.network.thegraph.com/api/subgraphs/id/..."
export POITOOL_GATEWAY_API_TOKEN="secret" # optional if not pointing to gateway
Generate a health report for a subgraph deployment:
poitool health <IPFS_HASH>
This command:
- Queries all indexers with allocations to the deployment
- Displays health status, latest block, and error information
- Shows results in a real-time updating table
Generate POI reports for specific blocks:
# Use current epoch's latest valid block
poitool poi report <IPFS_HASH>
# Use specific block number
poitool poi report <IPFS_HASH> <BLOCK_NUMBER>
Features:
- Collects POI values from all allocated indexers
- Compares POI consistency across the network
- Identifies indexers with matching/divergent POI values
Find the exact block where two indexers' POI values diverge:
poitool poi bisect <IPFS_HASH> <LEFT_INDEXER_ID> <RIGHT_INDEXER_ID>
This uses binary search to efficiently locate divergence points, useful for:
- Debugging indexing discrepancies
- Identifying when indexers went out of agreement
- Root cause analysis of POI mismatches
Generate a hash of an indexer's synced subgraph identifiers:
poitool indexer hash <INDEXER_ID>
Useful for:
- Finding indexers that are sharing graph-node
- Network Client: Interfaces with the Graph Network subgraph
- EBO Client: Interfaces with Epoch Block Oracle for valid block numbers
- Indexer Status Client: Communicates with individual indexer status endpoints
- Report Service: Generates health and POI reports across multiple indexers
- Bisector Service: Performs binary search to find POI divergence points
ReportService
: Orchestrates data collection from multiple indexersBisectorService
: Implements efficient bisection algorithm for POI analysis
NetworkClient
: Queries network subgraph for allocations, indexer info, and manifestsEBOClient
: Retrieves epoch and block validation dataIndexerStatusClient
: Queries individual indexer endpoints for status and POI data
--network-subgraph-endpoint
: Graph Network subgraph endpoint--ebo-subgraph-endpoint
: EBO subgraph endpoint--gateway-api-token
: Graph Gateway API token
Generate health report for a subgraph deployment.
Generate POI report. Block number defaults to current epoch's latest valid block.
Find first divergent block between two indexers using binary search.
Generate SHA-256 hash of indexer's synced subgraphs and their health status.
uv sync
The project uses GraphQL code generation for type-safe client interactions:
# Generate client code from GraphQL schemas
make codegen
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Open an issue on GitHub
- Check existing documentation and code comments