Giter Site home page Giter Site logo

bundler_circuit's Introduction

bundler_circuit_snarkjs

Configure Powers of Tau

download here : https://github.com/iden3/snarkjs

multiplier2

Compile the Circuit

circom multiplier2.circom --r1cs --wasm --sym

View Information About the Circuit

snarkjs info -r multiplier2.r1cs

To see the constraints of the circuit, execute this command

snarkjs r1cs print -r multiplier2.r1cs -s multiplier2.sym

Calculating a Witness

snarkjs r1cs export json multiplier2.r1cs multiplier2.r1cs.json
head multiplier2.r1cs.json

Edit input

vim input.json

To create the witness, execute these commands:

cd multiplier2_js
node generate_witness.js multiplier2.wasm ../input.json ../witness.wtns
ls
ls ..

Setting Up a PLONK Proving System

snarkjs plonk setup multiplier2.r1cs ../../snark/pot12_final.ptau multiplier2_final.zkey

Export the zkey

snarkjs zkey export verificationkey multiplier2_final.zkey verification_key.json

Create the Proof

snarkjs plonk prove multiplier2_final.zkey witness.wtns proof.json public.json
head proof.json
head public.json

Verify the Proof

snarkjs plonk verify verification_key.json public.json proof.json

bundler_circuit's People

Contributors

zerokpunk avatar

Stargazers

linkdrone avatar

Watchers

 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.