Expand description
ZYNC Core - Zero-knowledge sYNChronization for Zcash
core types and logic for ligerito-powered wallet sync
Re-exports§
pub use error::ZyncError;pub use error::Result;pub use state::WalletState;pub use state::WalletStateCommitment;
Modules§
Structs§
- Wallet
Id - wallet identifier (random 16 bytes)
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^28 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^24 config)
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^28, ~25s, 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^24, ~1.3s, max 1024 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