Skip to content

weijiekoh/zkey-manager

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 8 commits behind privacy-scaling-explorations:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
ts
 
 
 
 
 
 
 
 
 
 

zkey-manager

This utility simplifies the process of zkey file management for circuits written in circom.

Warning: for production setups, you should verify the integrity of the .ptau files that this utility downloads.

If your circuits are larger than 2 ** 20 constraints, please modify your config file to include the URL of a .ptau file that supports it. We provide .ptau files (copied from the Hermez Network Prepare Phase 1 ceremony) up to powersOfTau28_hez_final_20.ptau.

There is no guarantee that Hermez will continue to provide all .ptau files up 2 ** 28 constraints in this Dropbox folder.

Requirements

You need the following, preferably on a Linux machine:

  • NodeJS (preferably v11 or above)
  • gcc, g++, libgmp-dev, nlohmann-json3-dev, and libsodium-dev:
sudo apt install build-essential libgmp-dev libsodium-dev nlohmann-json3-dev nasm

Installation

npm i zkey-manager

Configure circuits

See the config.example.yml file for an example.

Compile circuits

zkey-manager compile -nc -c <CONFIG_FILE>

Set the -nc flag to avoid recompiling existing circuits.

Download the Phase 1 .ptau file

This scans the out directory as configured in the config file for .r1cs files, and downloads the .ptau file that is large enough to support .zkey generation for each of the .r1cs files.

node build/index.js downloadPtau -nc -c <CONFIG_FILE>

Generate the initial .zkey files

node build/index.js genZkeys -nc -c <CONFIG_FILE>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 76.7%
  • JavaScript 23.3%