zkVM Testing Report: Evaluating Nescience's Zero-Knowledge Virtual Machine

ยท

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:

  1. SP1 - High-performance open-source zkVM leveraging Plonky3
  2. RISC0 - RISC-V-based zkVM with STARK proofs
  3. Nexus - Modular zkVM using Nova folding scheme
  4. ZkMIPS - MIPS-based verifiable computation infrastructure
  5. ZkWASM - WASM-compatible zkVM
  6. Valida - STARK-based VM emphasizing proof performance

Selection Criteria

We prioritized zkVMs demonstrating:

Testing Methodology

Stage 1: Arithmetic Operations

Evaluated basic arithmetic computations using heptagonal number calculations:

Stage 2: Memory Management

Assessed memory handling under load with various data structures:

Results Overview

zkVMProof Time (Stage 1)Proof Size (Stage 1)RAM Consumption (Peak)
SP116.95s3.108MB2.1GB
RISC09.73s217.4KB1.9GB
Nexus12.06s46MB9.7MB
ZkMIPS9.32s4.3MB17.3GB
ZkWASM42.7s18KB8.2GB
Valida<1s280KBN/A

Key Findings

  1. RISC0 emerged as the top performer:

    • Fastest proof generation (9.73s)
    • Compact proofs (217.4KB)
    • Stable memory management (<2.3GB RAM)
  2. Valida showed promise but has Rust compatibility limitations:

    • Sub-second proof times
    • Currently unsuitable for complex memory operations
  3. SP1 lacked zero-knowledge capabilities despite decent performance
  4. ZkMIPS suffered from significant memory leaks (6.9GB in Stage 2)
  5. 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!