Giter Site home page Giter Site logo

chiquito's Introduction

Chiquito

Project Description

Chiquito is a step-based high-level rust DSL (pychiquito is a python DSL for chiquito) that provides better syntax and abstraction for constraint building and column placement when writing plonkish circuits and has a Halo2 backend, and other backends are in the works. It allows the user to manipulate an AST that’s compiled to a Chiquito Halo2 backend, which can be integrated into any Halo2 circuit.

It's HIGHLY RECOMMENDED that you read the design principles, architecture, and specific terms of a Chiquito circuit before getting started.

You can also learn about the project's current status) and its next steps.

Getting Started

Setup

Run the following in command line to add Chiquito as a dependency for your project:

cargo add --git https://github.com/privacy-scaling-explorations/chiquito 

Use the following examples to understand how Chiquito works or use them as starting templates for building your own Chiquito circuit.

Refer to the Appendix on the exposed user functions and overall workflow of a Chiquito circuit.

Refer to Testing and Links on detailed API documentations.

Example: Fibonacci Circuit

Run the following in command line:

cargo run --example fibonacci

This example demonstrates how to construct signals, step types, constraints, and witness generation in Chiquito. Best for first time Chiquito users.

Example: MiMC7 Circuit

TODO: annotate this code example

This example demonstrates how to construct a lookup table and use external inputs as trace arguments in Chiquito, besides covering concepts in the Fibonacci example. MiMC7 is a zk-friendly hashing function.

Example: zkEVM Bytecode Circuit

privacy-scaling-explorations/zkevm-circuits#1348

This example rewrites the zkEVM bytecode circuit using Chiquito and passes all original tests. It demonstrates how Chiquito can standardize and simplify larger scale circuits on the production level.

Testing and Links

API documentation: cargo doc --no-deps --package chiquito --open

Currently API documentation is only written for exposed user functions, which are scattered across the DSL, constraint builder, compiler, and AST. Refer to the following subdirectories for specific functions:

Licenses

MIT OR Apache-2.0

chiquito's People

Contributors

leolara avatar qwang98 avatar chihchengliang avatar lancenonce avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.