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

feat: Generic Relayer #69

Draft
wants to merge 134 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 131 commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
2ec4174
feat: email_auth template with body parsing
shreyas-londhe Aug 28, 2024
a9eb5b9
chore: bump zkemail-circuits to 6.1.5
shreyas-londhe Aug 29, 2024
253a02c
feat: extracting command from body in body-parsing
shreyas-londhe Aug 30, 2024
89f39f7
feat: email_auth body parsing circuit working with tests
shreyas-londhe Sep 1, 2024
6f6a726
fix: minor test changes
shreyas-londhe Sep 1, 2024
4de8d4d
chore: update dependencies
shreyas-londhe Sep 1, 2024
8685d3a
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami Sep 2, 2024
885b7a5
(wip) chore: pass github workflow
Bisht13 Sep 2, 2024
c88c574
Add a verifier contract
SoraSuegami Sep 2, 2024
48605a6
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami Sep 2, 2024
8a69a61
Update proving key url
SoraSuegami Sep 2, 2024
f5164a5
feat: add body parsing
Bisht13 Aug 21, 2024
cfa80b0
chore: update
Bisht13 Aug 21, 2024
f4dbfce
chore: separated body parsing tests
shreyas-londhe Sep 2, 2024
7214d3b
fix: refactring in recipent_enabled test
shreyas-londhe Sep 2, 2024
eedd202
fix: minor
shreyas-londhe Sep 2, 2024
e6caddf
chore: update relayer
Bisht13 Sep 2, 2024
9ccd3b9
fix: updated command regex
shreyas-londhe Sep 3, 2024
e2ed105
chore: changed max_command_bytes to 605
shreyas-londhe Sep 3, 2024
a8f2ef0
Update verifier
SoraSuegami Sep 3, 2024
05eaba9
Merge branch 'main' of https://github.com/zkemail/ether-email-auth in…
SoraSuegami Sep 3, 2024
80bdfc7
Merge branch 'main' of https://github.com/zkemail/ether-email-auth in…
SoraSuegami Sep 3, 2024
6b84605
feat: sha precompute test
shreyas-londhe Sep 3, 2024
2587fc8
chore: update relayer utils version
Bisht13 Sep 3, 2024
54d1526
feat: command update + relayer changes
Bisht13 Sep 4, 2024
19b46df
Fix circuit name in core.py
SoraSuegami Sep 4, 2024
05225ed
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami Sep 4, 2024
d192781
chore: update version
Bisht13 Sep 4, 2024
4fa904d
chore: update circuit test
Bisht13 Sep 4, 2024
3f62a9b
chore: update relayer-uitls dep
shreyas-londhe Sep 4, 2024
dca6793
Update verifier
SoraSuegami Sep 4, 2024
d8eb920
Change the max header/body sizes in the body-parsing circuits.
SoraSuegami Sep 4, 2024
97094f9
Add test circuits for body parsing
SoraSuegami Sep 4, 2024
c5f4bb5
Update verifier
SoraSuegami Sep 5, 2024
648720a
Fixing integration test
SoraSuegami Sep 6, 2024
703ce4e
Update emails for integration tests
SoraSuegami Sep 6, 2024
6edbe7a
Update yarn.lock
SoraSuegami Sep 6, 2024
b51d635
Fix scripts and email for integration test
SoraSuegami Sep 6, 2024
0566f14
chore: update circuit test
Bisht13 Sep 6, 2024
fbd3844
Integration test worked
SoraSuegami Sep 6, 2024
69963ef
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami Sep 6, 2024
d2f59da
fix: body parsing test
Bisht13 Sep 6, 2024
74c4557
feat: complete flow
Bisht13 Sep 6, 2024
cdf17ec
Replace subject with command.
SoraSuegami Sep 7, 2024
802e284
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami Sep 7, 2024
776fa59
Fix compile errors in relayer
SoraSuegami Sep 7, 2024
16eaa85
Remove skipped_command_bytes
SoraSuegami Sep 7, 2024
f6433a1
Merge audit-fix into body-parsing
SoraSuegami Sep 10, 2024
5002ab3
Add IGroth16Verifier
SoraSuegami Sep 10, 2024
d2255a4
Recover skipped_commad_bytes
SoraSuegami Sep 10, 2024
29989f4
Apply audit-fixes to the body-parsing circuit.
SoraSuegami Sep 10, 2024
f8bb968
Fix relayer
SoraSuegami Sep 10, 2024
30e99de
Disable auto script tests in contracts
SoraSuegami Sep 10, 2024
5396607
Merge branch 'main' into feat/body-parsing-with-audit-fix
SoraSuegami Sep 10, 2024
8532cea
Update verifier and proving key
SoraSuegami Sep 10, 2024
d10c8ad
Feat/fix zksync impl (#60)
wshino Sep 10, 2024
4727741
Update test emails for zksync
SoraSuegami Sep 10, 2024
2191baa
Update integration test for zksync
wshino Sep 10, 2024
10b7c60
Update bytecode hash
wshino Sep 10, 2024
c759ca5
Update proof.json path
wshino Sep 10, 2024
3fb0904
Update publicInputFile path
wshino Sep 10, 2024
e96b68d
Update bytecode hash
wshino Sep 11, 2024
6607fd2
Update docs for integration tests for zksync
wshino Sep 11, 2024
9104be6
Update package.json in contracts
SoraSuegami Sep 12, 2024
4adb046
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Sep 12, 2024
e210be9
Let functions in EmailAccountRecoveryZKSync be virtual
SoraSuegami Sep 12, 2024
5c21f4b
fix: subject template parsing
Bisht13 Sep 12, 2024
581a845
Add requestGuardian to SimpleWallet
SoraSuegami Sep 13, 2024
6ed6e87
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Sep 13, 2024
5342f0a
Fix scripts
SoraSuegami Sep 13, 2024
57acb00
Fix scripts
SoraSuegami Sep 13, 2024
8a62db1
Update READMEs
SoraSuegami Sep 14, 2024
c5fae68
Merge branch 'main' into feat/body-parsing-with-audit-fix
Divide-By-0 Sep 23, 2024
ce2fc6d
Fix typo and remove unnecessary file
SoraSuegami Sep 23, 2024
0f961e6
chore: refactor
Bisht13 Sep 8, 2024
1245c2f
WIP: Add custom errors
DimiDumo Sep 5, 2024
3e6ff1a
Update .env.example
DimiDumo Sep 5, 2024
6da5914
Split up handle_email fn; Remove code duplication
DimiDumo Sep 6, 2024
e8093d1
Custom errors for email
DimiDumo Sep 9, 2024
f8d73e8
Rebase solve conflicts of body-parser refacor
DimiDumo Sep 11, 2024
f212b09
Rebase solve conflicts of body-parser refacor
DimiDumo Sep 11, 2024
87340f4
Rebase fixes
DimiDumo Sep 11, 2024
bb9ce38
Acknowledgement as replies in email thread
DimiDumo Sep 12, 2024
d545cbb
Add Re: to subject for reply emails
DimiDumo Sep 13, 2024
37ef80b
Update email templates UI
wryonik Sep 13, 2024
d862ec6
Add cloud build to build on gcp
DimiDumo Sep 13, 2024
ac511f5
Bump relayer version
DimiDumo Sep 13, 2024
399126a
fix: add command in email templates
Bisht13 Sep 13, 2024
ede8e54
feat: add CONTRIBUTING.md & CODING_GUIDELINES.md
Bisht13 Sep 14, 2024
0ba5fb1
chore: move md files
Bisht13 Sep 14, 2024
52a4005
feat: add github workflows
Bisht13 Sep 15, 2024
b268d72
chore: remove abis
Bisht13 Sep 15, 2024
f91fc02
chore: update github actions and add PR template
Bisht13 Sep 15, 2024
b4e547a
fix: github action
Bisht13 Sep 15, 2024
f036aac
Remove hard-coded file_paths; Fix clippy warnings
DimiDumo Sep 16, 2024
deba9f3
Move util files from ether-email-auth to utils repo
DimiDumo Sep 16, 2024
2d3347a
Fix relayer-utils version to refactor commit
DimiDumo Sep 16, 2024
19bd27e
Force db initialization on startup
DimiDumo Sep 17, 2024
adcefd6
AI generated doc comments
DimiDumo Sep 18, 2024
69d7b3c
Prevent duplicates by checking if it is a valid reply
DimiDumo Sep 19, 2024
719dc4a
Add AI generated comments
DimiDumo Sep 19, 2024
4c179e5
Rename func to extract_template_vals_from_command
DimiDumo Sep 19, 2024
9cf423c
Exclude abi folder as workspace member
DimiDumo Sep 19, 2024
cf12f6d
Ignore abis for fmt
DimiDumo Sep 19, 2024
d5771de
Add github actions to build docker image
DimiDumo Sep 20, 2024
58ed8fb
ui: Update email template UI
wryonik Sep 28, 2024
3f6a025
feat: GPU prover (#66)
Bisht13 Sep 28, 2024
d81c86e
fix: regex json path
Bisht13 Sep 30, 2024
6b8bf54
chore: update k8s manifest
Bisht13 Sep 30, 2024
1465978
feat: use GPU for proving
Bisht13 Sep 24, 2024
e1080aa
chore: add comment in example env
Bisht13 Sep 30, 2024
987575f
feat: keep modal warm
Bisht13 Sep 30, 2024
7bd6534
ui: update email template design
wryonik Sep 30, 2024
b4066ea
chore: cleanup
Bisht13 Oct 1, 2024
65c0010
chore: update dockerignore
Bisht13 Oct 1, 2024
de9e2b7
chore: update dockerignore
Bisht13 Oct 1, 2024
3278b77
Merge pull request #62 from zkemail/refactor
Bisht13 Oct 1, 2024
3fc5c46
chore: update k8s manifest
Bisht13 Oct 1, 2024
1a5ebc8
chore: init generic relayer
Bisht13 Oct 8, 2024
cfa32e9
chore: Add generic email templates
wryonik Oct 9, 2024
8391efd
feat: add smtp and imap interaction
Bisht13 Oct 9, 2024
f08144a
fix: uuid capture
Bisht13 Oct 10, 2024
036a96d
feat: add icp, prover and on chain stuff
Bisht13 Oct 11, 2024
a32543a
fix: use tokio mutex
Bisht13 Oct 11, 2024
8d8e520
feat: add status api
Bisht13 Oct 11, 2024
3c306b0
Fix circom version
SoraSuegami Oct 11, 2024
0a458c8
fix: update schema
Bisht13 Oct 12, 2024
4acb91e
Merge branch 'feat/generic-relayer' of https://github.com/zkemail/eth…
SoraSuegami Oct 14, 2024
8e9fc0c
Fix circom test in github action
SoraSuegami Oct 14, 2024
0695423
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Oct 14, 2024
230951b
Add example contract
SoraSuegami Oct 14, 2024
faa36ed
Start scripts in example
SoraSuegami Oct 14, 2024
c31af55
Define some types in the script
SoraSuegami Oct 15, 2024
dc607f4
feat: finish e2e test
Bisht13 Oct 15, 2024
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ packages/contracts/test/build_integration/*.json
packages/contracts/test/build_integration/*.zkey
packages/contracts/test/build_integration/*.wasm
packages/contracts/test/build_integration/*.txt
packages/contracts/test/EmailAccountRecoveryZkSync

# NFT Relayer
packages/nft_relayer/sendgrid.env
Expand Down
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Description
<!-- Please include a summary of the change and which issue is fixed. Also, list any dependencies that are required for this change. -->

<!-- Fixes # (issue) -->

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -->

- [ ] Test A
- [ ] Test B

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
30 changes: 30 additions & 0 deletions .github/workflows/build-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Format

on: [push]

jobs:
build-and-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- run: rustup show

- name: Install rustfmt and clippy
run: |
rustup component add rustfmt
rustup component add clippy

- uses: Swatinem/rust-cache@v2

- name: Build and check for warnings
env:
RUSTFLAGS: "-D warnings"
run: cargo build --release

- name: Check formatting
run: cargo fmt -- --check

- name: Run clippy
run: cargo clippy -- -D warnings
51 changes: 51 additions & 0 deletions .github/workflows/build-img.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Push Docker Image

on:
push:
branches:
- refactor

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=
type=raw,value=latest

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Full.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
55 changes: 0 additions & 55 deletions .github/workflows/build-test-fmt.yml

This file was deleted.

40 changes: 35 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit-tests
name: Unit Tests

on: [push]

Expand All @@ -21,9 +21,9 @@ jobs:
override: true
components: rustfmt, clippy

- name: Download circom (Linux)
run: git clone https://github.com/iden3/circom.git && cd circom && cargo build --release && cargo install --path circom

- name: Download circom v2.1.8 (Linux)
run: wget https://github.com/iden3/circom/releases/download/v2.1.8/circom-linux-amd64 -O /usr/local/bin/circom && chmod +x /usr/local/bin/circom
- name: Print circom version
run: circom --version

Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install yarn
run: npm install -g yarn

Expand All @@ -62,3 +62,33 @@ jobs:
- name: Run tests
working-directory: packages/contracts
run: yarn test

relayer:
name: relayer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly-0079a1146b79a4aeda58b0258215bedb1f92700b

- name: Build contracts
working-directory: packages/contracts
run: yarn build

- name: Run tests
working-directory: packages/relayer
run: cargo test
35 changes: 14 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,17 @@ packages/contracts/test/build_integration/*.txt
packages/contracts/test/test-proofs
packages/contracts/deployments

# NFT Relayer
packages/nft_relayer/sendgrid.env
target
packages/nft_relayer/db/*
packages/nft_relayer/*.db
packages/nft_relayer/received_eml/*.eml
packages/nft_relayer/received_eml/*.json
packages/nft_relayer/proofs
packages/nft_relayer/logs
sql_database.db
.sqlx
.ic.pem

# Relayer
packages/relayer/sendgrid.env
target
packages/relayer/db/*
packages/relayer/*.db
packages/relayer/received_eml/*.eml
packages/relayer/received_eml/*.json
packages/relayer/proofs
packages/relayer/.sqlx/*
packages/relayer/logs
sql_database.db
.sqlx
packages/relayer/config.json
.ic.pem

# ABIs
packages/relayer/src/abis/*
!packages/realyer/src/abis/mod.rs

# Prover
packages/prover/build/*
packages/prover/params/*.zkey
Expand All @@ -80,6 +65,14 @@ book
# Vs code settings
.vscode

# Editor settings
.idea

# For zksync
zkout
.cache

# Example
example/contracts/artifacts
example/contracts/cache
example/contracts/node_modules
Loading
Loading