Code Monkey home page Code Monkey logo

halo2aggregator-s's Introduction

halo2aggregator-s

Aggregator for halo2 plonk circuits, including:

  1. Provide aggregation circuit for target circuit verification.
  2. Provide solidity code for aggregation circuit verification.

Prerequisite

  1. truffle

Try it on local testnet

cargo test test_solidity_render --release -- --nocapture

In terminal 1:

cd sol
yarn
yarn start

In terminal 2:

cd sol
truffle test

Try it on Goerli

cargo test test_solidity_render --release -- --nocapture

cd sol
yarn

# add INFURA_PROJECT_ID, MNEMONIC in .env file

# NOTICE!!! This command would spend about 0.025 GoerliETH for deployment
# This command is a liitle bit slow in my test env, please wait for several minutes
truffle test --goerli

Use as lib

The solidity code generation depends on the sol folder. You can download it from source code or release according to the version.

  1. call run_circuit_unsafe_full_pass() for target circuit with TranscriptHash::Poseidon to get aggregation circuit and its instances.
  2. call run_circuit_unsafe_full_pass() for aggregation circuit with TranscriptHash::Sha to create aggregation circuit proof.
  3. call solidity_render() with TranscriptHash::Sha to generate solidity code.
  4. call solidity_aux_gen() to prepare aux input for solidity verify. It will prepare scalar division result used by the verification to reduce gas.

See test test_solidity_render for sample.

halo2aggregator-s's People

Contributors

lanbones avatar xgaozoyoe avatar junyu0312 avatar kl456123 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.