Skip to content

Commit 0d8c322

Browse files
authored
Merge pull request #480 from semaphore-protocol/feat/semaphore-v4
Semaphore V4
2 parents 2bab9ac + e0bda47 commit 0d8c322

File tree

389 files changed

+24319
-24006
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

389 files changed

+24319
-24006
lines changed

.env.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
DEFAULT_NETWORK=hardhat
2-
TREE_DEPTH=20
3-
ALL_SNARK_ARTIFACTS=true
2+
TREE_DEPTH=10
43
REPORT_GAS=false
54
BACKEND_PRIVATE_KEY=
65
INFURA_API_KEY=
76
COINMARKETCAP_API_KEY=
87
ETHERSCAN_API_KEY=
8+
DEFENDER_KEY=
9+
DEFENDER_SECRET=
10+
CREATE2_SALT=1234

.github/workflows/docs.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,13 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
- name: Install Node.js
16-
uses: actions/setup-node@v1
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: 16.x
19-
20-
- name: Get yarn cache directory path
21-
id: yarn-cache-dir-path
22-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
23-
24-
- name: Restore yarn cache
25-
uses: actions/cache@v3
26-
id: yarn-cache
27-
with:
28-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
29-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-yarn-
18+
node-version: 20
19+
cache: yarn
3220

3321
- name: Install dependencies
3422
run: yarn

.github/workflows/production.yml

Lines changed: 21 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,20 @@ on:
66
- main
77

88
env:
9-
TREE_DEPTH: 20
10-
ALL_SNARK_ARTIFACTS: false
9+
TREE_DEPTH: 10
1110

1211
jobs:
1312
style:
1413
runs-on: ubuntu-latest
1514

1615
steps:
17-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1817

1918
- name: Install Node.js
20-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
2120
with:
22-
node-version: 16.x
23-
24-
- name: Get yarn cache directory path
25-
id: yarn-cache-dir-path
26-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
27-
28-
- name: Restore yarn cache
29-
uses: actions/cache@v3
30-
id: yarn-cache
31-
with:
32-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-yarn-
21+
node-version: 20
22+
cache: yarn
3623

3724
- name: Install dependencies
3825
run: yarn
@@ -56,25 +43,13 @@ jobs:
5643
runs-on: ubuntu-latest
5744

5845
steps:
59-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v4
6047

6148
- name: Install Node.js
62-
uses: actions/setup-node@v1
49+
uses: actions/setup-node@v4
6350
with:
64-
node-version: 16.x
65-
66-
- name: Get yarn cache directory path
67-
id: yarn-cache-dir-path
68-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
69-
70-
- name: Restore yarn cache
71-
uses: actions/cache@v3
72-
id: yarn-cache
73-
with:
74-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
75-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
76-
restore-keys: |
77-
${{ runner.os }}-yarn-
51+
node-version: 20
52+
cache: yarn
7853

7954
- name: Install dependencies
8055
run: yarn
@@ -90,40 +65,37 @@ jobs:
9065
strategy:
9166
matrix:
9267
type:
68+
- circuits
9369
- libraries
9470
- contracts
9571

9672
steps:
97-
- uses: actions/checkout@v2
73+
- uses: actions/checkout@v4
9874

9975
- name: Install Node.js
100-
uses: actions/setup-node@v1
76+
uses: actions/setup-node@v4
10177
with:
102-
node-version: 16.x
78+
node-version: 20
79+
cache: yarn
10380

104-
- name: Get yarn cache directory path
105-
id: yarn-cache-dir-path
106-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
81+
# https://github.com/iden3/circuits/blob/8fffb6609ecad0b7bcda19bb908bdb544bdb3cf7/.github/workflows/main.yml#L18-L22
82+
- name: Setup Circom deps
83+
run: sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
10784

108-
- name: Restore yarn cache
109-
uses: actions/cache@v3
110-
id: yarn-cache
111-
with:
112-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
113-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
114-
restore-keys: |
115-
${{ runner.os }}-yarn-
85+
- name: Setup Circom
86+
run: wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
11687

