Video thumbnail

ZKFlow

A visual builder for designing, testing, and deploying ZK circuits with AI assistance.

Project Description

ZKFlow is an application that enables users to visually edit zero-knowledge circuits. We have integrated GPT to assist in flow design, providing real-time optimisation suggestions, natural language-to-circuit conversion, and a context-aware chat interface. Custom-engineered prompts ensure that the AI comprehends ZK-specific concepts and offers meaningful recommendations. This significantly reduces the learning curve for developers, allowing them to build circuits faster while maintaining correctness and efficiency.

ZKFlow supports multiple ZK frameworks, including the Aztec Protocol and Aleo Platform, through a unified, framework-agnostic architecture. Custom adapters manage circuit compilation, proof verification, and execution, ensuring seamless interoperability. Aztec integration facilitates private state management and Layer 2 deployment, while Aleo enables zero-knowledge proof generation and private function execution. A key challenge was ensuring compatibility across frameworks, which we addressed by creating a shared node interface that standardises circuit-building operations.

Deployment is managed via the Autonome Network, providing decentralised execution, automated verification, and cross-chain compatibility. Moving forward, we plan to expand the template library, introduce automated circuit optimisation, and implement step-by-step visual debugging to enhance transparency in proof generation. By combining a powerful visual interface, AI assistance, and multi-framework support, ZKFlow simplifies ZK development, making it more accessible and efficient for developers.

How it's Made

​In developing ZKFlow, we employed a modular architecture integrating several technologies to create a seamless and efficient user experience:

  • Frontend Development: We utilized Next.js and React Flow to construct an intuitive interface for visual editing of zero-knowledge circuits. TailwindCSS was incorporated to streamline styling and ensure a responsive design.​

  • AI Integration: The application features an AI agent powered by GPT-4, offering real-time optimization suggestions and natural language-to-circuit conversion. Notably, the chat context is persistent, allowing the AI to maintain awareness of the ongoing design process and provide contextually relevant assistance.​

  • Custom Compiler: A key component of our system is a custom JavaScript compiler (compiler.js) that transforms the graph data structure of the flow into code compatible with different zero-knowledge frameworks:​

    • Noir Integration: The compiler effectively generates Noir code, accommodating complex flows and enhancing the application's versatility.​

    • Aleo Integration: While integrating with the Aleo platform presented challenges, our compiler supports simpler workflows, enabling zero-knowledge proof generation and private function execution.​

  • Modular Architecture: Our modular design ensures that each component operates independently yet cohesively, facilitating maintenance and scalability. This architecture also allows for the integration of additional frameworks and features in the future.

background image mobile

Join the mailing list

Get the latest news and updates