Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions zips/draft-lowo88-deterministic-orchard-scanning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
ZIP: unassigned
Title: Deterministic Orchard Wallet Scanning Standard
Owners: Lowo88 <lowo88@leoninedao.org>
Status: Draft
Category: Standards Track
Created: 2026-01-16
License: MIT

# Abstract

This ZIP specifies a standard algorithm for deterministic scanning of Orchard
notes in Zcash wallets. The specification ensures that wallet implementations
produce identical results when scanning the same block range, regardless of
implementation details, scan order, or timing.

# Motivation

Current Zcash wallet implementations lack a standardized approach to scanning
Orchard notes. This leads to several critical issues:

**Non-Deterministic Results**: Different wallets may produce different results
when scanning the same block range.
Comment on lines +21 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect. The state of the wallet is a function of the contents of the blockchain; the order of scanning is irrelevant (modulo implementation bugs.)


**Inconsistent Wallet State**: Wallet restores may produce different results.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue, this is also flatly incorrect.


**Interoperability Issues**: Users cannot reliably switch between wallet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interoperability concerns are the purview of ZIP 315. If there are specific standards required for interoperability (such as standards around key handling), I would recommend that you suggest them there.

implementations.

# Specification

The deterministic scanning algorithm processes blocks in strict sequential order
by height, processes transactions within each block in deterministic order,
and processes Orchard actions within each transaction in deterministic order.

## Key Requirements

1. **Block Processing Order**: Blocks MUST be processed in ascending height order
2. **Transaction Processing Order**: Transactions processed by index within block
3. **Action Processing Order**: Actions processed by index within transaction
4. **Scope Order**: External scope actions before Internal scope actions
5. **Deduplication**: First occurrence kept when duplicates found

# References

- ZIP 32: Shielded Hierarchical Deterministic Wallets
- ZIP 224: Orchard
- ZIP 316: Unified Addresses