ICICLE Case Study: Accelerating ZK Proofs with Kroma Network

Published on: 
Aug 14, 2024

Introduction and Background

Kroma Network is a universal-purpose rollup based on the OP stack with active fault proofs leveraging Zero-Knowledge Proofs. Its mission is to accelerate the adoption of blockchain technology in everyday life by enhancing user and developer experiences.

As part of its strategic vision to evolve into a universal ZK rollup, Kroma anticipated the frequent need for proof generation, which could result in significant costs. Therefore, reducing the time required for proof generation became a priority, making the integration of ICICLE an essential step in achieving their goals.

Tachyon

To remain ahead of the curve and retain flexibility for innovations in the ZK space, Kroma’s team recognized the need for a general-purpose, GPU-accelerated solution. However, existing ZK open-source libraries fell short — they either lacked compatibility with Halo2, were not general-purpose, or did not support GPU acceleration. To overcome these limitations, Kroma initiated the Tachyon project.

Tachyon is a high-performance, general-purpose, open-source ZK Proof library designed for seamless GPU interoperability. It supports various languages and runtimes, making it developer-friendly and easy to integrate. Tachyon is intended as a drop-in replacement for current Halo2 backends, significantly reducing proof generation time and costs. To achieve the performance needed, the Kroma team integrated ICICLE, Ingonyama’s GPU acceleration library for Zero-Knowledge Proofs into Tachyon.

ICICLE Integration Process

The integration of ICICLE into Tachyon’s systems and workflows involved adapting ICICLE to work seamlessly with its existing infrastructure, allowing for enhanced performance in their ZK proving processes.

ICICLE’s GPU algorithms were applied not only to BN254, but to all implemented fields and curves, including the Babybear field. Further utilizing ICICLE’s resources, Tachyon is built such that If GPU RAM is insufficient, the MSM will calculate as much as possible on the GPU and use the CPU for the rest of the process, or, alternatively, call the GPU algorithm repeatedly.

Performance Improvements Post-Integration

Integrating ICICLE allowed Kroma to generate the first end-to-end proof using GPU acceleration. In addition, prior to ICICLE integration Tachyon’s MSM GPUs had significant speed variances when scalar points were not uniformly distributed, limiting their use in production environments. This was resolved with ICICLE’s implementation.

The integration of ICICLE introduced GPU acceleration for Multi-Scalar Multiplication (MSM) and Fast Fourier Transform (FFT), leading to a 4x faster Circom proof generation. The most significant impact, however, was seen in the acceleration of the SP1 zkVM proof, Kroma’s primary objective, by replacing the Plonky3 backend with Tachyon.

Specific Performance Metrics

ICICLE’s integration into Tachyon resulted in an 8–10x speed improvement for MSM and a 3–5x speed improvement for Number Theoretic Transform (NTT) compared to traditional CPU implementations.

Overall, a 4x speed improvement was observed in Circom proof generation, with the GPU implementation offering a stark contrast to the already fast CPU implementation of Tachyon.

The graphs below show the difference in speed between Tachyon’s already fast CPU implementation versus Tachyon’s insanely fast GPU implementation.

Future Plans for ICICLE Utilization

Kroma plans to continue leveraging ICICLE’s capabilities in future projects. Upcoming enhancements include:

  • Applying MSM/NTT GPU to Halo2 Proof Generation: Kroma plans to optimize this process further.
  • Optimizing GPU Usage: If sufficient GPU RAM or multiple GPU devices are available, multiple MSM or NTT computations will be performed simultaneously in a batch.
  • Adopting MMCS GPU to SP1 Proof Generation: Kroma plans to optimize SP1 zkVM proof generation.

Experience Working with Ingonyama

The collaboration between Kroma and Ingonyama was characterized by good communication and near real-time support. This close collaboration ensured that any issues were addressed promptly, facilitating a smooth integration process.

Final Thoughts

When speed, efficiency, and scalability are paramount, the successful integration of ICICLE into Kroma Network’s Tachyon exemplifies the transformative potential of GPU acceleration in ZK Proof generation.

Many thanks to the Kroma team for their help and review.

light

Written by

Table of Contents

Want to discuss further?

Ingonyama is commited to developing hardware for a private future using Zero Knowledge Proofs.

Get in touch
Get our RSS feed