Skip to content

zodl-inc/zcash_voting

 
 

Repository files navigation

zcash_voting

Client-side cryptographic library for Zcash shielded voting. Implements proof generation, vote construction, and tree synchronization for the Zally governance protocol.

Workspace Crates

Crate Description
zcash_voting Core library: ZKP delegation and vote proofs (Halo2), El Gamal encryption, governance PCZT construction, Merkle witness generation, SQLite round-state persistence
vote-commitment-tree Append-only Poseidon Merkle tree for Vote Authority Notes and Vote Commitments
vote-commitment-tree-client HTTP client and CLI for syncing the vote commitment tree from a chain node

Architecture

zcash_voting
├── vote-commitment-tree ──── imt-tree (vote-nullifier-pir)
├── vote-commitment-tree-client
├── pir-client (vote-nullifier-pir)
├── voting-circuits ── ZK delegation + vote proofs, orchard fork
└── librustzcash ───── pczt, zcash_keys, zcash_client_sqlite, ...

Building

cargo check                    # check all crates
cargo build -p zcash_voting   # build just the core library

The workspace depends on the private valargroup/voting-circuits repo. The .cargo/config.toml enables git-fetch-with-cli so your local git credentials are used automatically.

Dependency Strategy

This workspace uses [patch.crates-io] (in the root Cargo.toml) to override two dependency trees:

  • orchard 0.11 — Resolved from valargroup/voting-circuits, which bundles an orchard fork with public visibility for constants, spec, and a shared_primitives::spend_authority gadget.

  • librustzcash crates (pczt, zcash_keys, zcash_client_sqlite, etc.) — Resolved from valargroup/librustzcash branch valargroup/pczt-governance-extensions-0.11. Adds public getters and methods needed for governance PCZT construction and Merkle witness generation.

FFI

Mobile FFI bindings live in zcash-swift-wallet-sdk (hand-rolled C FFI + Swift wrappers). This repo is a pure Rust workspace.

License

TODO

About

Zcash shielded voting library — core protocol, proof generation, storage, and FFI bindings

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages