@maci-protocol/website 0.0.0-ci.7fb1869 → 0.0.0-ci.7fb2610

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.
@@ -204,9 +204,15 @@ async function getConfig(): Promise<Config> {
204
204
  phpLoader: "matomo.php",
205
205
  jsLoader: "matomo.js",
206
206
  },
207
+ mermaid: {
208
+ theme: { light: "neutral", dark: "forest" },
209
+ },
207
210
  } satisfies Preset.ThemeConfig,
211
+ markdown: {
212
+ mermaid: true,
213
+ },
214
+ themes: ["@docusaurus/theme-mermaid"],
208
215
  };
209
-
210
216
  return config;
211
217
  }
212
218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maci-protocol/website",
3
- "version": "0.0.0-ci.7fb1869",
3
+ "version": "0.0.0-ci.7fb2610",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,7 +25,8 @@
25
25
  "@docusaurus/preset-classic": "^3.8.1",
26
26
  "@docusaurus/theme-classic": "^3.8.1",
27
27
  "@docusaurus/theme-common": "^3.8.1",
28
- "@easyops-cn/docusaurus-search-local": "^0.51.0",
28
+ "@docusaurus/theme-mermaid": "^3.8.1",
29
+ "@easyops-cn/docusaurus-search-local": "^0.51.1",
29
30
  "@mdx-js/react": "^3.1.0",
30
31
  "clsx": "^2.1.1",
31
32
  "docusaurus-plugin-image-zoom": "^3.0.1",
@@ -41,7 +42,7 @@
41
42
  "@docusaurus/module-type-aliases": "^3.8.1",
42
43
  "@docusaurus/tsconfig": "^3.8.1",
43
44
  "@docusaurus/types": "^3.8.1",
44
- "@types/node": "^24.0.1",
45
+ "@types/node": "^24.0.13",
45
46
  "@types/react": "^19.1.8",
46
47
  "ts-node": "^10.9.2",
47
48
  "typescript": "^5.8.3"
@@ -61,5 +62,5 @@
61
62
  "engines": {
62
63
  "node": ">=18.0"
63
64
  },
64
- "gitHead": "0f72404b1f1e5b714ada9e5598dc2d0da5feade5"
65
+ "gitHead": "fcd1afd0564543b3f35fea14eac1e2e9383384b5"
65
66
  }
@@ -41,9 +41,7 @@ Refer to the [Glossary](#glossary) for definitions of terms.
41
41
  3. The signup period ends after a fixed amount of time. From that point onwards, users may no longer invoke `signUp()` in this contract.
42
42
 
43
43
  4. Each user votes. To do this, they:
44
-
45
44
  - Sign their command using the key which they had signed up with and then use a random (ephemeral) key as well as the coordinator's public key to generate a shared key (via ECDH) encrypt it.
46
-
47
45
  - If they are bribed, the user should sign it using an old public key which has already been replaced with a new one.
48
46
 
49
47
  - Otherwise, the user should use the most current public key they have registered.
@@ -53,9 +51,7 @@ Refer to the [Glossary](#glossary) for definitions of terms.
53
51
  5. The coordinator processes all the commands after the voting period ends.
54
52
 
55
53
  6. For each batch of commands, they perform the following steps:
56
-
57
54
  - Generate a new state root which is the result of:
58
-
59
55
  - For each valid command, in reverse order, update the state leaf accordingly
60
56
 
61
57
  - Ignore all invalid commands
@@ -18,7 +18,67 @@ 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
84
  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.