Expand description
ZYNC Core - Zero-knowledge sYNChronization for Zcash
Cross-platform wallet core using Crux architecture. This crate contains all business logic shared across platforms:
- Desktop (egui)
- Android (Jetpack Compose)
- iOS (SwiftUI)
- Web (WASM)
Key features:
- WASM-compatible parallel note scanning
- Ligerito-powered header chain verification
- Epoch-based proof composition
Re-exports§
pub use app::ZafuCore;pub use app::Event;pub use app::Model;pub use app::ViewModel;pub use app::Effect;pub use app::Contact;pub use app::ChatMessage;pub use error::ZyncError;pub use error::Result;pub use state::WalletState;pub use state::WalletStateCommitment;pub use scanner::Scanner;pub use scanner::BatchScanner;pub use scanner::ScanAction;pub use scanner::DecryptedNote;pub use client::ZidecarClient;pub use client::LightwalletdClient;
Modules§
- app
- Crux App - cross-platform wallet core
- client
- gRPC clients for Zcash light wallet services
- error
- error types for zync
- scanner
- WASM-compatible parallel note scanner for Orchard
- state
- wallet state types and sparse merkle tree operations
- trustless
- Trustless state verification for secure light clients
- verifier
- ligerito proof verification with continuity checking
Structs§
- Incoming
Viewing Key - A key that provides the capability to detect and decrypt incoming notes from the block chain, without being able to spend the notes or detect when they are spent.
- Orchard
Fvk - A key that provides the capability to view incoming and outgoing transactions.
- Spending
Key - A spending key, from which all key material is derived.
- Wallet
Id - wallet identifier (random 16 bytes)
Enums§
- Scope
- The scope of a viewing key or address.
Constants§
- DOMAIN_
EPOCH_ PROOF - domain separator for epoch proof hash
- DOMAIN_
IVK_ COMMIT - domain separator for ivk commitment
- DOMAIN_
WALLET_ STATE - domain separator for wallet state commitment
- EMPTY_
SMT_ ROOT - empty sparse merkle tree root
- EPOCH_
SIZE - blocks per epoch (~21 hours at 75s/block)
- FIELDS_
PER_ ACTION - fields encoded per action in trace polynomial
- GENESIS_
EPOCH_ HASH - genesis epoch hash (all zeros)
- GIGAPROOF_
TRACE_ LOG_ SIZE - polynomial size exponent for gigaproofs (2^26 config)
- MAX_
ACTIONS_ PER_ BLOCK - max orchard actions per block
- ORCHARD_
ACTIVATION_ HEIGHT - orchard activation height (mainnet)
- ORCHARD_
ACTIVATION_ HEIGHT_ TESTNET - orchard activation height (testnet)
- SECURITY_
BITS - security parameter (bits)
- TIP_
TRACE_ LOG_ SIZE - polynomial size exponent for tip proofs (2^20 config, max ~32K headers)
Functions§
- epoch_
end - helper: get end height of epoch (inclusive)
- epoch_
for_ height - helper: calculate epoch number from block height
- epoch_
start - helper: get start height of epoch
- gigaproof_
prover_ config - ligerito prover config for gigaproofs (2^26, ~10s, multi-epoch)
- gigaproof_
verifier_ config - ligerito verifier config for gigaproofs (2^28)
- prover_
config_ for_ size - select the appropriate prover config for a given trace size returns (config, required_trace_size) - trace must be padded to required_trace_size
- tip_
prover_ config - ligerito prover config for tip proofs (2^20, ~0.1s, max ~32K blocks)
- tip_
verifier_ config - ligerito verifier config for tip proofs (2^24)
- verifier_
config_ for_ log_ size - select the appropriate verifier config for a given log size