use new miner_telemetry hashrate values and update openAPI schema#202
use new miner_telemetry hashrate values and update openAPI schema#202GitGab19 wants to merge 1 commit into
miner_telemetry hashrate values and update openAPI schema#202Conversation
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.
731ae9f to
59e3ffa
Compare
|
@lucasbalieiro this PR is still draft because while testing it with my Bitaxe I noticed that the 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 |
|
Ok, gonna check today. |
lucasbalieiro
left a comment
There was a problem hiding this comment.
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.

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, oripvlan, 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)
|
@lucasbalieiro what happens if you enable host networking in your Docker Desktop? Does the container see the real miner IP? |

This PR updates the openAPI schema to the latest changes introduced by stratum-mining/sv2-apps#553.
It also makes dashboard use
miner_telemetryhashrate values (measured from underlying apps throughasic-rs) instead of the vardiff estimated ones.Closes #188