ICICLE Case Study: Accelerating ZK Proofs with Brevis

Published on: 
Aug 27, 2024

Introduction

Brevis is an advanced ZK co-processor that empowers decentralized applications by providing trustless access to the full history of blockchain data. Unlike traditional systems that are constrained by the limitations of blockchain virtual machines, Brevis can trustlessly read states, transactions, and receipts from any time frame, across any blockchain.

Designed to enable data-rich use cases such as data-driven DeFi, zkBridges, zkDID, and user-segment optimized live-ops features for gaming, Brevis efficiently handles computations on data of any size and seamlessly verifies Zero-Knowledge (ZK) proofs across any blockchain.

The decision to utilize Ingonyama’s ICICLE acceleration library was driven by Brevis’s need for highly performant ZK proofs to break through the limitations of smart contracts and significantly reduce the costs associated with implementing complex, data-intensive functionalities.

Background & Motivations

Traditional smart contracts are constrained by the blockchain’s virtual machine environment, limiting their ability to access only certain types of data, such as recent blocks or data made available through specific “view” functions. This narrow scope excludes a vast amount of valuable historical data stored across various blocks and blockchains, making it impossible for decentralized applications to leverage this data in a trustless manner.

Even when this data is accessible, storing and querying large datasets on-chain is costly, and smart contracts struggle to execute complex, data-driven features due to the extensive computational power and data manipulation required, which is both resource-intensive and slow on-chain.

ZK proofs allow complex computations to be performed off-chain, with only the proof submitted on-chain. By integrating ICICLE, Brevis was able to accelerate its ZK proofs, unlocking new possibilities for data-driven features. With these ultra efficient accelerated proofs, Brevis can rapidly perform complex calculations on large datasets and then prove their correctness without burdening the blockchain with excessive computational costs.

ICICLE

Implementation of ICICLE

Brevis integrated ICICLE into its operations in early 2023. As Brevis relies on Gnark’s Groth16 for ZK proofs, ICICLE was integrated into the Gnark codebase to accelerate proof calculations. ICICLE plays a critical role in speeding up operations such as Multi-Scalar Multiplication (MSM) and Number Theoretic Transform (NTT), both of which are essential in the Groth16 proving process.

One of the standout features of ICICLE for Brevis was its support for multiple elliptic curves, including BLS12–377, BW6–761, and BN254. Additionally, ICICLE introduced a Multi-GPU feature, allowing Brevis to utilize multiple NVIDIA GPUs concurrently, significantly accelerating the proof generation process.

Performance Enhancements

The integration of ICICLE into Brevis’s ZK proving processes led to substantial performance improvements. Specifically, ICICLE accelerated key operations such as MSM and NTT by up to 70% compared to traditional CPU-based calculations. This dramatic increase in speed not only enhanced the efficiency of Brevis’s operations but also made it possible to scale ZK proofs to handle larger datasets and more complex computations without sacrificing performance.

Collaboration and Support

The collaboration between Brevis and Ingonyama’s ICICLE team was highly productive and supportive. Ingonyama provided critical CUDA code for GPU utilization, which was essential for achieving the desired performance improvements. Brevis then added the necessary Golang code in Gnark using the CUDA code.

The teams worked closely together throughout the integration and implementation phases, offering responsive and collaborative support. Ingonyama’s assistance was particularly valuable in identifying and resolving bugs that arose during the integration process. This partnership ensured a smooth and successful implementation of GPU acceleration features within Brevis’s system.

Future Plans for ICICLE Utilization

Brevis has ambitious plans for the continued use of ICICLE in its future projects. A key objective is to integrate ICICLE into their Plonk proving system, extending its benefits beyond the current Groth16 implementation. This integration is expected to further enhance proof generation performance while maintaining low memory usage on GPU cards, making the system even more efficient and scalable.

Brevis is highly satisfied with ICICLE’s performance and Ingonyama’s support. Looking ahead, they aim to push the boundaries of what’s possible with ZK proofs in the blockchain ecosystem. This includes continued optimization of Multi-Scalar Multiplication (MSM) and Number Theoretic Transform (NTT) calculations to achieve even greater efficiency. Their positive experience with ICICLE so far gives them confidence in its potential for future innovation.

Final Thoughts

Brevis’s integration of ICICLE has significantly enhanced their ZK proving processes, enabling them to tackle complex challenges in the blockchain space with greater efficiency and speed.

The collaboration between Brevis and Ingonyama has been instrumental in this success, and both teams are excited about the future possibilities that ICICLE’s ongoing development will bring. As Brevis continues to push the boundaries of what’s possible with ZK technology, ICICLE will remain a key component of their strategy.

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