PIR spendability integration#32
Draft
p0mvn wants to merge 1 commit into
Draft
Conversation
Use Private Information Retrieval to detect spent notes and fetch witnesses before sync completes, giving users early visibility into pending spends. Adds the full data flow (SDK synchronizer interface, Root reducer orchestration, shared state), a PIR setup screen in Advanced Settings with a persisted user toggle, and pending-spend UI treatment in transaction rows. Made-with: Cursor
p0mvn
commented
Apr 10, 2026
Comment on lines
+98
to
+99
| "revision" : "6a8927df5a91710b414caba4f8a088dead4633db", | ||
| "version" : "1.27.5" |
Author
There was a problem hiding this comment.
Note: Some of these changes are intentionally left for convenience when continuing to pick this up
This was referenced Apr 10, 2026
Draft: Add PIR-based spendability checking and witness fetching
valargroup/zcash-swift-wallet-sdk#15
Draft
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Use Private Information Retrieval to detect spent notes and fetch witnesses before sync completes, giving users early visibility into pending spends. Adds the full data flow (SDK synchronizer interface, Root reducer orchestration, shared state), a PIR setup screen in Advanced Settings with a persisted user toggle, and pending-spend UI treatment in transaction rows.
Motivation
During normal wallet sync, Orchard notes are not spendable until the
shard-tree scanner has processed enough blocks to construct a Merkle
authentication path for each note. For wallets that are catching up after
being offline, this can mean a significant delay before funds become
available.
Nullifier PIR (Private Information Retrieval) sidesteps this by querying
an external server for two pieces of information:
wallet mark notes as spent before the scanner confirms it.
needed to spend a note, so the wallet does not need to wait for its
local shard to be fully scanned.
Together, these allow the wallet to display accurate spendable balances
and build transactions within seconds of startup, rather than waiting for
a full scan.
Design Assumptions
Design Document
https://github.com/valargroup/spendability-pir/blob/main/docs/pir_wallet_integration.md
Video Demo
https://screen.studio/share/tm6q8yUz
Screenshots
Related PRs
Author
Reviewer