Implementing zk-STARKs from scratch in Rust (AIR + FRI)
Hey everyone,
I’ve been working on a personal project where I tried to build a small experimental blockchain from scratch, mainly to explore cryptography and systems design.
The Rust part is a custom zk-STARK implementation (AIR + FRI) that I wrote from scratch and then integrated into a working chain.
Some of the things in the project:
– zk-STARK system in Rust (custom AIR over Goldilocks field, Rescue-Prime)
– proof generation + verification (\~22 ms / \~0.6 ms)
– PyO3 bindings to connect it to a Python chain
– shielded transactions with a STARK-based privacy layer
– full chain replay that re-verifies proofs
– simple P2P gossip network
This is NOT production-ready (no persistence, no DoS protection, no audits, etc.) — it’s purely a learning / research project.
The most interesting part for me was:
– designing the AIR constraints
– getting the STARK pipeline working end-to-end
– integrating proof verification into the blockchain state machine
I’d really appreciate feedback, especially from people with Rust / crypto experience:
– Does the AIR design approach make sense?
– Any obvious performance issues or bad patterns?
– How would you structure this differently in Rust?
Repo / demo: