Add chain data validation endpoint to detect cross-source inconsistencies#10
Conversation
Co-authored-by: Johnaverse <110527930+Johnaverse@users.noreply.github.com>
Co-authored-by: Johnaverse <110527930+Johnaverse@users.noreply.github.com>
|
@copilot sorry, rules 3 keyword is Testnet or Devnet |
Co-authored-by: Johnaverse <110527930+Johnaverse@users.noreply.github.com>
Updated Rule 3 to check for "Devnet" instead of "Denver". The validation now correctly identifies chains like "Nibiru devnet-3" (chain 7222). Updated in commit 80fece8. Results: Rule 3 now detects 17 errors (up from 16), including the newly found devnet chain. |
|
@copilot is it included the error sources in the api response? |
Yes, error sources are included in the API response. Each error includes source information in different formats: Rule 1: Example from Rule 1: {
"graphRelation": {
"source": "theGraph"
},
"chainlistData": {...}
}Example from Rule 5: {
"statuses": [
{"source": "chainlist", "status": "active"},
{"source": "chains", "status": "deprecated"}
]
} |
Implements validation logic to detect potential data quality issues across The Graph Networks Registry, Chainlist, and Chain ID Network sources. Exposes findings via
GET /validateendpoint.Implementation
New function:
validateChainData()indataService.jsNew endpoint:
GET /validateValidation Rules
isTestnetvaluesslip44=1(testnet indicator) paired withisTestnet=falseResponse Format
{ "totalErrors": 86, "summary": { "rule1": 3, "rule2": 57, "rule3": 17, "rule4": 1, "rule5": 1, "rule6": 7 }, "errorsByRule": { "rule1_relation_conflicts": [...], "rule2_slip44_testnet_mismatch": [...], ... }, "allErrors": [...] }Each error includes chain ID, name, error type, descriptive message, and relevant source data for context.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.