Draft implementation for optimizing network performance and diagnosing latency, packet loss, jitter, and bottlenecks for high-load blockchain nodes and RPC infrastructure. Architecture: Observe → Reason → Act.
- Paper: WHITEPAPER.md
- Folder: Self-contained in
rpc-network-intelligence/(sibling todelphi-showcase-projectandinterview-prep).
| Stage | Component | Role |
|---|---|---|
| Observe | src/collector.py |
Produces eBPF-like metrics (RTT, loss, jitter, RPC, node). Demo uses simulated data; production would use eBPF. |
| Reason | src/features.py, src/model.py |
Feature extraction, anomaly detection (Isolation Forest), root-cause classification (network / node / RPC). |
| Act | src/adaptive.py |
Turns ML output into suggested actions and alerts (no automatic routing changes). |
cd rpc-network-intelligence
python3 -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txtFrom the rpc-network-intelligence directory:
python run_pipeline.pyThis will:
- Build synthetic training data (normal + network/node/rpc anomaly windows).
- Fit the anomaly detector and root-cause classifier.
- Run four demo windows (normal, network-bound, node-bound, rpc-bound) and print adaptive suggestions.
- Metrics schema: config/metrics_schema.yaml — aligns with the white paper §3.
- Real eBPF: Replace
collector.collect_window()input with metrics from eBPF programs (e.g. BCC/libbpf) or from Prometheus/OpenTelemetry exporters that follow the same schema. - Dashboard: Export metrics and ML outputs to Prometheus/Grafana or OpenTelemetry.
- Automation: In production, the adaptive layer can call internal APIs (load balancer, BGP policy) with safeguards.
Same as the parent repository.