Conversation
Lines of code reportTotal lines added: Detailed view |
🤖 Codex Code Review
Other than that, the PR looks mechanically safe: it doesn’t touch EVM execution, gas accounting, consensus validation, trie logic, or RLP paths. I couldn’t run Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
🤖 Claude Code ReviewNow I have enough context for a thorough review. Let me write it up. PR Review:
|
| Severity | Item |
|---|---|
| Bug | storage_downloaded / storage_inserted always 0; inc_* methods unused |
| Bug | Storage absolute counts not pushed (only rate) |
| Correctness | HealingStorage missing stage-start timestamp (or needs comment) |
| Low | cast_signed() panic in debug for very large counters |
| Nit | Stage number–enum mapping stability |
The rate calculation logic and phase detection heuristic (phase_elapsed < 2s) are correct given the 30-second polling interval. The feature flag gating is consistent with the rest of the codebase.
Automated review by Claude (Anthropic) · sonnet · custom prompt
…torage progress Fixes three critical issues with snap sync metrics: 1. Metrics not reaching 100% on phase completion - Added metrics emission when phases complete, not just during periodic logging - Headers and accounts now accurately show 100% when finished 2. Storage metrics showing incorrect values - Changed storage_downloaded/inserted from IntCounter to IntGauge - Use set() with total values instead of inc_by() with intervals - Prevents accumulation errors where inserted > downloaded 3. Improved real-time accuracy - Stage number updates immediately on phase transitions - All counters show actual values matching internal state Also enables metrics API by removing default-features=false from ethrex-metrics dependency.
Fixes two additional metrics issues: 1. Healing elapsed showing "no data" - Healing timestamp was only set within first 2 seconds of phase - Changed to set on first metrics call if currently 0 - Added getter method to check current timestamp value - Applied to both HealingState and HealingStorage phases 2. Bytecodes ETA bouncing between values - bytecodes_total was updating as pivot block changed during sync - Now locks the total when bytecode phase first starts - Prevents target from moving, making ETA calculations stable - Added getter method to check if total already locked Also removed unused IntCounter import.
Incorporate progress metrics from PR #6468 (Tomi/Esteve) into the observability PR, with improvements: - Add progress gauges: headers, accounts, storage, healing, bytecodes (downloaded/inserted/total) + stage + pivot_block - Push from METRICS atomics via push_sync_prometheus_metrics() in network.rs, called each polling cycle and on phase completion - Grafana dashboard with 7 rows: overview, peer health, headers, accounts, storage, healing, bytecodes — with progress gauges, rate panels (using Grafana rate() instead of app-computed rates), and ETA - All metrics use default Prometheus registry (register at init) - New peer-health row with eligible peers, pivot age, inflight requests, and pivot update outcomes — not present in the original PR Supersedes #6468.
|
We've incorporated the progress metrics and Grafana dashboard from this PR into #6470 (snap sync observability), with a few adaptations:
The dashboard layout is preserved: overview → headers → accounts → storage → healing → bytecodes, with progress gauges, rate panels, and ETA. This PR can be closed once #6470 merges. Thanks for the dashboard work! |
|
Closing this PR as all it's functionality was moved to #6470. |
No description provided.