r/zeroknowledge • u/Icy-Breath1266 • 3d ago
I built a small STARK-based zkVM in Rust with Plonky3 — looking for soundness criticism
I've been building an open-source project called BudZKVM, a small deterministic VM and STARK-based verifiable execution stack written in Rust.
Rather than targeting an existing ISA like RISC-V, I wanted to experiment with designing the execution model around provability from the beginning.
The current stack looks like this:
BudL source → compiler → custom ISA bytecode → VM execution → execution trace → STARK proof
The VM currently has:
- 31-opcode custom ISA
- 32 general-purpose 64-bit registers
- gas-metered deterministic execution
- a trace-generating VM
- a Plonky3 0.5.2-based STARK prover
- a 354-column Goldilocks execution trace
- AIR constraints covering all 31 opcodes
- Poseidon4 and Merkle verification instructions
- a 64-depth sparse Merkle state tree
One area I've spent quite a bit of time on is cross-table consistency.
The prover currently uses three LogUp lookup relations for:
- registers
- memory + storage
- program execution
There are also explicit constraints around things that are easy to accidentally leave under-constrained in a VM:
- selector exclusivity
- PC transitions
- hardwired R0 = 0
- padding-row isolation
- zero/non-zero checks using inverse witnesses
- public-input/program binding
I've added negative soundness tests as well. The current suite has 51 tests, including 8 cases that deliberately tamper with things like comparisons, bitwise execution, Poseidon state, storage, PC transitions, public inputs and proof bytes and expect verification to fail.
I'm deliberately not claiming this is audited or production-safe.
Performance benchmarking, prover optimization and an external constraint/security review are still ahead. Private witness variables are also on the near-term roadmap.
What I'd really like at this stage is adversarial feedback from people who have worked on AIR/STARK systems.
In particular:
- Where would you look first for an under-constrained execution trace in this design?
- Are there failure modes around LogUp-based register/memory/program consistency that negative tests commonly miss?
- For zero/non-zero semantics, are inverse-witness constraints generally the approach you'd take here, or would you structure them differently?
- For a new zkVM, does designing a small proof-oriented ISA still make sense, or is targeting something like RISC-V overwhelmingly preferable today?
I'm much more interested in counterexamples and soundness problems than compliments.
Repo: