Repository navigation
fix(spv): add distinct error state for SPV sync failures #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e409c29
fix(spv): transition to error status when sync manager fails
lklimek 3b6e3a2
fix(spv): preserve detailed error message in progress watcher
lklimek a2a7478
feat(ui): add Error state to connection indicator
lklimek c7f66d4
fix: address review findings — nested lock and stale test doc
lklimek 61e9bde
Merge remote-tracking branch 'origin/v1.0-dev' into fix/spv-sync-erro…
lklimek a93b6d6
fix(spv): address review findings — lock ordering, error semantics, a…
lklimek acfe2c7
fix(spv): address round-2 review — tooltip detail, formatting, docs
lklimek 865d95a
Merge branch 'v1.0-dev' into fix/spv-sync-error-status
lklimek 6fde28b
Merge remote-tracking branch 'origin/v1.0-dev' into fix/spv-sync-erro…
lklimek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
docs/ai-design/2026-02-24-spv-sync-error-status/manual-test-scenarios.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Manual Test Scenarios: SPV Sync Error Status | ||
|
|
||
| ## Context | ||
|
|
||
| When SPV sync encounters a fatal error (e.g., masternode sync failure), the app | ||
| should transition from "Syncing" to an error state, with the connectivity icon | ||
| turning red and the tooltip/status panel reflecting the failure. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Dash Evo Tool built with the fix applied | ||
| - Access to Testnet (or a network where SPV sync can be triggered) | ||
| - SPV backend mode enabled (not RPC mode) | ||
|
|
||
| ## Scenario 1: Verify error state on sync failure | ||
|
|
||
| **Goal:** Confirm the connectivity icon transitions to red (Disconnected) when | ||
| SPV sync fails. | ||
|
|
||
| ### Steps | ||
|
|
||
| 1. Launch Dash Evo Tool and connect to Testnet in SPV mode. | ||
| 2. Observe the top-left connectivity icon during sync — it should pulse orange | ||
| (Syncing state). | ||
| 3. If sync completes successfully, the icon should turn green (Running state). | ||
| 4. If sync fails (e.g., masternode QRInfo failure visible in logs), observe: | ||
| - The connectivity icon turns **red** (static, no pulsation). | ||
| - Hovering over the icon shows tooltip: **"Disconnected"** with | ||
| **"SPV: Error"** detail. | ||
| 5. Open the Network Chooser screen and check the SPV status detail — it should | ||
| display the error message (e.g., "Sync manager Masternode failed: ..."). | ||
|
|
||
| ### Expected Result | ||
|
|
||
| - Icon transitions from orange (Syncing) to red (Disconnected) on error. | ||
| - Tooltip shows "Disconnected / SPV: Error". | ||
| - Error message is visible in the status detail panel. | ||
|
|
||
| ## Scenario 2: Verify normal sync still works | ||
|
|
||
| **Goal:** Confirm the fix doesn't break the happy path. | ||
|
|
||
| ### Steps | ||
|
|
||
| 1. Launch Dash Evo Tool and connect to Testnet in SPV mode. | ||
| 2. Wait for sync to complete (may take several minutes on first sync). | ||
| 3. Observe the connectivity icon transitions: | ||
| - Orange (Syncing) during sync. | ||
| - Green (Running) after sync completes. | ||
| 4. Hover over the icon — tooltip should show "Ready" with "SPV: Running". | ||
|
|
||
| ### Expected Result | ||
|
|
||
| - Sync completes normally, icon turns green. | ||
| - No false error transitions during normal sync. | ||
|
|
||
| ## Scenario 3: Verify error message content | ||
|
|
||
| **Goal:** Confirm the error message stored in `last_error` contains useful | ||
| diagnostic information. | ||
|
|
||
| ### Steps | ||
|
|
||
| 1. Trigger an SPV sync that fails (e.g., by connecting to a network with | ||
| known chain lock propagation issues). | ||
| 2. Check application logs for the error: | ||
| - Look for `SPV manager ... reported error: ...` log line. | ||
| 3. On the Network Chooser screen, verify the status detail shows the same | ||
| error message (not a generic "Sync failed" without context). | ||
|
|
||
| ### Expected Result | ||
|
|
||
| - Log contains `SPV manager "Masternode" reported error: Masternode sync failed: ...`. | ||
| - UI status detail shows the specific error from the sync manager, including | ||
| the block hash reference. | ||
|
|
||
| ## Notes | ||
|
|
||
| - The actual QRInfo chain lock error is an upstream issue | ||
| (dashpay/rust-dashcore#470). This fix ensures the app **reports** the error | ||
| correctly rather than silently staying stuck in "Syncing". | ||
| - A separate upstream issue (dashpay/rust-dashcore#469) tracks the missing | ||
| `try_emit_progress()` call on error paths in dash-spv. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.