Skip to content

nullifier PIR integration#8

Closed
p0mvn wants to merge 368 commits into
sync-mainfrom
sync-pir
Closed

nullifier PIR integration#8
p0mvn wants to merge 368 commits into
sync-mainfrom
sync-pir

Conversation

@p0mvn
Copy link
Copy Markdown

@p0mvn p0mvn commented Apr 3, 2026

nuttycom and others added 30 commits December 17, 2025 18:33
Fix a mis-merge in the `zcash_transparent` CHANGELOG
zcash_client_backend: Don't rebuild protobufs on Windows
`zcash_keys/std` now implies `orchard?/std`, `sapling?/std`,
`transparent/std`, and `zcash_address/std`. In addition, downstream
crates of `zcash_keys` within this workspace now must explicitly
enable `zcash_keys/std` if its features are required.
This trait is introduced in order to make it possible to implement
`ChangeStrategy` for a type where the `fetch_wallet_meta` method
provably ignores its `meta_source` argument. This is useful for
circumstances when no input source is available.
In order to use zcash_client_backend::fees::ChangeStrategy when
preparing a spend of transparent coins, it is necessary to be able to
accurately compute fees. At present, the fee computation logic in
`zcash_client_backend` only functions in the context of spending p2pkh
inputs. Instead of reimplementing script size computation externally,
this commit exposes enough information from the `zcash_transparent`
builder to enable the script size computation used by the builder to
also be used externally.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
…rnal_usability

