npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

maci

v0.0.1

Published

Minimal Anti-Collustion Infrastructure

Readme

Minimal Anti-Collusion Infrastructure

Please refer to the implementation spec for technical details, and the original ethresear.ch post for a high-level view.

We welcome contributions to this project. Please join our Telegram group to discuss.

Local development and testing

Requirements

You should have Node 11.14.0 installed. Use nvm to install it.

TODO: Test this with Node 12 LTS.

You also need Solidity 0.5.16 installed in your PATH.

Get started

Clone this repository, install dependencies, and build the source code:

git clone [email protected]:barryWhiteHat/maci.git && \
npm i && \
npm run bootstrap && \
npm run build

Local development

This repository is organised as Lerna submodules. Each submodule contains its own unit tests.

  • config: project-wide configuration files. Includes config files for both testing and production.
  • crypto: low-level cryptographic operations.
  • circuits: zk-SNARK circuits.
  • contracts: Solidity contracts and deployment code.
  • domainobjs: Classes which represent high-level domain objects particular to this project.
  • core: Business logic functions for message processing and vote tallying.

Subdirectories which are not Lerna submodules are:

  • docker: Docker files for testing and deployment.

Trusted setup

For development purposes, you can generate the proving and verifying keys for the zk-SNARK circuits, along with their Solidity verifier contracts as such:

cd circuits
npm run buildBatchUpdateStateTreeSnark
npm run buildQuadVoteTallySnark

Alternatively, you can save time by downloading the files from Dropbox:

cd circuits
npm run downloadAllSnarks

Testing

Unit tests

The following submodules contain unit tests: crypto, circuits, contracts, and domainobjs.

Except for the contracts submodule, run unit tests as such (the following example is for crypto):

cd crypto
npm run test

For the contracts unit tests, run the tests one by one. This prevents incorrect nonce errors.

First, start a Ganache instance in a separate terminal:

cd contracts
npm run ganache

In another terminal, run the tests individually:

cd contracts
npm run test-hasher
npm run test-maci
npm run ...

Deploying contracts to the local testnet

Assuming that you have a Ganache node set up and listening to the path configured in config/test.yaml:

cd contracts
npm run deploy

The addresses which the contracts have been deployed to will be saved in contracts/deployedAddresses.json.

TODO: when we develop the CLI, this command should also copy the deployed addresses to the CLI submodule.

Deploying contracts to an Ethereum testnet or the mainnet

First, set the private key you need to deploy the contracts. The account associated with the key should already have some ETH in it. Create this file in your home directory (e.g. /home/user/kovanPrivKey.json) and replace the value between the quote marks with the private key.

["0x................................................................"]

There is an existing kovan.yml file in the config submodule. We will use it as an example of deploying to the Kovan testnet.

cd contracts
NODE_ENV=kovan npm run deploy

If the deployment fails because of an error from the Ethereum node, change it in kovan.yml:

chain:
  url: "https://kovan.infura.io/v3/<your infura key>"