Skip to content

fix: improve Zcash sync resilience#3370

Open
Arbeitszeit wants to merge 1 commit into
cake-tech:devfrom
Arbeitszeit:fix/zcash-sync-resilience
Open

fix: improve Zcash sync resilience#3370
Arbeitszeit wants to merge 1 commit into
cake-tech:devfrom
Arbeitszeit:fix/zcash-sync-resilience

Conversation

@Arbeitszeit

Copy link
Copy Markdown

Issue Number (if Applicable): N/A

Description

This change improves Zcash synchronization resilience and addresses delayed wallet updates caused by competing database work.

During an active Warp Sync, the status timer called updateTransactions(). Transaction loading uses the same database mutex as Warp Sync, and the sync monitor interpreted the resulting queue growth as a reason to cancel synchronization. Repeated timer callbacks could also overlap and enqueue more work.

Changes

  • Avoid transaction-history reads while Warp Sync is still behind the chain tip.
  • Keep lightweight balance refreshes during synchronization and refresh transactions after reaching the tip.
  • Prevent overlapping status and periodic-sync callbacks.
  • Retry incomplete or failed Warp Sync operations without scheduling duplicate retries.
  • Cancel an active sync directly when closing the wallet instead of queuing cancellation behind the database mutex.
  • Keep node health marked as working after a successful sync.
  • Prevent duplicate auto-shield jobs from accumulating.
  • Keep the transparent-address background worker alive after a recoverable iteration failure.

Validation

  • git diff --check passes.
  • Runtime validation with the native Zcash backend is still required. The Flutter/native build toolchain was not available in the analysis environment.

Pull Request - Checklist

  • Initial Manual Tests Passed
  • Double check modified code and verify it with the feature/task requirements
  • Format code
  • Look for code duplication
  • Clear naming for variables and methods
  • Manual tests in accessibility mode (TalkBack on Android) 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