@maci-protocol/website 0.0.0-ci.4d3408f → 0.0.0-ci.50605da

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maci-protocol/website",
3
- "version": "0.0.0-ci.4d3408f",
3
+ "version": "0.0.0-ci.50605da",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -61,5 +61,5 @@
61
61
  "engines": {
62
62
  "node": ">=18.0"
63
63
  },
64
- "gitHead": "446cafb442e15bd4915954407df89e2e893aade0"
64
+ "gitHead": "ae3899c2e269f784f7a0ad330c79149ace97b367"
65
65
  }
@@ -78,7 +78,7 @@ Serialized, these will look like **macipk.0e5194a54562ea4d440ac6a0049a41d4b600e3
78
78
  After successfully [installing](/docs/quick-start#installation) MACI, you can easily generate your MACI key pair by running:
79
79
 
80
80
  ```bash
81
- pnpm run generateMaciKeyPair
81
+ pnpm run generate-maci-keypair
82
82
  ```
83
83
 
84
84
  This command will create the necessary public and private keys required for running various MACI operations.
@@ -159,3 +159,48 @@ Error: The verifier contract found the proof invalid.
159
159
  ### The on-chain verification of total spent voice credits failed
160
160
 
161
161
  If you ran the `verify` command and got this error, please ensure consistency in your use of quadratic voting throughout interactions with MACI, including poll deployment, proof generation, and verification.
162
+
163
+ ### Proof generation process is killed
164
+
165
+ If your terminal output ends like this:
166
+
167
+ ```
168
+ [i] Starting to fetch logs from block 8386826
169
+ [i] Generating proofs of message processing...
170
+ [i] Progress: 1 / 1
171
+ [i] Wait until proof generation is finished
172
+ Killed
173
+ ELIFECYCLE  Command failed with exit code 137.
174
+ ```
175
+
176
+ This typically indicates the proof generation process was terminated due to exceeding the system's available memory limit (exit code `137` = SIGKILL by the OS, often due to OOM).
177
+
178
+ Increase Node.js' memory allocation by setting the `NODE_OPTIONS` environment variable before running the command:
179
+
180
+ ```bash
181
+ export NODE_OPTIONS="--max-old-space-size=4096"
182
+ # You can increase the value further (e.g., 8192 for 8GB) if your system has enough RAM:
183
+ export NODE_OPTIONS="--max-old-space-size=8192"
184
+ ```
185
+
186
+ ### Error: Not enough or too many values for input signals
187
+
188
+ If you see errors like:
189
+
190
+ ```
191
+ Error: Not enough values for input signal currentVoteWeightsPathElements
192
+ at /home/maci/node_modules/.pnpm/circom_runtime@0.1.28/node_modules/circom_runtime/build/main.cjs:513:27
193
+ ...
194
+ ```
195
+
196
+ ```
197
+ Error: Too many values for input signal ballots
198
+ at /home/maci/node_modules/.pnpm/circom_runtime@0.1.28/node_modules/circom_runtime/build/main.cjs:513:27
199
+ ...
200
+ ```
201
+
202
+ This usually happens when the Merkle tree depth configured in your MACI deployment does not match the depth expected by the zkey files used during proof generation.
203
+ To solve this:
204
+
205
+ - Download the correct zkey files from a trusted source.
206
+ - Verify that the `stateTreeDepth`, `messageTreeDepth`, and `voteOptionTreeDepth` used in your CLI or config match the values used to generate those zkey files.
@@ -73,7 +73,7 @@ Currently, the ceremony artifacts work with MACI version up to 2.x
73
73
  In order to run MACI polls, a coordinator is required to publish their MACI public key. You will need to generate a MACI keypair, and treat the private key just as your ethereum private keys. Please store them in a safe place as you won't be able to finish a round if you lose access, or if compromised a bad actor could decrypt the vote and publish them online. You can generate a new key pair using maci-cli by running the following command in the root of the project:
74
74
 
75
75
  ```bash
76
- pnpm run generateMaciKeyPair
76
+ pnpm run generate-maci-keypair
77
77
  ```
78
78
 
79
79
  ### Set the .env
@@ -219,7 +219,7 @@ pnpm run prove:[network] --poll [poll-id] \
219
219
  ```
220
220
 
221
221
  :::info
222
- The `--coordinator-private-key` is the one you generated earlier with `pnpm run generateMaciKeyPair`.
222
+ The `--coordinator-private-key` is the one you generated earlier with `pnpm run generate-maci-keypair`.
223
223
 
224
224
  `--start-block` is the block number from which to start looking for events from. You can use the block that you deployed the contracts in.
225
225
 
@@ -0,0 +1,419 @@
1
+ ---
2
+ title: MACI Deployment and Operation Costs
3
+ description: MACI Deployment and Operation Costs
4
+ sidebar_label: MACI Deployment and Operation Costs
5
+ sidebar_position: 3
6
+ ---
7
+
8
+ ## Notes
9
+
10
+ - Prices are estimates and will vary based on actual gas prices and ETH/USD exchange rates.
11
+ - These values assume a consistent gas price across operations, which may vary on-chain.
12
+
13
+ ## Costs on Polygon zkEVM
14
+
15
+ Below are the estimated costs for various MACI operations and deployments, assuming:
16
+
17
+ - **Gas price**: 0.012 gwei
18
+ - **ETH price**: $2595
19
+
20
+ <details>
21
+ <summary>Contract calls cost</summary>
22
+
23
+ | Contract | Method | Min | Max | Avg | USD (avg) |
24
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
25
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.00402 |
26
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.00122 |
27
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.0016 |
28
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.00413 |
29
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.00379 |
30
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.00497 |
31
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.00413 |
32
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.00402 |
33
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.00413 |
34
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.00494 |
35
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.00564 |
36
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.00413 |
37
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.00286 |
38
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.00413 |
39
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.00402 |
40
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.00413 |
41
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.0054 |
42
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.00413 |
43
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.05052 |
44
+ | MACI | signUp | 197667 | 730480 | 315320 | 0.01007 |
45
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0038 |
46
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.00413 |
47
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.00806 |
48
+ | Poll | joinPoll | 282314 | 503970 | 334837 | 0.0107 |
49
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.00815 |
50
+ | Poll | padLastBatch | - | - | 81884 | 0.00262 |
51
+ | Poll | publishMessage | - | - | 358725 | 0.01146 |
52
+ | Poll | publishMessageBatch | - | - | 671490 | 0.02145 |
53
+ | Poll | relayMessagesBatch | - | - | 155235 | 0.00496 |
54
+ | PollFactory | deploy | - | - | 1099100 | 0.03511 |
55
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.00339 |
56
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.00413 |
57
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.24207 |
58
+ | Tally | tallyVotes | 147262 | 204522 | 161585 | 0.00516 |
59
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0031 |
60
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.00413 |
61
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.01447 |
62
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.01447 |
63
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.02829 |
64
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.05711 |
65
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.00659 |
66
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.00413 |
67
+
68
+ </details>
69
+
70
+ <details>
71
+ <summary>Deployment cost</summary>
72
+
73
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Limit | USD (avg) |
74
+ | ---------------------------------------- | ------- | ------- | ------- | ---------- | --------- |
75
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9% | 0.01813 |
76
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5% | 0.02426 |
77
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3% | 0.01213 |
78
+ | EASCheckerFactory | - | - | 623304 | 2.1% | 0.01991 |
79
+ | EASPolicyFactory | - | - | 690560 | 2.3% | 0.02206 |
80
+ | ERC20CheckerFactory | - | - | 446429 | 1.5% | 0.01426 |
81
+ | ERC20PolicyFactory | - | - | 684892 | 2.3% | 0.02188 |
82
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5% | 0.01483 |
83
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6% | 0.01540 |
84
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3% | 0.02191 |
85
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1% | 0.01054 |
86
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2% | 0.02088 |
87
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5% | 0.01482 |
88
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3% | 0.02195 |
89
+ | Hasher | - | - | 426472 | 1.4% | 0.01362 |
90
+ | HatsCheckerFactory | - | - | 572538 | 1.9% | 0.01829 |
91
+ | HatsPolicyFactory | - | - | 684664 | 2.3% | 0.02187 |
92
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0% | 0.05761 |
93
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6% | 0.01572 |
94
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3% | 0.02192 |
95
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1% | 0.05809 |
96
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4% | 0.11885 |
97
+ | PoseidonT3 | - | - | 2157126 | 7.2% | 0.06891 |
98
+ | PoseidonT4 | - | - | 2745274 | 9.2% | 0.0877 |
99
+ | PoseidonT5 | - | - | 3569887 | 11.9% | 0.11404 |
100
+ | PoseidonT6 | - | - | 4261625 | 14.2% | 0.13613 |
101
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9% | 0.01781 |
102
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5% | 0.02394 |
103
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3% | 0.06953 |
104
+ | TokenCheckerFactory | - | - | 435769 | 1.5% | 0.01392 |
105
+ | TokenPolicyFactory | - | - | 690920 | 2.3% | 0.02207 |
106
+ | Utilities | - | - | 664356 | 2.2% | 0.02122 |
107
+ | Verifier | - | - | 775226 | 2.6% | 0.02476 |
108
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9% | 0.05609 |
109
+ | ZupassCheckerFactory | - | - | 640425 | 2.1% | 0.02046 |
110
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7% | 0.03542 |
111
+ | ZupassPolicyFactory | - | - | 785744 | 2.6% | 0.0251 |
112
+
113
+ </details>
114
+
115
+ ## Costs on Scroll
116
+
117
+ Below are the estimated costs for various MACI operations and deployments, assuming:
118
+
119
+ - **Gas price**: 0.016 gwei
120
+ - **ETH price**: $2493
121
+
122
+ <details>
123
+ <summary>Contract calls cost</summary>
124
+
125
+ | Contract | Method | Min | Max | Avg | USD (avg) |
126
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
127
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.00496 |
128
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0016 |
129
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.00208 |
130
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.00512 |
131
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0048 |
132
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.00624 |
133
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.00512 |
134
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.00496 |
135
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.00512 |
136
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.00624 |
137
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.00704 |
138
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.00512 |
139
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.00352 |
140
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.00512 |
141
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.00496 |
142
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.00512 |
143
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.00672 |
144
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.00512 |
145
+ | MACI | deployPoll | 1580765 | 1583829 | 1581630 | 0.06304 |
146
+ | MACI | signUp | 197667 | 730492 | 315320 | 0.01264 |
147
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0048 |
148
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.00512 |
149
+ | MessageProcessor | processMessages | 252007 | 252918 | 252317 | 0.01008 |
150
+ | Poll | joinPoll | 282314 | 503970 | 334835 | 0.01328 |
151
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.01024 |
152
+ | Poll | padLastBatch | - | - | 81884 | 0.0032 |
153
+ | Poll | publishMessage | - | - | 358725 | 0.01424 |
154
+ | Poll | publishMessageBatch | - | - | 671502 | 0.02672 |
155
+ | Poll | relayMessagesBatch | - | - | 155235 | 0.00624 |
156
+ | PollFactory | deploy | - | - | 1099088 | 0.04384 |
157
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.00416 |
158
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.00512 |
159
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.30224 |
160
+ | Tally | tallyVotes | 147262 | 204522 | 161585 | 0.0064 |
161
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.00384 |
162
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.00512 |
163
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.01808 |
164
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.01808 |
165
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.03536 |
166
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.07136 |
167
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.00816 |
168
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.00512 |
169
+
170
+ </details>
171
+
172
+ <details>
173
+ <summary>Deployment cost</summary>
174
+
175
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
176
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
177
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.02272 |
178
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.03024 |
179
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0152 |
180
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0248 |
181
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.02752 |
182
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.01776 |
183
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.02736 |
184
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.01856 |
185
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0192 |
186
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.02736 |
187
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.01312 |
188
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.02608 |
189
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.01856 |
190
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.02736 |
191
+ | Hasher | - | - | 426472 | 1.4 % | 0.01696 |
192
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.02288 |
193
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.02736 |
194
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.072 |
195
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.01968 |
196
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.02736 |
197
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.07248 |
198
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.14848 |
199
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.08608 |
200
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.1096 |
201
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.1424 |
202
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.17008 |
203
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.02224 |
204
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.02992 |
205
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.08688 |
206
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.01744 |
207
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.02752 |
208
+ | Utilities | - | - | 664356 | 2.2 % | 0.02656 |
209
+ | Verifier | - | - | 775226 | 2.6 % | 0.03088 |
210
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.07008 |
211
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0256 |
212
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.04416 |
213
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.03136 |
214
+
215
+ </details>
216
+
217
+ ## Costs on Linea
218
+
219
+ Below are the estimated costs for various MACI operations and deployments, assuming:
220
+
221
+ - **Gas price**: 0.04 gwei
222
+ - **ETH price**: $2508
223
+
224
+ <details>
225
+ <summary>Contract calls cost</summary>
226
+
227
+ | Contract | Method | Min | Max | Avg | USD (avg) |
228
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
229
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.0126 |
230
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0038 |
231
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.005 |
232
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.013 |
233
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0119 |
234
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.0156 |
235
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.013 |
236
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.0126 |
237
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.013 |
238
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.0155 |
239
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.0177 |
240
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.013 |
241
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.009 |
242
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.013 |
243
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.0126 |
244
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.013 |
245
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.017 |
246
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.013 |
247
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.1587 |
248
+ | MACI | signUp | 197667 | 730504 | 315320 | 0.0316 |
249
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0119 |
250
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.013 |
251
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.0253 |
252
+ | Poll | joinPoll | 282314 | 503970 | 334838 | 0.0336 |
253
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.0256 |
254
+ | Poll | padLastBatch | - | - | 81884 | 0.0082 |
255
+ | Poll | publishMessage | - | - | 358737 | 0.0360 |
256
+ | Poll | publishMessageBatch | - | - | 671538 | 0.0674 |
257
+ | Poll | relayMessagesBatch | - | - | 155223 | 0.0156 |
258
+ | PollFactory | deploy | - | - | 1099100 | 0.1103 |
259
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.0106 |
260
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.013 |
261
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.7604 |
262
+ | Tally | tallyVotes | 147262 | 204522 | 161584 | 0.0162 |
263
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0098 |
264
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.013 |
265
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.0455 |
266
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.0455 |
267
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.0889 |
268
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.1794 |
269
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.0207 |
270
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.013 |
271
+
272
+ </details>
273
+
274
+ <details>
275
+ <summary>Deployment cost</summary>
276
+
277
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
278
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
279
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.057 |
280
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.0762 |
281
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0381 |
282
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0625 |
283
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.0693 |
284
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.0448 |
285
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.0687 |
286
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.0466 |
287
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0484 |
288
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.0688 |
289
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.0331 |
290
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.0656 |
291
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.0466 |
292
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.0689 |
293
+ | Hasher | - | - | 426472 | 1.4 % | 0.0428 |
294
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.0575 |
295
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.0687 |
296
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.181 |
297
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.0494 |
298
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.0689 |
299
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.1825 |
300
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.3734 |
301
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.2165 |
302
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.2755 |
303
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.3582 |
304
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.4277 |
305
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.0560 |
306
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.0752 |
307
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.2184 |
308
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.0437 |
309
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.0693 |
310
+ | Utilities | - | - | 664356 | 2.2 % | 0.0667 |
311
+ | Verifier | - | - | 775226 | 2.6 % | 0.0778 |
312
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.1762 |
313
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0643 |
314
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.1113 |
315
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.0788 |
316
+
317
+ </details>
318
+
319
+ ## Costs on ZkSync Era
320
+
321
+ Below are the estimated costs for various MACI operations and deployments, assuming:
322
+
323
+ - **Gas price**: 0.04 gwei
324
+ - **ETH price**: $2508
325
+
326
+ <details>
327
+ <summary>Contract calls cost</summary>
328
+
329
+ | Contract | Method | Min | Max | Avg | USD (avg) |
330
+ | ---------------------------------------- | -------------------------- | ------- | ------- | ------- | --------- |
331
+ | AnonAadhaarCheckerFactory | deploy | - | - | 125971 | 0.0126 |
332
+ | AnonAadhaarPolicy | enforce | - | - | 38141 | 0.0038 |
333
+ | AnonAadhaarPolicy | setTarget | 50133 | 50167 | 50149 | 0.005 |
334
+ | AnonAadhaarPolicyFactory | deploy | - | - | 129387 | 0.013 |
335
+ | ConstantInitialVoiceCreditProxyFactory | deploy | - | - | 118665 | 0.0119 |
336
+ | EASCheckerFactory | deploy | - | - | 155556 | 0.0156 |
337
+ | EASPolicyFactory | deploy | - | - | 129387 | 0.013 |
338
+ | ERC20CheckerFactory | deploy | - | - | 125959 | 0.0126 |
339
+ | ERC20PolicyFactory | deploy | - | - | 129365 | 0.013 |
340
+ | ERC20VotesCheckerFactory | deploy | - | - | 154673 | 0.0155 |
341
+ | ERC20VotesInitialVoiceCreditProxyFactory | deploy | - | - | 176590 | 0.0177 |
342
+ | ERC20VotesPolicyFactory | deploy | - | - | 129365 | 0.013 |
343
+ | FreeForAllCheckerFactory | deploy | - | - | 89376 | 0.009 |
344
+ | FreeForAllPolicyFactory | deploy | 129375 | 129387 | 129386 | 0.013 |
345
+ | GitcoinPassportCheckerFactory | deploy | - | - | 125937 | 0.0126 |
346
+ | GitcoinPassportPolicyFactory | deploy | - | - | 129365 | 0.013 |
347
+ | HatsCheckerFactory | deploy | - | - | 169023 | 0.017 |
348
+ | HatsPolicyFactory | deploy | - | - | 129387 | 0.013 |
349
+ | MACI | deployPoll | 1580765 | 1583829 | 1581626 | 0.1587 |
350
+ | MACI | signUp | 197667 | 730504 | 315320 | 0.0316 |
351
+ | MerkleProofCheckerFactory | deploy | - | - | 119047 | 0.0119 |
352
+ | MerkleProofPolicyFactory | deploy | - | - | 129387 | 0.013 |
353
+ | MessageProcessor | processMessages | 252019 | 252918 | 252319 | 0.0253 |
354
+ | Poll | joinPoll | 282314 | 503970 | 334838 | 0.0336 |
355
+ | Poll | mergeState | 198686 | 354005 | 255089 | 0.0256 |
356
+ | Poll | padLastBatch | - | - | 81884 | 0.0082 |
357
+ | Poll | publishMessage | - | - | 358737 | 0.0360 |
358
+ | Poll | publishMessageBatch | - | - | 671538 | 0.0674 |
359
+ | Poll | relayMessagesBatch | - | - | 155223 | 0.0156 |
360
+ | PollFactory | deploy | - | - | 1099100 | 0.1103 |
361
+ | SemaphoreCheckerFactory | deploy | - | - | 106047 | 0.0106 |
362
+ | SemaphorePolicyFactory | deploy | - | - | 129387 | 0.013 |
363
+ | Tally | addTallyResults | 7311562 | 7844012 | 7577787 | 0.7604 |
364
+ | Tally | tallyVotes | 147262 | 204522 | 161584 | 0.0162 |
365
+ | TokenCheckerFactory | deploy | - | - | 97197 | 0.0098 |
366
+ | TokenPolicyFactory | deploy | - | - | 129387 | 0.013 |
367
+ | VerifyingKeysRegistry | setPollJoinedVerifyingKey | - | - | 453033 | 0.0455 |
368
+ | VerifyingKeysRegistry | setPollJoiningVerifyingKey | - | - | 453011 | 0.0455 |
369
+ | VerifyingKeysRegistry | setVerifyingKeys | 885514 | 885526 | 885517 | 0.0889 |
370
+ | VerifyingKeysRegistry | setVerifyingKeysBatch | - | - | 1787720 | 0.1794 |
371
+ | ZupassCheckerFactory | deploy | - | - | 206318 | 0.0207 |
372
+ | ZupassPolicyFactory | deploy | - | - | 129365 | 0.013 |
373
+
374
+ </details>
375
+
376
+ <details>
377
+ <summary>Deployment cost</summary>
378
+
379
+ | Deployments | Min Gas | Max Gas | Avg Gas | % of Block Limit | USD (avg) |
380
+ | ---------------------------------------- | ------- | ------- | ------- | ---------------- | --------- |
381
+ | AnonAadhaarCheckerFactory | - | - | 567621 | 1.9 % | 0.057 |
382
+ | AnonAadhaarPolicyFactory | - | - | 759390 | 2.5 % | 0.0762 |
383
+ | ConstantInitialVoiceCreditProxyFactory | - | - | 379812 | 1.3 % | 0.0381 |
384
+ | EASCheckerFactory | - | - | 623304 | 2.1 % | 0.0625 |
385
+ | EASPolicyFactory | - | - | 690560 | 2.3 % | 0.0693 |
386
+ | ERC20CheckerFactory | - | - | 446429 | 1.5 % | 0.0448 |
387
+ | ERC20PolicyFactory | - | - | 684892 | 2.3 % | 0.0687 |
388
+ | ERC20VotesCheckerFactory | - | - | 464123 | 1.5 % | 0.0466 |
389
+ | ERC20VotesInitialVoiceCreditProxyFactory | - | - | 482127 | 1.6 % | 0.0484 |
390
+ | ERC20VotesPolicyFactory | - | - | 685960 | 2.3 % | 0.0688 |
391
+ | FreeForAllCheckerFactory | - | - | 329927 | 1.1 % | 0.0331 |
392
+ | FreeForAllPolicyFactory | - | - | 653501 | 2.2 % | 0.0656 |
393
+ | GitcoinPassportCheckerFactory | - | - | 463912 | 1.5 % | 0.0466 |
394
+ | GitcoinPassportPolicyFactory | - | - | 687052 | 2.3 % | 0.0689 |
395
+ | Hasher | - | - | 426472 | 1.4 % | 0.0428 |
396
+ | HatsCheckerFactory | - | - | 572538 | 1.9 % | 0.0575 |
397
+ | HatsPolicyFactory | - | - | 684664 | 2.3 % | 0.0687 |
398
+ | MACI | 1803354 | 1803438 | 1803408 | 6.0 % | 0.181 |
399
+ | MerkleProofCheckerFactory | - | - | 491985 | 1.6 % | 0.0494 |
400
+ | MerkleProofPolicyFactory | - | - | 686188 | 2.3 % | 0.0689 |
401
+ | MessageProcessorFactory | 1818377 | 1818401 | 1818398 | 6.1 % | 0.1825 |
402
+ | PollFactory | 3720635 | 3720683 | 3720678 | 12.4 % | 0.3734 |
403
+ | PoseidonT3 | - | - | 2157126 | 7.2 % | 0.2165 |
404
+ | PoseidonT4 | - | - | 2745274 | 9.2 % | 0.2755 |
405
+ | PoseidonT5 | - | - | 3569887 | 11.9 % | 0.3582 |
406
+ | PoseidonT6 | - | - | 4261625 | 14.2 % | 0.4277 |
407
+ | SemaphoreCheckerFactory | - | - | 557606 | 1.9 % | 0.0560 |
408
+ | SemaphorePolicyFactory | - | - | 749517 | 2.5 % | 0.0752 |
409
+ | TallyFactory | 2176647 | 2176671 | 2176668 | 7.3 % | 0.2184 |
410
+ | TokenCheckerFactory | - | - | 435769 | 1.5 % | 0.0437 |
411
+ | TokenPolicyFactory | - | - | 690920 | 2.3 % | 0.0693 |
412
+ | Utilities | - | - | 664356 | 2.2 % | 0.0667 |
413
+ | Verifier | - | - | 775226 | 2.6 % | 0.0778 |
414
+ | VerifyingKeysRegistry | - | - | 1755862 | 5.9 % | 0.1762 |
415
+ | ZupassCheckerFactory | - | - | 640425 | 2.1 % | 0.0643 |
416
+ | ZupassGroth16Verifier | - | - | 1108706 | 3.7 % | 0.1113 |
417
+ | ZupassPolicyFactory | - | - | 785744 | 2.6 % | 0.0788 |
418
+
419
+ </details>
@@ -23,6 +23,14 @@ MACI has been tested on the following EVM networks:
23
23
  - Gnosis Chiado
24
24
  - Polygon
25
25
  - Polygon Amoy
26
+ - Scroll
27
+ - Scroll Sepolia
28
+ - Linea
29
+ - Linea Sepolia
30
+ - Zksync Era
31
+ - Zksync Sepolia
32
+ - Polygon Zkevm
33
+ - Polygon Cardona Zkevm
26
34
 
27
35
  We recommend using either Optimism, Arbitrum or Base. Please open an issue/PR if you intend to use other EVM networks and would like to contribute to this record of deployed and verified contracts as well as benchmarks, that would be greatly appreciated.
28
36
 
@@ -42,6 +50,14 @@ For better UX, MACI clients should be sending votes (messages) in batches. Depen
42
50
  | Gnosis Chiado | 50 | 15921753 | 0.0000188313 ETH ($0.05) |
43
51
  | Polygon | 85 | 26915773 | 0.0002193417259598 ETH ($0.54) |
44
52
  | Polygon Amoy | 89 | 28192368 | 0.00017069180975304 ETH ($0.43) |
53
+ | Scroll | 62 | 19447318 | 0.000233368 ETH ($0.61) |
54
+ | Scroll Sepolia | 62 | 19447318 | 0.000233368 ETH ($0.61) |
55
+ | Linea | 14 | 4438205 | 0.00005325846 ETH ($0.1382) |
56
+ | Linea Sepolia | 14 | 4438205 | 0.00005325846 ETH ($0.1382) |
57
+ | Zksync Era | 2 | 24000690 | 0.00028801 ETH ($0.75) |
58
+ | Zksync Sepolia | 2 | 24000690 | 0.00028801 ETH ($0.75) |
59
+ | Polygon Zkevm | 6 | 1917872 | 0.00006904 ETH ($0.18) |
60
+ | Polygon Cardona | 6 | 1917872 | 0.00006904 ETH ($0.18) |
45
61
 
46
62
  ## Test yourself
47
63
 
@@ -37,7 +37,7 @@ MACI's circuits are parameterized, and thus can be configured to support differe
37
37
  - **STATE_TREE_DEPTH** = how many users the system supports
38
38
  - **VOTE_OPTIONS_TREE_DEPTH** = how many vote options the system supports
39
39
  - **MESSAGE_BATCH_SIZE** = how many messages in a batch the circuit should process
40
- - **TALLY_PROCESSING_STATE_TREE_DEPTH** = how many ballots can be processed per batch when tallying the results (`5 ** TALLY_PROCESSING_STATE_TREE_DEPTH` ballots)
40
+ - **TALLY_PROCESSING_STATE_TREE_DEPTH** = how many ballots can be processed per batch when tallying the results (`2 ** TALLY_PROCESSING_STATE_TREE_DEPTH` ballots)
41
41
 
42
42
  Please refer to the individual circuit documentation for more details on the inner working of each circuit and where parameters fit.
43
43