Quick start

This page is basically ported from README.md.

Actions Status

Requirement

  • node >=v11.x

Setup

Config file

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

cream:
  merkleTrees: 4
  zeroValue: "2558267815324835836571784235309882327407732303445109280607932348234378166811"

maci:
  initialVoiceCreditBalance: 100
  signUpDurationInSeconds: 3600 # 1 hour
  votingDurationInSeconds: 3600 # 1 hour
  coordinatorPrivKey: "2222222222263902553431241761119057960280734584214105336279476766401963593688"
  tallyBatchsize: 4
  messageBatchSize: 4
  quadVoteTallyBatchSize: 4
  voteOptionsMaxLeafIndex: 3

  merkleTrees:
    stateTreeDepth: 4
    messageTreeDepth: 4
    voteOptionTreeDepth: 2

  chain:
    privateKeysPath: './'

Circuit

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

After you finish setting the configuration, you can run:


$ yarn && \
$ yarn build
$ cd packages/contracts && npm run ganache

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

Test

# after finished setting:
$ yarn test