Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed emailtest.circom #182

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions docs/zkEmailDocs/UsageGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ To compile the circuit locally, you need to have Rust and Circom installed first
```bash
circom MyCircuit.circom -o --r1cs --wasm --sym --c
```
*Note: You can add -l to specify the directory where the directive `include` should look for the circuits indicated. For our repo use circom -l node_modules instead of circom.
*Note: You can add `-l` to specify the directory where the directive `include` should look for the circuits indicated. For our repo, use `circom -l node_modules` instead of `circom`. Additionally, we generally recommend using the `--O0` flag for optimization during compilation for beginners. However, if you're more experienced with Circom, feel free to use the `--O1` flag instead. It's important to avoid using the `--O2` flag as that is the default setting and it may lead to the deletion of additional constraints.*

After running this command, the circuit will be compiled into a `.r1cs` file, a `.wasm` file, and a `.sym` file. These files are used in the next steps to generate the proving and verifying keys, and to compute the witness.



## Step 5: Compute the Witness

The process of creating a proof involves ensuring that all signals in the file adhere to the existing constraints. This is achieved by computing the witness using the Wasm file generated during compilation.
Expand Down Expand Up @@ -143,15 +145,11 @@ node --max-old-space-size=614400 ./../node_modules/.bin/snarkjs


### Powers of Tau
After obtaining the constraint size, find the next highest power of 2 and replace the '12' in the following command with that number. This command initiates the Powers of tau ceremony.

```
snarkjs powersoftau new bn128 12 pot12_0000.ptau -v
```
You can download the ptau file directly from Google Cloud Platform using the following command:

Then contribute to the ceremony by running:
```bash
snarkjs powersoftau contribute pot12_0000.ptau pot12_0001.ptau --name="First contribution" -v
```
wget https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_22.ptau
```
### Phase 2

Expand Down
22 changes: 21 additions & 1 deletion packages/circuits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,27 @@ This template provides functionality for performing arithmetic operations in fin

### utils.circom

This template includes a collection of utility functions used across multiple circuits, such as bit manipulation functions, comparison functions, or conversion functions.
The `utils.circom` file includes a collection of utility templates and functions that are used across multiple circuits. These utilities cover a wide range of functionalities, including bit manipulation, comparison, conversion, and arithmetic operations in finite fields. It serves as a foundational component for building complex arithmetic circuits.

## Utility templates

### bytes2ints.circom

This template converts an array of bytes into an array of integers. It is designed to handle inputs of any byte size and outputs integers based on the number of bytes specified. This is particularly useful for processing large binary data within arithmetic circuits.

### constants.circom

This file defines a set of constants used across various templates within the `circuits` package. These constants include maximum sizes for emails, domains, invitation codes, and timestamps, as well as specifications for packing bytes into field elements.

### digit2int.circom

The `Digit2Int` template converts an array of digit characters (0-9) into their corresponding integer representation. This is useful for processing numeric data that is input as a sequence of characters.

### hex2int.circom

This template provides functionality for converting hexadecimal strings into their integer representation. It supports conversion of both lowercase (a-f) and uppercase (A-F) hexadecimal characters. This is essential for processing hexadecimal data within arithmetic circuits.



## Overview of email-verifier.circom

Expand Down
128 changes: 0 additions & 128 deletions packages/circuits/emailtest.circom

This file was deleted.

2 changes: 1 addition & 1 deletion packages/circuits/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zk-email/circuits",
"version": "3.2.2",
"version": "3.2.4",
"scripts": {
"publish": "yarn npm publish --access=public",
"test": "NODE_OPTIONS=--max_old_space_size=8192 jest tests/*.ts"
Expand Down
File renamed without changes.
18 changes: 0 additions & 18 deletions packages/circuits/utils/email_addr_commit.circom

This file was deleted.

18 changes: 0 additions & 18 deletions packages/circuits/utils/email_addr_pointer.circom

This file was deleted.

24 changes: 0 additions & 24 deletions packages/circuits/utils/email_nullifier.circom

This file was deleted.

38 changes: 0 additions & 38 deletions packages/circuits/utils/hash_sign.circom

This file was deleted.

Loading