@maci-protocol/website 0.0.0-ci.16017f7 → 0.0.0-ci.17c3dcd

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 (66) hide show
  1. package/blog/2024-02-28-maci-v1.2.0.md +1 -1
  2. package/blog/2025-03-21-roadmap-2025.md +1 -1
  3. package/docusaurus.config.ts +7 -1
  4. package/package.json +6 -5
  5. package/versioned_docs/version-v0.x/introduction.md +0 -4
  6. package/versioned_docs/version-v1.2/circuits.md +8 -8
  7. package/versioned_docs/version-v1.2/contributing/contributing.md +4 -4
  8. package/versioned_docs/version-v1.2/deployment.md +1 -1
  9. package/versioned_docs/version-v1.2/integrating.md +1 -1
  10. package/versioned_docs/version-v1.2/key-change.md +1 -1
  11. package/versioned_docs/version-v1.2/poll-types.md +1 -1
  12. package/versioned_docs/version-v1.2/testing-in-detail.md +3 -3
  13. package/versioned_docs/version-v1.2/testing.md +1 -1
  14. package/versioned_docs/version-v1.2/topup.md +1 -1
  15. package/versioned_docs/version-v1.2/typedoc/core/index.md +2 -2
  16. package/versioned_docs/version-v1.2/versioning.md +3 -3
  17. package/versioned_docs/version-v1.2/workflow.md +1 -1
  18. package/versioned_docs/version-v2.x/contributing/contributing.md +4 -4
  19. package/versioned_docs/version-v2.x/core-concepts/key-change.md +1 -1
  20. package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +1 -1
  21. package/versioned_docs/version-v2.x/core-concepts/poll-types.md +1 -1
  22. package/versioned_docs/version-v2.x/core-concepts/workflow.md +1 -1
  23. package/versioned_docs/version-v2.x/guides/integrating.md +1 -1
  24. package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +3 -3
  25. package/versioned_docs/version-v2.x/guides/testing/testing.md +1 -1
  26. package/versioned_docs/version-v2.x/processes/versioning.md +3 -3
  27. package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +7 -7
  28. package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +1 -1
  29. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +1 -1
  30. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +1 -1
  31. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +1 -1
  32. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +1 -1
  33. package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +1 -1
  34. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +1 -1
  35. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +1 -1
  36. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +1 -1
  37. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +4 -4
  38. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +2 -2
  39. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +3 -3
  40. package/versioned_docs/version-v3.x/contributing/contributing.md +4 -4
  41. package/versioned_docs/version-v3.x/core-concepts/key-change.md +1 -1
  42. package/versioned_docs/version-v3.x/core-concepts/poll-types.md +1 -1
  43. package/versioned_docs/version-v3.x/core-concepts/polls.md +1 -1
  44. package/versioned_docs/version-v3.x/core-concepts/workflow.md +1 -1
  45. package/versioned_docs/version-v3.x/guides/integrating.md +2 -2
  46. package/versioned_docs/version-v3.x/guides/sdk.md +121 -0
  47. package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +3 -3
  48. package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +1 -1
  49. package/versioned_docs/version-v3.x/guides/troubleshooting.md +2 -2
  50. package/versioned_docs/version-v3.x/processes/versioning.md +3 -3
  51. package/versioned_docs/version-v3.x/security/trusted-setup.md +1 -1
  52. package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +7 -7
  53. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +1 -1
  54. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +1 -1
  55. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +1 -1
  56. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +1 -1
  57. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +1 -1
  58. package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +1 -1
  59. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +1 -1
  60. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +1 -1
  61. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +1 -1
  62. package/versioned_docs/version-v3.x/technical-references/technical-references.md +8 -8
  63. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +1 -1
  64. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +66 -6
  65. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +2 -2
  66. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +3 -3
@@ -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/coordinator)
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/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.
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
- ![ProcessMessages](/img/circuits/processMessages_2_0.svg)
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/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.
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/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.
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/dev/circuits/circom/trees/incrementalQuinTree.circom`.
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/dev/circuits/circom/core)
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
  ![VoteTally](/img/circuits/tallyVotes.svg)
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/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.
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
@@ -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/dev/packages/circuits):
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/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.
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.