Crate zync_core

Crate zync_core 

Source
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§

error
error types for zync
state
wallet state types and sparse merkle tree operations

Structs§

WalletId
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