Technical
Sep 4, 2024
HIGHLIGHTS
From day one, Lita has been committed to pushing the performance and usability of zero-knowledge proofs. We are here to make ZK truly universal. This is evident in how we designed Valida - our zero knowledge virtual machine.
We opted to build Valida from the ground up with a zk-optimized ISA for efficient zero-knowledge proving, and a compiler toolchain that enables any developer to leverage familiar tools and languages to integrate their application with Valida. We believe this to be the superior approach for creating a fast, performant, and truly accessible zkVM.
Today, we are proud to announce the alpha release of the Valida C Compiler Toolchain. Coupled with the Valida zkVM, developers can now execute and verify programs in Valida. This release represents more than just a technical milestone. It is a strategic advancement towards enabling cost-effective, large-scale applications of zkSTARKs and expanding the range of viable use cases.
Lita's compiler utilizes the powerful LLVM infrastructure, enabling the compilation of mainstream programming languages for the Valida zkVM. By adopting a common intermediate representation, we significantly streamline development by requiring only one backend for Valida for multiple frontend languages. This approach offers clear benefits in terms of versatility and coding efficiency.
The C Compiler toolchain and the Valida zkVM will allow developers to run and test programs on our VM. To showcase Valida's capabilities, we benchmarked it against RISC Zero, SP1, and Jolt.
Our performance comparison focused on two key metrics: User Time (CPU Efficiency) and Wall Clock Time, tested against programs performing SHA-256 and Fibonacci sequence computations.
We are pleased to present evidence that Valida holds significant advantages in both metrics compared to the aforementioned VMs. This superior performance underscores Lita’s promise of delivering industry-leading efficiency and speed.
Detailed reports can be found here.
User Time (CPU Efficiency) : The amount of computer time expended by the program code. For instance, if a program uses 5 cores for 5 seconds each, the user time is 25 seconds (5 cores x 5 seconds). User time is a crucial indicator of the energy consumed by the computation.
Wall Clock Time: This measures the actual elapsed time from the start to the end of the computation. In the same example, the wall clock time would be 5 seconds, regardless of the number of cores used. Wall clock time reflects the waiting time for users.
In summary, wall clock time focuses on user waiting time, while user time emphasizes the energy and cost efficiency of running the computation. Lowering both metrics benefits users by providing faster results and reducing overheads.
As part of our commitment to continuous improvement, it’s important to note that Standard C is not yet fully supported in the current alpha release of our C Compiler Toolchain. There are some known issues within the Valida backend for C, which our team is actively working to resolve with minimal expected impact on Valida’s current performance. For a detailed summary of these known issues and limitations, please refer to the release notes accompanying this release.
Valida operates as a bare metal computing environment similar to those found in minimal embedded systems, running without an operating system or memory protection. This offers no safeguards against issues like segmentation faults. To function in this environment, programs often require modifications. Not all standard library functions (libc) are compatible with bare metal environments, especially those that involve system calls. However, LLVM’s libc can compile for bare metal by excluding functions that make system calls.
Developers can dive in by experimenting with the toolchain, providing valuable feedback, and contributing to its ongoing development. Get started with the C Compiler Toolchain today by visiting our GitHub repo for documentation and resources.
Methodology Overview
Here’s an overview of the scope of benchmarks against different proving systems and test programs.
A 3-way Comparison
Programs Tested:
Detailed methodologies are available here.