zkVM Performance Evaluation: A Comprehensive Testing Report

·

In our ongoing research into zero-knowledge virtual machines (zkVMs), we conducted a series of rigorous tests to identify the most suitable solution for the Nescience architecture. This article presents our testing methodology, results, and conclusions while maintaining the original technical depth and analytical perspective.

Introduction

Following our initial exploration of zkVM technologies, we designed a systematic evaluation process to assess multiple candidates against our specific requirements. The testing focused on performance metrics, memory management, and practical usability factors that are critical for real-world implementation.

Why These Specific Candidates?

Our selection process prioritized several key factors:

The selected candidates represent the most promising solutions currently available in the zkVM ecosystem.

Tested zkVM Platforms

We evaluated six prominent zkVM solutions:

  1. SP1: A high-performance open-source zkVM capable of verifying arbitrary Rust programs using Plonky3 with support for recursive proofs
  2. RISC0: Based on RISC-V architecture, utilizing STARKs with 98-bit security level and supporting multiple programming languages
  3. Nexus: A modular, scalable open-source zkVM using Nova folding scheme, particularly suited for recursive proofs
  4. ZkMIPS: A general-purpose verifiable computation infrastructure based on Plonky2 and MIPS microarchitecture
  5. ZkWASM: Supports unmodified standard WASM bytecode specification, providing flexibility for various language support
  6. Valida: A STARK-based virtual machine designed for code reuse and maximum prover performance

Testing Methodology

We implemented a two-phase testing process to comprehensively evaluate each zkVM:

Phase 1: Arithmetic Operations

This initial phase assessed each zkVM's ability to handle fundamental arithmetic operations: addition, subtraction, multiplication, division, modulus operations, and square root calculations. We designed tests around heptagonal number calculations, requiring zkVMs to process multiple arithmetic operations simultaneously. This approach allowed us to measure efficiency and speed when handling complex mathematical computations.

Phase 2: Memory Consumption Assessment

The second phase evaluated each zkVM's memory management capabilities under heavy load conditions. We tested various data structures including lists, hash maps, deques, queues, BTreeMaps, hash sets, and binary heaps. Each zkVM underwent testing for:

This phase aimed to identify potential memory bottlenecks and determine each zkVM's ability to manage intensive tasks efficiently.

Hardware Configuration

All testing was conducted on identical hardware specifications:

Detailed Results Analysis

SP1 Performance Assessment

SP1 delivered respectable performance despite lacking native zero-knowledge capabilities in its proofs. Memory leakage remained minimal, staying below 700 KB. Interestingly, SP1 consumed more RAM during basic arithmetic tests than during memory allocation tests, demonstrating effective memory handling under load.

Phase 1 - Hept 100 Test:

Phase 2 - Vec 10000 Test:

RISC0 Performance Assessment

RISC0 excelled in both proof size and generation time, ranking among the top performers (except when compared to Valida and zkWASM in basic tests). Its memory management proved excellent with minimal leakage below 0.5 MB and controlled RAM consumption under 2.2 GB.

Phase 1 - Hept 100 Test:

Phase 2 - Vec 10000 Test:

Based on these results, RISC0 emerged as a strong candidate for Nescience implementation.

Nexus Performance Assessment

Nexus provided interesting insights into zkVMs based on folding schemes. Surprisingly, proof sizes remained consistent across different workloads with no significant memory leakage (below 700 KB). However, despite slightly increased RAM consumption under higher workloads (peaking at 1.2 GB), Nexus performed poorly in memory allocation tests.

Phase 1 - Hept 100 Test:

Phase 2 - Vec 10000 Test:

ZkMIPS Performance Assessment

ZkMIPS presented a mixed performance profile. While it demonstrated good proof sizes and generation times in basic tests, this came at the cost of significant RAM usage and memory leakage. Memory allocation tests revealed concerning 6.7 GB memory leakage, with 0.5 GB leakage in basic tests.

Phase 1 - Hept 100 Test:

Phase 2 - Vec 10000 Test:

ZkWASM Performance Assessment

ZkWASM delivered the poorest performance in both proof size and generation time across both phases. RAM consumption proved particularly excessive, exceeding 7 GB in basic tests and reaching 57 GB in memory allocation tests.

Phase 1 - Hept 100 Test:

Phase 2 - Vec 10000 Test:

Valida Performance Assessment

Valida demonstrated exceptional performance in proof generation speed and size, producing 280 KB proofs in less than 1 second. However, limited Rust support prevented comprehensive performance analysis. Valida currently uses an LLVM backend to compile Rust, converting LLVM IR to its C/C++ implementation, which causes errors with Rust-specific data structures or dependencies.