11788
- name: Install dependencies
11889
run: yarn
11990

12091
- name: Build libraries
12192
run: yarn build:libraries
12293

123-
- name: Test contracts and libraries
94+
- name: Test libraries, contracts and circuits
12495
run: yarn test:${{ matrix.type }}
12596

12697
- name: Coveralls
98+
if: matrix.type != 'circuits'
12799
uses: coverallsapp/github-action@master
128100
with:
129101
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pull-requests.yml

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,20 @@ on:
44
pull_request:
55

66
env:
7-
TREE_DEPTH: 20
8-
ALL_SNARK_ARTIFACTS: false
7+
TREE_DEPTH: 10
98

109
jobs:
1110
style:
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1615

1716
- name: Install Node.js
18-
uses: actions/setup-node@v1
17+
uses: actions/setup-node@v4
1918
with:
20-
node-version: 16.x
21-
22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
25-
26-
- name: Restore yarn cache
27-
uses: actions/cache@v3
28-
id: yarn-cache
29-
with:
30-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32-
restore-keys: |
33-
${{ runner.os }}-yarn-
19+
node-version: 20
20+
cache: yarn
3421

3522
- name: Install dependencies
3623
run: yarn
@@ -54,25 +41,20 @@ jobs:
5441
runs-on: ubuntu-latest
5542

5643
steps:
57-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v4
5845

5946
- name: Install Node.js
60-
uses: actions/setup-node@v1
47+
uses: actions/setup-node@v4
6148
with:
62-
node-version: 16.x
49+
node-version: 20
50+
cache: yarn
6351

64-
- name: Get yarn cache directory path
65-
id: yarn-cache-dir-path
66-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
52+
# https://github.com/iden3/circuits/blob/8fffb6609ecad0b7bcda19bb908bdb544bdb3cf7/.github/workflows/main.yml#L18-L22
53+
- name: Setup Circom deps
54+
run: sudo apt-get update && sudo apt-get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
6755

68-
- name: Restore yarn cache
69-
uses: actions/cache@v3
70-
id: yarn-cache
71-
with:
72-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
73-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
74-
restore-keys: |
75-
${{ runner.os }}-yarn-
56+
- name: Setup Circom
57+
run: wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
7658

7759
- name: Install dependencies
7860
run: yarn
@@ -83,5 +65,5 @@ jobs:
8365
- name: Build subgraph
8466
run: yarn build:subgraph
8567

86-
- name: Test contracts, libraries and subgraph
68+
- name: Test contracts, libraries, circuits and subgraph
8769
run: yarn test

.github/workflows/release.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,15 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

2020
- name: Install Node.js
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
23-
node-version: 16.x
24-
25-
- name: Get yarn cache directory path
26-
id: yarn-cache-dir-path
27-
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
28-
29-
- name: Restore yarn cache
30-
uses: actions/cache@v3
31-
id: yarn-cache
32-
with:
33-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-yarn-
23+
node-version: 20
24+
cache: yarn
3725

3826
- name: Install dependencies
3927
run: yarn

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ dist
7373
artifacts
7474
cache
7575
typechain-types
76-
packages/contracts/deployed-contracts/undefined.json
77-
packages/contracts/deployed-contracts/hardhat.json
78-
packages/contracts/deployed-contracts/localhost.json
7976

8077
# Stores VSCode versions used for testing VSCode extensions
8178
.vscode-test

.prettierignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ coverage.json
1212
artifacts
1313
cache
1414
typechain-types
15-
packages/contracts/deployed-contracts/undefined.json
16-
packages/contracts/deployed-contracts/hardhat.json
17-
packages/contracts/deployed-contracts/localhost.json
18-
19-
# circuits
20-
circuits
21-
22-
# contracts
23-
Verifier*.sol
2415

2516
# production
2617
dist

.yarn/plugins/@yarnpkg/plugin-version.cjs

Lines changed: 0 additions & 550 deletions
This file was deleted.

0 commit comments

Comments
 (0)