Skip to content

use new miner_telemetry hashrate values and update openAPI schema#202

Draft
GitGab19 wants to merge 1 commit into
stratum-mining:mainfrom
GitGab19:update-hashrate-monitoring
Draft

use new miner_telemetry hashrate values and update openAPI schema#202
GitGab19 wants to merge 1 commit into
stratum-mining:mainfrom
GitGab19:update-hashrate-monitoring

Conversation

@GitGab19

Copy link
Copy Markdown
Member

This PR updates the openAPI schema to the latest changes introduced by stratum-mining/sv2-apps#553.

It also makes dashboard use miner_telemetry hashrate values (measured from underlying apps through asic-rs) instead of the vardiff estimated ones.

Closes #188

@GitGab19 GitGab19 marked this pull request as draft June 29, 2026 17:47
Sync monitoring types with stratum-mining/sv2-apps#553 and prefer
miner_telemetry.reported_hashrate_hs, falling back to vardiff hashrate
when telemetry is unavailable.
@GitGab19 GitGab19 force-pushed the update-hashrate-monitoring branch from 731ae9f to 59e3ffa Compare June 29, 2026 20:48
@GitGab19 GitGab19 marked this pull request as ready for review June 30, 2026 00:58
@GitGab19 GitGab19 marked this pull request as draft June 30, 2026 01:15
@GitGab19

Copy link
Copy Markdown
Member Author

@lucasbalieiro this PR is still draft because while testing it with my Bitaxe I noticed that the miner_telemetry values where not retrieved from both JDC and tProxy (expect for the make and model fields).

I won't have access to my Bitaxe for the next days, so I would appreciate your help on figuring out what's going on here.

I still don't know if the issue is in our apps, in the docker images, or related to docker networking stuff.

What I know is that if you run apps on our current main, it works like a charm, and all the values are correctly retrieved, so it seems there's a difference between the apps and the docker images..

@lucasbalieiro

Copy link
Copy Markdown
Collaborator

Ok, gonna check today.

@lucasbalieiro lucasbalieiro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just posting a summary of what we've been discussing:

when tProxy/JDC runs inside a Docker container using the default bridge network, the peer IPs it observes are NATed by Docker. As a result, multiple ASICs appear to originate from the same bridge gateway IP instead of their actual LAN IP. The screenshot below confirms this behavior.
image

This is expected for bridge networking. See Docker's networking documentation: https://docs.docker.com/engine/network/port-publishing/.

The issue is that we need the miner's real LAN IP to make the HTTP request that fetches its telemetry.

This is probably not an issue for Umbrel, since we use network_mode: host, which avoids the bridge NAT. However, we also need to support Windows and macOS, where host networking is not a portable option.

I can think of a few approaches:

  • Keep using host networking where available and accept a different implementation on Windows/macOS.
  • Investigate Linux specific networking options such as direct routing, macvlan, or ipvlan, although these are not portable to Docker Desktop and would increase deployment complexity.
  • Perform a LAN scan to discover miners, fetch telemetry from each discovered IP, and then correlate the results using user_identity.

At the moment, the LAN scan seems like the most portable solution. The downside is that it duplicates logic that we intended to centralize in the sv2 apps, since sv2-ui would have to rediscover miners instead of relying on tProxy/JDC. (and sv2-ui is also running inside docker)

@GitGab19

GitGab19 commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

@lucasbalieiro what happens if you enable host networking in your Docker Desktop?

Does the container see the real miner IP?

@lucasbalieiro

Copy link
Copy Markdown
Collaborator

currently exploring a new way.
using Docker Desktop version 4.34 and later

enabling Host Network manually. This comes disabled by default:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitoring API updated in PR #553

2 participants