feat(validator): add Prometheus metrics and improve telemetry for incentive mechanism - #415
feat(validator): add Prometheus metrics and improve telemetry for incentive mechanism#415itzlambda wants to merge 2 commits into
Conversation
…entive mechanism Add 12 new Prometheus metrics for the incentive pipeline: pool state (usd_required, usd_emission_capacity), per-GPU-category config (target_count, price_per_gpu_cents, window_hours), global config (revenue_share_pct, slash_pct), token prices (alpha, TAO), weight-setting outcome counter, and per-miner CU vesting gauges (cu_total, cu_vested_pct by miner_uid + gpu_category). Refactor compute_miner_breakdown (~120 lines of duplicated payout math) out of weight_setter into a new MinerCategoryDetail struct returned directly from compute_incentive_pool, eliminating divergence risk. Add #[instrument] spans to key async functions for trace correlation and a cumulative vesting percentage computation for per-miner Grafana dashboards.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing: this PR has been migrated to one-covenant/basilica-protocol#5 as part of the repo move to |
Summary
MinerCategoryDetailstruct computed insidecompute_incentive_pool, eliminating the ~120-line duplicatecompute_miner_breakdownpass inweight_setter.rs#[instrument]tracing spans onattempt_weight_setting,compute_incentive_pool_weights,compute_incentive_pool, andsubmit_weights_to_chainCloses #413