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

Readme/constraint breakdown for the email wallet #100

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 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
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,30 @@ This is a simplified flow, but underneath we use many parameters to ensure secur
## ☞ Directory structure
This is a mono-repo that contains the circom circuits, smart contracts, the relayer and a prover server.

### Circuits and Constraints:
*Total Constraints Across All Circuits*: **3,999,432**

- **Main Circuits:**
- `Announcement.circom`: 459 constraints
- `Claim.circom`: 921 constraints
- `Email_sender.circom`: 1,895,054 constraints
- `Account_creation.circom`: 2,102,567 constraints

- **Utils:**
- `Account_salt.circom`: 258 constraints
- `Bytes2ints.circom`: 0 constraints
- `Digit2int.circom`: 0 constraints
- `Email_addr_commit.circom`: 465 constraints
- `Email_nullifier.circom`: 213 constraints
- `Hash_sign.circom`: 213 constraints
- `Hext2int.circom`: 80 constraints

- **Regex:**
- `Invitation_code_regex.circom`: 97 constraints
- `Invitation_code_with_prefix_regex.circom`: 105 constraints

<br />

- `packages/circuits` contains the circom circuits, tests, scripts to generate zkeys, vkeys, and helper functions to generate circuit inputs.
- `packages/contracts` contains the solidity contracts, tests, and scripts to deploy the wallet.
- `packages/relayer` contains the relayer code - relayer listens to IMAP server, generate proof using prover server, and call the contract.
Expand Down Expand Up @@ -124,13 +148,15 @@ saved here.
├── /subgraph # indexing and querying events generated by circuits.


```


<br />

## ☞ Building and Running

The total number of constraints across all circuits is **3,999,432**.

- Refer to the [circuit docs](./packages/circuits/README.md) for more details on building and testing circuits.
- Refer to the [contract docs](./packages/contracts/README.md) for more details on building and testing contracts.
- Refer to the [relayer docs](./packages/relayer/README.md) for more details on building and running relayer.
Expand All @@ -148,12 +174,11 @@ And to serve the website:
mdbook serve
```


## References
1. S. Suegami and K. Shibano, "Contract Wallet Using Emails," 2023 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Dubai, United Arab Emirates, 2023, pp. 1-2, doi: 10.1109/ICBC56567.2023.10174932.

<br />
<hr />
<br />

☆ Built using [zk-email](https://github.com/zkemail/zk-email-verify) ☆
☆ Built using [zk-email](https://github.com/zkemail/zk-email-verify) ☆
Loading