Coder Social home page Coder Social logo

exfinen / cream Goto Github PK

View Code? Open in Web Editor NEW

This project forked from couger-inc/cream

0.0 0.0 0.0 47.27 MB

zkCREAM is zk-SNARK based anonymized voting application using a token mixer

Home Page: https://zkcre.am

License: GNU General Public License v3.0

JavaScript 1.23% Shell 2.87% TypeScript 58.18% Solidity 37.66% Dockerfile 0.06%

cream's Introduction

zkC.R.E.A.M

Actions Status

Zero-Knowledge Confidential Reliable Ethereum Anonymous Mixer

Requirement

  • node >=v11.x

Setup

Config file

Check out packages/config/test.yml file how to configure settings:

cream:
  merkleTrees: 4
  zeroValue: "2558267815324835836571784235309882327407732303445109280607932348234378166811"

maci:
  initialVoiceCreditBalance: 100
  signUpDurationInSeconds: 180 # 3 min
  votingDurationInSeconds: 120 # 2 min
  coordinatorPrivKey: "2222222222263902553431241761119057960280734584214105336279476766401963593688"
  tallyBatchsize: 4
  messageBatchSize: 4
  quadVoteTallyBatchSize: 4
  voteOptionsMaxLeafIndex: 3

  merkleTrees:
    stateTreeDepth: 4
    messageTreeDepth: 4
    voteOptionTreeDepth: 2

chain:
  privateKeysPath: './'

snarkParamsPath: '../params'

Circuit

Make sure you set the same value of merkleTrees depth on both packages/config/test.yml and packages/circuits/circom.circom.

After finished setting, you can run:

$ yarn
$ yarn bulid
$ yarn ganache-cli // or cd packages/contracts && yarn ganache

# In up another terminal
$ cd packages/contracts && yarn migrate

Test

# after finished setting:
$ docker-compose -f docker/docker-compose.yml up -d # run ipfs container
$ yarn test

# after finished test:
$ docker-compose -f docker/docker-compose.yml down

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.