Introduction
Following our preliminary exploration of zkVM in previous blog posts, we conducted a series of tests to identify the most suitable zkVM for Nescience's architecture. This report details our testing methodology, results, and conclusions. The complete test suite and scripts are available on our GitHub repository for reproducibility. Notably, we excluded hardware acceleration from benchmarks to ensure accessibility for a broad audience.
Tested zkVMs:
- SP1 - High-performance open-source zkVM leveraging Plonky3
- RISC0 - RISC-V-based zkVM with STARK proofs
- Nexus - Modular zkVM using Nova folding scheme
- ZkMIPS - MIPS-based verifiable computation infrastructure
- ZkWASM - WASM-compatible zkVM
- Valida - STARK-based VM emphasizing proof performance
Selection Criteria
We prioritized zkVMs demonstrating:
- True zero-knowledge capabilities
- Documented performance benchmarks
- Support for lookup tables, precompiles, and recursion
Testing Methodology
Stage 1: Arithmetic Operations
Evaluated basic arithmetic computations using heptagonal number calculations:
- Addition/subtraction
- Multiplication/division
- Modulo/square roots
Stage 2: Memory Management
Assessed memory handling under load with various data structures:
- Insert/delete operations
- Appending/searching
- Memory allocation patterns
Results Overview
| zkVM | Proof Time (Stage 1) | Proof Size (Stage 1) | RAM Consumption (Peak) |
|---|---|---|---|
| SP1 | 16.95s | 3.108MB | 2.1GB |
| RISC0 | 9.73s | 217.4KB | 1.9GB |
| Nexus | 12.06s | 46MB | 9.7MB |
| ZkMIPS | 9.32s | 4.3MB | 17.3GB |
| ZkWASM | 42.7s | 18KB | 8.2GB |
| Valida | <1s | 280KB | N/A |
Key Findings
RISC0 emerged as the top performer:
- Fastest proof generation (9.73s)
- Compact proofs (217.4KB)
- Stable memory management (<2.3GB RAM)
Valida showed promise but has Rust compatibility limitations:
- Sub-second proof times
- Currently unsuitable for complex memory operations
- SP1 lacked zero-knowledge capabilities despite decent performance
- ZkMIPS suffered from significant memory leaks (6.9GB in Stage 2)
- ZkWASM had prohibitive RAM requirements (up to 58.8GB)
Conclusion
๐ RISC0 stands as the optimal choice for Nescience's requirements, offering the best balance of performance, proof compactness, and memory efficiency. We recommend its adoption while monitoring Valida's development as a potential future alternative.
FAQs
Q: Why exclude hardware acceleration?
A: To ensure broad accessibility - we cannot assume users have specialized hardware like AVX512-capable CPUs.
Q: Will you retest Valida later?
A: Yes. We'll reevaluate once its Rust support matures and memory operations become testable.
Q: How can I reproduce these results?
A: All test scripts and configurations are available on our GitHub repository.
Q: What makes RISC0 better than alternatives?
A: Its combination of fast proof generation, small proof sizes, and efficient memory usage outperformed other candidates in our tests.
References
[1] Original zkVM exploration: Article Link
[2] Nescience architecture: Technical Details
[3] Full test suite: GitHub Repository
๐ Join the discussion about zkVM selection and share your insights!