add multiple fallback pools#119
Conversation
|
Quick glance, this PR touches on too many things, making it hard to review. 1300 lines of codes just for adding a simple option to add a fallback pool seems too much. My biggest concern here is that you touched all configuration steps with this as well, so for example now the flow is completely disrupted. For example, now in the setup user can't add custom pool, but it needs to add a fallback pool. I don't know what approach did @GitGab19 have in mind, but this is pretty large scope for a simple feature. On top of that needs rebase and conflict resolving. |
I'm simplifying, I realised somethings are already implemented. Now doing cleanup. |
656ba31 to
57df22d
Compare
|
I've pushed a simplified version. |
57df22d to
66b5d6c
Compare
|
@xyephy Much better and cleaner direction. Thanks for addressing. I was able to test it and my pool correctly fall back to a secondary pool. On my first test I encountered the issue where in the setting page I wasn't able to edit or add more fallbacks pool, fallback pools completely disappeared, see video. Screen.Recording.2026-04-24.at.11.56.50.movAlso CI is failing. It also doesn't seem I can add more than one fallback pool, earlier you had a way to add and drag drop them which imo was good UX. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
66b5d6c to
de8d579
Compare
|
@pavlenex addressed everything from your review. Thank you, let me know if the fallbacks work on your end. |
|
Hi @xyephy I've looked into PR, and I like the new flow. Found few concerns:
2. @GitGab19 can you confirm that the **fallback only happens in JD mode**? In that case how come we have it in the Pool Non JD mode in the UI? And if it's at tProxy level, then it should also be available in the non JD mode for pool solo mine?
|
|
@GitGab19 I am really confused on how fallback works, so it apparently exists in tProxy? But just doesn't work? My understanding was that failover happens only in JDC and that such functionality doesn't exist in tProxy. But now I am seeing in logs, that tproxy in no jd mode has that functionality, and if functionality exists in both (great) then we can do pool fallback for both solo pooled mining and JD mining, and even non jd pool mining. |
its a UX bug, I just need to add validation to prevent primary pool from appearing in the fallback option. Yes we should exclude primary pool if user has already selected. |
|
@pavlenex fallback exists in both JDC and tProxy, more precisely that's what happens:
|
|
In that case this PR needs to be properly done then, it seems it's missing critical structural elements. For example in solo pool mode we should have fallback, currently we don't. It seems fallback in tproxy doesn't work either I doubt that's because of this pr. |
|
@pavlenex thanks @GitGab19 for confirming. Pushed ec0175a addressing the structural concerns:
|
ec0175a to
5c666c5
Compare
|
I tried Solo with SRI as default BlitzPool as a fallback and it crashed: This may be due to our SV2-App logic, not sure, but adding user identiy as an address is a requirement in BlitzPool so I used it in SRI Pool as well. Unsure what went wrong but hopefully logs are helpful. |
|
Same happened vice versa, blitz default sri secondary, something is fishy here: |
|
When fallback isn't enabled in the UI I can connect to either or without any issues. Seems like we should test this one more. |
|
Having a look |
|
@Shourya742 Not really sure what's triggering but I am sure you'll figure it out :) One thing to narrow down the search could be:
It could be if worker name is empty it can happen, as from what I can tell naively BitzPool expects payout address and treats it as a worker name, but this is just a naive assumption, this config made things work for me using same for worker and payout with sri as primary pool, but it could as well be wider incopatability issue between the pools.
|
|
@pavlenex you might be right on what causing the fail.
Why it breaks with fallback: the translator only has one So when BlitzPool gets |
|
Fix would be to make |
|
@xyephy Were you able to replicate this locally? |
|
@pavlenex I was able to replicate this in apps. It seems a writer task isn’t undergoing fallback, which is causing the executor to hang. With the local fix, I was able to connect to our SRI pool after the fallback. 2026-05-05T09:34:05.343331Z INFO translator_sv2: Starting Translator Proxy...
2026-05-05T09:34:05.343472Z INFO translator_sv2: Initializing upstream connection...
2026-05-05T09:34:05.343495Z INFO translator_sv2: Trying upstream 1 of 2: blitzpool.yourdevice.ch:3333
2026-05-05T09:34:05.343503Z INFO translator_sv2: Connection attempt 1/3...
2026-05-05T09:34:06.345518Z INFO translator_sv2::sv2::upstream: Trying to connect to upstream at blitzpool.yourdevice.ch:3333
2026-05-05T09:34:06.345586Z INFO stratum_apps::network_helpers::resolve_hostname: Resolving hostname 'blitzpool.yourdevice.ch' via DNS...
2026-05-05T09:34:06.701409Z INFO translator_sv2::sv2::upstream: Connected to upstream at 62.2.188.226:3333
2026-05-05T09:34:07.108148Z INFO translator_sv2::sv2::upstream::common_message_handler: Received: SetupConnectionSuccess(used_version: 2, flags: 0x00000000)
2026-05-05T09:34:07.108279Z INFO translator_sv2::sv1::sv1_server: Starting SV1 server on 0.0.0.0:34255
2026-05-05T09:34:07.108427Z INFO translator_sv2::sv1::sv1_server: Translator Proxy: listening on 0.0.0.0:34255
2026-05-05T09:34:07.108636Z INFO translator_sv2: Launching ChannelManager tasks...
2026-05-05T09:34:07.108706Z INFO translator_sv2: Initializing monitoring server on http://0.0.0.0:9092
2026-05-05T09:34:07.108797Z INFO translator_sv2::sv1::sv1_server::difficulty_manager: Variable difficulty adjustment enabled - starting vardiff loop
2026-05-05T09:34:07.108898Z INFO translator_sv2::sv1::sv1_server: Starting job keepalive loop with interval of 60 seconds
2026-05-05T09:34:07.109359Z INFO stratum_apps::monitoring::http_server: Starting monitoring server on http://0.0.0.0:9092
2026-05-05T09:34:07.109402Z INFO stratum_apps::monitoring::http_server: Cache refresh interval: 15s
2026-05-05T09:34:07.110122Z INFO translator_sv2::sv1::sv1_server::difficulty_manager: Starting vardiff loop for downstreams
2026-05-05T09:34:07.113040Z INFO stratum_apps::monitoring::http_server: Swagger UI available at http://0.0.0.0:9092/swagger-ui
2026-05-05T09:34:07.113077Z INFO stratum_apps::monitoring::http_server: Prometheus metrics available at http://0.0.0.0:9092/metrics
2026-05-05T09:34:13.677080Z INFO translator_sv2::sv1::sv1_server: New SV1 downstream connection from 127.0.0.1:50146
2026-05-05T09:34:13.677180Z INFO translator_sv2::sv1::sv1_server: Downstream 1 registered successfully (channel will be opened after first message)
2026-05-05T09:34:13.677320Z INFO translator_sv2::sv1::sv1_server: SV1 server: opening extended mining channel for downstream 1 after first message
2026-05-05T09:34:13.677378Z INFO translator_sv2::sv2::channel_manager: Sending OpenExtendedMiningChannel message to upstream: OpenExtendedMiningChannel(request_id: 1, user_identity: sri/solo/bc1q9f9vj7spn8h7qda6pn8d4g4j99f0mn9lhwz55j, nominal_hash_rate: 10000000000000, max_target: U256(000000000002d09371a41ebef0f5ac163c7c5d80571129ae7f7d75deba45e0c0), min_extranonce_size: 6)
2026-05-05T09:34:13.996069Z WARN translator_sv2::sv2::channel_manager::mining_message_handler: Received: OpenMiningChannelError(request_id: 1, error_code: unknown-user)
2026-05-05T09:34:13.996161Z WARN translator_sv2::sv2::channel_manager: ChannelManager::handle_upstream_frame requested fallback error_kind=OpenMiningChannelError
2026-05-05T09:34:13.996218Z WARN translator_sv2::sv2::channel_manager: ChannelManager: unified message loop exited.
2026-05-05T09:34:13.996250Z INFO translator_sv2: Preparing fallback
2026-05-05T09:34:13.996266Z INFO translator_sv2::sv2::upstream: Upstream: fallback triggered
2026-05-05T09:34:13.996396Z WARN translator_sv2::sv2::upstream: Upstream: task shutting down cleanly.
2026-05-05T09:34:13.996440Z WARN translator_sv2::io_task: Writer task exited.
2026-05-05T09:34:13.996432Z INFO translator_sv2::sv1::downstream: Downstream 1: fallback triggered
2026-05-05T09:34:13.996279Z INFO translator_sv2::sv1::sv1_server: SV1 Server: fallback triggered, clearing state
2026-05-05T09:34:13.996355Z INFO translator_sv2: Monitoring server: fallback triggered.
2026-05-05T09:34:13.996552Z INFO stratum_apps::monitoring::http_server: Monitoring server received shutdown signal, stopping...
2026-05-05T09:34:13.996552Z WARN translator_sv2::io_task: Reader task exited.
2026-05-05T09:34:13.996862Z INFO stratum_apps::monitoring::http_server: Monitoring server stopped
2026-05-05T09:34:13.996892Z INFO translator_sv2: Monitoring server task exited and signaled fallback coordinator
2026-05-05T09:34:13.996471Z WARN translator_sv2::sv1::downstream: Downstream 1: unified task shutting down
2026-05-05T09:34:13.997059Z INFO translator_sv2: All components finished fallback cleanup
2026-05-05T09:34:13.997252Z INFO translator_sv2: Trying upstream 2 of 2: 75.119.150.111:3333
2026-05-05T09:34:13.997286Z INFO translator_sv2: Connection attempt 1/3...
2026-05-05T09:34:14.998440Z INFO translator_sv2::sv2::upstream: Trying to connect to upstream at 75.119.150.111:3333
2026-05-05T09:34:15.297641Z INFO translator_sv2::sv2::upstream: Connected to upstream at 75.119.150.111:3333
2026-05-05T09:34:15.708197Z INFO translator_sv2::sv2::upstream::common_message_handler: Received: SetupConnectionSuccess(used_version: 2, flags: 0x00000000)
2026-05-05T09:34:15.708287Z INFO translator_sv2::sv1::sv1_server: Starting SV1 server on 0.0.0.0:34255
2026-05-05T09:34:15.708399Z INFO translator_sv2::sv1::sv1_server: Translator Proxy: listening on 0.0.0.0:34255
2026-05-05T09:34:15.708540Z INFO translator_sv2: Launching ChannelManager tasks...
2026-05-05T09:34:15.708574Z INFO translator_sv2: Reinitializing monitoring server on http://0.0.0.0:9092
2026-05-05T09:34:15.708595Z INFO translator_sv2::sv1::sv1_server::difficulty_manager: Variable difficulty adjustment enabled - starting vardiff loop
2026-05-05T09:34:15.708719Z INFO translator_sv2::sv1::sv1_server: Starting job keepalive loop with interval of 60 seconds
2026-05-05T09:34:15.708872Z INFO translator_sv2: Upstream and ChannelManager restarted successfully.
2026-05-05T09:34:15.708969Z INFO stratum_apps::monitoring::http_server: Starting monitoring server on http://0.0.0.0:9092
2026-05-05T09:34:15.709007Z INFO stratum_apps::monitoring::http_server: Cache refresh interval: 15s
2026-05-05T09:34:15.709859Z INFO translator_sv2::sv1::sv1_server::difficulty_manager: Starting vardiff loop for downstreams
2026-05-05T09:34:15.712064Z INFO stratum_apps::monitoring::http_server: Swagger UI available at http://0.0.0.0:9092/swagger-ui
2026-05-05T09:34:15.712096Z INFO stratum_apps::monitoring::http_server: Prometheus metrics available at http://0.0.0.0:9092/metrics
2026-05-05T09:34:30.694962Z INFO translator_sv2::sv1::sv1_server: New SV1 downstream connection from 127.0.0.1:50480
2026-05-05T09:34:30.695067Z INFO translator_sv2::sv1::sv1_server: Downstream 1 registered successfully (channel will be opened after first message) |






Adds support for configuring fallback pools with automatic failover, in both the setup wizard and the settings tab.
Closes #45.


