@maci-protocol/website 0.0.0-ci.c584537 → 0.0.0-ci.c898917
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 +4 -4
- package/versioned_docs/version-v3.x/core-concepts/poll-types.md +6 -30
- package/versioned_docs/version-v3.x/core-concepts/polls.md +6 -30
- package/versioned_docs/version-v3.x/guides/compile-circuits.md +7 -23
- package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +1 -7
- package/versioned_docs/version-v3.x/quick-start.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +3 -7
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maci-protocol/website",
|
|
3
|
-
"version": "0.0.0-ci.
|
|
3
|
+
"version": "0.0.0-ci.c898917",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@docusaurus/module-type-aliases": "^3.7.0",
|
|
42
42
|
"@docusaurus/tsconfig": "^3.7.0",
|
|
43
43
|
"@docusaurus/types": "^3.7.0",
|
|
44
|
-
"@types/node": "^22.15.
|
|
45
|
-
"@types/react": "^19.1.
|
|
44
|
+
"@types/node": "^22.15.8",
|
|
45
|
+
"@types/react": "^19.1.2",
|
|
46
46
|
"ts-node": "^10.9.2",
|
|
47
47
|
"typescript": "^5.8.3"
|
|
48
48
|
},
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=18.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "a11f636a1b4af5f3e12ba0ce0a354a45fba30530"
|
|
65
65
|
}
|
|
@@ -5,7 +5,7 @@ sidebar_label: Poll types
|
|
|
5
5
|
sidebar_position: 9
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
MACI allows to conduct polls in both a quadratic voting and non quadratic voting fashion. One should be aware that the only distinction between the two happens when messages are processed and votes tallied. On top of that, the Tally smart contract has been split into two different ones, with the non quadratic voting version one being slightly smaller, due to the need of one less function.
|
|
8
|
+
MACI allows to conduct polls in both a quadratic voting and non quadratic voting fashion. One should be aware that the only distinction between the two happens when messages are processed and votes tallied. On top of that, the Tally smart contract has been split into two different ones, with the non quadratic voting version one being slightly smaller, due to the need of one less function.
|
|
9
9
|
|
|
10
10
|
This document will explain how to use each of these options. Hardhat tasks are the currently recommended way to deploy contracts and run polls but you can also use the MACI cli.
|
|
11
11
|
|
|
@@ -17,13 +17,13 @@ To run a poll with quadratic voting, the coordinator must deploy the Poll with t
|
|
|
17
17
|
|
|
18
18
|
### Using Hardhat tasks
|
|
19
19
|
|
|
20
|
-
In the deploy-config.json file set the `
|
|
20
|
+
In the deploy-config.json file set the `useQuadraticVoting` value to **true**.
|
|
21
21
|
|
|
22
22
|
```json
|
|
23
23
|
"Poll": {
|
|
24
24
|
"pollDuration": 604800,
|
|
25
25
|
"coordinatorPublicKey": "macipk",
|
|
26
|
-
"
|
|
26
|
+
"useQuadraticVoting": true
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -37,41 +37,17 @@ pnpm deploy-poll:NETWORK
|
|
|
37
37
|
|
|
38
38
|
The non quadratic voting option is a new feature that has been added to MACI with the v1.2 release. It allows to conduct polls without the quadratic voting mechanism. This means that the number of voice credits is not reduced by the square of the weight of the vote casted. This option is useful for polls where the quadratic voting mechanism is not necessary, and it is also slightly cheaper for coordinators to tally votes, as there are less checks required in the Tally smart contract.
|
|
39
39
|
|
|
40
|
-
To run a poll with non quadratic voting, the coordinator must set the `
|
|
40
|
+
To run a poll with non quadratic voting, the coordinator must set the `useQuadraticVoting` parameter to `false` when creating the MACI instance. This will make the MACI instance use the `TallyNonQv` smart contract, which is a smaller version of the `Tally` smart contract, as it does not require the checks for the quadratic voting mechanism.
|
|
41
41
|
|
|
42
42
|
### Using Hardhat tasks
|
|
43
43
|
|
|
44
|
-
In the deploy-config.json file set the `
|
|
44
|
+
In the deploy-config.json file set the `useQuadraticVoting` value to **false**.
|
|
45
45
|
|
|
46
46
|
```json
|
|
47
47
|
"Poll": {
|
|
48
48
|
"pollDuration": 604800,
|
|
49
49
|
"coordinatorPublicKey": "macipk",
|
|
50
|
-
"
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Then run the task to create a poll:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pnpm deploy-poll:NETWORK
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Full Credits Voting
|
|
61
|
-
|
|
62
|
-
Full Credits Voting is a new feature introduced in MACI v3. This voting mode disables the quadratic voting mechanism and requires participants to allocate their entire voice credit balance to a single option. Unlike quadratic voting, where the cost of votes increases quadratically with the number of votes cast, Full Credits Voting uses a linear model: participants spend all their available voice credits on one chosen option. No splitting across multiple options is allowed. This option is useful for polls where the quadratic voting mechanism is not necessary and where it's important to ensure voters fully commit to a single choice—eliminating fragmented or spread-out voting behavior. It also offers a slight cost advantage for coordinators, as tallying is more efficient with fewer checks required in the Tally smart contract.
|
|
63
|
-
|
|
64
|
-
To run a poll full credits voting, the coordinator must set the `mode` parameter to `full` when creating the MACI instance. This will make the MACI instance use the `TallyNonQv` smart contract, which is a smaller version of the `Tally` smart contract, as it does not require the checks for the quadratic voting mechanism.
|
|
65
|
-
|
|
66
|
-
### Using Hardhat tasks
|
|
67
|
-
|
|
68
|
-
In the deploy-config.json file set the `mode` value to **full**.
|
|
69
|
-
|
|
70
|
-
```json
|
|
71
|
-
"Poll": {
|
|
72
|
-
"pollDuration": 604800,
|
|
73
|
-
"coordinatorPublicKey": "macipk",
|
|
74
|
-
"mode": "full"
|
|
50
|
+
"useQuadraticVoting": false
|
|
75
51
|
}
|
|
76
52
|
```
|
|
77
53
|
|
|
@@ -11,7 +11,7 @@ Currently, you can configure the following parameters for a poll:
|
|
|
11
11
|
|
|
12
12
|
- Poll duration, in the form of a unix timestamp for start and end times. This allows polls to be scheduled to start at a certain time, and run for a certain amount of time.
|
|
13
13
|
- Vote option - how many vote options are allowed for a poll.
|
|
14
|
-
- Vote mode - quadratic
|
|
14
|
+
- Vote mode - quadratic or non quadratic voting. One should be aware that the only distinction between the two happens when messages are processed and votes tallied.
|
|
15
15
|
- Policy - the Excubiae policy that will be used to gate access to the poll.
|
|
16
16
|
- Initial voice credit proxy - the initial voice credit proxy that will be used to assign voice credits to voters.
|
|
17
17
|
- Relayer - the list of addresses that will be able to relay messages on behalf of other users (for now this is recommended to be the coordinator only)
|
|
@@ -40,13 +40,13 @@ To run a poll with quadratic voting, the coordinator must deploy the Poll with t
|
|
|
40
40
|
|
|
41
41
|
### Using Hardhat tasks
|
|
42
42
|
|
|
43
|
-
In the deploy-config.json file set the `
|
|
43
|
+
In the deploy-config.json file set the `useQuadraticVoting` value to **true**.
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
46
|
"Poll": {
|
|
47
47
|
[...]
|
|
48
48
|
"coordinatorPublicKey": "macipk",
|
|
49
|
-
"
|
|
49
|
+
"useQuadraticVoting": true
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -60,41 +60,17 @@ pnpm deploy-poll:NETWORK
|
|
|
60
60
|
|
|
61
61
|
The non quadratic voting option is a new feature that has been added to MACI with the v1.2 release. It allows to conduct polls without the quadratic voting mechanism. This means that the number of voice credits is not reduced by the square of the weight of the vote casted. This option is useful for polls where the quadratic voting mechanism is not necessary, and it is also slightly cheaper for coordinators to tally votes, as there are less checks required in the Tally smart contract.
|
|
62
62
|
|
|
63
|
-
To run a poll with non quadratic voting, the coordinator must set the `
|
|
63
|
+
To run a poll with non quadratic voting, the coordinator must set the `useQuadraticVoting` parameter to `false` when creating the MACI instance.
|
|
64
64
|
|
|
65
65
|
### Using Hardhat tasks
|
|
66
66
|
|
|
67
|
-
In the deploy-config.json file set the `
|
|
67
|
+
In the deploy-config.json file set the `useQuadraticVoting` value to **false**.
|
|
68
68
|
|
|
69
69
|
```json
|
|
70
70
|
"Poll": {
|
|
71
71
|
[...]
|
|
72
72
|
"coordinatorPublicKey": "macipk",
|
|
73
|
-
"
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Then run the task to create a poll:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
pnpm deploy-poll:NETWORK
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Full Credits Voting
|
|
84
|
-
|
|
85
|
-
Full Credits Voting is a new feature introduced in MACI v3. This voting mode disables the quadratic voting mechanism and requires participants to allocate their entire voice credit balance to a single option. Unlike quadratic voting, where the cost of votes increases quadratically with the number of votes cast, Full Credits Voting uses a linear model: participants spend all their available voice credits on one chosen option. No splitting across multiple options is allowed. This option is useful for polls where the quadratic voting mechanism is not necessary and where it's important to ensure voters fully commit to a single choice—eliminating fragmented or spread-out voting behavior. It also offers a slight cost advantage for coordinators, as tallying is more efficient with fewer checks required in the Tally smart contract.
|
|
86
|
-
|
|
87
|
-
To run a poll with full credits voting, the coordinator must set the `mode` parameter to `full` when creating the MACI instance.
|
|
88
|
-
|
|
89
|
-
### Using Hardhat tasks
|
|
90
|
-
|
|
91
|
-
In the deploy-config.json file set the `mode` value to **full**.
|
|
92
|
-
|
|
93
|
-
```json
|
|
94
|
-
"Poll": {
|
|
95
|
-
[...]
|
|
96
|
-
"coordinatorPublicKey": "macipk",
|
|
97
|
-
"mode": "full"
|
|
73
|
+
"useQuadraticVoting": false
|
|
98
74
|
}
|
|
99
75
|
```
|
|
100
76
|
|
|
@@ -77,24 +77,24 @@ Remember that if on a ARM64 chip, you will not be able to compile the c++ witnes
|
|
|
77
77
|
|
|
78
78
|
### Configure circomkit
|
|
79
79
|
|
|
80
|
-
Edit `circuits/circom/circuits` to include the circuits you would like to compile. This comes already configured with the main coordinator circuits, in
|
|
80
|
+
Edit `circuits/circom/circuits` to include the circuits you would like to compile. This comes already configured with the two main coordinator circuits, in both qv and non qv variants, as well as the client side circuit. The parameters are designed to support testing use cases:
|
|
81
81
|
|
|
82
82
|
```json
|
|
83
83
|
{
|
|
84
84
|
"PollJoining_10_test": {
|
|
85
|
-
"file": "./voter/PollJoining",
|
|
85
|
+
"file": "./anon/voter/PollJoining",
|
|
86
86
|
"template": "PollJoining",
|
|
87
87
|
"params": [10],
|
|
88
88
|
"pubs": ["nullifier", "stateRoot", "pollPublicKey", "pollId"]
|
|
89
89
|
},
|
|
90
90
|
"PollJoined_10_test": {
|
|
91
|
-
"file": "./voter/PollJoined",
|
|
91
|
+
"file": "./anon/voter/PollJoined",
|
|
92
92
|
"template": "PollJoined",
|
|
93
93
|
"params": [10],
|
|
94
94
|
"pubs": ["stateRoot"]
|
|
95
95
|
},
|
|
96
96
|
"ProcessMessages_10-20-2_test": {
|
|
97
|
-
"file": "./
|
|
97
|
+
"file": "./core/qv/processMessages",
|
|
98
98
|
"template": "ProcessMessages",
|
|
99
99
|
"params": [10, 20, 2],
|
|
100
100
|
"pubs": [
|
|
@@ -110,7 +110,7 @@ Edit `circuits/circom/circuits` to include the circuits you would like to compil
|
|
|
110
110
|
]
|
|
111
111
|
},
|
|
112
112
|
"ProcessMessagesNonQv_10-20-2_test": {
|
|
113
|
-
"file": "./
|
|
113
|
+
"file": "./core/non-qv/processMessages",
|
|
114
114
|
"template": "ProcessMessagesNonQv",
|
|
115
115
|
"params": [10, 20, 2],
|
|
116
116
|
"pubs": [
|
|
@@ -125,30 +125,14 @@ Edit `circuits/circom/circuits` to include the circuits you would like to compil
|
|
|
125
125
|
"voteOptions"
|
|
126
126
|
]
|
|
127
127
|
},
|
|
128
|
-
"ProcessMessagesFull_10-20-2_test": {
|
|
129
|
-
"file": "./coordinator/non-qv/MessageProcessor",
|
|
130
|
-
"template": "MessageProcessorFull",
|
|
131
|
-
"params": [10, 20, 2],
|
|
132
|
-
"pubs": [
|
|
133
|
-
"totalSignups",
|
|
134
|
-
"index",
|
|
135
|
-
"batchEndIndex",
|
|
136
|
-
"currentSbCommitment",
|
|
137
|
-
"newSbCommitment",
|
|
138
|
-
"outputBatchHash",
|
|
139
|
-
"actualStateTreeDepth",
|
|
140
|
-
"coordinatorPublicKeyHash",
|
|
141
|
-
"voteOptions"
|
|
142
|
-
]
|
|
143
|
-
},
|
|
144
128
|
"TallyVotes_10-1-2_test": {
|
|
145
|
-
"file": "./
|
|
129
|
+
"file": "./core/qv/tallyVotes",
|
|
146
130
|
"template": "TallyVotes",
|
|
147
131
|
"params": [10, 1, 2],
|
|
148
132
|
"pubs": ["index", "totalSignups", "sbCommitment", "currentTallyCommitment", "newTallyCommitment"]
|
|
149
133
|
},
|
|
150
134
|
"TallyVotesNonQv_10-1-2_test": {
|
|
151
|
-
"file": "./
|
|
135
|
+
"file": "./core/non-qv/tallyVotes",
|
|
152
136
|
"template": "TallyVotesNonQv",
|
|
153
137
|
"params": [10, 1, 2],
|
|
154
138
|
"pubs": ["index", "totalSignups", "sbCommitment", "currentTallyCommitment", "newTallyCommitment"]
|
|
@@ -74,7 +74,7 @@ or download them. Please remember to not use these testing `.zkey` files in prod
|
|
|
74
74
|
MACI has two main zk-SNARK circuits, `processMessages` and `tallyVotes`.
|
|
75
75
|
|
|
76
76
|
:::info
|
|
77
|
-
The `processMessages` and `tallyVotes` circuits are also provided in a non-quadratic voting (non-QV)
|
|
77
|
+
The `processMessages` and `tallyVotes` circuits are also provided in a non-quadratic voting (non-QV) version. Currently these new versions have not undergone a trusted setup ceremony.
|
|
78
78
|
:::
|
|
79
79
|
|
|
80
80
|
Each circuit is parameterised and there should be one
|
|
@@ -151,12 +151,6 @@ To run e2e tests with normal voting (not quadratic voting):
|
|
|
151
151
|
pnpm run test:e2e-non-qv
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
To run e2e tests with full credits voting (full):
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
pnpm run test:e2e-full
|
|
158
|
-
```
|
|
159
|
-
|
|
160
154
|
To run integration tests:
|
|
161
155
|
|
|
162
156
|
```bash
|
|
@@ -142,7 +142,7 @@ The VerifyingKeysRegistry hold the verifying keys used to verify the proofs, on
|
|
|
142
142
|
| **messageTreeDepth** | Defines how many messages (votes) the system supports. |
|
|
143
143
|
| **voteOptionTreeDepth** | Defines how many vote options the system supports. |
|
|
144
144
|
| **messageBatchDepth** | Defines how many messages in a batch can the circuit process. |
|
|
145
|
-
| **zkeys** | Defines the path to the zkey files for QV
|
|
145
|
+
| **zkeys** | Defines the path to the zkey files for QV and Non QV keys. |
|
|
146
146
|
| **pollJoiningZkey** | Defines the zkey to the poll joining circuit which allows to join polls for voting. |
|
|
147
147
|
| **pollJoinedZkey** | Defines the zkey to the poll joined circuit which allows to prove you joined a poll. |
|
|
148
148
|
|
|
@@ -149,7 +149,7 @@ Polls require the following information:
|
|
|
149
149
|
- `coordinatorPubKey`: the public key of the poll's coordinator
|
|
150
150
|
- `verifier`: the address of the zk-SNARK verifier contract
|
|
151
151
|
- `vkRegistry`: the address of the vk registry contract
|
|
152
|
-
- `mode`: the mode of the poll, to set whether it supports quadratic voting
|
|
152
|
+
- `mode`: the mode of the poll, to set whether it supports quadratic voting or non quadratic voting
|
|
153
153
|
- `signUpPolicy`: the address of the sign up policy contract
|
|
154
154
|
- `initialVoiceCreditProxy`: the address of the initial voice credit proxy contract
|
|
155
155
|
- `relayers`: the addresses of the relayers for the poll (if offchain voting is enabled)
|
|
@@ -34,7 +34,7 @@ This contract should be deployed alongside a `Poll`, with the the constructor ac
|
|
|
34
34
|
- `vkRegistry` - The address of the vkRegistry contract
|
|
35
35
|
- `poll` - The address of the poll contract
|
|
36
36
|
- `messageProcessor` - The address of the messageProcessor contract
|
|
37
|
-
- `mode` - The mode of the tally contract - depending on this, the commitments will be processed differently, and it must equal the Poll mode (quadratic vs non quadratic
|
|
37
|
+
- `mode` - The mode of the tally contract - depending on this, the commitments will be processed differently, and it must equal the Poll mode (quadratic vs non quadratic voting)
|
|
38
38
|
|
|
39
39
|
Users can use the verification functions to verify the Tally results. These are as follows:
|
|
40
40
|
|
|
@@ -18,7 +18,7 @@ The VerifyingKeysRegistry is a contract that holds the verifying keys for the zk
|
|
|
18
18
|
|
|
19
19
|
Each circuit will have a signature which is its compile-time constants represented as a uint256.
|
|
20
20
|
|
|
21
|
-
Please note that each Verifying Key should be set with the corresponding mode. Available modes are quadratic
|
|
21
|
+
Please note that each Verifying Key should be set with the corresponding mode. Available modes are quadratic voting and non quadratic voting.
|
|
22
22
|
|
|
23
23
|
The contract owner can set them using the `setVerifyingKeysBatch` function:
|
|
24
24
|
|
package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md
CHANGED
|
@@ -5,11 +5,11 @@ sidebar_label: Process Messages Circuit
|
|
|
5
5
|
sidebar_position: 3
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/
|
|
8
|
+
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core)
|
|
9
9
|
|
|
10
10
|
This circuit allows the coordinator to prove that they have correctly processed each message in reverse order, in a consecutive batch of 5 ^ messageBatchDepth messages to the respective state leaf within the state tree. Coordinators would use this circuit to prove correct execution at the end of each Poll.
|
|
11
11
|
|
|
12
|
-
The [`processMessages`](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/
|
|
12
|
+
The [`processMessages`](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/qv/processMessages.circom) circuit will try to decrypt the messages, and based on the content of the message, update within itself the trees, to generate a proof that the coordinator's off-chain processing was done correctly. In other words, the circuit takes a final state, an initial state, and the leaves (messages and user signups) - it processes these messages via the different state transitions to finally check that the expected state is correct.
|
|
13
13
|
The pre-requisites for this circuit are:
|
|
14
14
|
|
|
15
15
|
- the related Poll has ended
|
|
@@ -21,11 +21,7 @@ This circuit requires the coordinator's private key, hence a proof for this circ
|
|
|
21
21
|

|
|
22
22
|
|
|
23
23
|
:::info
|
|
24
|
-
A version working with non quadratic voting (non-qv) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/
|
|
25
|
-
:::
|
|
26
|
-
|
|
27
|
-
:::info
|
|
28
|
-
A version working with full credits voting (full) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/coordinator/full/MessageProcessor.circom). This version is called `MessageProcessorFull` and is to be used when the Poll is not using the quadratic or non quadratic voting features. Note that by default MACI works with quadratic voting.
|
|
24
|
+
A version working with non quadratic voting (non-qv) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/non-qv/processMessages.circom). This version is called `processMessagesNonQV` and is to be used when the Poll is not using the quadratic voting feature. Note that by default MACI works with quadratic voting.
|
|
29
25
|
:::
|
|
30
26
|
|
|
31
27
|
#### Parameters
|
|
@@ -18,7 +18,7 @@ sidebar_position: 4
|
|
|
18
18
|

|
|
19
19
|
|
|
20
20
|
:::info
|
|
21
|
-
A version working with non quadratic
|
|
21
|
+
A version working with non quadratic voting (non-qv) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/non-qv/tallyVotes.circom). This version is called `tallyVotesNonQv` and is to be used when the Poll is not using the quadratic voting feature. Note that by default MACI works with quadratic voting.
|
|
22
22
|
:::
|
|
23
23
|
|
|
24
24
|
#### Input signals
|
package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md
CHANGED
|
@@ -7,8 +7,8 @@ sidebar_position: 1
|
|
|
7
7
|
|
|
8
8
|
MACI has three main zk-SNARK [circuits](https://github.com/privacy-scaling-explorations/maci/tree/dev/packages/circuits):
|
|
9
9
|
|
|
10
|
-
1. ProcessMessages.circom, which takes a batch of encrypted messages, decrypts them, and generates a proof that the coordinator's local processing was performed correctly. [QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/
|
|
11
|
-
2. TallyVotes.circom, which counts votes from users' ballots, batch by batch. [QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/
|
|
10
|
+
1. ProcessMessages.circom, which takes a batch of encrypted messages, decrypts them, and generates a proof that the coordinator's local processing was performed correctly. [QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/qv/processMessages.circom) and [non-QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/non-qv/processMessages.circom) versions are available.
|
|
11
|
+
2. TallyVotes.circom, which counts votes from users' ballots, batch by batch. [QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/qv/tallyVotes.circom) and [non-QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/core/non-qv/tallyVotes.circom) versions are available.
|
|
12
12
|
3. PollJoining.circom, which allows users to prove they know a private key for a public key signed up to the MACI smart contract, and to register to a specific poll.
|
|
13
13
|
|
|
14
14
|
The rest of the circuits are utilities templates that are required for the main circuits to work correctly. These include utilities such as float math, conversion of private keys, and Poseidon hashing/encryption.
|