Skip to content

fix(kaspa): separate migration and sync retry loops#449

Merged
danwt merged 1 commit intomain-dymfrom
danwt/claude/fix-migration-sync-retry
Jan 23, 2026
Merged

fix(kaspa): separate migration and sync retry loops#449
danwt merged 1 commit intomain-dymfrom
danwt/claude/fix-migration-sync-retry

Conversation

@danwt
Copy link
Copy Markdown

@danwt danwt commented Jan 23, 2026

Summary

  • Previously, if post-migration hub sync failed (TX not yet confirmed), the retry loop re-attempted migration itself — which always fails since old escrow is empty
  • Split into two phases: migration with retry, then sync with retry
  • If migration fails but new escrow already has funds, detect that migration already happened and skip straight to sync
  • Added 10s delay between migration submission and first sync attempt to allow TX confirmation

Scenarios handled

  1. Fresh migration (mainnet): executes TX → waits 10s → syncs hub with retries
  2. Resumed after crash/restart (blumbus now): migration fails (empty escrow) → detects new escrow has funds → skips to sync with retries

Test plan

  • Deploy to blumbus, reboot relayer — should detect migration already done and sync hub
  • Verify hub anchor is updated to new escrow UTXO

🤖 Generated with Claude Code

Previously, if post-migration hub sync failed (e.g. TX not yet
confirmed), the retry loop would re-attempt the migration itself.
Since the old escrow is already empty, migration always fails and
sync is never retried.

Fix: split into two phases — migration with retry, then sync with
retry. If migration fails but new escrow has funds, detect that
migration already happened and skip straight to sync.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@danwt danwt merged commit 7ddc560 into main-dym Jan 23, 2026
7 of 11 checks passed
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.

1 participant