Summary
Hashpool's pool monitoring (roles/pool/src/lib/monitoring.rs) is a bespoke axum router. The SRI reference pool uses stratum_apps::MonitoringServer with Sv2ClientsMonitoring implemented on ChannelManager, which gives it the full REST API, Prometheus metrics, Swagger UI, and snapshot cache for free.
Motivation
Migrating to the standard pattern would:
- Delete the custom
monitoring.rs axum code
- Simplify hashpool-local steps whenever upstream
stratum-apps library features are added (e.g. the network field in GlobalInfo collapses to a one-liner instead of a hand-rolled endpoint)
- Keep hashpool's monitoring surface in sync with upstream automatically
Blocked on
Mapping hashpool-specific stats (ehash, quotes, per-downstream hashrate) onto the stratum_apps monitoring trait surface. These stats have no equivalent in the SRI reference pool and need a design decision before the migration can proceed.
Related
docs/pr/sri-pr-globalinfo-network.md — "Future work" section captures the specific simplification this migration enables for the GlobalInfo.network feature
Summary
Hashpool's pool monitoring (
roles/pool/src/lib/monitoring.rs) is a bespoke axum router. The SRI reference pool usesstratum_apps::MonitoringServerwithSv2ClientsMonitoringimplemented onChannelManager, which gives it the full REST API, Prometheus metrics, Swagger UI, and snapshot cache for free.Motivation
Migrating to the standard pattern would:
monitoring.rsaxum codestratum-appslibrary features are added (e.g. thenetworkfield inGlobalInfocollapses to a one-liner instead of a hand-rolled endpoint)Blocked on
Mapping hashpool-specific stats (ehash, quotes, per-downstream hashrate) onto the
stratum_appsmonitoring trait surface. These stats have no equivalent in the SRI reference pool and need a design decision before the migration can proceed.Related
docs/pr/sri-pr-globalinfo-network.md— "Future work" section captures the specific simplification this migration enables for theGlobalInfo.networkfeature