@maci-protocol/website 0.0.0-ci.4d3abe4 → 0.0.0-ci.4edbce2

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.4d3abe4",
3
+ "version": "0.0.0-ci.4edbce2",
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.1",
28
+ "@docusaurus/theme-mermaid": "^3.8.1",
29
+ "@easyops-cn/docusaurus-search-local": "^0.52.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.7",
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": "d474a7961cfa9b10c5313ec1850e281be50baff7"
65
+ "gitHead": "51021ec89b3208176f5e8de32bf438c63ce97f42"
65
66
  }
@@ -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.