Repository navigation
fix: export wallet backup without paykit registry #1784
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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
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 @@ | ||
| Wallet backups now complete while the Pubky homeserver is unreachable. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bitkit builds the SDK with
withPaymentAdapterAndPubkySharedStateAndClientConfig, which wiresPubkySharedStateStorage(paykit-ffisdk.rs:250at v0.1.1-rc2, the pinned version). With that adapterexport_backup_stringis not a local read:backup::export_backup_statecallsstorage.transaction, which with no active operation goes throughrun_operation_erased(pubky_shared.rs:381). That needs the Paykit identity secret in the session access, takes the remote lock withwith_write_lock(storage.lock(...), an HTTP call to the homeserver,locks.rs:170), then reads the pending markers and the encrypted state blob from the homeserver. With the homeserver blackholed (manual test 1), theget_paykit_app_registryerror goes away but the export fails atacquire Pubky write lock, and the WALLET backup retries as before. The changelog line is not delivered. The new test passes only becausePaykitSdkis a mock, so it cannot see this path. Making the backup survive an outage needs a change below this call, either in the SDK (an export that can serve the last observed state) or in howBackupRepotreats a Paykit transport failure.Verified by: traced
exportBackupStringthrough paykit-rs v0.1.1-rc2 (sdk.rs:349>runtime/backup.rs:11>backup/mod.rs:240>storage/mod.rs:170>pubky_shared.rs:517-523>run_operation_erased>with_shared_state_lock>locks.rs:170). A cold reader from another model family checked the same trace and found it holds.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed. This change removes the App Registry fetch but does not fix #1746, and the test passes only because
PaykitSdkis a mock.Device run (Android,
17ef309, rooted google_apis emulator, homeserver34.65.231.81dropped with iptables at 12:36:43): before the block the WALLET backup succeeded (12:34:07). After it, WALLET retried at 10 s, 20 s and 40 s, each failing withacquire Pubky write lock (request timeout), while ACTIVITY, METADATA and WIDGETS kept succeeding. The backoff from #1552 works; the export itself still needs the homeserver.I'm leaving this thread open and the PR as a draft until we decide where the fix belongs: below this call (an SDK export from a local snapshot, or a separate backup category for Paykit state), or closing #1746 as working by design.