@maci-protocol/website 0.0.0-ci.2f69240 → 0.0.0-ci.2ff3d96
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/blog/2024-02-28-maci-v1.2.0.md +1 -1
- package/blog/2025-03-21-roadmap-2025.md +1 -1
- package/blog/2025-08-18-maci-aragon-plugin.md +107 -0
- package/blog/2025-09-05-maci-coordinator-service.md +167 -0
- package/docusaurus.config.ts +7 -1
- package/package.json +10 -9
- package/versioned_docs/version-v0.x/contract.md +1 -1
- package/versioned_docs/version-v0.x/introduction.md +0 -4
- package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +1 -1
- package/versioned_docs/version-v1.2/circuits.md +8 -8
- package/versioned_docs/version-v1.2/contributing/contributing.md +4 -4
- package/versioned_docs/version-v1.2/deployment.md +1 -1
- package/versioned_docs/version-v1.2/integrating.md +1 -1
- package/versioned_docs/version-v1.2/key-change.md +1 -1
- package/versioned_docs/version-v1.2/poll-types.md +1 -1
- package/versioned_docs/version-v1.2/testing-in-detail.md +3 -3
- package/versioned_docs/version-v1.2/testing.md +1 -1
- package/versioned_docs/version-v1.2/topup.md +1 -1
- package/versioned_docs/version-v1.2/typedoc/core/index.md +2 -2
- package/versioned_docs/version-v1.2/versioning.md +3 -3
- package/versioned_docs/version-v1.2/workflow.md +1 -1
- package/versioned_docs/version-v2.x/contributing/contributing.md +4 -4
- package/versioned_docs/version-v2.x/core-concepts/key-change.md +1 -1
- package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +1 -1
- package/versioned_docs/version-v2.x/core-concepts/poll-types.md +1 -1
- package/versioned_docs/version-v2.x/core-concepts/workflow.md +1 -1
- package/versioned_docs/version-v2.x/guides/integrating.md +1 -1
- package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +3 -3
- package/versioned_docs/version-v2.x/guides/testing/testing.md +1 -1
- package/versioned_docs/version-v2.x/processes/versioning.md +3 -3
- package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +7 -7
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +1 -1
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +4 -4
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +2 -2
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +3 -3
- package/versioned_docs/version-v3.x/contributing/contributing.md +11 -5
- package/versioned_docs/version-v3.x/core-concepts/key-change.md +1 -1
- package/versioned_docs/version-v3.x/core-concepts/poll-types.md +1 -1
- package/versioned_docs/version-v3.x/core-concepts/polls.md +1 -1
- package/versioned_docs/version-v3.x/core-concepts/workflow.md +1 -1
- package/versioned_docs/version-v3.x/guides/integrating.md +2 -2
- package/versioned_docs/version-v3.x/guides/sdk.md +121 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +3 -3
- package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +4 -4
- package/versioned_docs/version-v3.x/guides/troubleshooting.md +2 -2
- package/versioned_docs/version-v3.x/processes/versioning.md +3 -3
- package/versioned_docs/version-v3.x/security/trusted-setup.md +1 -1
- package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +7 -7
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +15 -1
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +5 -33
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/usage.md +64 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.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/smart-contracts/VoiceCreditProxy.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/technical-references.md +8 -8
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +1 -1
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +66 -6
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +2 -2
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +3 -3
|
@@ -154,7 +154,7 @@ Within the circuits folder, there are a number of tests that are used to verify
|
|
|
154
154
|
|
|
155
155
|
These tests often use mock data from the `core` package. For instance, when testing the `processMessages` circuit, we are required to generate the parameters from the `core` packing, using the `Poll:processMessages` function. The same applies to vote tallying, where we need the `Poll:tally` function to be run first with mock users and vote messages.
|
|
156
156
|
|
|
157
|
-
All of the tests run using test parameters, usually `10, 20, 2`, aside from the tests inside: [`ceremonyParam`](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
157
|
+
All of the tests run using test parameters, usually `10, 20, 2`, aside from the tests inside: [`ceremonyParam`](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/ts/__tests__/CeremonyParams.test.ts) which use the parameters of the latest MACI ceremony. More details on the trusted setup can be found [here](/docs/security/trusted-setup).
|
|
158
158
|
|
|
159
159
|
### Core
|
|
160
160
|
|
|
@@ -162,7 +162,7 @@ The core package contains a number of tests that are used to verify that the cor
|
|
|
162
162
|
|
|
163
163
|
These tests interact with the crypto and dombinobjs packages, where mock data comes from. Their main goal is to ensure that the core functions work as expected, and that the state is as expected after a series of operations.
|
|
164
164
|
|
|
165
|
-
Currently, there is a blend of e2e and unit tests, where e2e tests are used to verify that the entire MACI local processing works as expected (users signup, publish votes, messages are processed and finally these votes are tallied). Unit tests on the other hand are used to verify that the core functions work as expected, such as `MessageProcessor` and `VoteTally`. You will find them in separate files, with e2e being [here](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
165
|
+
Currently, there is a blend of e2e and unit tests, where e2e tests are used to verify that the entire MACI local processing works as expected (users signup, publish votes, messages are processed and finally these votes are tallied). Unit tests on the other hand are used to verify that the core functions work as expected, such as `MessageProcessor` and `VoteTally`. You will find them in separate files, with e2e being [here](https://github.com/privacy-scaling-explorations/maci/blob/main/core/ts/__tests__/e2e.test.ts) and unit tests in the other files.
|
|
166
166
|
|
|
167
167
|
### Domainobjs/Crypto tests
|
|
168
168
|
|
|
@@ -170,7 +170,7 @@ These tests are used to verify that MACI's primitives such as private keys work
|
|
|
170
170
|
|
|
171
171
|
## "Manual" Testing
|
|
172
172
|
|
|
173
|
-
To ensure that the MACI stack works as expected, without having to run the entire test suite (or even just the e2e tests), there is a [bash script](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
173
|
+
To ensure that the MACI stack works as expected, without having to run the entire test suite (or even just the e2e tests), there is a [bash script](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/testScriptLocalhost.sh) inside the contracts folder which can be used.
|
|
174
174
|
|
|
175
175
|
This script contains a number of actions which touch all of the parts of MACI, and resemble exactly what other e2e tests do.
|
|
176
176
|
|
|
@@ -112,7 +112,7 @@ circuits.
|
|
|
112
112
|
|
|
113
113
|
Note the locations of the `.zkey` files as the smart contract tasks require them as part of the JSON configuration file.
|
|
114
114
|
|
|
115
|
-
For testing purposes you can download the required artifacts using the [`download-zkeys:test`](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
115
|
+
For testing purposes you can download the required artifacts using the [`download-zkeys:test`](https://github.com/privacy-scaling-explorations/maci/blob/main/package.json#L15). The script will place all required artifacts inside the `cli/zkeys` folder.
|
|
116
116
|
|
|
117
117
|
You can run the script directly with bash or use pnpm: `pnpm run download:test-zkeys` from the monorepo root.
|
|
118
118
|
|
|
@@ -123,19 +123,19 @@ From the root folder, run:
|
|
|
123
123
|
**for c++ witness generator**
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
pnpm build:circuits-c -- --outPath
|
|
126
|
+
pnpm build:circuits-c -- --outPath ../../zkeys
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
**for wasm witness generator**
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
pnpm build:circuits-wasm -- --outPath
|
|
132
|
+
pnpm build:circuits-wasm -- --outPath ../../zkeys
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
**generate zkeys**
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
|
-
pnpm setup:zkeys --outPath
|
|
138
|
+
pnpm setup:zkeys --outPath ../../zkeys
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
### Check the Rapidsnark binary
|
|
@@ -71,7 +71,7 @@ Error: commitment mismatch
|
|
|
71
71
|
|
|
72
72
|
This is because commitments are generated using random salts, thus will differ at each `generateProofs` run.
|
|
73
73
|
|
|
74
|
-
In [core/Poll.ts](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
74
|
+
In [core/Poll.ts](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/core/ts/Poll.ts):
|
|
75
75
|
|
|
76
76
|
```
|
|
77
77
|
let newSbSalt = genRandomSalt();
|
|
@@ -140,7 +140,7 @@ event MergeMessageAqSubRoots(uint256 indexed _numSrQueueOps);
|
|
|
140
140
|
event MergeMessageAq(uint256 indexed _messageRoot);
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
Please remember to pull the latest MACI repo updates(`git fetch origin && git pull origin
|
|
143
|
+
Please remember to pull the latest MACI repo updates(`git fetch origin && git pull origin main`) and run `pnpm build` in the root of this monorepo.
|
|
144
144
|
|
|
145
145
|
### Verifier contract found the proof invalid
|
|
146
146
|
|
|
@@ -19,7 +19,7 @@ MACI follows the [Semantic Versioning Specification (SemVer)](https://semver.org
|
|
|
19
19
|
|
|
20
20
|
All MACI packages are organized in our monorepo and follow a global release approach, meaning that all packages have the same version.
|
|
21
21
|
|
|
22
|
-
Currently, MACI core team manually decides when to release and what the version should be. Packages are released [automatically via CI](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
22
|
+
Currently, MACI core team manually decides when to release and what the version should be. Packages are released [automatically via CI](https://github.com/privacy-scaling-explorations/maci/blob/main/.github/workflows/release.yml) when a new tag is created in GitHub. [You can view our releases and tags in GitHub](https://github.com/privacy-scaling-explorations/maci/releases).
|
|
23
23
|
|
|
24
24
|
## MACI Release Process
|
|
25
25
|
|
|
@@ -37,10 +37,10 @@ Version number '1.2.3' is used here as an example. You should replace the versio
|
|
|
37
37
|
git clone https://github.com/privacy-scaling-explorations/maci
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
3. Switch to the `
|
|
40
|
+
3. Switch to the `main` branch:
|
|
41
41
|
|
|
42
42
|
```
|
|
43
|
-
git checkout
|
|
43
|
+
git checkout main
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
4. Install required dependencies:
|
|
@@ -17,7 +17,7 @@ to manage a large amount of value, and if their users accept that the risk of
|
|
|
17
17
|
coordinator misbehaviour is insufficient to justify doing the work of a
|
|
18
18
|
trusted setup. After all, MACI's security model presumes a trusted coordinator.
|
|
19
19
|
|
|
20
|
-
The [PSE team](https://pse.
|
|
20
|
+
The [PSE team](https://pse.main/) is making available a trusted set of zKeys for MACI's circuits,
|
|
21
21
|
which are available and accessible on
|
|
22
22
|
[p0tion's website](https://ceremony.pse.dev/).
|
|
23
23
|
For more info on trusted setup ceremonies please refer to p0tion's [docs](https://p0tion.super.site/).
|
|
@@ -7,14 +7,14 @@ sidebar_position: 2
|
|
|
7
7
|
|
|
8
8
|
There are a number of MACI's smart contracts which can be re-used by different deployments. These are the following:
|
|
9
9
|
|
|
10
|
-
- [VerifyingKeysRegistry](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
11
|
-
- [PoseidonHashers](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
12
|
-
- [PollFactory](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
13
|
-
- [MessageProcessorFactory](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
14
|
-
- [TallyFactory](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
15
|
-
- [Verifier](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
10
|
+
- [VerifyingKeysRegistry](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/VerifyingKeysRegistry.sol)
|
|
11
|
+
- [PoseidonHashers](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/crypto/Hasher.sol)
|
|
12
|
+
- [PollFactory](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/PollFactory.sol)
|
|
13
|
+
- [MessageProcessorFactory](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/MessageProcessorFactory.sol)
|
|
14
|
+
- [TallyFactory](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/TallyFactory.sol)
|
|
15
|
+
- [Verifier](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/crypto/Verifier.sol)
|
|
16
16
|
- [FreeForAllPolicy](https://github.com/privacy-scaling-explorations/excubiae/tree/main/packages/contracts/contracts/extensions/freeForAll)
|
|
17
|
-
- [ConstantInitialVoiceCreditProxy](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
17
|
+
- [ConstantInitialVoiceCreditProxy](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol) - if you are happy to work with a fixed amount of credits
|
|
18
18
|
|
|
19
19
|
VkRegistries can be re-used by different protocols to share the same set of verifying keys. Please be advised that you should be verifying that those verifying keys are the ones that have undergone a trusted setup ceremony.
|
|
20
20
|
|
|
@@ -7,4 +7,18 @@ sidebar_position: 1
|
|
|
7
7
|
|
|
8
8
|
# Coordinator Service
|
|
9
9
|
|
|
10
|
-
Welcome to the Coordinator Service technical reference.
|
|
10
|
+
Welcome to the Coordinator Service technical reference. This guide describes how the Coordinator Service works, its workflow, and how to interact with it. For more technical code documentation regarding API endpoints and data transfer objects, please refer to the [API documentation](https://coordinator.maci.vote/api).
|
|
11
|
+
|
|
12
|
+
## Responsibilities
|
|
13
|
+
|
|
14
|
+
A MACI coordinator is responsible for running voting processes. In quadratic funding rounds or authority election rounds, the coordinator is the entity that defines who can vote, which projects or candidates are eligible for funding, and the duration of the voting round.
|
|
15
|
+
|
|
16
|
+
First of all, the coordinator needs to deploy the MACI smart contracts with the desired configuration: gatekeeper policy, which defines who can sign up as a voter; the state Merkle tree depth which defines the maximum number of voters; and the voting mode which defines how votes will be counted (more info in [Poll types](https://maci.pse.dev/docs/core-concepts/poll-types#quadratic-voting)).
|
|
17
|
+
|
|
18
|
+
After deploying the MACI contracts, the coordinator can deploy a poll (which represents a voting process). To deploy the poll, the coordinator needs to specify: the gatekeeper policy, which defines who can join the poll as a voter; the start and end dates of the poll; the number of options to vote for; the maximum number of votes per voter; and the voting mode.
|
|
19
|
+
|
|
20
|
+
The coordinator will then wait until the poll ends, after which they will need to finalize the poll. This involves processing all published messages, extracting the votes, tallying them, and submitting the results on-chain.
|
|
21
|
+
|
|
22
|
+
## Conclusion
|
|
23
|
+
|
|
24
|
+
In the following documents, we will go through the details of setting up the Coordinator Service and how to interact with it to perform the tasks described above.
|
package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md
CHANGED
|
@@ -5,39 +5,11 @@ sidebar_label: Installation
|
|
|
5
5
|
sidebar_position: 2
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
2. Generate RSA key pair with `pnpm run generate-keypair`.
|
|
10
|
-
3. Download zkey files using `pnpm run download-zkeys:{type}` (only test type is available for now).
|
|
11
|
-
4. Make sure you copied RSA public key to your application. This will be needed for encrypting `Authorization` header and coordinator private key for proof generation. Also it can be accessed through API method `GET v1/proof/publicKey`.
|
|
12
|
-
5. Run `pnpm run start` to run the service.
|
|
13
|
-
6. All API calls must be called with `Authorization` header, where the value is encrypted with RSA public key you generated before. Header value contains message signature and message digest created by `COORDINATOR_ADDRESSES`. The format is `publicEncrypt({signature}:{digest})`.
|
|
14
|
-
Make sure you set `COORDINATOR_ADDRESSES` env variable and sign any message with the addresses from your application (see [AccountSignatureGuard](./ts/auth/AccountSignatureGuard.service.ts)).
|
|
15
|
-
7. Proofs can be generated with `POST v1/proof/generate` API method or with Websockets (see [dto spec](./ts/proof/dto.ts), [controller](./ts/app.controller.ts) and [wsgateway](./ts/events/events.gateway.ts)).
|
|
16
|
-
|
|
17
|
-
## Subgraph deployment
|
|
18
|
-
|
|
19
|
-
It is possible to deploy subgraph using coordinator service.
|
|
20
|
-
|
|
21
|
-
First, you need to setup subgraph and create a project. [Subgraph dashboard](https://thegraph.com/studio/).
|
|
22
|
-
|
|
23
|
-
Then, set env variables:
|
|
8
|
+
There are two ways to run the coordinator service: building it from source or using Docker. Both methods require you to clone the MACI repository and move to the project root directory.
|
|
24
9
|
|
|
10
|
+
```bash
|
|
11
|
+
git clone https://github.com/privacy-scaling-explorations/maci
|
|
12
|
+
cd maci
|
|
25
13
|
```
|
|
26
|
-
# Subgraph name
|
|
27
|
-
SUBGRAPH_NAME="maci-subgraph"
|
|
28
|
-
|
|
29
|
-
# Subgraph provider url
|
|
30
|
-
SUBGRAPH_PROVIDER_URL=https://api.studio.thegraph.com/deploy/
|
|
31
|
-
|
|
32
|
-
# Subgraph deploy key
|
|
33
|
-
SUBGRAPH_DEPLOY_KEY=*******
|
|
34
14
|
|
|
35
|
-
|
|
36
|
-
SUBGRAPH_FOLDER=../subgraph
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
After deployment, subgraph url will be available in studio dashboard and you can use this type of url to get latest deployed version in your application:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
https://api.studio.thegraph.com/.../{SUBGRAPH_NAME}/version/latest
|
|
43
|
-
```
|
|
15
|
+
You need to check the latest [README.md](https://github.com/privacy-ethereum/maci/tree/main/apps/coordinator) instructions in the coordinator service app for detailed information about requirements and steps to install, build, and run the service.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Usage
|
|
3
|
+
description: Learn how to interact with a running MACI coordinator service instance.
|
|
4
|
+
sidebar_label: Usage
|
|
5
|
+
sidebar_position: 3
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
After setting up and running the MACI coordinator service, you can interact with it through its RESTful API. The service provides various endpoints for deployment and finalization of polls. Please refer to the API documentation at [https://coordinator.maci.vote/api](https://coordinator.maci.vote/api) for the exact request format and required parameters for all endpoint calls described below.
|
|
9
|
+
|
|
10
|
+
# Authentication
|
|
11
|
+
|
|
12
|
+
The coordinator service uses a custom signature authentication mechanism to guard the deploy endpoints. To interact with these endpoints, you need to:
|
|
13
|
+
|
|
14
|
+
1. Make sure you have run the command to set up and generate the RSA keypair, as described in the instructions section.
|
|
15
|
+
|
|
16
|
+
2. Ensure that your Ethereum public key is set in the `.env` file under the `COORDINATOR_ADDRESSES` variable.
|
|
17
|
+
|
|
18
|
+
3. Get the RSA public key from the coordinator service with [https://coordinator.maci.vote/v1/proof/publicKey](https://coordinator.maci.vote/v1/proof/publicKey).
|
|
19
|
+
|
|
20
|
+
4. Sign a message such as "authenticate-me" using the coordinator's Ethereum private key.
|
|
21
|
+
|
|
22
|
+
5. Encrypt both the message (also called digest) and its signature using the RSA public key. For example, you can use RSA public-key encryption in the format:
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
const payload: string = "signature:digest";
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then encrypt this payload using the coordinator’s RSA public key.
|
|
29
|
+
|
|
30
|
+
# Deploy MACI
|
|
31
|
+
|
|
32
|
+
To deploy the set of MACI smart contracts, you need to call the endpoint [https://coordinator.maci.vote/v1/deploy/maci](https://coordinator.maci.vote/v1/deploy/maci) with a POST request. The request body should include the necessary parameters for the deployment, such as the gatekeeper policy, state tree depth, and voting mode.
|
|
33
|
+
|
|
34
|
+
# Deploy Poll
|
|
35
|
+
|
|
36
|
+
To deploy a new poll to an existing MACI instance, you need to call the endpoint [https://coordinator.maci.vote/v1/deploy/poll](https://coordinator.maci.vote/v1/deploy/poll) with a POST request. The request body should include the necessary parameters for the poll deployment, such as the gatekeeper policy, start and end dates, number of options, and voting mode.
|
|
37
|
+
|
|
38
|
+
# Deploy Subgraph
|
|
39
|
+
|
|
40
|
+
To deploy a subgraph for a MACI instance and its corresponding polls, you need to call the endpoint [https://coordinator.maci.vote/v1/subgraph/deploy](https://coordinator.maci.vote/v1/subgraph/deploy) with a POST request. The request body should include the necessary parameters for the subgraph deployment, such as the MACI contract address and the subgraph name.
|
|
41
|
+
|
|
42
|
+
# Finalize Poll
|
|
43
|
+
|
|
44
|
+
To finalize a poll, you need to follow a series of steps that involve processing messages, merging state trees, generating proofs, and submitting the final tally on-chain. The Coordinator Service provides endpoints for each of these steps.
|
|
45
|
+
|
|
46
|
+
## Merge
|
|
47
|
+
|
|
48
|
+
To merge the published messages and create the required state tree, you need to call the endpoint [https://coordinator.maci.vote/v1/proof/merge](https://coordinator.maci.vote/v1/proof/merge) with a POST request. The request body should include the necessary parameters for the merge operation, such as the MACI contract address and the poll ID.
|
|
49
|
+
|
|
50
|
+
## Generate
|
|
51
|
+
|
|
52
|
+
Once the Merkle trees are ready, you can generate the zk-SNARK proof for the final tally by calling the endpoint [https://coordinator.maci.vote/v1/proof/generate](https://coordinator.maci.vote/v1/proof/generate) with a POST request. The request body should include the necessary parameters for the proof generation, such as the MACI contract address and the poll ID.
|
|
53
|
+
|
|
54
|
+
## Submit
|
|
55
|
+
|
|
56
|
+
After generating the proof, you can submit the final tally on-chain by calling the endpoint [https://coordinator.maci.vote/v1/proof/submit](https://coordinator.maci.vote/v1/proof/submit) with a POST request. The request body should include the necessary parameters for the submission, such as the MACI contract address, poll ID, and the generated proof.
|
|
57
|
+
|
|
58
|
+
# Schedule Poll
|
|
59
|
+
|
|
60
|
+
After deploying a poll, you can schedule it to be finalized automatically after it ends. Make sure to set the MACI coordinator private key in the `.env` file. To do so, you need to call the endpoint [https://coordinator.maci.vote/v1/schedule/poll](https://coordinator.maci.vote/v1/schedule/poll) with a POST request. The request body should include the necessary parameters for scheduling the poll, such as the MACI contract address and the poll ID.
|
|
61
|
+
|
|
62
|
+
# Health
|
|
63
|
+
|
|
64
|
+
To check that the env variables are set correctly and the service is running, you can call the health endpoint [https://coordinator.maci.vote/v1/health](https://coordinator.maci.vote/v1/health) with a GET request. This endpoint will return a status message indicating the rapidsnark access, redis database connection, zkeys access, and the MACI coordinator address with its funds in each MACI-compatible network.
|
|
@@ -6,7 +6,7 @@ sidebar_position: 1
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [MACI.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [MACI.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/MACI.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
`MACI.sol` is the core contract of the project, as it provides the base layer for user signups and Polls to be created.
|
package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md
CHANGED
|
@@ -6,7 +6,7 @@ sidebar_position: 4
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [MessageProcessor.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [MessageProcessor.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/MessageProcessor.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
This contract is used to prepare parameters for the zk-SNARK circuits as well as for verifying proofs. It should be deployed alongside a `Poll`.
|
|
@@ -6,7 +6,7 @@ sidebar_position: 9
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [Params.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [Params.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/utilities/Params.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
A contract holding three structs:
|
|
@@ -21,7 +21,7 @@ The MACI repository comes with several out-of-the-box options:
|
|
|
21
21
|
- `HatsPolicy` - This allows gatekeeping signups to only users who have a specific [Hat](https://www.hatsprotocol.xyz/).
|
|
22
22
|
- `GitcoinPassportPolicy` - This allows gatekeeping signups to only users who have a specific [Gitcoin Passport](https://passport.gitcoin.co/) score.
|
|
23
23
|
- `ZupassPolicy` - This allows gatekeeping signups only to users who have a valid [Zupass PCD ticket](https://github.com/proofcarryingdata/zupass).
|
|
24
|
-
- `SemaphorePolicy` - This allows gatekeeping signups only to users who can prove they are part of a [Semaphore](https://semaphore.pse.
|
|
24
|
+
- `SemaphorePolicy` - This allows gatekeeping signups only to users who can prove they are part of a [Semaphore](https://semaphore.pse.main/) group.
|
|
25
25
|
|
|
26
26
|
You can find all of the latest policy contracts here:
|
|
27
27
|
https://github.com/privacy-scaling-explorations/excubiae/tree/main/packages/contracts/contracts/extensions
|
|
@@ -6,7 +6,7 @@ sidebar_position: 2
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [Poll.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [Poll.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/Poll.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
This contract allows users to submit their votes.
|
|
@@ -6,7 +6,7 @@ sidebar_position: 3
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [PollFactory.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [PollFactory.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/PollFactory.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
`PollFactory` is a smart contract that is used to deploy new Polls. This is used by MACI inside the `deployPoll` function.
|
|
@@ -6,7 +6,7 @@ sidebar_position: 5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [Tally.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [Tally.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/Tally.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
The `Tally` contract is used by the coordinator to submit commitments to the tally results via the `tallyVotes` function. This is done in batches and the final commitment can be used by the users to verify the validity of the results.
|
|
@@ -6,7 +6,7 @@ sidebar_position: 8
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [VerifyingKeysRegistry.sol](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
9
|
+
Code location: [VerifyingKeysRegistry.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/VerifyingKeysRegistry.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
The VerifyingKeysRegistry is a contract that holds the verifying keys for the zk-SNARK circuits. It holds four different sets of keys:
|
package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md
CHANGED
|
@@ -6,7 +6,7 @@ sidebar_position: 7
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [InitialVoiceCreditProxy](https://github.com/privacy-scaling-explorations/maci/tree/
|
|
9
|
+
Code location: [InitialVoiceCreditProxy](https://github.com/privacy-scaling-explorations/maci/tree/main/contracts/contracts/initialVoiceCreditProxy)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
12
|
The VoiceCreditProxy contract is used to assign voice credits to users. Whichever implementation should the MACI deployers use, this must implement a view function that returns the balance for a user, such as the one below:
|
|
@@ -19,7 +19,7 @@ The MACI smart contracts handle the on-chain aspects - both the functionality an
|
|
|
19
19
|
|
|
20
20
|
The MACI smart contracts are written in [Solidity](https://soliditylang.org/).
|
|
21
21
|
|
|
22
|
-
Contracts are released through the [`@maci-contracts`](https://www.npmjs.com/package
|
|
22
|
+
Contracts are released through the [`@maci-protocol/contracts`](https://www.npmjs.com/package/@maci-protocol/contracts) NPM package.
|
|
23
23
|
|
|
24
24
|
[Learn more about MACI contracts](/docs/technical-references/smart-contracts/)
|
|
25
25
|
|
|
@@ -29,12 +29,12 @@ The TypeScript libraries manage the business logic between the smart contracts a
|
|
|
29
29
|
|
|
30
30
|
The MACI [TypeScript](https://www.typescriptlang.org/) libraries are released through the following NPM packages:
|
|
31
31
|
|
|
32
|
-
- [`@maci-cli`](https://www.npmjs.com/package
|
|
33
|
-
- [`@maci-core`](https://www.npmjs.com/package
|
|
34
|
-
- [`@maci-crypto`](https://www.npmjs.com/package
|
|
35
|
-
- [`@maci-domainobjs`](https://www.npmjs.com/package
|
|
36
|
-
- [`@maci-integrationtests`](https://www.npmjs.com/package
|
|
37
|
-
- [`@maci-sdk`](https://www.npmjs.com/package
|
|
32
|
+
- [`@maci-protocol/cli`](https://www.npmjs.com/package/@maci-protocol/cli)
|
|
33
|
+
- [`@maci-protocol/core`](https://www.npmjs.com/package/@maci-protocol/core)
|
|
34
|
+
- [`@maci-protocol/crypto`](https://www.npmjs.com/package/@maci-protocol/crypto)
|
|
35
|
+
- [`@maci-protocol/domainobjs`](https://www.npmjs.com/package/@maci-protocol/domainobjs)
|
|
36
|
+
- [`@maci-protocol/integrationtests`](https://www.npmjs.com/package/@maci-protocol/integrationtests)
|
|
37
|
+
- [`@maci-protocol/sdk`](https://www.npmjs.com/package/@maci-protocol/sdk)
|
|
38
38
|
|
|
39
39
|
## Circuits
|
|
40
40
|
|
|
@@ -43,6 +43,6 @@ MACI has multiple circuits that ensure all off-chain computation is completed co
|
|
|
43
43
|
The circuits for these zero-knowledge proofs are written
|
|
44
44
|
in [Circom](https://iden3.io/circom).
|
|
45
45
|
|
|
46
|
-
The MACI circuits are released through the [`@maci-circuits`](https://www.npmjs.com/package
|
|
46
|
+
The MACI circuits are released through the [`@maci-protocol/circuits`](https://www.npmjs.com/package/@maci-protocol/circuits) NPM package.
|
|
47
47
|
|
|
48
48
|
[Learn more about MACI circuits](/docs/technical-references/zk-snark-circuits/)
|
|
@@ -5,7 +5,7 @@ sidebar_label: Join Poll Circuit
|
|
|
5
5
|
sidebar_position: 6
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
8
|
+
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/voter)
|
|
9
9
|
|
|
10
10
|
## PollJoining
|
|
11
11
|
|
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/
|
|
8
|
+
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator)
|
|
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 [`MessageProcessorQv`](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
12
|
+
The [`MessageProcessorQv`](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator/qv/MessageProcessor.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
|
|
@@ -18,14 +18,74 @@ The pre-requisites for this circuit are:
|
|
|
18
18
|
|
|
19
19
|
This circuit requires the coordinator's private key, hence a proof for this circuit can only be generated by the coordinator. The private key is needed in order to generate the ECDH shared key used to decrypt the messages.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
```mermaid
|
|
22
|
+
flowchart LR
|
|
23
|
+
parameters(["MessageProcessorQv - Parameters"])
|
|
24
|
+
parameters --> stateTreeDepth["stateTreeDepth"]
|
|
25
|
+
parameters --> batchSize["batchSize"]
|
|
26
|
+
parameters --> voteOptionTreeDepth["voteOptionTreeDepth"]
|
|
27
|
+
|
|
28
|
+
stateTreeDepth & batchSize & voteOptionTreeDepth --> publicInputs["Public inputs"]
|
|
29
|
+
|
|
30
|
+
subgraph publicInputs
|
|
31
|
+
direction LR
|
|
32
|
+
totalSignups ~~~ index
|
|
33
|
+
batchEndIndex ~~~ currentSbCommitment
|
|
34
|
+
newSbCommitment ~~~ outputBatchHash
|
|
35
|
+
actualStateTreeDepth ~~~ coordinatorPublicKeyHash
|
|
36
|
+
voteOptions
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
publicInputs --> privateInputs
|
|
40
|
+
|
|
41
|
+
subgraph privateInputs
|
|
42
|
+
direction LR
|
|
43
|
+
inputBatchHash ~~~ messages
|
|
44
|
+
coordinatorPrivateKey ~~~ encryptionPublicKeys
|
|
45
|
+
currentStateRoot ~~~ currentStateLeaves
|
|
46
|
+
currentStateLeavesPathElements ~~~ currentSbSalt
|
|
47
|
+
newSbSalt ~~~ currentBallotRoot
|
|
48
|
+
currentBallots ~~~ currentBallotsPathElements
|
|
49
|
+
currentVoteWeights ~~~ currentVoteWeightsPathElements
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
privateInputs --> step1["1 - Verify currentSbCommitment"]
|
|
53
|
+
step1 --> step1B["hash(currentStateRoot, currentBallotRoot, currentSbSalt)"]
|
|
54
|
+
|
|
55
|
+
privateInputs --> step2["2 – Check voteOptions upper-bound"]
|
|
56
|
+
step2 --> step2B["voteOptions <= 5 ** voteOptionTreeDepth"]
|
|
57
|
+
|
|
58
|
+
privateInputs --> step3["3 – Ensure totalSignups within capacity"]
|
|
59
|
+
step3 --> step3B["totalSignups <= 2 ** stateTreeDepth"]
|
|
60
|
+
|
|
61
|
+
privateInputs --> step4["4 – Hash each message + pub-key"]
|
|
62
|
+
step4 --> step4B["MessageHasher template loop"]
|
|
63
|
+
|
|
64
|
+
privateInputs --> step5["5 – Build and verify chainHash"]
|
|
65
|
+
step5 --> step5B["PoseidonHasher template loop + Mux1"]
|
|
66
|
+
|
|
67
|
+
privateInputs --> step6["6 – Derive & verify coordinator pubKey"]
|
|
68
|
+
step6 --> step6B["PrivateToPublicKey -> derivedPublicKeyHash == coordinatorPublicKeyHash"]
|
|
69
|
+
|
|
70
|
+
privateInputs --> step7["7 – Decrypt each message to a command using MessageToCommand"]
|
|
71
|
+
step7 --> step7B["MessageToCommand template loop"]
|
|
72
|
+
|
|
73
|
+
privateInputs --> step8["8 – Process messages in reverse order"]
|
|
74
|
+
step8 --> step8B["SingleMessageProcessorQv template loop"]
|
|
75
|
+
|
|
76
|
+
privateInputs --> step9["9 – Compute newSbCommitment"]
|
|
77
|
+
step9 --> step9B["hash(stateRoot, ballotRoot, newSbSalt)"]
|
|
78
|
+
|
|
79
|
+
privateInputs --> step10["10 – Verify provided newSbCommitment"]
|
|
80
|
+
step10 --> step10B["equality with computed commitment"]
|
|
81
|
+
```
|
|
22
82
|
|
|
23
83
|
:::info
|
|
24
|
-
A version working with non quadratic voting (non-qv) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
84
|
+
A version working with non quadratic voting (non-qv) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator/non-qv/MessageProcessor.circom). This version is called `MessageProcessorNonQV` and is to be used when the Poll is not using the quadratic voting feature. Note that by default MACI works with quadratic voting.
|
|
25
85
|
:::
|
|
26
86
|
|
|
27
87
|
:::info
|
|
28
|
-
A version working with full credits voting (full) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
88
|
+
A version working with full credits voting (full) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/main/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.
|
|
29
89
|
:::
|
|
30
90
|
|
|
31
91
|
#### Parameters
|
|
@@ -96,7 +156,7 @@ A simplified example using a tree of arity 2:
|
|
|
96
156
|
|
|
97
157
|
To prove that `a...d` are leaves of the tree with root `r`, we prove that the leaves have the subroot `s` with depth 2, and _then_ prove that `s` is a member of `r` at depth 1.
|
|
98
158
|
|
|
99
|
-
The implementation for this is in the `QuinBatchLeavesExists` circuit in `https://github.com/privacy-scaling-explorations/maci/blob/
|
|
159
|
+
The implementation for this is in the `QuinBatchLeavesExists` circuit in `https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/trees/incrementalQuinTree.circom`.
|
|
100
160
|
|
|
101
161
|
This method requires fewer circuit constraints than if we verified a Merkle proof for each leaf.
|
|
102
162
|
|
|
@@ -5,7 +5,7 @@ sidebar_label: Tally Votes Circuit
|
|
|
5
5
|
sidebar_position: 4
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
8
|
+
[**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/core)
|
|
9
9
|
|
|
10
10
|
#### Parameters
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ sidebar_position: 4
|
|
|
18
18
|

|
|
19
19
|
|
|
20
20
|
:::info
|
|
21
|
-
A version working with non quadratic and full credits voting (non-qv, full) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
21
|
+
A version working with non quadratic and full credits voting (non-qv, full) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator/non-qv/VoteTally.circom). This version is called `tallyVotes` 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
|
@@ -5,10 +5,10 @@ sidebar_label: zk-SNARK Circuits
|
|
|
5
5
|
sidebar_position: 1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
MACI has three main zk-SNARK [circuits](https://github.com/privacy-scaling-explorations/maci/tree/
|
|
8
|
+
MACI has three main zk-SNARK [circuits](https://github.com/privacy-scaling-explorations/maci/tree/main/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/
|
|
11
|
-
2. TallyVotes.circom, which counts votes from users' ballots, batch by batch. [QV](https://github.com/privacy-scaling-explorations/maci/blob/
|
|
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/main/circuits/circom/coordinator/qv/MessageProcessor.circom), [non-QV](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator/non-qv/MessageProcessor.circom), [Full](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator/full/MessageProcessor.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/main/circuits/circom/coordinator/qv/VoteTally.circom) and [non-QV](https://github.com/privacy-scaling-explorations/maci/blob/main/circuits/circom/coordinator/non-qv/VoteTally.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.
|