@maci-protocol/website 0.0.0-ci.26f28d6

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 (406) hide show
  1. package/.eslintrc.js +157 -0
  2. package/CHANGELOG.md +566 -0
  3. package/LICENSE +22 -0
  4. package/README.md +58 -0
  5. package/babel.config.js +3 -0
  6. package/blog/2021-10-12-maci-v1.md +100 -0
  7. package/blog/2022-09-22-maci-v1-technical-introduction.md +180 -0
  8. package/blog/2023-01-18-maci-v1.1.1.md +121 -0
  9. package/blog/2024-01-18-roadmap.md +106 -0
  10. package/blog/2024-02-28-maci-v1.2.0.md +121 -0
  11. package/blog/2024-04-10-roadmap-q2.md +96 -0
  12. package/blog/2024-05-08-ethdam.md +169 -0
  13. package/blog/2024-05-22-the-origins-of-maci.md +38 -0
  14. package/blog/2024-05-28-upcoming-grants.md +85 -0
  15. package/blog/2024-06-17-understanding-maci.md +63 -0
  16. package/blog/2024-06-21-deciphering-maci.md +48 -0
  17. package/blog/2024-06-28-revolusioning-public-goods-funding.md +32 -0
  18. package/blog/2024-07-23-q2-review.md +72 -0
  19. package/blog/2024-07-30-roadmap-q3.md +61 -0
  20. package/blog/2024-08-10-maci-v2.md +102 -0
  21. package/blog/2024-08-29-anonymous-poll-joining.md +47 -0
  22. package/blog/2024-10-29-q3-review.md +63 -0
  23. package/blog/2024-11-20-maci-platform.md +93 -0
  24. package/blog/2024-12-01-maci-getting-started.md +294 -0
  25. package/blog/2025-03-21-roadmap-2025.md +112 -0
  26. package/blog/assets/MACI_Bob_SignUp_1.png +0 -0
  27. package/blog/assets/MACI_Bob_SignUp_2.png +0 -0
  28. package/blog/assets/MACI_Complex_Message.png +0 -0
  29. package/blog/assets/MACI_Contracts.png +0 -0
  30. package/blog/assets/MACI_Sign_Up.png +0 -0
  31. package/blog/assets/MACI_Simple_Message.png +0 -0
  32. package/blog/assets/MACI_Verifier_1.png +0 -0
  33. package/blog/authors.yml +5 -0
  34. package/docusaurus.config.ts +213 -0
  35. package/package.json +65 -0
  36. package/src/components/ActionCard/index.tsx +30 -0
  37. package/src/components/ActionCard/styles.module.css +96 -0
  38. package/src/components/HomepageFeatures/index.tsx +91 -0
  39. package/src/components/HomepageFeatures/styles.module.css +17 -0
  40. package/src/components/ProjectCard/index.tsx +74 -0
  41. package/src/components/ProjectCard/styles.module.css +77 -0
  42. package/src/components/ProjectList/index.tsx +218 -0
  43. package/src/components/ProjectList/styles.module.css +180 -0
  44. package/src/content/projects.json +294 -0
  45. package/src/css/card.module.css +130 -0
  46. package/src/css/custom.css +91 -0
  47. package/src/icons/IconDiscord.tsx +16 -0
  48. package/src/icons/IconGithub.tsx +16 -0
  49. package/src/icons/IconWebsite.tsx +16 -0
  50. package/src/pages/blogs.tsx +58 -0
  51. package/src/pages/index.module.css +152 -0
  52. package/src/pages/index.tsx +66 -0
  53. package/src/pages/projects.tsx +44 -0
  54. package/src/pages/roadmap.md +150 -0
  55. package/src/pages/typedoc.tsx +11 -0
  56. package/src/plugins/blog-plugin/index.ts +86 -0
  57. package/src/react-app-env.d.ts +1 -0
  58. package/src/scripts/setupSolidityDocs.ts +67 -0
  59. package/src/scripts/setupTypedoc.ts +112 -0
  60. package/src/scripts/utils.ts +115 -0
  61. package/src/utils/getProjectsByFilter.ts +40 -0
  62. package/static/.nojekyll +0 -0
  63. package/static/audit_reports/20210922_Hashcloak_audit_report.pdf +0 -0
  64. package/static/audit_reports/202220930_Hashcloak_audit_report.pdf +0 -0
  65. package/static/audit_reports/20240223_PSE_Audit_audit_report.pdf +0 -0
  66. package/static/audit_reports/20240731_PSE_Audit_audit_report.pdf +0 -0
  67. package/static/fonts/DM_Sans.woff2 +0 -0
  68. package/static/fonts/Share_Tech_Mono.woff2 +0 -0
  69. package/static/img/box.png +0 -0
  70. package/static/img/box_dark.png +0 -0
  71. package/static/img/chain.png +0 -0
  72. package/static/img/chain_dark.png +0 -0
  73. package/static/img/chart.png +0 -0
  74. package/static/img/chart_dark.png +0 -0
  75. package/static/img/circuits/MACI-Circuits.excalidraw +39652 -0
  76. package/static/img/circuits/calculateTotal.svg +21 -0
  77. package/static/img/circuits/ecdh.svg +21 -0
  78. package/static/img/circuits/messageToCommand.svg +21 -0
  79. package/static/img/circuits/messageValidator.svg +21 -0
  80. package/static/img/circuits/poseidonHasher13.svg +21 -0
  81. package/static/img/circuits/privToPubkey.svg +21 -0
  82. package/static/img/circuits/processMessages.svg +21 -0
  83. package/static/img/circuits/processMessagesInputHasher.svg +21 -0
  84. package/static/img/circuits/processMessages_2_0.svg +21 -0
  85. package/static/img/circuits/processOne.svg +21 -0
  86. package/static/img/circuits/processTopup.svg +21 -0
  87. package/static/img/circuits/processingAfterPollEnds.svg +21 -0
  88. package/static/img/circuits/quinBatchLeavesExists.svg +21 -0
  89. package/static/img/circuits/quinCheckRoot.svg +21 -0
  90. package/static/img/circuits/quinGeneratePathIndices.svg +21 -0
  91. package/static/img/circuits/quinSelector.svg +21 -0
  92. package/static/img/circuits/resultsCommitmentVerifier.svg +21 -0
  93. package/static/img/circuits/splicer.svg +21 -0
  94. package/static/img/circuits/tallyInputHasher.svg +21 -0
  95. package/static/img/circuits/tallyVotes.svg +21 -0
  96. package/static/img/circuits/unpackElement.svg +21 -0
  97. package/static/img/circuits/verifySignature.svg +21 -0
  98. package/static/img/completingAPoll.svg +4 -0
  99. package/static/img/contracts.svg +16 -0
  100. package/static/img/coordinatorComponents.svg +21 -0
  101. package/static/img/favicon.ico +0 -0
  102. package/static/img/generateProofs.svg +4 -0
  103. package/static/img/hero.svg +9 -0
  104. package/static/img/maci-card.png +0 -0
  105. package/static/img/maci-rpgf-design.jpg +0 -0
  106. package/static/img/messageProcessingLocal.svg +21 -0
  107. package/static/img/offlineProcessing.svg +21 -0
  108. package/static/img/pse-logo-round.png +0 -0
  109. package/static/img/tallyCommitments.svg +4 -0
  110. package/static/img/voteTallyingLocal.svg +21 -0
  111. package/tsconfig.json +34 -0
  112. package/versioned_docs/version-v0.x/circuits.md +22 -0
  113. package/versioned_docs/version-v0.x/contract.md +186 -0
  114. package/versioned_docs/version-v0.x/faq.md +67 -0
  115. package/versioned_docs/version-v0.x/introduction.md +119 -0
  116. package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +138 -0
  117. package/versioned_docs/version-v0.x/state-root-transition-circuit.md +230 -0
  118. package/versioned_docs/version-v1.2/audit.md +160 -0
  119. package/versioned_docs/version-v1.2/ci-pipeline.md +38 -0
  120. package/versioned_docs/version-v1.2/circuits.md +508 -0
  121. package/versioned_docs/version-v1.2/cli.md +689 -0
  122. package/versioned_docs/version-v1.2/contracts.md +445 -0
  123. package/versioned_docs/version-v1.2/contributing/code-of-conduct.md +91 -0
  124. package/versioned_docs/version-v1.2/contributing/contributing.md +129 -0
  125. package/versioned_docs/version-v1.2/coordinator-processing.md +46 -0
  126. package/versioned_docs/version-v1.2/deployment.md +122 -0
  127. package/versioned_docs/version-v1.2/installation.md +175 -0
  128. package/versioned_docs/version-v1.2/integrating.md +200 -0
  129. package/versioned_docs/version-v1.2/introduction.md +94 -0
  130. package/versioned_docs/version-v1.2/key-change.md +182 -0
  131. package/versioned_docs/version-v1.2/overview.md +47 -0
  132. package/versioned_docs/version-v1.2/poll-types.md +68 -0
  133. package/versioned_docs/version-v1.2/primitives.md +216 -0
  134. package/versioned_docs/version-v1.2/project-ideas.md +14 -0
  135. package/versioned_docs/version-v1.2/purpose.md +62 -0
  136. package/versioned_docs/version-v1.2/solidity-docs/MACI.md +345 -0
  137. package/versioned_docs/version-v1.2/solidity-docs/MessageProcessor.md +266 -0
  138. package/versioned_docs/version-v1.2/solidity-docs/MessageProcessorFactory.md +26 -0
  139. package/versioned_docs/version-v1.2/solidity-docs/Poll.md +381 -0
  140. package/versioned_docs/version-v1.2/solidity-docs/PollFactory.md +50 -0
  141. package/versioned_docs/version-v1.2/solidity-docs/SignUpToken.md +27 -0
  142. package/versioned_docs/version-v1.2/solidity-docs/Subsidy.md +218 -0
  143. package/versioned_docs/version-v1.2/solidity-docs/SubsidyFactory.md +27 -0
  144. package/versioned_docs/version-v1.2/solidity-docs/Tally.md +311 -0
  145. package/versioned_docs/version-v1.2/solidity-docs/TallyFactory.md +27 -0
  146. package/versioned_docs/version-v1.2/solidity-docs/TallyNonQv.md +296 -0
  147. package/versioned_docs/version-v1.2/solidity-docs/TallyNonQvFactory.md +27 -0
  148. package/versioned_docs/version-v1.2/solidity-docs/TopupCredit.md +61 -0
  149. package/versioned_docs/version-v1.2/solidity-docs/VkRegistry.md +457 -0
  150. package/versioned_docs/version-v1.2/solidity-docs/benchmarks/HasherBenchmarks.md +44 -0
  151. package/versioned_docs/version-v1.2/solidity-docs/crypto/Hasher.md +125 -0
  152. package/versioned_docs/version-v1.2/solidity-docs/crypto/IVerifier.md +11 -0
  153. package/versioned_docs/version-v1.2/solidity-docs/crypto/MockVerifier.md +17 -0
  154. package/versioned_docs/version-v1.2/solidity-docs/crypto/Pairing.md +85 -0
  155. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT3.md +9 -0
  156. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT4.md +9 -0
  157. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT5.md +9 -0
  158. package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT6.md +9 -0
  159. package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkCommon.md +16 -0
  160. package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkConstants.md +40 -0
  161. package/versioned_docs/version-v1.2/solidity-docs/crypto/Verifier.md +61 -0
  162. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/EASGatekeeper.md +121 -0
  163. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/FreeForAllSignUpGatekeeper.md +40 -0
  164. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpGatekeeper.md +26 -0
  165. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpTokenGatekeeper.md +93 -0
  166. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md +79 -0
  167. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperMultiple.md +48 -0
  168. package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperSingle.md +42 -0
  169. package/versioned_docs/version-v1.2/solidity-docs/index.md +4 -0
  170. package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.md +40 -0
  171. package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md +26 -0
  172. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IEAS.md +40 -0
  173. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IHats.md +103 -0
  174. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMPFactory.md +26 -0
  175. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMessageProcessor.md +31 -0
  176. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPoll.md +217 -0
  177. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPollFactory.md +29 -0
  178. package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallyFactory.md +28 -0
  179. package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallySubsidyFactory.md +27 -0
  180. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVerifier.md +25 -0
  181. package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVkRegistry.md +70 -0
  182. package/versioned_docs/version-v1.2/solidity-docs/mocks/MockHatsProtocol.md +133 -0
  183. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueue.md +464 -0
  184. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary.md +60 -0
  185. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary0.md +40 -0
  186. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinaryMaci.md +34 -0
  187. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary.md +75 -0
  188. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary0.md +40 -0
  189. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryBlankSl.md +40 -0
  190. package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryMaci.md +40 -0
  191. package/versioned_docs/version-v1.2/solidity-docs/trees/EmptyBallotRoots.md +13 -0
  192. package/versioned_docs/version-v1.2/solidity-docs/utilities/CommonUtilities.md +25 -0
  193. package/versioned_docs/version-v1.2/solidity-docs/utilities/DomainObjs.md +40 -0
  194. package/versioned_docs/version-v1.2/solidity-docs/utilities/Params.md +36 -0
  195. package/versioned_docs/version-v1.2/solidity-docs/utilities/Utilities.md +79 -0
  196. package/versioned_docs/version-v1.2/spec.md +944 -0
  197. package/versioned_docs/version-v1.2/testing-in-detail.md +209 -0
  198. package/versioned_docs/version-v1.2/testing.md +472 -0
  199. package/versioned_docs/version-v1.2/topup.md +43 -0
  200. package/versioned_docs/version-v1.2/troubleshooting.md +51 -0
  201. package/versioned_docs/version-v1.2/trusted-setup.md +76 -0
  202. package/versioned_docs/version-v1.2/typedoc/cli/.nojekyll +1 -0
  203. package/versioned_docs/version-v1.2/typedoc/cli/index.md +15 -0
  204. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/AirdropArgs.md +89 -0
  205. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployArgs.md +154 -0
  206. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployPollArgs.md +154 -0
  207. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployedContracts.md +130 -0
  208. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenLocalStateArgs.md +168 -0
  209. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenProofsArgs.md +388 -0
  210. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IGenKeypairArgs.md +37 -0
  211. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IRegisteredUserArgs.md +63 -0
  212. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeMessagesArgs.md +76 -0
  213. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeSignupsArgs.md +76 -0
  214. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PollContracts.md +53 -0
  215. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/ProveOnChainArgs.md +128 -0
  216. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PublishArgs.md +154 -0
  217. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SignupArgs.md +89 -0
  218. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SubsidyData.md +73 -0
  219. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TallyData.md +166 -0
  220. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TopupArgs.md +89 -0
  221. package/versioned_docs/version-v1.2/typedoc/cli/interfaces/VerifyArgs.md +128 -0
  222. package/versioned_docs/version-v1.2/typedoc/cli/modules.md +556 -0
  223. package/versioned_docs/version-v1.2/typedoc/core/.nojekyll +1 -0
  224. package/versioned_docs/version-v1.2/typedoc/core/classes/MaciState.md +295 -0
  225. package/versioned_docs/version-v1.2/typedoc/core/classes/Poll.md +1098 -0
  226. package/versioned_docs/version-v1.2/typedoc/core/index.md +110 -0
  227. package/versioned_docs/version-v1.2/typedoc/core/interfaces/BatchSizes.md +50 -0
  228. package/versioned_docs/version-v1.2/typedoc/core/interfaces/IJsonMaciState.md +77 -0
  229. package/versioned_docs/version-v1.2/typedoc/core/interfaces/IProcessMessagesCircuitInputs.md +242 -0
  230. package/versioned_docs/version-v1.2/typedoc/core/interfaces/ISubsidyCircuitInputs.md +198 -0
  231. package/versioned_docs/version-v1.2/typedoc/core/interfaces/ITallyCircuitInputs.md +231 -0
  232. package/versioned_docs/version-v1.2/typedoc/core/interfaces/MaxValues.md +37 -0
  233. package/versioned_docs/version-v1.2/typedoc/core/interfaces/TreeDepths.md +63 -0
  234. package/versioned_docs/version-v1.2/typedoc/core/modules.md +289 -0
  235. package/versioned_docs/version-v1.2/typedoc/crypto/.nojekyll +1 -0
  236. package/versioned_docs/version-v1.2/typedoc/crypto/classes/AccQueue.md +770 -0
  237. package/versioned_docs/version-v1.2/typedoc/crypto/classes/G1Point.md +115 -0
  238. package/versioned_docs/version-v1.2/typedoc/crypto/classes/G2Point.md +140 -0
  239. package/versioned_docs/version-v1.2/typedoc/crypto/classes/IncrementalQuinTree.md +470 -0
  240. package/versioned_docs/version-v1.2/typedoc/crypto/index.md +44 -0
  241. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Keypair.md +33 -0
  242. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/PoseidonFuncs.md +115 -0
  243. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Queue.md +33 -0
  244. package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Signature.md +37 -0
  245. package/versioned_docs/version-v1.2/typedoc/crypto/modules.md +913 -0
  246. package/versioned_docs/version-v1.2/typedoc/domainobjs/.nojekyll +1 -0
  247. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Ballot.md +274 -0
  248. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Keypair.md +181 -0
  249. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Message.md +244 -0
  250. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PCommand.md +409 -0
  251. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PrivKey.md +206 -0
  252. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PubKey.md +289 -0
  253. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/StateLeaf.md +340 -0
  254. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/TCommand.md +200 -0
  255. package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/VerifyingKey.md +240 -0
  256. package/versioned_docs/version-v1.2/typedoc/domainobjs/index.md +81 -0
  257. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/ICommand.md +104 -0
  258. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG1ContractParams.md +31 -0
  259. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG2ContractParams.md +31 -0
  260. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonBallot.md +42 -0
  261. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonCommand.md +32 -0
  262. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonKeyPair.md +31 -0
  263. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonPCommand.md +111 -0
  264. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonStateLeaf.md +42 -0
  265. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonTCommand.md +67 -0
  266. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IMessageContractParams.md +31 -0
  267. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeaf.md +39 -0
  268. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeafContractParams.md +42 -0
  269. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkContractParams.md +64 -0
  270. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkObjectParams.md +108 -0
  271. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/Proof.md +46 -0
  272. package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/VoteOptionTreeLeaf.md +24 -0
  273. package/versioned_docs/version-v1.2/typedoc/domainobjs/modules.md +110 -0
  274. package/versioned_docs/version-v1.2/typedoc/index.md +4 -0
  275. package/versioned_docs/version-v1.2/versioning.md +94 -0
  276. package/versioned_docs/version-v1.2/workflow.md +142 -0
  277. package/versioned_docs/version-v2.x/case-studies.md +35 -0
  278. package/versioned_docs/version-v2.x/contributing/_category_.json +4 -0
  279. package/versioned_docs/version-v2.x/contributing/code-of-conduct.md +92 -0
  280. package/versioned_docs/version-v2.x/contributing/contributing.md +149 -0
  281. package/versioned_docs/version-v2.x/contributing/project-ideas.md +78 -0
  282. package/versioned_docs/version-v2.x/core-concepts/_category_.json +4 -0
  283. package/versioned_docs/version-v2.x/core-concepts/ballot.md +19 -0
  284. package/versioned_docs/version-v2.x/core-concepts/coordinator-processing.md +46 -0
  285. package/versioned_docs/version-v2.x/core-concepts/hashing-and-encryption.md +45 -0
  286. package/versioned_docs/version-v2.x/core-concepts/key-change.md +179 -0
  287. package/versioned_docs/version-v2.x/core-concepts/maci-keys.md +84 -0
  288. package/versioned_docs/version-v2.x/core-concepts/maci-messages.md +44 -0
  289. package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +23 -0
  290. package/versioned_docs/version-v2.x/core-concepts/poll-types.md +106 -0
  291. package/versioned_docs/version-v2.x/core-concepts/spec.md +883 -0
  292. package/versioned_docs/version-v2.x/core-concepts/state-leaf.md +42 -0
  293. package/versioned_docs/version-v2.x/core-concepts/workflow.md +142 -0
  294. package/versioned_docs/version-v2.x/getting-started.md +313 -0
  295. package/versioned_docs/version-v2.x/guides/_category_.json +4 -0
  296. package/versioned_docs/version-v2.x/guides/compile-circuits.md +163 -0
  297. package/versioned_docs/version-v2.x/guides/frontend.md +99 -0
  298. package/versioned_docs/version-v2.x/guides/integrating.md +73 -0
  299. package/versioned_docs/version-v2.x/guides/maciWrapper.md +173 -0
  300. package/versioned_docs/version-v2.x/guides/subgraph.md +79 -0
  301. package/versioned_docs/version-v2.x/guides/testing/_category_.json +4 -0
  302. package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +203 -0
  303. package/versioned_docs/version-v2.x/guides/testing/testing.md +163 -0
  304. package/versioned_docs/version-v2.x/guides/troubleshooting.md +161 -0
  305. package/versioned_docs/version-v2.x/introduction.md +146 -0
  306. package/versioned_docs/version-v2.x/processes/_category_.json +4 -0
  307. package/versioned_docs/version-v2.x/processes/ci-pipeline.md +38 -0
  308. package/versioned_docs/version-v2.x/processes/versioning.md +94 -0
  309. package/versioned_docs/version-v2.x/resources.md +33 -0
  310. package/versioned_docs/version-v2.x/security/_category_.json +4 -0
  311. package/versioned_docs/version-v2.x/security/audit.md +167 -0
  312. package/versioned_docs/version-v2.x/security/trusted-setup.md +166 -0
  313. package/versioned_docs/version-v2.x/supported-networks/_category_.json +4 -0
  314. package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +1108 -0
  315. package/versioned_docs/version-v2.x/supported-networks/supported-networks.md +47 -0
  316. package/versioned_docs/version-v2.x/technical-references/_category_.json +4 -0
  317. package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +21 -0
  318. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Gatekeepers.md +40 -0
  319. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +152 -0
  320. package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
  321. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +32 -0
  322. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +104 -0
  323. package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +43 -0
  324. package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +45 -0
  325. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +57 -0
  326. package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
  327. package/versioned_docs/version-v2.x/technical-references/smart-contracts/_category_.json +8 -0
  328. package/versioned_docs/version-v2.x/technical-references/technical-references.md +47 -0
  329. package/versioned_docs/version-v2.x/technical-references/typescript-code/_category_.json +4 -0
  330. package/versioned_docs/version-v2.x/technical-references/typescript-code/cli.md +699 -0
  331. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/_category_.json +4 -0
  332. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +107 -0
  333. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/setup.md +101 -0
  334. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
  335. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/utilities.md +131 -0
  336. package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +37 -0
  337. package/versioned_docs/version-v2.x/use-cases/_category_.json +4 -0
  338. package/versioned_docs/version-v2.x/use-cases/governance.md +18 -0
  339. package/versioned_docs/version-v2.x/use-cases/polling.md +10 -0
  340. package/versioned_docs/version-v2.x/use-cases/public-goods.md +65 -0
  341. package/versioned_docs/version-v3.x/case-studies.md +35 -0
  342. package/versioned_docs/version-v3.x/contributing/_category_.json +4 -0
  343. package/versioned_docs/version-v3.x/contributing/code-of-conduct.md +92 -0
  344. package/versioned_docs/version-v3.x/contributing/contributing.md +149 -0
  345. package/versioned_docs/version-v3.x/contributing/project-ideas.md +78 -0
  346. package/versioned_docs/version-v3.x/core-concepts/_category_.json +4 -0
  347. package/versioned_docs/version-v3.x/core-concepts/ballot.md +19 -0
  348. package/versioned_docs/version-v3.x/core-concepts/coordinator-processing.md +46 -0
  349. package/versioned_docs/version-v3.x/core-concepts/hashing-and-encryption.md +45 -0
  350. package/versioned_docs/version-v3.x/core-concepts/key-change.md +179 -0
  351. package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +84 -0
  352. package/versioned_docs/version-v3.x/core-concepts/maci-messages.md +44 -0
  353. package/versioned_docs/version-v3.x/core-concepts/merkle-trees.md +16 -0
  354. package/versioned_docs/version-v3.x/core-concepts/poll-types.md +58 -0
  355. package/versioned_docs/version-v3.x/core-concepts/polls.md +81 -0
  356. package/versioned_docs/version-v3.x/core-concepts/spec.md +883 -0
  357. package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +42 -0
  358. package/versioned_docs/version-v3.x/core-concepts/workflow.md +143 -0
  359. package/versioned_docs/version-v3.x/guides/_category_.json +4 -0
  360. package/versioned_docs/version-v3.x/guides/compile-circuits.md +175 -0
  361. package/versioned_docs/version-v3.x/guides/integrating.md +137 -0
  362. package/versioned_docs/version-v3.x/guides/subgraph.md +79 -0
  363. package/versioned_docs/version-v3.x/guides/testing/_category_.json +4 -0
  364. package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +191 -0
  365. package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +158 -0
  366. package/versioned_docs/version-v3.x/guides/troubleshooting.md +161 -0
  367. package/versioned_docs/version-v3.x/introduction.md +153 -0
  368. package/versioned_docs/version-v3.x/processes/_category_.json +4 -0
  369. package/versioned_docs/version-v3.x/processes/ci-pipeline.md +38 -0
  370. package/versioned_docs/version-v3.x/processes/versioning.md +94 -0
  371. package/versioned_docs/version-v3.x/quick-start.md +318 -0
  372. package/versioned_docs/version-v3.x/resources.md +33 -0
  373. package/versioned_docs/version-v3.x/security/_category_.json +4 -0
  374. package/versioned_docs/version-v3.x/security/audit.md +167 -0
  375. package/versioned_docs/version-v3.x/security/trusted-setup.md +172 -0
  376. package/versioned_docs/version-v3.x/supported-networks/_category_.json +4 -0
  377. package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +112 -0
  378. package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +53 -0
  379. package/versioned_docs/version-v3.x/technical-references/_category_.json +4 -0
  380. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +160 -0
  381. package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
  382. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +33 -0
  383. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +39 -0
  384. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +170 -0
  385. package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +33 -0
  386. package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +43 -0
  387. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +62 -0
  388. package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
  389. package/versioned_docs/version-v3.x/technical-references/smart-contracts/_category_.json +8 -0
  390. package/versioned_docs/version-v3.x/technical-references/technical-references.md +48 -0
  391. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/_category_.json +4 -0
  392. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +53 -0
  393. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +106 -0
  394. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +96 -0
  395. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
  396. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +131 -0
  397. package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +42 -0
  398. package/versioned_docs/version-v3.x/use-cases/_category_.json +4 -0
  399. package/versioned_docs/version-v3.x/use-cases/governance.md +18 -0
  400. package/versioned_docs/version-v3.x/use-cases/polling.md +10 -0
  401. package/versioned_docs/version-v3.x/use-cases/public-goods.md +65 -0
  402. package/versioned_sidebars/version-v0.x-sidebars.json +8 -0
  403. package/versioned_sidebars/version-v1.2-sidebars.json +8 -0
  404. package/versioned_sidebars/version-v2.x-sidebars.json +8 -0
  405. package/versioned_sidebars/version-v3.x-sidebars.json +8 -0
  406. package/versions.json +1 -0
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: MACI Contributor Code of Conduct
3
+ description: The Contributor Covenant Code of Conduct for MACI
4
+ sidebar_label: Code of Conduct
5
+ sidebar_position: 2
6
+ ---
7
+
8
+ # Contributor Covenant Code of Conduct
9
+
10
+ Please see our guide on [contributing to MACI](/docs/contributing).
11
+
12
+ ## Our Pledge
13
+
14
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
15
+
16
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
17
+
18
+ ## Our Standards
19
+
20
+ Examples of behavior that contributes to a positive environment for our community include:
21
+
22
+ - Demonstrating empathy and kindness toward other people
23
+ - Being respectful of differing opinions, viewpoints, and experiences
24
+ - Giving and gracefully accepting constructive feedback
25
+ - Accepting responsibility and apologizing to those affected by our mistakes,
26
+ and learning from the experience
27
+ - Focusing on what is best not just for us as individuals, but for the
28
+ overall community
29
+
30
+ Examples of unacceptable behavior include:
31
+
32
+ - The use of sexualized language or imagery, and sexual attention or
33
+ advances of any kind
34
+ - Trolling, insulting or derogatory comments, and personal or political attacks
35
+ - Public or private harassment
36
+ - Publishing others' private information, such as a physical or email
37
+ address, without their explicit permission
38
+ - Other conduct which could reasonably be considered inappropriate in a
39
+ professional setting
40
+
41
+ ## Enforcement Responsibilities
42
+
43
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
44
+
45
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
46
+
47
+ ## Scope
48
+
49
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
50
+
51
+ ## Enforcement
52
+
53
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement.
54
+ All complaints will be reviewed and investigated promptly and fairly.
55
+
56
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
57
+
58
+ ## Enforcement Guidelines
59
+
60
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
61
+
62
+ ### 1. Correction
63
+
64
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
65
+
66
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
67
+
68
+ ### 2. Warning
69
+
70
+ **Community Impact**: A violation through a single incident or series of actions.
71
+
72
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
73
+
74
+ ### 3. Temporary Ban
75
+
76
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
77
+
78
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
79
+
80
+ ### 4. Permanent Ban
81
+
82
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
83
+
84
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
85
+
86
+ ## Attribution
87
+
88
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.0, [available here](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
89
+
90
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
91
+
92
+ For answers to common questions about this code of conduct, see [the FAQ](https://www.contributor-covenant.org/faq). [Translations are available here](https://www.contributor-covenant.org/translations).
@@ -0,0 +1,149 @@
1
+ ---
2
+ title: Contributing to MACI
3
+ description: Instructions on how to contribute to MACI
4
+ sidebar_label: Contributing
5
+ sidebar_position: 1
6
+ ---
7
+
8
+ # Contributing
9
+
10
+ 🎉 Thank you for being interested in contributing to MACI! 🎉
11
+
12
+ Feel welcome and read the following sections in order to know how to ask questions and how to work on something.
13
+
14
+ All members of our community are expected to follow our [Code of Conduct](/docs/contributing/code-of-conduct). Please make sure you are welcoming and friendly in all of our spaces.
15
+
16
+ We're really glad you're reading this, because we need volunteer developers to help this project come to fruition. There is a lot we want to achieve, and this can only be made possible thanks to your support. 👏
17
+
18
+ **Disclaimer**: We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical error feel free to message the team [here](https://discord.gg/akDcCB69).
19
+
20
+ ## How You Can Contribute
21
+
22
+ 1. **Report Bugs**: Identify and describe issues.
23
+ 2. **Suggest Features**: Share your ideas for improvements.
24
+ 3. **Code Contributions**: Fix bugs, add features, or refactor existing code.
25
+ 4. **Improve Documentation**: Help us keep the docs clear and up to date.
26
+ 5. **Engage with the Community**: Help answer questions or participate in discussions.
27
+
28
+ ## Issues
29
+
30
+ The best way to contribute to our projects is by opening a [new issue](https://github.com/privacy-scaling-explorations/maci/issues) or tackling one of the issues listed [here](https://github.com/privacy-scaling-explorations/maci/contribute).
31
+
32
+ Before submitting an issue:
33
+
34
+ - Search existing issues to avoid duplicates
35
+ - Check documentation/FAQ
36
+ - Test with the latest version
37
+
38
+ :::info
39
+ If you pick up an issue and are assigned to it by the maintaining team, please be advised that from time to time the team will reach out to check on the progress of the work. If you are working on the issue you are assigned but need more time or help, please let us know and we will be happy to assist you. We understand that contributors have other commitments too, and we appreciate every contribution, no matter the pace. If you fail to respond after 2 weeks, we will gently remind you to provide an update. If there is still no activity after that, we may reassign the issue to ensure project momentum, but we also welcome you to reengage with the project at any time when you are more available.
40
+ :::
41
+
42
+ ## Pull Requests
43
+
44
+ Pull requests are great if you want to add a feature or fix a bug. Here's a quick guide:
45
+
46
+ 1. Ensure there is an issue tracking your work.
47
+
48
+ 2. Fork the repo.
49
+
50
+ 3. Run the tests. We only take pull requests with passing tests.
51
+
52
+ 4. Add a test for your change. Only refactoring and documentation changes require no new tests.
53
+
54
+ 5. Make sure to check out the [Style Guide](#style-guide) and ensure that your code complies with the rules.
55
+
56
+ 6. Make sure you read our [GitHub processes](https://github.com/privacy-scaling-explorations/maci/discussions/847) documentation.
57
+
58
+ 7. Make the test pass.
59
+
60
+ 8. Commit your changes. Please make sure your forked `dev` branch is synced as well feature/fix branch and there are no "temp" commits (like wip, fix typo/lint/types and etc). We recommend to squash the feature/fix branch commits before creating PR. You can use this command for it:
61
+
62
+ ```bash
63
+ git reset $(git merge-base dev $(git rev-parse --abbrev-ref HEAD))
64
+ ```
65
+
66
+ 9. Push to your fork and submit a pull request on our `dev` branch. Please provide us with some explanation of why you made the changes you made. For new features make sure to explain a standard use case to us.
67
+
68
+ 10. Link any issues that the PR is addressing as described in our processes documentation.
69
+
70
+ ## CI (Github Actions) Tests
71
+
72
+ We use GitHub Actions to test each PR before it is merged.
73
+
74
+ When you submit your PR (or later change that code), a CI build will automatically be kicked off. A note will be added to the PR, and will indicate the current status of the build.
75
+
76
+ Please refer to our [testing guide](/docs/guides/testing/testing-introduction) for more details on how we run tests across the monorepo.
77
+
78
+ ## Style Guide
79
+
80
+ ### Code rules
81
+
82
+ We always use ESLint and Prettier. To check that your code follows the rules, simply run the pnpm script `pnpm run lint` and `pnpm run prettier`. When committing, `eslint` is run automatically, so you will be required to fix any error before being able to push a commit. We highly recommend to tackle warnings as well.
83
+
84
+ ### Commits rules
85
+
86
+ For commits it is recommended to use [Conventional Commits](https://www.conventionalcommits.org). You may install the [commitizen](https://commitizen-tools.github.io/commitizen/) tool to help you with this.
87
+
88
+ Each commit message consists of a **header**, a **body** and a **footer**. The **header** has a special format that includes a **type**, a **scope** and a **subject**:
89
+
90
+ ```
91
+ <type>(<scope>): <subject>
92
+ <BLANK LINE>
93
+ <body>
94
+ <BLANK LINE>
95
+ <footer>
96
+ ```
97
+
98
+ The **header** is mandatory and the **scope** of the header must contain the name of the component you are working on.
99
+
100
+ #### Type
101
+
102
+ The type must be one of the following:
103
+
104
+ - feat: A new feature
105
+ - fix: A bug fix
106
+ - docs: Documentation only changes
107
+ - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
108
+ - refactor: A code change that neither fixes a bug nor adds a feature (improvements of the code structure)
109
+ - perf: A code change that improves the performance
110
+ - test: Adding missing or correcting existing tests
111
+ - build: Changes that affect the build system or external dependencies (example scopes: gulp, npm)
112
+ - ci: Changes to CI configuration files and scripts (example scopes: travis, circle)
113
+ - chore: Other changes that don't modify src or test files
114
+ - revert: Reverts a previous commit
115
+
116
+ #### Scope
117
+
118
+ The scope should be the name of the feature or package modified (as perceived by the person reading the changelog generated from commit messages).
119
+
120
+ #### Subject
121
+
122
+ The subject contains a succinct description of the change:
123
+
124
+ - Use the imperative, present tense: "change" not "changed" nor "changes"
125
+ - Don't capitalize the first letter
126
+ - No dot (.) at the end
127
+
128
+ #### Body
129
+
130
+ Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
131
+
132
+ ### Branch rules
133
+
134
+ - Branches should generally be created off of the base branch (`dev` )
135
+ - Avoid long descriptive names for long-lived branches
136
+ - Use kebab-case (no CamelCase)
137
+ - Use grouping tokens (words) at the beginning of your branch names (in a similar way to the `type` of commit)
138
+ - Define and use short lead tokens to differentiate branches in a way that is meaningful to your workflow
139
+ - Use slashes to separate parts of your branch names
140
+ - Remove branch after merge if it is not important
141
+
142
+ Examples:
143
+
144
+ ```bash
145
+ git branch -b docs/readme
146
+ git branch -b test/a-feature
147
+ git branch -b feat/sidebar
148
+ git branch -b fix/b-feature
149
+ ```
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: MACI Project Ideas
3
+ description: Community-sourced ideas of projects you could build with MACI
4
+ sidebar_label: MACI Project ideas
5
+ sidebar_position: 3
6
+ ---
7
+
8
+ # Project Ideas
9
+
10
+ ### 1. Decentralized Governance Platform
11
+
12
+ **Idea:** Create a decentralized governance platform for DAOs (Decentralized Autonomous Organizations) using the Scaffold ETH 2 + MACI Voting Template. Enable DAO members to propose and vote on governance decisions securely and anonymously.
13
+
14
+ **Features:**
15
+
16
+ - Proposal creation and submission
17
+ - Secure, anonymous voting using MACI
18
+ - Transparent results display
19
+ - Integration with existing DAO frameworks
20
+
21
+ ### 2. Secure Polling System for Communities
22
+
23
+ **Idea:** Develop a secure and private polling system for online communities, such as social media groups, forums, or local organizations. This system can be used for decision-making, surveys, or feedback collection.
24
+
25
+ **Features:**
26
+
27
+ - User-friendly poll creation and management interface
28
+ - Anonymized vote submission
29
+ - Real-time poll results visualization
30
+ - Admin dashboard for poll oversight
31
+
32
+ ### 3. Private Election System for Institutions
33
+
34
+ **Idea:** Build a private and secure election system for educational institutions, corporate boards, or non-profits. Ensure that election processes are transparent, fair, and resistant to manipulation.
35
+
36
+ **Features:**
37
+
38
+ - Secure voter registration process
39
+ - Anonymous and tamper-proof voting
40
+ - Detailed results analytics
41
+ - Audit logs and election certification
42
+
43
+ ### 4. Anonymous Feedback System
44
+
45
+ **Idea:** Implement an anonymous feedback system for companies or organizations to collect honest feedback from employees or customers. Guarantee the privacy of the respondents to encourage open and honest communication.
46
+
47
+ **Features:**
48
+
49
+ - Anonymous feedback submission
50
+ - Secure handling of sensitive information
51
+ - Aggregated feedback reports
52
+ - Admin tools for feedback analysis
53
+
54
+ ### 5. Decentralized Survey Platform
55
+
56
+ **Idea:** Create a decentralized survey platform for academic research or market analysis. Utilize MACI's privacy features to ensure respondent confidentiality and data integrity.
57
+
58
+ **Features:**
59
+
60
+ - Customizable survey creation
61
+ - Anonymized responses
62
+ - Secure data storage and processing
63
+ - Results aggregation and visualization
64
+
65
+ ### 6. Blockchain-based Voting for Public Elections
66
+
67
+ **Idea:** Develop a blockchain-based voting system for municipal or state-level public elections. Focus on enhancing transparency, security, and voter anonymity.
68
+
69
+ **Features:**
70
+
71
+ - Robust voter registration and verification
72
+ - Anonymous vote casting and tallying
73
+ - Transparent and verifiable election results
74
+ - Compliance with electoral regulations
75
+
76
+ ## Join the conversation
77
+
78
+ The MACI core team maintains a wishlist of community-sourced ideas to build with/for/on MACI. Check out our ["Project ideas to build with MACI" GitHub Discussion](https://github.com/privacy-scaling-explorations/maci/discussions/1136) for the up-to-date list! We encourage you to find inspiration here and comment in the discussion to suggest ideas of your own.
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Core Concepts",
3
+ "position": 5
4
+ }
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: Ballot
3
+ description: A short introduction of the main primitives used by MACI
4
+ sidebar_label: Ballot
5
+ sidebar_position: 4
6
+ ---
7
+
8
+ A Ballot represents a particular user's votes in a poll, as well as their next valid nonce. It is akin to a voting slip, which belongs to only one voter and contains a list of their choices.
9
+
10
+ | Symbol | Name | Comments |
11
+ | --------- | -------------------------- | -------------------------------------------------------------------------- |
12
+ | $blt_{v}$ | An array of vote weights | $blt_{v[i]}$ refers to the vote weights assigned to vote option $i$ |
13
+ | $blt_n$ | The current nonce | Starts from 0 and increments, so the first valid command must have nonce 1 |
14
+ | $blt_d$ | The vote option tree depth | The depth of the vote option tree |
15
+
16
+ The hash $blt$ is computed as such:
17
+
18
+ 1. Compute the Merkle root of $blt_v$, arity 5, of a tree of depth $blt_d$; let this value be $blt_r$
19
+ 2. Compute $poseidon_2([blt_n, blt_r])$
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Coordinator local processing
3
+ description: How does the coordinator process and tally messages locally
4
+ sidebar_label: Coordinator local processing
5
+ sidebar_position: 7
6
+ ---
7
+
8
+ # Coordinator local processing
9
+
10
+ The coordinator is responsible for processing and tallying messages locally, before generating proofs that this was done correctly using the zk-SNARK circuits.
11
+
12
+ To summarize, the coordinator's goal here is to process all of the messages that were submitted by MACI's voters, then tally the votes based on the valid vote messages. Furthermore, each batch processed should be able to be verified by a zk-SNARK proof.
13
+
14
+ ## Which MACI's components are involved
15
+
16
+ The following diagram, shows which components are involved and at which step of the way
17
+
18
+ ![components involved](/img/coordinatorComponents.svg)
19
+
20
+ ## What does the process look like?
21
+
22
+ ![processing](/img/offlineProcessing.svg)
23
+
24
+ Zooming in.
25
+
26
+ **Message processing**
27
+
28
+ ![message processing](/img/messageProcessingLocal.svg)
29
+
30
+ **Vote tallying**
31
+
32
+ ![vote tallying](/img/voteTallyingLocal.svg)
33
+
34
+ ## What does the process look like when including the zk-SNARK proofs
35
+
36
+ **Process of completing a Poll**
37
+
38
+ ![processing with proofs](/img/completingAPoll.svg)
39
+
40
+ **Process of generating proofs**
41
+
42
+ ![generating proofs](/img/generateProofs.svg)
43
+
44
+ **Tally commitments**
45
+
46
+ ![tally commitments](/img/tallyCommitments.svg)
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Hashing and Encryption
3
+ description: A short introduction of the main primitives used by MACI
4
+ sidebar_label: Hashing and Encryption
5
+ sidebar_position: 3
6
+ ---
7
+
8
+ ### Hash Functions
9
+
10
+ MACI uses the Poseidon hash function, which is proven to be very efficient in ZK applications. Poseidon accepts $n$ inputs and produces 1 output:
11
+
12
+ $y = poseidon_n([x_1, x_2, ..., x_n])$
13
+
14
+ Also, SHA256 is used to compress public inputs to a circuit into a single field element in the finite field $F$ mod $p$.
15
+
16
+ ### Message Encryption
17
+
18
+ In order to encrypt messages, MACI uses Poseidon in DuplexSponge [mode](https://dusk.network/uploads/Encryption-with-Poseidon.pdf). This provides an encryption function and a decryption function:
19
+
20
+ - $C$ as $poseidonEncrypt(k_s[0], k_s[1], N, l, t[])$
21
+ - $poseidonDecrypt(k_s[0], k_s[1], N, l, C)$
22
+
23
+ In more details,
24
+
25
+ - $k_s$ is the shared key, a point on the Baby Jubjub curve
26
+ - $N$ is the nonce, which we hardcode to 0
27
+ - $l$ is the length of the plaintext $t[]$
28
+
29
+ The implementation can be found [here](https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/poseidon-cipher).
30
+
31
+ ### Shared Key Generation
32
+
33
+ The ECDH algorithm is used to generate a shared key, which is then used to encrypt each message. This allows to create messages which are only decryptable by the coordinator and the person sending the message.
34
+
35
+ In more details:
36
+
37
+ - The coordinator's public key $cPk$ is known to all. Their private key $cSk$ is secret.
38
+
39
+ - When the user publishes a message (i.e. casts a vote), they generate an ephemeral keypair with private key $eSk$ and public key $ePk$.
40
+
41
+ - The user generates the shared key $k$ using the coordinator's public key $cPk$ and the user's ephemeral private key $eSk$.
42
+
43
+ - The user encrypts the command and signature with $k$ to form a message.
44
+
45
+ - The user sends their ephemeral public key $ePk$ along with the ciphertext. The coordinator can recover the same shared key using their private key $cSk$ and the given ephemeral public key $ePk$.
@@ -0,0 +1,179 @@
1
+ ---
2
+ title: Key change
3
+ description: How key change messages work
4
+ sidebar_label: Key change
5
+ sidebar_position: 8
6
+ ---
7
+
8
+ MACI's voters are identified by their MACI public key. Together with their private key, they can sign and submit messages to live Polls.
9
+
10
+ As MACI's main property is to provide collusion resistance in digital voting applications, it is important to have a mechanism for a user to change their voting key, should this become compromised, or they wish to revoke past actions.
11
+
12
+ ## How MACI messages are processed
13
+
14
+ In order to understand how key changing currently works in MACI, we need to understand how messages are processed.
15
+
16
+ After a poll ends, the coordinator processes messages off chain in reverse order. To improve efficiency, messages are processed in batches, and correctness is proved for each batch using a zk-SNARK circuit.
17
+
18
+ Due to messages being processed in reverse order, key change messages would work a bit differently than if they were processed in the same order as they were submitted.
19
+
20
+ ## Why are messages processed in reverse order?
21
+
22
+ Reverse processing was introduced to prevent a type of attack where a briber would collude with a voter to sign up, and then submit a message to change their key to a key that the briber controls. This way the briber would have assurance that they could submit the vote they want.
23
+
24
+ Let's take as an example the following:
25
+
26
+ 1. Alice signs up with pub key $pub1$
27
+ 2. Bob (Briber) bribes Alice and asks her to submit a key change message to $pub2$ (owned by Bob)
28
+ 3. Bob submits a vote with $pub2$
29
+ 4. Alice submits a vote with $pub1$
30
+
31
+ If messages were processed in the same order as they were submitted, Alice's vote would not be valid, due to it being signed with a private key $priv1$ - which now would not be valid.
32
+
33
+ On the other hand, due to messages being processed in reverse order, Alice's last message would be counted as valid as the key change would have not been processed yet. Then, Bob's vote would not be counted as valid as the current key for Alice would be $pub1$.
34
+
35
+ > Note that a key change message should have the nonce set to 1 in order for it to be valid. We'll see a code example in the next sections.
36
+
37
+ ## Then how can a voter change their key and submit a new vote?
38
+
39
+ A user, can submit a key change message, by simply sending a new message signed with their signup key, and setting the nonce to 1. This is because the code checks that the first message to be processed has the nonce set to 1.
40
+
41
+ Let's take a look into a code example:
42
+
43
+ > We have two users, and three keypairs
44
+
45
+ - Create three keypairs
46
+
47
+ ```ts
48
+ const user1Keypair = new Keypair();
49
+ const user2Keypair = new Keypair();
50
+ const secondKeyPair = new Keypair();
51
+ ```
52
+
53
+ - Votes will be
54
+
55
+ ```ts
56
+ // user1 votes for project 0
57
+ const user1VoteOptionIndex = BigInt(0);
58
+ // user2 votes for project 1
59
+ const user2VoteOptionIndex = BigInt(1);
60
+ // user1 votes 9 for the first vote
61
+ const user1VoteWeight = BigInt(9);
62
+ // user2 votes 3
63
+ const user2VoteWeight = BigInt(3);
64
+ // user1 will change their vote to 5
65
+ const user1NewVoteWeight = BigInt(5);
66
+ ```
67
+
68
+ - What do we expect as result
69
+
70
+ ```
71
+ project 0 = 5 * 5 -> 25
72
+ project 1 = 3 * 3 -> 9
73
+ ```
74
+
75
+ As seen above, we expect the first vote weight 9 to not be counted, but instead the second vote weight 5 to be counted.
76
+
77
+ - Deploy a MaciState locally and sign up
78
+
79
+ ```ts
80
+ const maciState: MaciState = new MaciState(STATE_TREE_DEPTH);
81
+ // Sign up
82
+ user1StateIndex = maciState.signUp(user1Keypair.pubKey, voiceCreditBalance, BigInt(Math.floor(Date.now() / 1000)));
83
+ user2StateIndex = maciState.signUp(user2Keypair.pubKey, voiceCreditBalance, BigInt(Math.floor(Date.now() / 1000)));
84
+ // deploy a poll
85
+ pollId = maciState.deployPoll(
86
+ duration,
87
+ BigInt(Math.floor(Date.now() / 1000) + duration),
88
+ treeDepths,
89
+ messageBatchSize,
90
+ coordinatorKeypair,
91
+ );
92
+ ```
93
+
94
+ - User1 and user2 submit their first votes
95
+
96
+ ```ts
97
+ const poll = maciState.polls[pollId];
98
+ const command1 = new PCommand(
99
+ BigInt(user1StateIndex),
100
+ user1Keypair.pubKey,
101
+ user1VoteOptionIndex,
102
+ user1VoteWeight,
103
+ BigInt(1),
104
+ BigInt(pollId),
105
+ );
106
+
107
+ const signature1 = command1.sign(user1Keypair.privKey);
108
+
109
+ const ecdhKeypair1 = new Keypair();
110
+ const sharedKey1 = Keypair.genEcdhSharedKey(ecdhKeypair1.privKey, coordinatorKeypair.pubKey);
111
+
112
+ const message1 = command1.encrypt(signature1, sharedKey1);
113
+ poll.publishMessage(message1, ecdhKeypair1.pubKey);
114
+
115
+ const command2 = new PCommand(
116
+ BigInt(user2StateIndex),
117
+ user2Keypair.pubKey,
118
+ user2VoteOptionIndex,
119
+ user2VoteWeight,
120
+ BigInt(1),
121
+ BigInt(pollId),
122
+ );
123
+
124
+ const signature2 = command2.sign(user2Keypair.privKey);
125
+
126
+ const ecdhKeypair2 = new Keypair();
127
+ const sharedKey2 = Keypair.genEcdhSharedKey(ecdhKeypair2.privKey, coordinatorKeypair.pubKey);
128
+
129
+ const message2 = command2.encrypt(signature2, sharedKey2);
130
+ poll.publishMessage(message2, ecdhKeypair2.pubKey);
131
+ ```
132
+
133
+ - User1 submits a key change message with the new vote
134
+
135
+ ```ts
136
+ const poll = maciState.polls[pollId];
137
+ const command = new PCommand(
138
+ BigInt(user1StateIndex),
139
+ secondKeyPair.pubKey,
140
+ user1VoteOptionIndex,
141
+ user1NewVoteWeight,
142
+ BigInt(1),
143
+ BigInt(pollId),
144
+ );
145
+
146
+ const signature = command.sign(user1Keypair.privKey);
147
+
148
+ const ecdhKeypair = new Keypair();
149
+ const sharedKey = Keypair.genEcdhSharedKey(ecdhKeypair.privKey, coordinatorKeypair.pubKey);
150
+
151
+ const message = command.encrypt(signature, sharedKey);
152
+ poll.publishMessage(message, ecdhKeypair.pubKey);
153
+ ```
154
+
155
+ - We process the votes and check that the result is as expected (`user1NewVoteWeight` was 5 and `user2VoteWeight` 3)
156
+
157
+ ```ts
158
+ const poll = maciState.polls[pollId];
159
+ poll.processMessages(pollId);
160
+ poll.tallyVotes();
161
+ expect(poll.perVOSpentVoiceCredits[0].toString()).to.eq((user1NewVoteWeight * user1NewVoteWeight).toString());
162
+ expect(poll.perVOSpentVoiceCredits[1].toString()).to.eq((user2VoteWeight * user2VoteWeight).toString());
163
+ ```
164
+
165
+ - Finally confirm that the keypair was changed for the user1
166
+
167
+ ```ts
168
+ const poll = maciState.polls[pollId];
169
+ const stateLeaf1 = poll.stateLeaves[user1StateIndex];
170
+ const stateLeaf2 = poll.stateLeaves[user2StateIndex];
171
+ expect(stateLeaf1.pubKey.equals(user1SecondKeypair.pubKey)).to.eq(true);
172
+ expect(stateLeaf2.pubKey.equals(user2Keypair.pubKey)).to.eq(true);
173
+ ```
174
+
175
+ We see that is important that we set the final message (the one with the new vote) with nonce 1, as this vote would be counted as the first vote.
176
+
177
+ :::info
178
+ Tests related to key changes have been added to the [core package](https://github.com/privacy-scaling-explorations/maci/blob/dev/core/ts/__tests__/) and to the [cli package](https://github.com/privacy-scaling-explorations/maci/blob/dev/cli/tests/).
179
+ :::