Make `ChangeStrategy` values usable outside of the context of `zcash_client_backend`
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.1.2 to 7.2.0.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@8585678...61cb8a9)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [EmbarkStudios/cargo-deny-action](https://github.com/embarkstudios/cargo-deny-action) from 2.0.14 to 2.0.15.
- [Release notes](https://github.com/embarkstudios/cargo-deny-action/releases)
- [Commits](EmbarkStudios/cargo-deny-action@76cd80e...3fd3802)

---
updated-dependencies:
- dependency-name: EmbarkStudios/cargo-deny-action
  dependency-version: 2.0.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jack Grigg <jack@electriccoin.co>
`zcash_keys`: Fix missing `std` feature dependencies.
…ting

fix: Fix cargo-vet store format errors
cargo-doc was failing due to doc references to modules behind feature
gates. This commit enables all features when building docs for the
gitbook.
The 'prepare' action forgets to collect the output from the
`prepare-all` step, causing the `--all-features` flag to get lost.
Test was failing due to a type mismatch:

```
error[E0308]: mismatched types
   --> zcash_primitives/src/transaction/tests.rs:410:29
    |
410 |             .map(|s| Script(s.clone()))
    |                      ------ ^^^^^^^^^ expected `Code`, found `Vec<u8>`
    |                      |
    |                      arguments to this struct are incorrect
    |
    = note: expected struct `Code`
               found struct `Vec<u8>`
```
nuttycom and others added 22 commits March 30, 2026 08:27
…canned.

This tests the scenario where the wallet has been truncated to an
earlier chain state (for example, when adding an account with an earlier
birthday) and then truncate_to_chain_state is called again with a
*greater* height, such that a discontinuity would be introduced in the
subtree roots by the chain state insertion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…anned height.

`Shardtree` will return an error if insertion results in a discontinuity
in subtree roots. When adding an account after truncation, this can
cause the insertion to fail.
zcash_client_sqlite: Allow truncate_to_chain_state to truncate to an unscanned block height.
…ements

zcash_client_backend: Add data_api::Account::birthday_height
…tionally`

This enables amortizing the database transaction overhead, which gives a
significant performance boost to repeated operations. For example, in
Zallet this reduces the time to make 200 `WalletWrite::store_decrypted_tx`
calls from 28s to 11s on my development machine.
Apparently we weren't relying on accessing them outside this module, and
this is better for ensuring it is used correctly.
zcash_client_sqlite: Enable `WalletWrite` calls in `WalletDb::transactionally`
Add documentation for all public items that were missing doc comments
and enable the missing_docs lint to prevent undocumented APIs from
being merged in future.

Closes zcash#491

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…deny-missing-docs

feat(zcash_client_sqlite): enable #![deny(missing_docs)]
…tions/deploy-pages-5.0.0

build(deps): bump actions/deploy-pages from 4.0.5 to 5.0.0
…iki-e/install-action-2.70.2

build(deps): bump taiki-e/install-action from 2.68.9 to 2.70.2
…zmorcore/zizmor-action-0.5.2

build(deps): bump zizmorcore/zizmor-action from 0.5.0 to 0.5.2
Kinda surprised we didn't add this sooner tbh.
zcash_primitives: Add `Block` struct
@p0mvn p0mvn changed the title PIR integration nullifier PIR integration Apr 3, 2026
p0mvn added a commit to valargroup/zcash-swift-wallet-sdk that referenced this pull request Apr 3, 2026
librustzcash pinned to valargroup/librustzcash#8 head (77ac387),
sync-nullifier-pir pinned to valargroup/sync-nullifier-pir main (ab81f98).
Adds sync-nullifier-pir feature flag and spend-client/spend-types deps.

Made-with: Cursor
p0mvn pushed a commit that referenced this pull request Apr 3, 2026
…14868de..23f0768ea

23f0768ea Release lightwallet-protocol v0.4.0
41156c767 Merge pull request #11 from zcash/feature/get_mempool_tx_pools
7c130e883 Add `lightwalletProtocolVersion` field to `LightdInfo` struct.
edbb726d7 Apply suggestion from code review
38fddd73b Apply suggestions from code review
0250f2720 Add pool type filtering to `GetMempoolTx` argument.
54ccaadd5 Change semantics of pool-based pruning of compact transactions from "may prune" to "must prune".
b0667ec99 Merge pull request #9 from zcash/2025-11-doc-TransparentAddressBlockFilter
f3fea7bd4 doc: TransparentAddressBlockFilter doesn't include mempool
a67dd323a Merge pull request #8 from zcash/2025-11-lightdinfo-upgrade-info
11da4b7e3 add next upgrade info to LightdInfo structure (GetLightdInfo)
42cd8f720 Transparent data docs update (#7)
c0cf957ac Merge pull request #5 from zcash/2025-11-comments
912fc3609 Minor clarification in GetBlockRange documentation.
6b03f2cce Documentation (comments) only
d978256a2 Merge pull request #1 from zcash/compact_tx_transparent
7eeb82e7c Merge pull request #4 from zcash/add_changelog
a95359dc9 Apply suggestions from code review
592b637a8 Add transparent data to the `CompactBlock` format.
9d1fb2c41 Add a CHANGELOG.md that documents the evolution of the light client protocol.
180717dfa Merge pull request #3 from zcash/merge_librustzcash_history
450bd4181 Merge the history of the .proto files from `librustzcash` for complete history preservation.
a4859d11d Move protobuf files into place for use in `zcash/lightwallet-protocol`
2e66cdd9e Update zcash_client_backend/proto/service.proto
eda012519 fix comment
f838d10ad Add gRPC LightdInfo Donation Address
db12c0415 Merge pull request zcash#1473 from nuttycom/wallet/enrichment_queue
698feba96 Apply suggestions from code review
20ce57ab3 zcash_client_backend: Add `block_height` argument to `decrypt_and_store_transaction`
a6dea1da8 Merge pull request zcash#1482 from zancas/doc_tweak
4d2d45fc9 fix incorrect doc-comment
e826f4740 update CompactBlock doc-comment, to cover non-Sapling shielded notes, and addresses
e9a6c00bf Various documentation improvements
988bc7214 Merge pull request zcash#872 from nuttycom/feature/pre_dag_sync-suggest_scan_ranges
58d07d469 Implement `suggest_scan_ranges` and `update_chain_tip`
a9222b338 Address comments from code review.
e20310857 Rename proto::compact::{BlockMetadata => ChainMetadata}
ac63418c5 Reorganize Sapling and Orchard note commitment tree sizes in CompactBlock.
0fdca14f1 zcash_client_backend: Add note commitment tree sizes to `CompactBlock` serialization.
2a0c2b8b7 zcash_client_backend: Add gRPC bindings behind feature flag
1342f0480 zcash_client_backend: Address compact_formats.proto comments
68aa4e01b zcash_client_backend: Bring in latest `compact_formats.proto`
e712eb1bc Add prevHash field to CompactBlock
440384c3e Build protobufs for compact formats

git-subtree-dir: zcash_client_backend/lightwallet-protocol
git-subtree-split: 23f0768ea4471b63285f3c0e9b6fbb361674aa2b
Nullifier PIR (Private Information Retrieval) lets the wallet discover
Orchard note spendability by querying an external PIR server for
nullifier inclusion, rather than waiting for sequential shard-tree
scanning to complete. This significantly reduces the time before
notes become spendable.

The implementation is gated behind the `sync-nullifier-pir` feature
flag and comprises:

- A `pir_spent_notes` table (migration created unconditionally to keep
  the DAG identical across all builds; empty when the feature is off).
- A `wallet::pir` module with queries for unspent notes eligible for
  PIR checking, pending-spend tracking, and idempotent insert logic.
- Feature-gated changes to `get_wallet_summary` and note selection
  that skip the unscanned-range spendability gate for Orchard notes
  when PIR is enabled.
- Unconditional `pir_spent_notes` cleanup in `truncate_to_height` to
  prevent stale exclusions from persisting after reorgs.

Made-with: Cursor
@p0mvn
Copy link
Copy Markdown
Author

p0mvn commented Apr 3, 2026

Superseded by a new PR from sync-pir-0.19.x with clean history.

@p0mvn p0mvn closed this Apr 3, 2026
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.

8 participants