Skip to main content

Crate zync_core

Crate zync_core 

Source
Expand description

ZYNC Core - Zcash light client primitives

Shared library for zcash light client verification and scanning:

  • Ligerito header chain verification
  • NOMT state proof verification
  • Orchard note trial decryption
  • gRPC client for zidecar/lightwalletd

Re-exports§

pub use error::Result;
pub use error::ZyncError;
pub use scanner::BatchScanner;
pub use scanner::DecryptedNote;
pub use scanner::ScanAction;
pub use scanner::Scanner;
pub use client::LightwalletdClient;
pub use client::ZidecarClient;

Modules§

actions
Actions merkle root computation and running commitment chain.
client
gRPC clients for Zcash light wallet services
error
error types for zync
nomt
NOMT proof verification primitives shared between zcli and zidecar.
scanner
WASM-compatible parallel note scanner for Orchard
verifier
ligerito proof verification with continuity checking

Structs§

IncomingViewingKey
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.
OrchardFvk
A key that provides the capability to view incoming and outgoing transactions.
SpendingKey
A spending key, from which all key material is derived.

Enums§

Scope
The scope of a viewing key or address.

Constants§

ACTIVATION_HASH_MAINNET
orchard activation block hash (mainnet, LE internal order)
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_PROOF_TRACE_LOG_SIZE
polynomial size exponent for epoch proofs (2^26 config)
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)
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_proof_prover_config
ligerito prover config for epoch proofs (2^26)
epoch_start
helper: get start height of epoch
prover_config_for_size
select the appropriate prover config for a given trace size
tip_prover_config
ligerito prover config for tip proofs (2^20)
verifier_config_for_log_size
select the appropriate verifier config for a given log size