@maci-protocol/website 0.0.0-ci.a8b537a → 0.0.0-ci.aad6000
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/LICENSE +1 -2
- package/blog/2024-02-28-maci-v1.2.0.md +2 -2
- package/blog/2024-08-10-maci-v2.md +1 -1
- package/blog/2024-12-01-maci-getting-started.md +1 -1
- package/blog/2025-03-21-roadmap-2025.md +2 -2
- package/docusaurus.config.ts +9 -3
- package/package.json +16 -15
- package/src/pages/roadmap.md +39 -80
- package/static/img/circuits/MACI-Circuits.excalidraw +79 -79
- package/static/img/circuits/ecdh.svg +1 -1
- package/static/img/circuits/messageToCommand.svg +1 -1
- package/static/img/circuits/messageValidator.svg +1 -1
- package/static/img/circuits/privToPubkey.svg +1 -1
- package/static/img/circuits/processMessages.svg +1 -1
- package/static/img/circuits/processMessagesInputHasher.svg +1 -1
- package/static/img/circuits/processMessages_2_0.svg +1 -1
- package/static/img/circuits/processOne.svg +1 -1
- package/static/img/circuits/processTopup.svg +1 -1
- package/static/img/circuits/quinBatchLeavesExists.svg +1 -1
- package/static/img/circuits/quinCheckRoot.svg +1 -1
- package/static/img/circuits/quinGeneratePathIndices.svg +1 -1
- package/static/img/circuits/quinSelector.svg +1 -1
- package/static/img/circuits/resultsCommitmentVerifier.svg +1 -1
- package/static/img/circuits/splicer.svg +1 -1
- package/static/img/circuits/tallyInputHasher.svg +1 -1
- package/static/img/circuits/tallyVotes.svg +1 -1
- package/static/img/circuits/verifySignature.svg +1 -1
- package/static/img/relayer-diagram.png +0 -0
- package/versioned_docs/version-v0.x/introduction.md +0 -4
- package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +16 -16
- 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 +4 -4
- package/versioned_docs/version-v3.x/core-concepts/coordinator-service.md +16 -0
- package/versioned_docs/version-v3.x/core-concepts/key-change.md +29 -29
- package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +1 -1
- package/versioned_docs/version-v3.x/core-concepts/offchain-voting.md +14 -0
- package/versioned_docs/version-v3.x/core-concepts/poll-types.md +33 -9
- package/versioned_docs/version-v3.x/core-concepts/polls.md +34 -10
- package/versioned_docs/version-v3.x/core-concepts/spec.md +43 -109
- package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +2 -2
- package/versioned_docs/version-v3.x/core-concepts/workflow.md +9 -3
- package/versioned_docs/version-v3.x/guides/compile-circuits.md +36 -20
- package/versioned_docs/version-v3.x/guides/integrating.md +10 -10
- package/versioned_docs/version-v3.x/guides/sdk.md +121 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +4 -4
- package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +35 -3
- package/versioned_docs/version-v3.x/guides/troubleshooting.md +64 -19
- package/versioned_docs/version-v3.x/processes/versioning.md +3 -3
- package/versioned_docs/version-v3.x/quick-start.md +29 -21
- package/versioned_docs/version-v3.x/resources.md +1 -0
- package/versioned_docs/version-v3.x/security/audit.md +2 -2
- package/versioned_docs/version-v3.x/security/trusted-setup.md +36 -36
- package/versioned_docs/version-v3.x/supported-networks/costs.md +725 -0
- package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +9 -9
- package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +16 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +10 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/index.md +51 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/installation.md +109 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +7 -7
- 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 +2 -2
- 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 +8 -8
- 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 +4 -4
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +8 -8
- 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 +4 -5
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +81 -17
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +3 -3
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +6 -6
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +9 -9
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +3 -3
|
@@ -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
|
-
- [
|
|
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
|
|
|
@@ -25,11 +25,11 @@ In order to verify you will need the following:
|
|
|
25
25
|
- run checkVerifyingKeys with the cli (see below)
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
cd cli && node build/ts/index.js checkVerifyingKeys -q false -vk 0x74569d524a193daC0D3Df17B9E207C916174745b -s 6 -i 2 -m 9 -v 3 -b 2 -p ./zkeys/
|
|
28
|
+
cd cli && node build/ts/index.js checkVerifyingKeys -q false -vk 0x74569d524a193daC0D3Df17B9E207C916174745b -s 6 -i 2 -m 9 -v 3 -b 2 -p ./zkeys/MessageProcessorQv_6-9-2-3/MessageProcessorQv_6-9-2-3.zkey -t ./zkeys/VoteTallyQv_6-2-3/tallyVotes_6-2-3.zkey
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
:::info
|
|
32
|
-
You should change the -vk parameter to the
|
|
32
|
+
You should change the -vk parameter to the VerifyingKeysRegistry address for the chain you are deploying to. Also you might need to modify the parameters based on the circuit configuration. Please refer to the [circuits page](/docs/technical-references/zk-snark-circuits/setup) for more information. Also you can add `-uq false` if you want to check non quadratic voting keys.
|
|
33
33
|
:::
|
|
34
34
|
|
|
35
35
|
## Contract Addresses
|
|
@@ -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
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Coordinator Service",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"link": {
|
|
5
|
+
"type": "generated-index",
|
|
6
|
+
"description": "The Coordinator Service is a backend service that aims to automate MACI-related operations, such as contracts deployment, proof generation and poll finalisation."
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: The Coordinator Service is a service that allows to automate MACI coordinator tasks.
|
|
4
|
+
sidebar_label: Introduction
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Coordinator Service
|
|
9
|
+
|
|
10
|
+
Welcome to the Coordinator Service technical reference. Here you will find the technical details of the Coordinator Service, including the API endpoints and code examples.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation and setup
|
|
3
|
+
description: Learn how to install and setup the Coordinator Service.
|
|
4
|
+
sidebar_label: Installation
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
1. Add `.env` file (see `.env.example`).
|
|
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:
|
|
24
|
+
|
|
25
|
+
```
|
|
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
|
+
|
|
35
|
+
# Subgraph project folder
|
|
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
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: The Offchain Relayer is a service that allows users to vote on MACI polls free of charge.
|
|
4
|
+
sidebar_label: Introduction
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Coordinator Service
|
|
9
|
+
|
|
10
|
+
Welcome to the Offchain Relayer technical reference. Here you will find the technical details of the Offchain Relayer: how to set it up and and how to use it.
|
|
11
|
+
|
|
12
|
+
## Flow Diagram
|
|
13
|
+
|
|
14
|
+
Below is a high-level diagram illustrating the flow of the Relayer Service:
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
## High-Level Overview of the Relayer:
|
|
19
|
+
|
|
20
|
+
### Functionality
|
|
21
|
+
|
|
22
|
+
The Relayer serves as an intermediary between users and the MACI system. It performs the following tasks:
|
|
23
|
+
|
|
24
|
+
- Allows users to send messages without having to pay gas fees by processing these messages off-chain.
|
|
25
|
+
- Receives user messages.
|
|
26
|
+
- Prepare messages batches and upload it to IPFS
|
|
27
|
+
- Submits the message hashes to the Poll contract with IPFS hash of the batch.
|
|
28
|
+
|
|
29
|
+
This process ensures that user actions are recorded on-chain without compromising their privacy.
|
|
30
|
+
|
|
31
|
+
### Privacy Preservation
|
|
32
|
+
|
|
33
|
+
By verifying the zero-knowledge proofs, the Relayer ensures that only authorized users can send messages.
|
|
34
|
+
Users must know the pre-image to a state leaf in the poll state tree.
|
|
35
|
+
|
|
36
|
+
### Decentralization and Trust
|
|
37
|
+
|
|
38
|
+
It's recommended that the coordinator only runs this service for now. That is because if the service malfunctions and batch hashes are pushed on chain without the messages actually being stored on ipfs, then polls can't be finalized.
|
|
39
|
+
|
|
40
|
+
### Integration with MACI Components
|
|
41
|
+
|
|
42
|
+
The Relayer interacts with other components of the MACI system, such as the **Coordinator** and the on-chain smart contracts:
|
|
43
|
+
|
|
44
|
+
- The **Coordinator** fetches all the messages stored in IPFS and uses them as regular on-chain messages.
|
|
45
|
+
- This ensures that user messages are properly processed and recorded, contributing to the overall functionality and security of the voting protocol.
|
|
46
|
+
|
|
47
|
+
### Additional Information
|
|
48
|
+
|
|
49
|
+
For more details, you can read the following post on EthResearch:
|
|
50
|
+
|
|
51
|
+
[MACI with Mostly Off-Chain Happy Path](https://ethresear.ch/t/maci-with-mostly-off-chain-happy-path/19527)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation and setup
|
|
3
|
+
description: Learn how to install and setup the Offchain Relayer service.
|
|
4
|
+
sidebar_label: Setup
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
Make sure you have the following tools installed on your system:
|
|
11
|
+
|
|
12
|
+
- **Docker**: [Install Docker](https://www.docker.com/products/docker-desktop)
|
|
13
|
+
- **Docker Compose**: [Install Docker Compose](https://docs.docker.com/compose/install/)
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
Follow these steps to run the MACI Relayer service using Docker.
|
|
18
|
+
|
|
19
|
+
### 1. Clone the Repository
|
|
20
|
+
|
|
21
|
+
First, clone the repository to your local machine.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/privacy-scaling-explorations/maci
|
|
25
|
+
cd maci
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 2. Configure Environment Variables
|
|
29
|
+
|
|
30
|
+
The `.env` file contains sensitive configuration values that will be injected into the Docker containers at runtime. To set them up:
|
|
31
|
+
|
|
32
|
+
1. Copy the `.env.example` file to `.env`.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cp .env.example .env
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Edit the `.env` file and configure the variables.
|
|
39
|
+
|
|
40
|
+
## 3. Build and Run the Docker Containers
|
|
41
|
+
|
|
42
|
+
Now that your environment is set up, it's time to build and run the Docker containers.
|
|
43
|
+
|
|
44
|
+
Run the following command from the root directory of your project:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
docker-compose up --build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This command does the following:
|
|
51
|
+
|
|
52
|
+
- Builds the Docker images based on the Dockerfile and `docker-compose.yml` files.
|
|
53
|
+
- Starts the service container (the MACI relayer application) and the mongodb container.
|
|
54
|
+
|
|
55
|
+
The MACI Relayer service will be available on port 3000 by default (you can modify this in the `.env` file).
|
|
56
|
+
|
|
57
|
+
## 4. Access the Service
|
|
58
|
+
|
|
59
|
+
Once the containers are up and running, you can access the relayer service at:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
http://localhost:3000
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Additionally, the Swagger UI documentation for the Relayer service API can be accessed at:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
http://localhost:3000/api
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
You can interact with the API through the Swagger interface, which provides a convenient way to test endpoints and view the API methods.
|
|
72
|
+
|
|
73
|
+
## 5. Check Logs
|
|
74
|
+
|
|
75
|
+
To view the logs from the containers and troubleshoot any issues, run:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
docker-compose logs
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This will display logs from both the service (relayer) and mongodb containers.
|
|
82
|
+
|
|
83
|
+
## 6. Stop the Services
|
|
84
|
+
|
|
85
|
+
To stop the containers and remove the containers (but keep the volumes), use the following command:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
docker-compose down
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This will stop and remove the containers but retain the volumes (like MongoDB data). To also remove the volumes, run:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
docker-compose down --volumes
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## 7. MongoDB Persistence
|
|
98
|
+
|
|
99
|
+
MongoDB data is persisted using Docker volumes (`mongodb-data`). Even if you remove and recreate the MongoDB container, the data will persist.
|
|
100
|
+
|
|
101
|
+
This ensures that any data stored in the MongoDB database is not lost even if the container is restarted or removed.
|
|
102
|
+
|
|
103
|
+
If you'd like to remove the persisted data as well, you can remove the volume by running:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
docker volume rm your-repo_mongodb-data
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This will delete the volume, along with all the data stored in MongoDB.
|
|
@@ -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.
|
|
@@ -62,12 +62,12 @@ This function does the following:
|
|
|
62
62
|
- hashes the public key and inserts it into the state tree.
|
|
63
63
|
|
|
64
64
|
```ts
|
|
65
|
-
function signUp(
|
|
65
|
+
function signUp(PublicKey memory _publicKey, bytes memory _signUpPolicyData) public virtual {
|
|
66
66
|
// ensure we do not have more signups than what the circuits support
|
|
67
67
|
if (leanIMTData.size >= maxSignups) revert TooManySignups();
|
|
68
68
|
|
|
69
69
|
// ensure that the public key is on the baby jubjub curve
|
|
70
|
-
if (!CurveBabyJubJub.isOnCurve(
|
|
70
|
+
if (!CurveBabyJubJub.isOnCurve(_publicKey.x, _publicKey.y)) {
|
|
71
71
|
revert InvalidPubKey();
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -76,13 +76,13 @@ function signUp(PubKey memory _pubKey, bytes memory _signUpPolicyData) public vi
|
|
|
76
76
|
signUpPolicy.register(msg.sender, _signUpPolicyData);
|
|
77
77
|
|
|
78
78
|
// Hash the public key and insert it into the tree.
|
|
79
|
-
uint256 pubKeyHash = hashLeftRight(
|
|
79
|
+
uint256 pubKeyHash = hashLeftRight(_publicKey.x, _publicKey.y);
|
|
80
80
|
uint256 stateRoot = InternalLeanIMT._insert(leanIMTData, pubKeyHash);
|
|
81
81
|
|
|
82
82
|
// Store the current state tree root in the array
|
|
83
83
|
stateRootsOnSignUp.push(stateRoot);
|
|
84
84
|
|
|
85
|
-
emit SignUp(leanIMTData.size - 1, block.timestamp,
|
|
85
|
+
emit SignUp(leanIMTData.size - 1, block.timestamp, _publicKey.x, _publicKey.y);
|
|
86
86
|
}
|
|
87
87
|
```
|
|
88
88
|
|
|
@@ -149,12 +149,12 @@ 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, non quadratic voting, full credits 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)
|
|
156
156
|
- `voteOptions`: the number of vote options for the poll
|
|
157
157
|
|
|
158
158
|
:::info
|
|
159
|
-
Please be advised that the number of signups in the MACI contract (number of leaves in the merkle tree holding MACI's state) considers the initial zero leaf as one signup. For this reason, when accounting for the real users signed up to MACI, you should subtract one from the value returned from the `
|
|
159
|
+
Please be advised that the number of signups in the MACI contract (number of leaves in the merkle tree holding MACI's state) considers the initial zero leaf as one signup. For this reason, when accounting for the real users signed up to MACI, you should subtract one from the value returned from the `totalSignups` function.
|
|
160
160
|
:::
|
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:
|
|
@@ -14,7 +14,7 @@ A contract holding three structs:
|
|
|
14
14
|
```ts
|
|
15
15
|
/// @notice A struct holding the depths of the merkle trees
|
|
16
16
|
struct TreeDepths {
|
|
17
|
-
uint8
|
|
17
|
+
uint8 tallyProcessingStateTreeDepth;
|
|
18
18
|
uint8 voteOptionTreeDepth;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -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.
|
|
@@ -26,7 +26,7 @@ The `joinPoll` function looks as follows:
|
|
|
26
26
|
/// @inheritdoc IPoll
|
|
27
27
|
function joinPoll(
|
|
28
28
|
uint256 _nullifier,
|
|
29
|
-
|
|
29
|
+
PublicKey calldata _publicKey,
|
|
30
30
|
uint256 _stateRootIndex,
|
|
31
31
|
uint256[8] calldata _proof,
|
|
32
32
|
bytes memory _signUpPolicyData,
|
|
@@ -41,7 +41,7 @@ The `joinPoll` function looks as follows:
|
|
|
41
41
|
pollNullifiers[_nullifier] = true;
|
|
42
42
|
|
|
43
43
|
// Verify user's proof
|
|
44
|
-
if (!verifyJoiningPollProof(_nullifier, _stateRootIndex,
|
|
44
|
+
if (!verifyJoiningPollProof(_nullifier, _stateRootIndex, _publicKey, _proof)) {
|
|
45
45
|
revert InvalidPollProof();
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -55,7 +55,7 @@ The `joinPoll` function looks as follows:
|
|
|
55
55
|
);
|
|
56
56
|
|
|
57
57
|
// Store user in the pollStateTree
|
|
58
|
-
uint256 stateLeaf = hashStateLeaf(StateLeaf(
|
|
58
|
+
uint256 stateLeaf = hashStateLeaf(StateLeaf(_publicKey, voiceCreditBalance, block.timestamp));
|
|
59
59
|
|
|
60
60
|
uint256 stateRoot = InternalLazyIMT._insert(pollStateTree, stateLeaf);
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@ The `joinPoll` function looks as follows:
|
|
|
63
63
|
pollStateRootsOnJoin.push(stateRoot);
|
|
64
64
|
|
|
65
65
|
uint256 pollStateIndex = pollStateTree.numberOfLeaves - 1;
|
|
66
|
-
emit PollJoined(
|
|
66
|
+
emit PollJoined(_publicKey.x, _publicKey.y, voiceCreditBalance, block.timestamp, _nullifier, pollStateIndex);
|
|
67
67
|
}
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -72,7 +72,7 @@ The `joinPoll` function looks as follows:
|
|
|
72
72
|
The `publishMessage` function looks as follows:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
|
-
function publishMessage(Message calldata _message,
|
|
75
|
+
function publishMessage(Message calldata _message, PublicKey calldata _encPubKey) public virtual isOpenForVoting {
|
|
76
76
|
// check if the public key is on the curve
|
|
77
77
|
if (!CurveBabyJubJub.isOnCurve(_encPubKey.x, _encPubKey.y)) {
|
|
78
78
|
revert InvalidPubKey();
|
|
@@ -84,7 +84,7 @@ function publishMessage(Message calldata _message, PubKey calldata _encPubKey) p
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// compute current message hash
|
|
87
|
-
uint256 messageHash =
|
|
87
|
+
uint256 messageHash = hashMessageAndPublicKey(_message, _encPubKey);
|
|
88
88
|
|
|
89
89
|
// update current message chain hash
|
|
90
90
|
updateChainHash(messageHash);
|
|
@@ -96,7 +96,7 @@ function publishMessage(Message calldata _message, PubKey calldata _encPubKey) p
|
|
|
96
96
|
The `publishMessageBatch` function looks as follows:
|
|
97
97
|
|
|
98
98
|
```ts
|
|
99
|
-
function publishMessageBatch(Message[] calldata _messages,
|
|
99
|
+
function publishMessageBatch(Message[] calldata _messages, PublicKey[] calldata _encPubKeys) public virtual {
|
|
100
100
|
if (_messages.length != _encPubKeys.length) {
|
|
101
101
|
revert InvalidBatchLength();
|
|
102
102
|
}
|
|
@@ -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.
|
|
@@ -16,14 +16,14 @@ This contract should be deployed alongside a `Poll`, with the the constructor ac
|
|
|
16
16
|
```ts
|
|
17
17
|
constructor(
|
|
18
18
|
address _verifier,
|
|
19
|
-
address
|
|
19
|
+
address _verifyingKeysRegistry,
|
|
20
20
|
address _poll,
|
|
21
21
|
address _mp,
|
|
22
22
|
address _tallyOwner,
|
|
23
23
|
Mode _mode
|
|
24
24
|
) payable {
|
|
25
25
|
verifier = IVerifier(_verifier);
|
|
26
|
-
vkRegistry = IVkRegistry(
|
|
26
|
+
vkRegistry = IVkRegistry(_verifyingKeysRegistry);
|
|
27
27
|
poll = IPoll(_poll);
|
|
28
28
|
messageProcessor = IMessageProcessor(_mp);
|
|
29
29
|
mode = _mode;
|
|
@@ -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 voting)
|
|
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 vs full credits voting)
|
|
38
38
|
|
|
39
39
|
Users can use the verification functions to verify the Tally results. These are as follows:
|
|
40
40
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
4
|
-
sidebar_label:
|
|
2
|
+
title: VerifyingKeysRegistry Smart Contract
|
|
3
|
+
description: VerifyingKeysRegistry smart contract
|
|
4
|
+
sidebar_label: VerifyingKeysRegistry
|
|
5
5
|
sidebar_position: 8
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
:::info
|
|
9
|
-
Code location: [
|
|
9
|
+
Code location: [VerifyingKeysRegistry.sol](https://github.com/privacy-scaling-explorations/maci/blob/main/packages/contracts/contracts/VerifyingKeysRegistry.sol)
|
|
10
10
|
:::
|
|
11
11
|
|
|
12
|
-
The
|
|
12
|
+
The VerifyingKeysRegistry is a contract that holds the verifying keys for the zk-SNARK circuits. It holds four different sets of keys:
|
|
13
13
|
|
|
14
|
-
- `processVks` - The keys for the
|
|
15
|
-
- `tallyVks` - The keys for the
|
|
14
|
+
- `processVks` - The keys for the MessageProcessor circuit
|
|
15
|
+
- `tallyVks` - The keys for the VoteTally circuit
|
|
16
16
|
- `pollJoiningVk` - The key for the poll joining circuit
|
|
17
17
|
- `pollJoinedVk` - The key for the poll joined circuit
|
|
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, non quadratic and full credits 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/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
|
|
|
@@ -21,8 +21,8 @@ Users need to provide a valid proof to the Poll smart contract to join a poll, a
|
|
|
21
21
|
|
|
22
22
|
| Input signal | Description |
|
|
23
23
|
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
24
|
+
| `privateKey` | The user's private key |
|
|
25
|
+
| `pollPublicKey` | The poll's public key |
|
|
26
26
|
| `siblings` | The siblings for the merkle tree inclusion proof |
|
|
27
27
|
| `indices` | The indices for the merkle tree inclusion proof |
|
|
28
28
|
| `nullifier` | The nullifier |
|
|
@@ -44,9 +44,8 @@ Users will use this circuit to anonymously prove that they joined a poll. This c
|
|
|
44
44
|
|
|
45
45
|
| Input signal | Description |
|
|
46
46
|
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
-
| `
|
|
47
|
+
| `privateKey` | The user's private key |
|
|
48
48
|
| `voiceCreditsBalance` | The user's initial voice credits balance |
|
|
49
|
-
| `joinTimestamp` | The timestamp of when the user joined the poll |
|
|
50
49
|
| `pathElements` | The path elements for the merkle tree inclusion proof |
|
|
51
50
|
| `pathIndices` | The path indices for the merkle tree inclusion proof |
|
|
52
51
|
| `stateRoot` | The MACI state tree root |
|