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: Body Parsing With Audit Fixes #59

Merged
merged 253 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
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
3d5cd60
Fix circuit package.json
SoraSuegami Sep 19, 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
5aa9bfc
Remove space from invitation code
SoraSuegami Sep 30, 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
b5f3199
Add an invalid utf8 test email
SoraSuegami Oct 10, 2024
d518bab
Update circom_tester
SoraSuegami Oct 10, 2024
55455f8
Fix circom version
SoraSuegami Oct 11, 2024
3c306b0
Fix circom version
SoraSuegami Oct 11, 2024
9ddf4e5
Make test cases as a function named files
wshino Oct 7, 2024
2d6971a
Add test cases for DKIM registries
wshino Oct 12, 2024
a7a7177
Add test cases for EmailAccountRecovery
wshino Oct 12, 2024
2b8f8a4
Add general test cases
wshino Oct 12, 2024
e99af3c
Update proxy bytecode hash
SoraSuegami Oct 14, 2024
63040e9
Add more events
SoraSuegami Oct 14, 2024
99b43e1
Fix circom version to 2.1.9 in github action
SoraSuegami Oct 15, 2024
54b458d
audit fixes
SoraSuegami Oct 16, 2024
be40697
Fix email_auth_with_recipient
SoraSuegami Oct 16, 2024
d2a2dfc
Add send_email.py for test
SoraSuegami Oct 16, 2024
0d317d3
Add upgrade test
wshino Oct 16, 2024
c81f8e8
Update circom tests
SoraSuegami Oct 16, 2024
dd632d1
Fix recipient test
SoraSuegami Oct 16, 2024
e0b8039
Fix circom import in email_auth.circom
SoraSuegami Oct 16, 2024
d08069e
Fix arg name in removePrefix
SoraSuegami Oct 17, 2024
bed2a36
Update dependencies
SoraSuegami Oct 17, 2024
a77de81
Fix interfaces to call EmailVerifier.
SoraSuegami Oct 17, 2024
3bd4e7d
Change the regex of forced_subject
SoraSuegami Oct 17, 2024
f8752a4
change the positon dependency in forced_subject
SoraSuegami Oct 17, 2024
ea1a823
Add "ZK" to the relayer's email subjects
SoraSuegami Oct 17, 2024
678dd7b
Fix force_subject regex error
SoraSuegami Oct 17, 2024
dd4f433
Integration test on base worked.
SoraSuegami Oct 17, 2024
8f77c5b
update version
SoraSuegami Oct 17, 2024
058cfa3
Update integration test emails
SoraSuegami Oct 17, 2024
ad9155b
Fix zksync intergation test
SoraSuegami Oct 17, 2024
718d8a6
Not hardcode proxyBytecodeHash in EmailAccountRecoveryZKSync
SoraSuegami Oct 18, 2024
976f8aa
Update prover
SoraSuegami Oct 18, 2024
2d86090
Update README and call args for RecoveryControllerZKSync
wshino Oct 18, 2024
68a502a
Merge branch 'feat/audit-fix-2024-09' of github.com:zkemail/ether-ema…
wshino Oct 18, 2024
ac5be62
Change forced_subject to accept "Re: "
SoraSuegami Oct 18, 2024
1ae5284
Merge branch 'feat/audit-fix-2024-09' of https://github.com/zkemail/e…
SoraSuegami Oct 18, 2024
ea41049
Update zk-email circuits/contracts versions
SoraSuegami Oct 18, 2024
3c194a6
Add RequestGuardianSimpleWallet script
SoraSuegami Oct 18, 2024
d564aac
add test_forced_subject_regex
SoraSuegami Oct 18, 2024
91040ae
Update test emails for integration tests
SoraSuegami Oct 18, 2024
56ad346
Remove console from EmailAuth
SoraSuegami Oct 18, 2024
2d13ce9
remove console.log
SoraSuegami Oct 18, 2024
2bfa926
Use PROXY_BYTECODE_HASH in .env
wshino Oct 18, 2024
60c08b4
Merge branch 'feat/audit-fix-2024-09' of github.com:zkemail/ether-ema…
wshino Oct 18, 2024
66038c1
Use default bytes32 value if PROXY_BYTECODE_HASH is not set
wshino Oct 18, 2024
da715b6
if PROXY_BYTECODE_HASH it not set the script will revert
wshino Oct 18, 2024
6d618cf
Update verifier
SoraSuegami Oct 18, 2024
82ec388
Merge branch 'feat/audit-fix-2024-09' of https://github.com/zkemail/e…
SoraSuegami Oct 18, 2024
c668227
Update versions
SoraSuegami Oct 18, 2024
9bb9fc4
relayer update
SoraSuegami Oct 18, 2024
b00f205
Update prover with gpus
SoraSuegami Oct 19, 2024
9b3e29c
Update prover
SoraSuegami Oct 19, 2024
f3c49b7
chore: node version >=18
Bisht13 Oct 19, 2024
87b1d92
chore: prover
Bisht13 Oct 19, 2024
82d3071
Revert "Update prover"
SoraSuegami Oct 19, 2024
9a28129
Revert "Update prover with gpus"
SoraSuegami Oct 19, 2024
25050f7
Merge branch 'feat/audit-fix-2024-09' of https://github.com/zkemail/e…
SoraSuegami Oct 19, 2024
ae3cbf0
Update prover version
SoraSuegami Oct 19, 2024
2b725ab
chore: change gpu
Bisht13 Oct 20, 2024
2160c25
Update dkim registries
SoraSuegami Oct 21, 2024
cb03d48
Update integration test
SoraSuegami Oct 21, 2024
8612c69
Update scripts to use useroverriable registry
SoraSuegami Oct 21, 2024
5d5e3d5
E2E test with user overridable dkim registry worked.
SoraSuegami Oct 21, 2024
af3ea0a
Remove DeployCommonScript
SoraSuegami Oct 21, 2024
156258e
Fix integration test for foundry
SoraSuegami Oct 21, 2024
d716798
Fix IntegrationZKSync
SoraSuegami Oct 21, 2024
0f81632
Update dependency
SoraSuegami Oct 21, 2024
9d388e1
Update yarn.lock
wshino Oct 21, 2024
d75815e
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Oct 21, 2024
bd9374d
chore: update
Bisht13 Oct 21, 2024
805b9f2
chore: update version & Cargo.lock
Bisht13 Oct 21, 2024
9995f1f
Remove ForwardDKIMRegistry and Add scripts for UseroverridableDKIMReg…
SoraSuegami Oct 21, 2024
2fff637
Fix relayer
SoraSuegami Oct 21, 2024
989e186
Remove ForwardDKIMRegistry.sol
SoraSuegami Oct 21, 2024
d1b6689
Update yarn.lock
wshino Oct 21, 2024
e5c2adf
Update yarn.lock
wshino Oct 21, 2024
f93dcab
Fix clippy bug
SoraSuegami Oct 21, 2024
e7e1eab
Fix integration test for zksync era-test-node
wshino Oct 21, 2024
3282e0c
Merge branch 'feat/audit-fix-2024-09-registry' of github.com:zkemail/…
wshino Oct 21, 2024
19dcbd9
Remove code which relates to ForwardDKIMRegistry
wshino Oct 21, 2024
11f33c3
Abstract Verifier as IVerifier
SoraSuegami Oct 22, 2024
01b3ba8
Merge branch 'feat/audit-fix-2024-09-registry' of https://github.com/…
SoraSuegami Oct 22, 2024
b637604
Update test signature for test_Dfinity_Oracle_Response
SoraSuegami Oct 22, 2024
3a9577a
Fix script test errors
wshino Oct 22, 2024
2541763
chore: update
Bisht13 Oct 22, 2024
6a232db
Update circuit depndencies
SoraSuegami Oct 22, 2024
fe9c5d8
Merge branch 'feat/audit-fix-2024-09-registry' of https://github.com/…
SoraSuegami Oct 22, 2024
656f037
chore: update version
Bisht13 Oct 22, 2024
0506930
downgrade typescript
SoraSuegami Oct 22, 2024
bc1b66d
Format
wshino Oct 22, 2024
c68f8e5
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Oct 22, 2024
bbcec4d
Remove setEnv from DeployRecoveryController
SoraSuegami Oct 22, 2024
4bb2dea
Specify commits in zk-email-verify
SoraSuegami Oct 22, 2024
948104b
Update version
SoraSuegami Oct 22, 2024
5174231
Remove testRequestGuardianNotOwner and add verifier test case for upg…
wshino Oct 23, 2024
7f6ac43
Merge pull request #70 from zkemail/feat/add-more-test-cases-from-bod…
wshino Oct 23, 2024
1481070
Merge branch 'feat/audit-fix-2024-09' into feat/body-parsing-with-aud…
SoraSuegami Oct 24, 2024
3efb454
Fix test_Revert_IfSignatureIsInvalid
wshino Oct 24, 2024
d13dca8
Update zk-email/contracts repo hash
SoraSuegami Oct 24, 2024
a4b9a41
Update zk-regex and circuit tests
SoraSuegami Oct 25, 2024
44eb51a
update zk-email/circuit and contract
SoraSuegami Oct 25, 2024
016440d
Update verifier and integration tests
SoraSuegami Oct 26, 2024
cb5bd35
Update prover
SoraSuegami Oct 26, 2024
6855db2
Use wasm&cpu for the prover temporarily.
SoraSuegami Oct 26, 2024
c806df4
Fix chain.rs for updates of Useroverridable dkim registry
SoraSuegami Oct 26, 2024
55c4d0e
Fix the forced subject
SoraSuegami Oct 26, 2024
0d0106f
Update versions
SoraSuegami Oct 26, 2024
2c8092a
Add gas limit param (#75)
wshino Oct 28, 2024
0caa739
Send cycles to call the dkim canister function
SoraSuegami Oct 28, 2024
54a5826
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Oct 28, 2024
5e3b3c1
remove warning
SoraSuegami Oct 28, 2024
68f200f
fix warning
SoraSuegami Oct 28, 2024
25b830e
Add string utils to ether-email-auth (#76)
JohnGuilding Oct 30, 2024
fc26610
Feat/audit fix 2024 09 gpus (#77)
SoraSuegami Oct 30, 2024
d2da1a6
Update zk-email/contracts
SoraSuegami Oct 30, 2024
ae1bf02
Fix script
SoraSuegami Oct 30, 2024
658cfad
Feat/deploy via oz defender (#73)
JohnGuilding Nov 1, 2024
e60d1de
update version
SoraSuegami Nov 1, 2024
06e2187
Use the address from deployerPrivateKey if no initialOwner is provided.
SoraSuegami Nov 1, 2024
5e6cf7b
Fix BaseDeployScript
SoraSuegami Nov 1, 2024
fd94061
Update integration test
SoraSuegami Nov 1, 2024
6761912
Feat/improve alerts (#72)
wshino Nov 1, 2024
9222426
Add support section (#78)
wshino Nov 1, 2024
985646d
Feat/add emergency docs (#71)
wshino Nov 1, 2024
e97f9f6
Feat/e2e zksync (#79)
wshino Nov 1, 2024
101a995
Merge branch 'main' of https://github.com/zkemail/ether-email-auth in…
SoraSuegami Nov 1, 2024
5851ac3
remove console in StringUtils
SoraSuegami Nov 1, 2024
3d98944
Import StringUtils in CommandUtils
SoraSuegami Nov 1, 2024
18edd1d
Feat/fix zksync commands (#80)
wshino Nov 2, 2024
5d9827d
Export a circuit with body parsing and the recipient feature.
SoraSuegami Nov 2, 2024
a3f5e3b
Merge branch 'feat/body-parsing-with-audit-fix' of https://github.com…
SoraSuegami Nov 2, 2024
8f3791f
Push the missing circuit
SoraSuegami Nov 2, 2024
aa1b98e
Add one more circuit test
SoraSuegami Nov 2, 2024
4a426c5
Separate tests for the recipient
SoraSuegami Nov 3, 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
64 changes: 64 additions & 0 deletions .github/workflows/build-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
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: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-0079a1146b79a4aeda58b0258215bedb1f92700b

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

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- 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.

42 changes: 38 additions & 4 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,8 +21,8 @@ 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.9 (Linux)
run: wget https://github.com/iden3/circom/releases/download/v2.1.9/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,37 @@ jobs:
- name: Run tests
working-directory: packages/contracts
run: yarn test

- name: Run script tests
working-directory: packages/contracts
run: yarn test:script

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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ packages/nft_relayer/logs
sql_database.db
.sqlx
.ic.pem
config.json

# Relayer
packages/relayer/sendgrid.env
Expand All @@ -57,6 +58,10 @@ sql_database.db
.sqlx
.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 +85,9 @@ book
# Vs code settings
.vscode

# Editor settings
.idea

# For zksync
zkout
.cache
Loading
Loading