# Private queries on Zcash

A compact-block scan finds shielded ZEC payments on your device. To fill in missing details, the wallet sometimes needs a particular transaction or the history of a transparent address. The experimental **Settings → Private queries** option uses *private information retrieval* (PIR) for supported Zcash lookups. The wallet encodes its selection so the server can answer without receiving the raw transaction ID or transparent address. [How Veylor recovers transaction details](https://github.com/ChinmayGopal931/vizor-fork/blob/d2a6430e9cfac488dc685c4b13cd62a591908ad9/rust/src/wallet/sync_engine/enhancement/README.md)

| During Zcash sync | What the service can learn |
| --- | --- |
| Download compact blocks | Your Zcash server sees the block ranges you download. Your device checks locally for shielded notes. |
| Use Private queries | The PIR service sees the block range, request size and timing. For some transaction details it also sees which group of records contains the answer. Repeated requests for the same group can narrow down the possibilities. |
| Turn off Private queries | Veylor rebuilds transparent history through public lookups. The Zcash server receives the accounts’ transparent addresses and transaction IDs found by private recovery, which it can associate with each other. |

If a private lookup fails, the wallet can leave details pending. A service failure alone never authorizes sending that private lookup in the clear. The setting applies to Zcash. For 0zkUSDC, Veylor finds notes by scanning Railgun pool data and uses a separate service for screening. [Railgun wallet sync](https://docs.veylor.cash/concepts/wallet-sync/) · [Screening requests](https://docs.veylor.cash/concepts/proof-service/)

## What does Tor change?

PIR protects the record you select. Tor protects the source IP on a routed connection. With Tor and Private queries enabled, a large Zcash sync can fetch bulk compact blocks directly. The Zcash server then sees your IP and the block ranges being downloaded. Requests carrying an address, transaction ID or transaction in that sync stay on Tor. [Veylor’s Zcash connection rules](https://github.com/ChinmayGopal931/vizor-fork/blob/d2a6430e9cfac488dc685c4b13cd62a591908ad9/docs/sync.md#sync-engine-rust-only)