👉 Explore advanced zkVM implementation strategies

Comparative Results Summary

Phase 1 Performance Metrics

zkVMProof TimeProof SizePeak RAM ConsumptionMemory Leakage
SP116.95 s3.108 MB2.1 GB656.8 KB
RISC09.73 s217.4 KB1.9 GB470.5 KB
Nexus12.06 s46 MB9.7 MB646.5 KB
ZkMIPS9.32 s4.3 MB17.3 GB453.8 MB
ZkWASM42.7 s18 KB8.2 GB259.4 KB
Valida< 1 s280 KBN/AN/A

Phase 2 Performance Metrics

zkVMProof TimeProof SizePeak RAM ConsumptionMemory Leakage
SP120.85 s3.17 MB1.9 GB616 KB
RISC016.63 s217.4 KB2.3 GB485.3 KB
Nexus56 m46 MB1.9 GB616 KB
ZkMIPS42.57 s4.898 MB18.9 GB6.9 GB
ZkWASM323 s334 KB58.8 GB259.4 KB
ValidaN/AN/AN/AN/A

Conclusion and Recommendations

After extensive evaluation of six zkVM candidates, RISC0 emerged as the optimal choice for our requirements. It demonstrated excellent proof generation times and sizes while maintaining reasonable memory footprint. With robust zero-knowledge proof capabilities and support for multiple programming languages, it effectively meets our project needs for privacy, performance, and flexibility.

Valida shows significant potential for high proof performance but remains in early development stages with Rust integration issues. Current LLVM IR conversion limitations prevent handling complex memory interactions, making it unsuitable for immediate implementation. However, as development matures, Valida may become a strong alternative.

SP1, despite initial promise, failed to meet zero-knowledge proof requirements. Its satisfactory performance in arithmetic operations was overshadowed by lacking ZK capabilities, which are crucial for our privacy-first objectives.

Nexus showed consistent proof sizes and manageable memory usage but demonstrated poor performance in memory-intensive tasks. zkMIPS offered reasonable proof times but suffered from critical memory issues that cannot be overlooked. ZkWASM delivered the weakest overall results with excessive RAM consumption making it impractical for production use.

👉 Learn more about optimizing zero-knowledge proof systems

Frequently Asked Questions

What distinguishes zkVMs from traditional virtual machines?
zkVMs incorporate zero-knowledge proof capabilities that allow verification of computation correctness without revealing underlying data. This privacy-preserving feature enables trustless verification of execution results while maintaining data confidentiality, unlike traditional VMs that focus solely on execution without built-in privacy features.

How important is memory management in zkVM selection?
Memory management is critically important because inefficient memory handling can lead to performance bottlenecks and scalability issues. Our tests revealed significant variations in memory leakage and consumption patterns across different zkVMs, directly impacting their suitability for production environments with intensive computational requirements.

Why was RISC0 selected over other candidates?
RISC0 demonstrated the best balance of performance metrics including proof generation speed, proof size efficiency, and memory management. Its support for multiple programming languages and robust zero-knowledge capabilities made it the most suitable choice for our specific architecture requirements and future scalability needs.

Can these test results be replicated on different hardware?
While absolute performance numbers may vary across different hardware configurations, the relative performance differences between zkVM solutions should remain consistent. The testing methodology provides a framework for comparative evaluation regardless of specific hardware implementation.

What future developments might change these recommendations?
zkVM technology is rapidly evolving with ongoing improvements in proof systems, hardware acceleration support, and language compatibility. Valida's development progress particularly warrants monitoring, as it may become a strong contender once Rust integration issues are resolved and the platform matures further.

How does proof size impact practical implementation?
Smaller proof sizes reduce storage requirements and transmission costs, which is crucial for blockchain applications where on-chain storage is expensive. Proof generation time directly affects user experience and system throughput, making both metrics critical for practical deployment considerations.

Future Research Directions

We plan to compare RISC0 and SP1 with CUDA acceleration capabilities in future testing rounds. Ideally, more zkVM platforms will incorporate similar acceleration capabilities, enabling more comprehensive and equitable cross-platform comparisons. The continuous evolution of zkVM technology promises exciting developments in performance optimization and feature expansion.

The field of zero-knowledge virtual machines continues to advance rapidly, with new solutions and improvements emerging regularly. Our testing provides a snapshot of current capabilities while establishing a framework for ongoing evaluation as the technology matures and new contenders enter the space.