Skip to content

Correlated Slashing Risk Analyzer for Geographically Distributed Node Clusters #57

Description

@JamesEjembi

Problem Statement / Feature Objective

Operators running validators across multiple data centers risk correlated slashing events when a shared infrastructure dependency (same cloud provider, same ISP, same power grid) causes simultaneous failures. Build a risk analyzer that takes a cluster topology map (node coordinates + provider metadata), cross-references it against known slashing vectors (same IP range, same ASN, same cloud region), and computes a correlated slashing risk score for each node cluster with mitigation recommendations.

Technical Invariants & Bounds

  • Risk score per cluster = 0.4 × (shared_IP_count / total_nodes) + 0.3 × (shared_ASN_count / total_nodes) + 0.3 × (shared_cloud_region_count / total_nodes)
  • Cluster detected via DBSCAN density-based clustering on geocoordinates (ε=500km, minPts=3)
  • Infrastructure metadata sourced from: (1) node self-reported config, (2) IP geolocation API, (3) BGP ASN lookup
  • Risk tier thresholds: Low (<0.25), Medium (0.25–0.5), High (0.5–0.75), Critical (>0.75)
  • Mitigation recommendations: for each risk factor, suggest diversification strategies (e.g., "Move 3 nodes to different ASN 12345")
  • Cluster map must render up to 500 nodes on a Canvas global map projection (equirectangular) with cluster overlays

Codebase Navigation Guide

  • src/hooks/useCorrelationRisk.ts – risk analysis hook
  • src/workers/riskClusterWorker.ts – web worker for DBSCAN clustering
  • src/components/canvas/RiskTopologyMap.tsx – canvas map renderer
  • src/services/infrastructureService.ts – IP/ASN/cloud metadata service
  • src/utils/dbscan.ts – DBSCAN clustering implementation
  • src/store/riskSlice.ts – state management for risk data

Implementation Blueprint

  1. Implement src/utils/dbscan.ts – DBSCAN clustering algorithm with ε=500km, minPts=3 using Haversine distance calculation on lat/lng coordinates
  2. Build src/services/infrastructureService.ts – aggregates node infrastructure metadata: IP (from node config), ASN (via BGP lookup API), cloud region (from node labels/tags)
  3. Create src/workers/riskClusterWorker.ts – receives node list → runs DBSCAN → returns cluster assignments + risk scores via postMessage
  4. Implement src/utils/riskScore.ts – computes cluster risk score using the weighted formula
  5. Create src/utils/mitigationRecommender.ts – for each risk factor, generates human-readable diversification recommendations
  6. Build src/components/canvas/RiskTopologyMap.tsx – equirectangular canvas map with:
    • Node dots colored by risk tier
    • Cluster convex hull polygons (semi-transparent)
    • Zoom/pan support
    • Click cluster → show risk breakdown and mitigations
  7. Create src/components/validators/RiskSummaryPanel.tsx – tabular summary of all clusters with risk score, node count, and top mitigation
  8. Mount in a new "Correlation Risk" tab on ValidatorDashboard.tsx

Metadata

Metadata

Assignees

Labels

Complexity: HardcoreExtremely difficult, high-complexity engineering taskGrantFox OSSIssue tracked in GrantFox OSSLayer: Core-EngineCore engine layerMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignType: Core-ArchitectureCore architecture design and structural concern

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions