Repository navigation
Add the receiver PIR restore client #124
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
Open
czarcas7ic
wants to merge
76
commits into
adam/swap-receiving-slot-filling
from
adam/swap-receiving-pir-receiver
Open
Changes from 30 commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
6be7a6c
Add the receiver PIR restore client
czarcas7ic 06685a8
Pin the receiver crates to wallet-pir's main
czarcas7ic 7689449
Require a current recent set from every provider
czarcas7ic 7b786b9
Refresh the Enhance routing before each note-data batch
czarcas7ic 36e3df5
Merge the slot-filling and SQLite store fixes
czarcas7ic aa479cb
Restore the receiver-client references with the client
czarcas7ic 35bb356
Merge the restore watch change
czarcas7ic dfa2c55
Stop reading recent sets in restore sweeps
czarcas7ic 5ae2a92
Require a seen set for every provider with sets
czarcas7ic 0103145
Merge the slot-filling round-3 merge
czarcas7ic 627c0f5
Cover a seen hit across a rejected payment and a later miss
czarcas7ic 335237c
Stop the sweep run when leasing an attempt fails
czarcas7ic 2cba164
Merge the restored-address issuance gate
czarcas7ic 6059530
Merge the restored-account issuance gate
czarcas7ic 56c1d4d
Merge the restored lookahead seen check
czarcas7ic 7acd0fd
Merge the restored lookahead that stays ahead of issued keys
czarcas7ic c57dce8
Merge the round-4 SQLite fixes into the receiver client
czarcas7ic 422938c
Cover a deferred payment replaced by a later publication
czarcas7ic b994e58
Sweep one batch per account in each run
czarcas7ic 693ef90
Name the account of each deferred sweep key
czarcas7ic a460f05
Merge the exact-input refund and seen-set fixes
czarcas7ic a1e359c
Stop the sweep run when the PIR session fails to open
czarcas7ic 7dc580e
Merge the round-6 SQLite fixes
czarcas7ic bb62c90
Check the network of fetched seen sets
czarcas7ic fa8bd17
Pin transparent PIR to the receiver's wallet-pir revision
czarcas7ic be6f0b5
Flag a package resolved from two git sources
czarcas7ic b1c1939
Check every requested position in returned note data
czarcas7ic 1dbea92
Count only note data requests that name positions
czarcas7ic 2454f85
Merge the restore receipt retrieval note
czarcas7ic 7dbda8c
Merge the restored dynamic memo retrieval fix
czarcas7ic 5a86b57
Merge the round-8 SQLite fixes
czarcas7ic 7423ae8
Skip the note source when a sweep needs no positions
czarcas7ic 4728d95
Merge the round-9 SQLite fixes
czarcas7ic 2bb2d44
Merge the unreadable refund memo retention fix
czarcas7ic 4732d73
Merge the round-10 SQLite fixes
czarcas7ic 2eb63ac
Merge main into the receiver restore client
czarcas7ic 091c60f
Merge the round-12 fixes from the slot-filling branch
czarcas7ic 860aae3
Merge the zero exact-output refund fix
czarcas7ic 4f22415
Stop the sweep when the note source cannot serve the chain
czarcas7ic bf7d27a
Release spend evidence only at the current tip
czarcas7ic b65a4b8
Sweep a repeated account only once
czarcas7ic 86f35aa
Merge the received-note dynamic key index
czarcas7ic 6de9eb9
Revalidate the chain point before releasing spend evidence
czarcas7ic 9017590
Merge the incomplete-deposit wording and the reservation limit
czarcas7ic 1ecb146
Merge the completion-limit reopen fix
czarcas7ic 72f66c4
Merge the refund-owed completion-limit fix
czarcas7ic 34179ec
Merge the delayed-status completion-limit fix
czarcas7ic 851e61d
Merge the structural completion-limit closure
czarcas7ic c717501
Merge the frozen closed-key deadline
czarcas7ic f9774f5
Merge the graph root, PRF note and pending-recovery guard
czarcas7ic 691e9d9
Match a publication's end position to the wallet's anchor tree
czarcas7ic e2f7f31
Recheck the fully scanned height before releasing spend evidence
czarcas7ic bfce96d
Merge the round-16 key lifecycle and snapshot fixes
czarcas7ic 5b0cebe
Merge the transaction key snapshot fix
czarcas7ic dc037b2
Reject sweeps of a publication without provider seen sets
czarcas7ic c37511c
Continue a sweep's application after a before-birthday payment
czarcas7ic d99d58c
Merge the slot-filling note
czarcas7ic 7f0fa01
Note why a sweep ignores seen-feed dates
czarcas7ic 88ace31
Merge the memo and restore-watch simplifications
czarcas7ic bed573b
Watch only recent restored keys and recheck closed ones by paid filter
czarcas7ic 8c2ef66
Merge the dynamic IVK simplifications
czarcas7ic 404c34e
Remove the before-birthday continuation from sweeps
czarcas7ic bf902cf
Sweep one account per call
czarcas7ic 3ee7420
Inline the paid-filter recheck
czarcas7ic af80885
Consolidate the receiver sweep tests into table tests
czarcas7ic 4e34b8a
State each receiver rule once in its docs
czarcas7ic 1aef482
Merge the dynamic IVK safety fixes
czarcas7ic 90e32de
Merge the no-orchard storage guard
czarcas7ic a099889
Merge the low-level no-orchard guard
czarcas7ic d0648b5
Merge the one-time IVK slot-filling rename
czarcas7ic 60d1208
Rename dynamic IVKs to one-time IVKs in the PIR receiver
czarcas7ic 9bce1c0
Merge the SQLite one-time IVK restructure
czarcas7ic e3a8f7b
Run receiver sweeps over the one-time IVK restore traits
czarcas7ic 8673c1a
List the receiver PIR lane in the development guide
czarcas7ic d85f053
Merge the pruning guard and restructure fixes
czarcas7ic 4bb7f4a
Merge the NEAR Intents adapter crate
czarcas7ic 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,16 @@ | ||
| # Changelog | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
|
|
||
| - `sweep`, behind the `wallet` feature, which runs a restored wallet's | ||
| receiver-directory sweeps of its dynamic keys for any store implementing the | ||
| backend's `DynamicIvkWrite`, with `Transport`, `NoteSource`, `EnhanceNotes`, `WriteLock`, | ||
| `Swept`, `Error` and `MAINNET_GENESIS`. It reads a publication's labeled filter | ||
| sets `paid` and each provider's `seen`. The receiver PIR client moved here from | ||
| Vizor. | ||
| - `fetch_seen` and `Seen`: a publication's swap provider seen sets, which a wallet | ||
| checks before issuing a swap address. A publication in which a provider with sets | ||
| lacks a dated seen set is malformed, for `fetch_seen` and `sweep` alike. They need | ||
| no `wallet` feature. |
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,46 @@ | ||
| [package] | ||
| name = "zakura-pir-receiver" | ||
| version = "0.0.1-rc0" | ||
| publish = false | ||
| description = "Restore sweeps of dynamic IVKs through a receiver directory over PIR" | ||
| edition.workspace = true | ||
| rust-version.workspace = true | ||
| license.workspace = true | ||
| repository.workspace = true | ||
| readme = "README.md" | ||
|
|
||
| [features] | ||
| default = [] | ||
| ## The restore sweep, over a wallet store's dynamic IVK traits. | ||
| wallet = ["dep:futures-util", "dep:thiserror", "dep:zakura-pir-enhance", "dep:zakura-dynamic-ivk", "dep:zcash_client_backend", "dep:zcash_protocol"] | ||
|
|
||
| [dependencies] | ||
| futures-util = { version = "0.3", optional = true } | ||
| thiserror = { version = "2", optional = true } | ||
| zakura-pir-enhance = { version = "=0.0.1-rc1", path = "../pir-enhance", features = ["wallet"], optional = true } | ||
| zakura-dynamic-ivk = { version = "=0.0.1-rc0", path = "../dynamic-ivk", optional = true } | ||
| zcash_client_backend = { workspace = true, features = ["orchard"], optional = true } | ||
| zcash_protocol = { workspace = true, optional = true } | ||
| # The receiver crates come from wallet-pir's `main`. | ||
| receiver-directory = { git = "https://github.com/valargroup/wallet-pir", rev = "0d6ad4aa94abbb2838d4182c869f06e1881e6c35" } | ||
| receiver-pir = { git = "https://github.com/valargroup/wallet-pir", rev = "0d6ad4aa94abbb2838d4182c869f06e1881e6c35" } | ||
|
|
||
| [dev-dependencies] | ||
| axum = "0.7" | ||
| base64.workspace = true | ||
| hex.workspace = true | ||
| orchard.workspace = true | ||
| receiver-pir = { git = "https://github.com/valargroup/wallet-pir", rev = "0d6ad4aa94abbb2838d4182c869f06e1881e6c35", features = ["server"] } | ||
| receiver-pir-server = { git = "https://github.com/valargroup/wallet-pir", rev = "0d6ad4aa94abbb2838d4182c869f06e1881e6c35" } | ||
| serde_json.workspace = true | ||
| sha2.workspace = true | ||
| tokio = { workspace = true, features = ["macros", "rt"] } | ||
| tower = { workspace = true, features = ["util"] } | ||
| zcash_client_backend = { workspace = true, features = ["orchard", "test-dependencies"] } | ||
| zcash_client_sqlite = { path = "../../librustzcash/zcash_client_sqlite", package = "zakura-client-sqlite", features = ["orchard", "test-dependencies"] } | ||
| zcash_note_encryption.workspace = true | ||
| zcash_primitives.workspace = true | ||
|
|
||
| [[test]] | ||
| name = "sweep" | ||
| required-features = ["wallet"] | ||
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.
When receiver and transparent PIR are enabled together, these new
0d6ad4aadependencies coexist with the06a972dbpins inzakura/pir-transparent/Cargo.toml:36-42;Cargo.lockconsequently contains two source-distinct copies ofpir-native0.1.0, plus duplicatepir-controlandpir-observabilityin all-target builds. The graph verifier misses this because it collapses packages by name and version rather than source, so combined consumers compile two implementations and updates can silently diverge. Move the wallet-pir family to one shared revision.AGENTS.md reference: AGENTS.md:L43-L46
Useful? React with 👍 / 👎.