Author: miles Source: X, @Miles082510
Test Object
SP1 is a high-performance open source zkVM for verifying the execution of arbitrary Rust (or any LLVM-compiled language) programs. SP1 leverages Plonky3, supports recursive proofs and supports a variety of cryptographic algorithms, including ECC-based algorithms such as Groth16.
RISC0 zkVM allows proof of the correct execution of arbitrary Rust code. It is built on the RISC-V architecture and is inherently suitable for implementing standard cryptographic hash functions such as SHA-256 and ECDSA. RISC0 uses STARK, which provides a 98-bit security level. Since it is compatible with LLVM and WASM, it supports a variety of programming languages, including C and Rust.
Nexus is a modular, extensible, open source, highly parallelized, verifier-optimized, and contributor-friendly zkVM written in Rust. It focuses on performance and security, using the Nova folding scheme, which is particularly efficient for recursive proofs. Nexus also supports pre-compilation and targeted compilation, and provides C++ support in addition to Rust.
ZkMIPS is a general-purpose verifiable computation infrastructure based on the Plonky2 and MIPS microarchitectures, designed to enable Ethereum as a global settlement layer. It can also run arbitrary Rust code. Notably, zkMIPS is the only zkVM on this list that uses the MIPS opcode set.
ZkWASM follows and supports the standard WASM bytecode specification without modification. Since Rust code can be compiled to WASM bytecode, it is theoretically possible to run any Rust code on a zkWASM machine, providing flexibility and broad language support.
Valida is a STARK-based virtual machine with a RISC-inspired instruction set that simplifies the goals of traditional programming languages. A backend compiler is being developed to compile LLVM IR to Valida ISA, enabling verification of programs written in Rust, Go, C++, and other languages with almost zero changes to the source code.
Test Projects
Stage 1: Arithmetic Operations (Hept 100)The first stage focuses on evaluating the ability of zkVMs to handle basic arithmetic operations: addition, subtraction, multiplication, division, modular division, and square root calculations. We designed the test around Heptagonal numbers, which requires zkVMs to handle multiple arithmetic operations simultaneously
Stage 2: Memory Consumption (Vec 10000)The second stage evaluated each zkVM's ability to manage memory under heavy load. The purpose of this stage is to identify any memory bottlenecks and determine whether the zkVM can effectively manage high-intensity tasks. Several data structures were tested, including lists, hash maps, deques, queues, BTreeMaps, hash sets, and binary heaps. Each zkVM was tested with the following operations:
Insert: How fast can the zkVM add data to the structure?
Delete: Can the zkVM handle memory release efficiently?
Append: Can the zkVM grow data structures efficiently?
Research: How fast and efficient is the zkVM when retrieving stored data?
Test machine configuration
CPU: AMD EPYC 7713 "Milan" 64-core processor (128 threads total)
RAM: 600GiB DDR4 3200MHz ECC RAM, distributed across 16 DIMMs
Host OS: Proxmox 8.3
Hypervisor: KVM
Network layer: Open vSwitch
Machine model: Supermicro AS-2024US-TRT
Test results
Arithmetic operation (Hept 100) results:
center
Phase 1 Test Results
2. Memory Consumption (Vec 10000)
Phase 2 test results
Summary
RISC0 becomes the first choice. It performs well in both proof generation time and size while maintaining a reasonable memory footprint. With strong zero-knowledge proof capabilities and support for multiple programming languages, it meets the needs of privacy, performance, and flexibility. Its overall balance between performance and efficiency makes it the most viable zkVM at this stage.
Valida achieves impressive results in proof generation speed and size, with a proof size of 280 KB and a proof time of < 1 second. However, due to Valida's limited Rust support, analysis is not possible. Valida currently compiles Rust using the LLVM backend, transpiling LLVM IR to utilize its C/C++ implementation, which can cause errors when dealing with Rust-specific data structures or dependencies. Therefore, complex memory interactions cannot be tested, and it is not currently recommended to use Valida with Rust code
SP1, while initially interesting, failed to meet zero-knowledge proof requirements. Its performance in arithmetic operations is commendable, but not enough to justify further consideration given its lack of ZK capabilities
Nexus demonstrated consistent proof sizes and manageable memory usage, but it performed poorly during memory-intensive tasks, and its proof size (especially for larger workloads) disqualified it from being a top contender.
zkMIPS delivered solid proof times, but memory issues were too severe to allow
zkWASM had the worst results, struggling with both proof size and generation time. While it may support WASM bytecode, RAM consumption (up to 57 GB in the memory test) is excessive