@maci-protocol/website 0.0.0-ci.3dc39ba → 0.0.0-ci.3edbfe2

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.
Files changed (24) hide show
  1. package/package.json +11 -11
  2. package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +1 -1
  3. package/versioned_docs/version-v3.x/core-concepts/poll-types.md +30 -6
  4. package/versioned_docs/version-v3.x/core-concepts/polls.md +30 -6
  5. package/versioned_docs/version-v3.x/core-concepts/spec.md +2 -2
  6. package/versioned_docs/version-v3.x/core-concepts/workflow.md +1 -1
  7. package/versioned_docs/version-v3.x/guides/compile-circuits.md +31 -15
  8. package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +1 -1
  9. package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +34 -2
  10. package/versioned_docs/version-v3.x/guides/troubleshooting.md +51 -6
  11. package/versioned_docs/version-v3.x/quick-start.md +3 -3
  12. package/versioned_docs/version-v3.x/resources.md +1 -0
  13. package/versioned_docs/version-v3.x/security/trusted-setup.md +35 -35
  14. package/versioned_docs/version-v3.x/supported-networks/costs.md +725 -0
  15. package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +1 -1
  16. package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +16 -0
  17. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +1 -1
  18. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +1 -1
  19. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +3 -3
  20. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +7 -3
  21. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +3 -3
  22. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +2 -2
  23. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +2 -2
  24. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +2 -2
@@ -25,7 +25,7 @@ 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/ProcessMessages_6-9-2-3/processMessages_6-9-2-3.zkey -t ./zkeys/TallyVotes_6-2-3/tallyVotes_6-2-3.zkey
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
@@ -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
 
@@ -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 or non 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)
@@ -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
 
@@ -11,14 +11,14 @@ Code location: [VerifyingKeysRegistry.sol](https://github.com/privacy-scaling-ex
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:
13
13
 
14
- - `processVks` - The keys for the processMessages circuit
15
- - `tallyVks` - The keys for the tallyVotes circuit
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 voting and non quadratic voting.
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
 
@@ -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/core)
8
+ [**Repo link**](https://github.com/privacy-scaling-explorations/maci/blob/dev/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 [`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.
12
+ The [`MessageProcessorQv`](https://github.com/privacy-scaling-explorations/maci/blob/dev/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
@@ -21,7 +21,11 @@ This circuit requires the coordinator's private key, hence a proof for this circ
21
21
  ![ProcessMessages](/img/circuits/processMessages_2_0.svg)
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/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.
24
+ A version working with non quadratic voting (non-qv) is also [available](https://github.com/privacy-scaling-explorations/maci/blob/dev/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
+ :::
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.
25
29
  :::
26
30
 
27
31
  #### Parameters
@@ -37,7 +37,7 @@ MACI's circuits are parameterized, and thus can be configured to support differe
37
37
  - **STATE_TREE_DEPTH** = how many users the system supports
38
38
  - **VOTE_OPTIONS_TREE_DEPTH** = how many vote options the system supports
39
39
  - **MESSAGE_BATCH_SIZE** = how many messages in a batch the circuit should process
40
- - **TALLY_PROCESSING_STATE_TREE_DEPTH** = how many ballots can be processed per batch when tallying the results (`5 ** TALLY_PROCESSING_STATE_TREE_DEPTH` ballots)
40
+ - **TALLY_PROCESSING_STATE_TREE_DEPTH** = how many ballots can be processed per batch when tallying the results (`2 ** TALLY_PROCESSING_STATE_TREE_DEPTH` ballots)
41
41
 
42
42
  Please refer to the individual circuit documentation for more details on the inner working of each circuit and where parameters fit.
43
43
 
@@ -90,7 +90,7 @@ To test the circuits package, please use `pnpm run test`. This will run all of t
90
90
 
91
91
  To run individual tests, you can use the following commands (for all other circuits please refer to the `package.json` scripts section):
92
92
 
93
- - `pnpm run test:processMessages` to run the tests for the `processMessages` circuit.
94
- - `pnpm run test:tallyVotes` to run the tests for the `tallyVotes` circuit.
93
+ - `pnpm run test:messageProcessor` to run the tests for the `MessageProcessor` circuit.
94
+ - `pnpm run test:voteTally` to run the tests for the `VoteTally` circuit.
95
95
 
96
96
  More details on testing are provided in the [testing section](/docs/guides/testing/testing-introduction) of the documentation.
@@ -15,10 +15,10 @@ sidebar_position: 4
15
15
  | 1 | State leaf batch depth | Allows $(5^{n})$ users' votes to be processed per batch. |
16
16
  | 2 | Vote option tree depth | Allows $(5^{n})$ vote options. |
17
17
 
18
- ![TallyVotes](/img/circuits/tallyVotes.svg)
18
+ ![VoteTally](/img/circuits/tallyVotes.svg)
19
19
 
20
20
  :::info
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.
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/dev/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
@@ -7,7 +7,7 @@ sidebar_position: 5
7
7
 
8
8
  #### Process Messages Input Hasher
9
9
 
10
- A utility circuit used by the main `processMessages` circuit to hash its inputs.
10
+ A utility circuit used by the main `MessageProcessor` circuit to hash its inputs.
11
11
 
12
12
  ![ProcessMessagesInputHasher](/img/circuits/processMessagesInputHasher.svg)
13
13
 
@@ -35,7 +35,7 @@ It outputs one field element, which is the SHA256 hash of the following inputs:
35
35
 
36
36
  #### ResultsCommitmentVerifier
37
37
 
38
- A utility circuit used by the main `tallyVotes` circuit to verify that the results commitment is correct.
38
+ A utility circuit used by the main `VoteTally` circuit to verify that the results commitment is correct.
39
39
 
40
40
  ![ResultsCommitmentVerifier](/img/circuits/resultsCommitmentVerifier.svg)
41
41
 
@@ -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/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.
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/coordinator/qv/MessageProcessor.circom), [non-QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/circuits/circom/coordinator/non-qv/MessageProcessor.circom), [Full](https://github.com/privacy-scaling-explorations/maci/blob/dev/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/dev/circuits/circom/coordinator/qv/VoteTally.circom) and [non-QV](https://github.com/privacy-scaling-explorations/maci/blob/dev/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.