Skip to content

salman01zp/cirom-circuits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Private transaction Mixer

Simple Implementation on private transaction mixer.

Circom Installation

Refer Circom and Snarkjs installation guide here

1. Compile Circuit

This will generate wasm and r1cs file in outputs directory

circom circuit/transaction.circom --r1cs --wasm --sym -o outputs/

2. Generate ptau file (This file is used to generate proving and verifying key)

We will be using pregenerated file for testing

wget https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_12.ptau

3. Setup Gorth16Verifier

snarkjs groth16 setup outputs/transaction.r1cs outputs/powersOfTau28_hez_final_12.ptau outputs/mixer_transaction_circuit.zkey

4. Generate Verification key

snarkjs zkey export verificationkey outputs/mixer_transaction_circuit.zkey outputs/verification_key.json

5. Generate Verifying Contract

snarkjs zkey export solidityverifier outputs/mixer_transaction_circuit.zkey  outputs/verifier.sol

Install Foundry

Follow the instructions from their repository or just do:

curl -L https://foundry.paradigm.xyz | bash
foundryup

Install dependencies in submodules

You can do it either with forge:

forge install

or directly with git:

git submodule update --init --recursive

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published