Skip to content

fix: clean up stale miner data when hotkey re-links to new GitHub account#340

Open
tmimmanuel wants to merge 1 commit intoentrius:testfrom
tmimmanuel:fix/cleanup-stale-miner-data-reverse
Open

fix: clean up stale miner data when hotkey re-links to new GitHub account#340
tmimmanuel wants to merge 1 commit intoentrius:testfrom
tmimmanuel:fix/cleanup-stale-miner-data-reverse

Conversation

@tmimmanuel
Copy link
Copy Markdown

@tmimmanuel tmimmanuel commented Apr 3, 2026

Summary

  • Existing cleanup only handled one direction: same github_id re-registering on a new (uid, hotkey)
  • Missing the reverse: same (uid, hotkey) linking to a new github_id — old GitHub's rows were never deleted
  • This caused duplicate entries (e.g. madelyngamble2) showing stale data with same $/day but 0 score
  • Added three reverse cleanup queries (CLEANUP_STALE_*_BY_HOTKEY) and call them in cleanup_stale_miner_data()

Scenario

  1. User registers madelyngamble2, links wallet, gets hotkey
  2. User stops mining with madelyngamble2
  3. User registers spider-yamet with the same wallet/hotkey
  4. Old entry for madelyngamble2 is never cleaned up → duplicate in UI

Related entrius/gittensor-ui#124
spider-yamet
madelyngamble2

@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented Apr 7, 2026

just merged big changes into test please fix conflicts thanks

@tmimmanuel tmimmanuel force-pushed the fix/cleanup-stale-miner-data-reverse branch from 7fdfa41 to 544b6df Compare April 7, 2026 04:15
@tmimmanuel
Copy link
Copy Markdown
Author

@anderdc I resolved merge conflicts, plz review.

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.

2 participants