rust-zkp
A minimal ZK-Rollup hand-built in Rust — cryptographic primitives, mini state machine, and an HTTP backend. No SNARK frameworks; every layer composed from scratch.
What this demonstrates
ZKP primitives from scratch
Pedersen commitments, Sigma + Fiat–Shamir, binary bit proofs, range via bit decomposition, then Merkle membership before the rollup demos.
Mini rollup
Account state, signed transactions with replay protection, atomic batch processing, sled-backed persistence with atomic writes.
Production-style Rust backend
axum HTTP server, MPSC mempool, background batch builder, structured logging via tracing, custom error responses, CORS, full CI/CD.
Browser-side cryptography
Same Rust crypto compiled to WebAssembly. Sign a transaction in the browser, post to the deployed API, watch it get batched and applied.
Stack
num-bigint, sha2 ·
axum, tokio, tower-http ·
tracing ·
sled, bincode ·
clap, reqwest ·
wasm-bindgen, wasm-pack ·
rayon ·
Astro 4 ·
Docker · Render · GitHub Pages · GitHub Actions
Approach
Most ZKP tutorials show toy code or jump straight to SNARK frameworks. This project sits in the middle: build every primitive yourself, compose them into a working system, and understand why each piece exists.
The cryptography is intentionally simplified — small primes instead of elliptic curves, direct verification instead of SNARKs — to keep the focus on architecture and protocol design. The full picture of what's production-grade and what's not is in this note.
Built end-to-end as a learning project: ZKP exercises → rollup composition → backend → WASM playground → deployment. Notes for each layer are in the Notes section.