Skip to content

Miner app: dashboard stuck when legacy rewards-address.txt exists (no inner hash setup path from UI) #481

@adamtpang

Description

@adamtpang

GUI dashboard stuck: MinerWalletService.isSetupComplete() returns true on legacy rewards-address.txt, but no inner hash exists

Environment

  • App: Quantus Miner 0.4.1 (quantus_miner_windows.zip)
  • OS: Windows 11 Home, 10.0.26200
  • Embedded versions: Node v0.6.5-penestanan, Miner v2.1.2 (banner offers Miner v3.1.0 update)

Symptom

After installing the GUI and launching, the user lands on /miner_dashboard with:

  • "Rewards address not configured — complete the inner-hash setup first." in the Rewards Address card
  • "Start Mining" button greyed out
  • "Start Node" button enabled but clicking it has no visible effect
  • No path from the dashboard or Settings to perform inner-hash setup

Settings → View Inner Hash correctly reports "No inner hash found. Please set up your wallet first." — but the only way back to the setup screens is Logout (Full Reset), which is destructive.

Root cause (from source)

miner-app/lib/main.dart initialRedirect chain:

// Check 3: Rewards Wallet Set (mnemonic-based wormhole address)
final walletService = MinerWalletService();
isRewardsWalletSet = await walletService.isSetupComplete();
if (!isRewardsWalletSet) {
  return '/rewards_address_setup';
}
return '/miner_dashboard';

miner-app/lib/src/services/miner_wallet_service.dart:

Future<bool> isSetupComplete() async {
  if (await hasRewardsPreimageFile()) return true;
  try {
    return await (await _legacyPreimageFile()).exists();
  } catch (_) {
    return false;
  }
}

The legacy fallback checks ~/.quantus/rewards-address.txt, which is an SS58 address, not the 32-byte inner-hash preimage the rest of the app expects. On any machine that ever ran the original --rewards-address–era CLI (pre-v0.6 chain), this file exists with content like:

qzm7AKWK7CpZJsBDG3ZmeWUemm5QAW16gSbsyUaFov8rwm5sK

isSetupComplete() returns true purely on file existence, the user is routed to the dashboard, and the dashboard then can't proceed because no preimage was ever loaded into secure storage.

Reproduction

  1. On any machine, create a stale legacy file:
    "qzm7AKWK7CpZJsBDG3ZmeWUemm5QAW16gSbsyUaFov8rwm5sK" | Out-File -Encoding ascii "$env:USERPROFILE\.quantus\rewards-address.txt" -NoNewline
  2. Launch quantus_miner.exe
  3. Observe: lands on dashboard with "not configured" warning and no setup path

Suggested fixes

  1. isSetupComplete() should validate, not just exist-check. If _legacyPreimageFile() is found, attempt to read it and verify it's either a valid 32-byte hex preimage OR run a one-time migration that produces a rewards-preimage.txt from it. If neither succeeds, treat it as missing and fall through to the setup screen.
  2. Add a "Set up rewards address" entry to the Settings → Wallet section. The dashboard explicitly tells the user to do this; there should be a path from the visible UI, not just Logout (Full Reset).
  3. Reconsider the legacy fallback entirelyrewards-address.txt is from a chain version (pre-live_resonance/planck) that the bundled v0.6.5 node won't accept anyway. If the legacy file can never produce a valid preimage, drop the check.

Side observation: GPU device count "5 / 0"

The dashboard's GPU Devices row shows 5 / 0 on a Windows laptop with one integrated AMD iGPU and one NVIDIA RTX 3070. This is the same wgpu multi-adapter enumeration bug I filed against the CLI miner (see Quantus-Network/quantus-miner#61 and PR Quantus-Network/quantus-miner#62) — the GUI ships the same quantus-miner binary, so the fix in #62 will surface a sane count here too.

Workaround for stuck users

Remove-Item "$env:USERPROFILE\.quantus\rewards-address.txt"

Then relaunch — the GUI redirects through the proper /rewards_address_setup flow.

Happy to PR

The fix is small (validate file contents in isSetupComplete() + a Settings entry point). Happy to put up a Dart PR if a maintainer can confirm the desired behaviour for the legacy file (silent migrate vs. force user to redo setup vs. drop the check).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions