@maci-protocol/circuits 0.0.0-ci.38c76f2 → 0.0.0-ci.3a64a23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maci-protocol/circuits",
3
- "version": "0.0.0-ci.38c76f2",
3
+ "version": "0.0.0-ci.3a64a23",
4
4
  "private": false,
5
5
  "description": "zk-SNARK circuits for MACI",
6
6
  "main": "build/ts/index.js",
@@ -38,7 +38,8 @@
38
38
  "test:verifySignature": "pnpm run mocha-test ts/__tests__/VerifySignature.test.ts",
39
39
  "test:privateToPublicKey": "pnpm run mocha-test ts/__tests__/PrivateToPublicKey.test.ts",
40
40
  "test:calculateTotal": "pnpm run mocha-test ts/__tests__/CalculateTotal.test.ts",
41
- "test:messageProcessor": "pnpm run mocha-test ts/__tests__/MessageProcessor.test.ts",
41
+ "test:messageProcessorFull": "pnpm run mocha-test ts/__tests__/MessageProcessorFull.test.ts",
42
+ "test:isOnCurve": "pnpm run mocha-test ts/__tests__/IsOnCurve.test.ts",
42
43
  "test:voteTally": "pnpm run mocha-test ts/__tests__/VoteTally.test.ts",
43
44
  "test:ceremonyParams": "pnpm run mocha-test ts/__tests__/CeremonyParams.test.ts",
44
45
  "test:incrementalQuinaryTree": "pnpm run mocha-test ts/__tests__/IncrementalQuinaryTree.test.ts",
@@ -46,29 +47,29 @@
46
47
  "test:pollJoined": "pnpm run mocha-test ts/__tests__/PollJoined.test.ts"
47
48
  },
48
49
  "dependencies": {
49
- "@maci-protocol/core": "0.0.0-ci.38c76f2",
50
- "@maci-protocol/crypto": "0.0.0-ci.38c76f2",
51
- "@maci-protocol/domainobjs": "0.0.0-ci.38c76f2",
52
- "@maci-protocol/sdk": "0.0.0-ci.38c76f2",
50
+ "@maci-protocol/core": "0.0.0-ci.3a64a23",
51
+ "@maci-protocol/crypto": "0.0.0-ci.3a64a23",
52
+ "@maci-protocol/domainobjs": "0.0.0-ci.3a64a23",
53
+ "@maci-protocol/sdk": "0.0.0-ci.3a64a23",
53
54
  "@zk-kit/circuits": "^0.4.0",
54
- "circomkit": "^0.3.3",
55
+ "circomkit": "^0.3.4",
55
56
  "circomlib": "^2.0.5"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@types/chai": "^4.3.11",
59
- "@types/chai-as-promised": "^7.1.8",
60
+ "@types/chai-as-promised": "^8.0.2",
60
61
  "@types/mocha": "^10.0.10",
61
- "@types/node": "^24.0.13",
62
+ "@types/node": "^24.11.0",
62
63
  "@types/snarkjs": "^0.7.9",
63
64
  "@zk-kit/baby-jubjub": "^1.0.3",
64
65
  "chai": "^4.3.10",
65
- "chai-as-promised": "^7.1.2",
66
+ "chai-as-promised": "^8.0.1",
66
67
  "fast-check": "^4.2.0",
67
- "glob": "^11.0.3",
68
- "mocha": "^11.7.1",
68
+ "glob": "^12.0.0",
69
+ "mocha": "^11.7.2",
69
70
  "ts-mocha": "^11.1.0",
70
71
  "ts-node": "^10.9.1",
71
- "typescript": "^5.8.3"
72
+ "typescript": "^5.9.2"
72
73
  },
73
- "gitHead": "aa9774b8a82d49c72b7596122fc5cb75b324dc0a"
74
+ "gitHead": "84d8c5f885c142d02f5c32fbb39109be8192026f"
74
75
  }
@@ -1,44 +0,0 @@
1
- pragma circom 2.0.0;
2
-
3
- // zk-kit imports
4
- include "./safe-comparators.circom";
5
- // local import
6
- include "../CalculateTotal.circom";
7
-
8
- /**
9
- * Calculates the path indices required for Merkle proof verifications.
10
- * Given a node index within an IMT and the total tree levels, it outputs the path indices leading to that node.
11
- * The template handles the modulo and division operations to break down the tree index into its constituent path indices.
12
- */
13
- template MerklePathIndicesGenerator(levels) {
14
- // The base used for the modulo and division operations, set to 2 for binary trees.
15
- var BASE = 2;
16
-
17
- // The total sum of the path indices.
18
- signal input indices;
19
-
20
- // The generated path indices.
21
- signal output out[levels];
22
-
23
- var computedIndices = indices;
24
- var computedResults[levels];
25
-
26
- for (var i = 0; i < levels; i++) {
27
- // circom's best practices suggests to avoid using <-- unless you
28
- // are aware of what's going on. This is the only way to do modulo operation.
29
- out[i] <-- computedIndices % BASE;
30
- computedIndices = computedIndices \ BASE;
31
-
32
- // Check that each output element is less than the base.
33
- var computedIsOutputElementLessThanBase = SafeLessThan(3)([out[i], BASE]);
34
- computedIsOutputElementLessThanBase === 1;
35
-
36
- // Re-compute the total sum.
37
- computedResults[i] = out[i] * (BASE ** i);
38
- }
39
-
40
- // Check that the total sum matches the index.
41
- var computedCalculateTotal = CalculateTotal(levels)(computedResults);
42
-
43
- computedCalculateTotal === indices;
44
- }