@maci-protocol/website 0.0.0-ci.2653bc0
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/.eslintrc.js +157 -0
- package/CHANGELOG.md +566 -0
- package/LICENSE +22 -0
- package/README.md +58 -0
- package/babel.config.js +3 -0
- package/blog/2021-10-12-maci-v1.md +100 -0
- package/blog/2022-09-22-maci-v1-technical-introduction.md +180 -0
- package/blog/2023-01-18-maci-v1.1.1.md +121 -0
- package/blog/2024-01-18-roadmap.md +106 -0
- package/blog/2024-02-28-maci-v1.2.0.md +121 -0
- package/blog/2024-04-10-roadmap-q2.md +96 -0
- package/blog/2024-05-08-ethdam.md +169 -0
- package/blog/2024-05-22-the-origins-of-maci.md +38 -0
- package/blog/2024-05-28-upcoming-grants.md +85 -0
- package/blog/2024-06-17-understanding-maci.md +63 -0
- package/blog/2024-06-21-deciphering-maci.md +48 -0
- package/blog/2024-06-28-revolusioning-public-goods-funding.md +32 -0
- package/blog/2024-07-23-q2-review.md +72 -0
- package/blog/2024-07-30-roadmap-q3.md +61 -0
- package/blog/2024-08-10-maci-v2.md +102 -0
- package/blog/2024-08-29-anonymous-poll-joining.md +47 -0
- package/blog/2024-10-29-q3-review.md +63 -0
- package/blog/2024-11-20-maci-platform.md +93 -0
- package/blog/2024-12-01-maci-getting-started.md +294 -0
- package/blog/2025-03-21-roadmap-2025.md +112 -0
- package/blog/assets/MACI_Bob_SignUp_1.png +0 -0
- package/blog/assets/MACI_Bob_SignUp_2.png +0 -0
- package/blog/assets/MACI_Complex_Message.png +0 -0
- package/blog/assets/MACI_Contracts.png +0 -0
- package/blog/assets/MACI_Sign_Up.png +0 -0
- package/blog/assets/MACI_Simple_Message.png +0 -0
- package/blog/assets/MACI_Verifier_1.png +0 -0
- package/blog/authors.yml +5 -0
- package/docusaurus.config.ts +213 -0
- package/package.json +65 -0
- package/src/components/ActionCard/index.tsx +30 -0
- package/src/components/ActionCard/styles.module.css +96 -0
- package/src/components/HomepageFeatures/index.tsx +91 -0
- package/src/components/HomepageFeatures/styles.module.css +17 -0
- package/src/components/ProjectCard/index.tsx +74 -0
- package/src/components/ProjectCard/styles.module.css +77 -0
- package/src/components/ProjectList/index.tsx +218 -0
- package/src/components/ProjectList/styles.module.css +180 -0
- package/src/content/projects.json +294 -0
- package/src/css/card.module.css +130 -0
- package/src/css/custom.css +91 -0
- package/src/icons/IconDiscord.tsx +16 -0
- package/src/icons/IconGithub.tsx +16 -0
- package/src/icons/IconWebsite.tsx +16 -0
- package/src/pages/blogs.tsx +58 -0
- package/src/pages/index.module.css +152 -0
- package/src/pages/index.tsx +66 -0
- package/src/pages/projects.tsx +44 -0
- package/src/pages/roadmap.md +150 -0
- package/src/pages/typedoc.tsx +11 -0
- package/src/plugins/blog-plugin/index.ts +86 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/scripts/setupSolidityDocs.ts +67 -0
- package/src/scripts/setupTypedoc.ts +112 -0
- package/src/scripts/utils.ts +115 -0
- package/src/utils/getProjectsByFilter.ts +40 -0
- package/static/.nojekyll +0 -0
- package/static/audit_reports/20210922_Hashcloak_audit_report.pdf +0 -0
- package/static/audit_reports/202220930_Hashcloak_audit_report.pdf +0 -0
- package/static/audit_reports/20240223_PSE_Audit_audit_report.pdf +0 -0
- package/static/audit_reports/20240731_PSE_Audit_audit_report.pdf +0 -0
- package/static/fonts/DM_Sans.woff2 +0 -0
- package/static/fonts/Share_Tech_Mono.woff2 +0 -0
- package/static/img/box.png +0 -0
- package/static/img/box_dark.png +0 -0
- package/static/img/chain.png +0 -0
- package/static/img/chain_dark.png +0 -0
- package/static/img/chart.png +0 -0
- package/static/img/chart_dark.png +0 -0
- package/static/img/circuits/MACI-Circuits.excalidraw +39652 -0
- package/static/img/circuits/calculateTotal.svg +21 -0
- package/static/img/circuits/ecdh.svg +21 -0
- package/static/img/circuits/messageToCommand.svg +21 -0
- package/static/img/circuits/messageValidator.svg +21 -0
- package/static/img/circuits/poseidonHasher13.svg +21 -0
- package/static/img/circuits/privToPubkey.svg +21 -0
- package/static/img/circuits/processMessages.svg +21 -0
- package/static/img/circuits/processMessagesInputHasher.svg +21 -0
- package/static/img/circuits/processMessages_2_0.svg +21 -0
- package/static/img/circuits/processOne.svg +21 -0
- package/static/img/circuits/processTopup.svg +21 -0
- package/static/img/circuits/processingAfterPollEnds.svg +21 -0
- package/static/img/circuits/quinBatchLeavesExists.svg +21 -0
- package/static/img/circuits/quinCheckRoot.svg +21 -0
- package/static/img/circuits/quinGeneratePathIndices.svg +21 -0
- package/static/img/circuits/quinSelector.svg +21 -0
- package/static/img/circuits/resultsCommitmentVerifier.svg +21 -0
- package/static/img/circuits/splicer.svg +21 -0
- package/static/img/circuits/tallyInputHasher.svg +21 -0
- package/static/img/circuits/tallyVotes.svg +21 -0
- package/static/img/circuits/unpackElement.svg +21 -0
- package/static/img/circuits/verifySignature.svg +21 -0
- package/static/img/completingAPoll.svg +4 -0
- package/static/img/contracts.svg +16 -0
- package/static/img/coordinatorComponents.svg +21 -0
- package/static/img/favicon.ico +0 -0
- package/static/img/generateProofs.svg +4 -0
- package/static/img/hero.svg +9 -0
- package/static/img/maci-card.png +0 -0
- package/static/img/maci-rpgf-design.jpg +0 -0
- package/static/img/messageProcessingLocal.svg +21 -0
- package/static/img/offlineProcessing.svg +21 -0
- package/static/img/pse-logo-round.png +0 -0
- package/static/img/relayer-diagram.png +0 -0
- package/static/img/tallyCommitments.svg +4 -0
- package/static/img/voteTallyingLocal.svg +21 -0
- package/tsconfig.json +34 -0
- package/versioned_docs/version-v0.x/circuits.md +22 -0
- package/versioned_docs/version-v0.x/contract.md +186 -0
- package/versioned_docs/version-v0.x/faq.md +67 -0
- package/versioned_docs/version-v0.x/introduction.md +119 -0
- package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +138 -0
- package/versioned_docs/version-v0.x/state-root-transition-circuit.md +230 -0
- package/versioned_docs/version-v1.2/audit.md +160 -0
- package/versioned_docs/version-v1.2/ci-pipeline.md +38 -0
- package/versioned_docs/version-v1.2/circuits.md +508 -0
- package/versioned_docs/version-v1.2/cli.md +689 -0
- package/versioned_docs/version-v1.2/contracts.md +445 -0
- package/versioned_docs/version-v1.2/contributing/code-of-conduct.md +91 -0
- package/versioned_docs/version-v1.2/contributing/contributing.md +129 -0
- package/versioned_docs/version-v1.2/coordinator-processing.md +46 -0
- package/versioned_docs/version-v1.2/deployment.md +122 -0
- package/versioned_docs/version-v1.2/installation.md +175 -0
- package/versioned_docs/version-v1.2/integrating.md +200 -0
- package/versioned_docs/version-v1.2/introduction.md +94 -0
- package/versioned_docs/version-v1.2/key-change.md +182 -0
- package/versioned_docs/version-v1.2/overview.md +47 -0
- package/versioned_docs/version-v1.2/poll-types.md +68 -0
- package/versioned_docs/version-v1.2/primitives.md +216 -0
- package/versioned_docs/version-v1.2/project-ideas.md +14 -0
- package/versioned_docs/version-v1.2/purpose.md +62 -0
- package/versioned_docs/version-v1.2/solidity-docs/MACI.md +345 -0
- package/versioned_docs/version-v1.2/solidity-docs/MessageProcessor.md +266 -0
- package/versioned_docs/version-v1.2/solidity-docs/MessageProcessorFactory.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/Poll.md +381 -0
- package/versioned_docs/version-v1.2/solidity-docs/PollFactory.md +50 -0
- package/versioned_docs/version-v1.2/solidity-docs/SignUpToken.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/Subsidy.md +218 -0
- package/versioned_docs/version-v1.2/solidity-docs/SubsidyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/Tally.md +311 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyNonQv.md +296 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyNonQvFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/TopupCredit.md +61 -0
- package/versioned_docs/version-v1.2/solidity-docs/VkRegistry.md +457 -0
- package/versioned_docs/version-v1.2/solidity-docs/benchmarks/HasherBenchmarks.md +44 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Hasher.md +125 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/IVerifier.md +11 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/MockVerifier.md +17 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Pairing.md +85 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT3.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT4.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT5.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT6.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkCommon.md +16 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkConstants.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Verifier.md +61 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/EASGatekeeper.md +121 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/FreeForAllSignUpGatekeeper.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpGatekeeper.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpTokenGatekeeper.md +93 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md +79 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperMultiple.md +48 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperSingle.md +42 -0
- package/versioned_docs/version-v1.2/solidity-docs/index.md +4 -0
- package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IEAS.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IHats.md +103 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMPFactory.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMessageProcessor.md +31 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPoll.md +217 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPollFactory.md +29 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallyFactory.md +28 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallySubsidyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVerifier.md +25 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVkRegistry.md +70 -0
- package/versioned_docs/version-v1.2/solidity-docs/mocks/MockHatsProtocol.md +133 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueue.md +464 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary.md +60 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary0.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinaryMaci.md +34 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary.md +75 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary0.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryBlankSl.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryMaci.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/EmptyBallotRoots.md +13 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/CommonUtilities.md +25 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/DomainObjs.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/Params.md +36 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/Utilities.md +79 -0
- package/versioned_docs/version-v1.2/spec.md +944 -0
- package/versioned_docs/version-v1.2/testing-in-detail.md +209 -0
- package/versioned_docs/version-v1.2/testing.md +472 -0
- package/versioned_docs/version-v1.2/topup.md +43 -0
- package/versioned_docs/version-v1.2/troubleshooting.md +51 -0
- package/versioned_docs/version-v1.2/trusted-setup.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/cli/index.md +15 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/AirdropArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployPollArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployedContracts.md +130 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenLocalStateArgs.md +168 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenProofsArgs.md +388 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IGenKeypairArgs.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IRegisteredUserArgs.md +63 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeMessagesArgs.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeSignupsArgs.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PollContracts.md +53 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/ProveOnChainArgs.md +128 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PublishArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SignupArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SubsidyData.md +73 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TallyData.md +166 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TopupArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/VerifyArgs.md +128 -0
- package/versioned_docs/version-v1.2/typedoc/cli/modules.md +556 -0
- package/versioned_docs/version-v1.2/typedoc/core/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/core/classes/MaciState.md +295 -0
- package/versioned_docs/version-v1.2/typedoc/core/classes/Poll.md +1098 -0
- package/versioned_docs/version-v1.2/typedoc/core/index.md +110 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/BatchSizes.md +50 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/IJsonMaciState.md +77 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/IProcessMessagesCircuitInputs.md +242 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/ISubsidyCircuitInputs.md +198 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/ITallyCircuitInputs.md +231 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/MaxValues.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/TreeDepths.md +63 -0
- package/versioned_docs/version-v1.2/typedoc/core/modules.md +289 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/AccQueue.md +770 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/G1Point.md +115 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/G2Point.md +140 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/IncrementalQuinTree.md +470 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/index.md +44 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Keypair.md +33 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/PoseidonFuncs.md +115 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Queue.md +33 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Signature.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/modules.md +913 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Ballot.md +274 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Keypair.md +181 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Message.md +244 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PCommand.md +409 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PrivKey.md +206 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PubKey.md +289 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/StateLeaf.md +340 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/TCommand.md +200 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/VerifyingKey.md +240 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/index.md +81 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/ICommand.md +104 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG1ContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG2ContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonBallot.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonCommand.md +32 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonKeyPair.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonPCommand.md +111 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonStateLeaf.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonTCommand.md +67 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IMessageContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeaf.md +39 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeafContractParams.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkContractParams.md +64 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkObjectParams.md +108 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/Proof.md +46 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/VoteOptionTreeLeaf.md +24 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/modules.md +110 -0
- package/versioned_docs/version-v1.2/typedoc/index.md +4 -0
- package/versioned_docs/version-v1.2/versioning.md +94 -0
- package/versioned_docs/version-v1.2/workflow.md +142 -0
- package/versioned_docs/version-v2.x/case-studies.md +35 -0
- package/versioned_docs/version-v2.x/contributing/_category_.json +4 -0
- package/versioned_docs/version-v2.x/contributing/code-of-conduct.md +92 -0
- package/versioned_docs/version-v2.x/contributing/contributing.md +149 -0
- package/versioned_docs/version-v2.x/contributing/project-ideas.md +78 -0
- package/versioned_docs/version-v2.x/core-concepts/_category_.json +4 -0
- package/versioned_docs/version-v2.x/core-concepts/ballot.md +19 -0
- package/versioned_docs/version-v2.x/core-concepts/coordinator-processing.md +46 -0
- package/versioned_docs/version-v2.x/core-concepts/hashing-and-encryption.md +45 -0
- package/versioned_docs/version-v2.x/core-concepts/key-change.md +179 -0
- package/versioned_docs/version-v2.x/core-concepts/maci-keys.md +84 -0
- package/versioned_docs/version-v2.x/core-concepts/maci-messages.md +44 -0
- package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +23 -0
- package/versioned_docs/version-v2.x/core-concepts/poll-types.md +106 -0
- package/versioned_docs/version-v2.x/core-concepts/spec.md +883 -0
- package/versioned_docs/version-v2.x/core-concepts/state-leaf.md +42 -0
- package/versioned_docs/version-v2.x/core-concepts/workflow.md +142 -0
- package/versioned_docs/version-v2.x/getting-started.md +313 -0
- package/versioned_docs/version-v2.x/guides/_category_.json +4 -0
- package/versioned_docs/version-v2.x/guides/compile-circuits.md +163 -0
- package/versioned_docs/version-v2.x/guides/frontend.md +99 -0
- package/versioned_docs/version-v2.x/guides/integrating.md +73 -0
- package/versioned_docs/version-v2.x/guides/maciWrapper.md +173 -0
- package/versioned_docs/version-v2.x/guides/subgraph.md +79 -0
- package/versioned_docs/version-v2.x/guides/testing/_category_.json +4 -0
- package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +203 -0
- package/versioned_docs/version-v2.x/guides/testing/testing.md +163 -0
- package/versioned_docs/version-v2.x/guides/troubleshooting.md +161 -0
- package/versioned_docs/version-v2.x/introduction.md +146 -0
- package/versioned_docs/version-v2.x/processes/_category_.json +4 -0
- package/versioned_docs/version-v2.x/processes/ci-pipeline.md +38 -0
- package/versioned_docs/version-v2.x/processes/versioning.md +94 -0
- package/versioned_docs/version-v2.x/resources.md +33 -0
- package/versioned_docs/version-v2.x/security/_category_.json +4 -0
- package/versioned_docs/version-v2.x/security/audit.md +167 -0
- package/versioned_docs/version-v2.x/security/trusted-setup.md +166 -0
- package/versioned_docs/version-v2.x/supported-networks/_category_.json +4 -0
- package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +1108 -0
- package/versioned_docs/version-v2.x/supported-networks/supported-networks.md +47 -0
- package/versioned_docs/version-v2.x/technical-references/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +21 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Gatekeepers.md +40 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +152 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +32 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +104 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +43 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +45 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +57 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/_category_.json +8 -0
- package/versioned_docs/version-v2.x/technical-references/technical-references.md +47 -0
- package/versioned_docs/version-v2.x/technical-references/typescript-code/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/typescript-code/cli.md +699 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +107 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/setup.md +101 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/utilities.md +131 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +37 -0
- package/versioned_docs/version-v2.x/use-cases/_category_.json +4 -0
- package/versioned_docs/version-v2.x/use-cases/governance.md +18 -0
- package/versioned_docs/version-v2.x/use-cases/polling.md +10 -0
- package/versioned_docs/version-v2.x/use-cases/public-goods.md +65 -0
- package/versioned_docs/version-v3.x/case-studies.md +35 -0
- package/versioned_docs/version-v3.x/contributing/_category_.json +4 -0
- package/versioned_docs/version-v3.x/contributing/code-of-conduct.md +92 -0
- package/versioned_docs/version-v3.x/contributing/contributing.md +149 -0
- package/versioned_docs/version-v3.x/contributing/project-ideas.md +78 -0
- package/versioned_docs/version-v3.x/core-concepts/_category_.json +4 -0
- package/versioned_docs/version-v3.x/core-concepts/ballot.md +19 -0
- package/versioned_docs/version-v3.x/core-concepts/coordinator-processing.md +46 -0
- package/versioned_docs/version-v3.x/core-concepts/coordinator-service.md +16 -0
- package/versioned_docs/version-v3.x/core-concepts/hashing-and-encryption.md +45 -0
- package/versioned_docs/version-v3.x/core-concepts/key-change.md +179 -0
- package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +84 -0
- package/versioned_docs/version-v3.x/core-concepts/maci-messages.md +44 -0
- package/versioned_docs/version-v3.x/core-concepts/merkle-trees.md +16 -0
- package/versioned_docs/version-v3.x/core-concepts/offchain-voting.md +14 -0
- package/versioned_docs/version-v3.x/core-concepts/poll-types.md +58 -0
- package/versioned_docs/version-v3.x/core-concepts/polls.md +81 -0
- package/versioned_docs/version-v3.x/core-concepts/spec.md +883 -0
- package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +42 -0
- package/versioned_docs/version-v3.x/core-concepts/workflow.md +149 -0
- package/versioned_docs/version-v3.x/guides/_category_.json +4 -0
- package/versioned_docs/version-v3.x/guides/compile-circuits.md +175 -0
- package/versioned_docs/version-v3.x/guides/integrating.md +137 -0
- package/versioned_docs/version-v3.x/guides/subgraph.md +79 -0
- package/versioned_docs/version-v3.x/guides/testing/_category_.json +4 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +191 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +158 -0
- package/versioned_docs/version-v3.x/guides/troubleshooting.md +161 -0
- package/versioned_docs/version-v3.x/introduction.md +153 -0
- package/versioned_docs/version-v3.x/processes/_category_.json +4 -0
- package/versioned_docs/version-v3.x/processes/ci-pipeline.md +38 -0
- package/versioned_docs/version-v3.x/processes/versioning.md +94 -0
- package/versioned_docs/version-v3.x/quick-start.md +318 -0
- package/versioned_docs/version-v3.x/resources.md +33 -0
- package/versioned_docs/version-v3.x/security/_category_.json +4 -0
- package/versioned_docs/version-v3.x/security/audit.md +167 -0
- package/versioned_docs/version-v3.x/security/trusted-setup.md +172 -0
- package/versioned_docs/version-v3.x/supported-networks/_category_.json +4 -0
- package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +112 -0
- package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +53 -0
- package/versioned_docs/version-v3.x/technical-references/_category_.json +4 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +10 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/index.md +51 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/installation.md +109 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +160 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +33 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +39 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +170 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +33 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +62 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/technical-references.md +48 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/_category_.json +4 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +53 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +106 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +96 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +131 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +42 -0
- package/versioned_docs/version-v3.x/use-cases/_category_.json +4 -0
- package/versioned_docs/version-v3.x/use-cases/governance.md +18 -0
- package/versioned_docs/version-v3.x/use-cases/polling.md +10 -0
- package/versioned_docs/version-v3.x/use-cases/public-goods.md +65 -0
- package/versioned_sidebars/version-v0.x-sidebars.json +8 -0
- package/versioned_sidebars/version-v1.2-sidebars.json +8 -0
- package/versioned_sidebars/version-v2.x-sidebars.json +8 -0
- package/versioned_sidebars/version-v3.x-sidebars.json +8 -0
- package/versions.json +1 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CI Pipeline
|
|
3
|
+
description: Introduction to how MACI's CI works
|
|
4
|
+
sidebar_label: CI
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Continuous Integration (CI) Pipeline
|
|
9
|
+
|
|
10
|
+
CI (Continuous Integration) pipeline is an automated workflow to ensure that software is always in a working state. An event like opening a pull request causes a pipeline to run. The pipeline consists of an automated build process and a suite of automated tests (See [Testing](https://pse.dev/docs/guides/testing) for more details).
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## Pipeline Triggers
|
|
15
|
+
|
|
16
|
+
### Commit to Main Branch
|
|
17
|
+
|
|
18
|
+
Each commit (i.e. a merged PR) to the main branch triggers the pipeline. The pipeline creates packages that can be deployed to any environment. Packages are uploaded to an artifact repository (e.g. npm).
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
### Pull Request (PR)
|
|
23
|
+
|
|
24
|
+
When a pull request has been created (or updated), it triggers the PR pipeline. It gives the reviewer confidence that the software works as expected with the introduced code changes.
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
### Nightly
|
|
29
|
+
|
|
30
|
+
Nightly build runs every midnight. It is to ensure that all required dependencies are present and to show no bugs have been introduced.
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
### Tag Push
|
|
35
|
+
|
|
36
|
+
When a tag has been pushed, it triggers a release pipeline. It will draft a release note with an auto-generated changelog and publish npm package(s).
|
|
37
|
+
|
|
38
|
+

|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI versioning and release process
|
|
3
|
+
description: How MACI's versioning and release process works
|
|
4
|
+
sidebar_label: MACI versioning
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# MACI versioning and release process
|
|
9
|
+
|
|
10
|
+
This document outlines the approach to versioning and releasing the MACI project. The primary goal here is to set clear expectations and provide a consistent user experience for developers integrating MACI and its packages.
|
|
11
|
+
|
|
12
|
+
## MACI code
|
|
13
|
+
|
|
14
|
+
MACI code consists 3 core parts: Circom circuits, Solidity contracts and JS (TS) libraries, from which we release a total of 7 NPM packages. See the [codebase overview](/docs/technical-references/) for more details.
|
|
15
|
+
|
|
16
|
+
## MACI versioning
|
|
17
|
+
|
|
18
|
+
MACI follows the [Semantic Versioning Specification (SemVer)](https://semver.org/).
|
|
19
|
+
|
|
20
|
+
All MACI packages are organized in our monorepo and follow a global release approach, meaning that all packages have the same version.
|
|
21
|
+
|
|
22
|
+
Currently, MACI core team manually decides when to release and what the version should be. Packages are released [automatically via CI](https://github.com/privacy-scaling-explorations/maci/blob/dev/.github/workflows/release.yml) when a new tag is created in GitHub. [You can view our releases and tags in GitHub](https://github.com/privacy-scaling-explorations/maci/releases).
|
|
23
|
+
|
|
24
|
+
## MACI Release Process
|
|
25
|
+
|
|
26
|
+
To release a new version of MACI, follow these steps:
|
|
27
|
+
|
|
28
|
+
:::warning
|
|
29
|
+
Version number '1.2.3' is used here as an example. You should replace the version number '1.2.3' with the version number you are planning to release
|
|
30
|
+
:::
|
|
31
|
+
|
|
32
|
+
1. Verify that tests have passed on GitHub Actions
|
|
33
|
+
|
|
34
|
+
2. Clone maci:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
git clone https://github.com/privacy-scaling-explorations/maci
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
3. Switch to the `dev` branch:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
git checkout dev
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. Install required dependencies:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
pnpm install
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
5. Run `lerna version` to update CHANGELOG and version numbers of sub-packages:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
pnpm exec lerna version --no-push --no-git-tag-version --conventional-commits 1.2.3
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
6. Commit changes:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
git commit --message "chore(release): publish 1.2.3"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
7. Push changes and create a pull request
|
|
65
|
+
|
|
66
|
+
After the pull request has been merged:
|
|
67
|
+
|
|
68
|
+
8. Retrieve merged commit
|
|
69
|
+
|
|
70
|
+
9. Add a tag:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
git tag --sign v1.2.3 --message v1.2.3
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
10. Publish tag:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
git push v1.2.3
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Once the tag is pushed, GitHub Actions will automatically publish the packages to npm.js and create a release on GitHub.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
The following packages will be published on NPM:
|
|
87
|
+
|
|
88
|
+
- [`@maci-circuits`](https://www.npmjs.com/package/maci-circuits)
|
|
89
|
+
- [`@maci-contracts`](https://www.npmjs.com/package/maci-contracts)
|
|
90
|
+
- [`@maci-cli`](https://www.npmjs.com/package/maci-cli)
|
|
91
|
+
- [`@maci-core`](https://www.npmjs.com/package/maci-core)
|
|
92
|
+
- [`@maci-crypto`](https://www.npmjs.com/package/maci-crypto)
|
|
93
|
+
- [`@maci-domainobjs`](https://www.npmjs.com/package/maci-domainobjs)
|
|
94
|
+
- [`@maci-integrationtests`](https://www.npmjs.com/package/maci-integrationtests)
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Quick Start
|
|
3
|
+
description: Getting with MACI
|
|
4
|
+
sidebar_label: Quick Start
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Quick Start
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
You need the following to use MACI:
|
|
13
|
+
|
|
14
|
+
- Node.js: use a JS toolchain manager like [`nvm`](https://github.com/nvm-sh/nvm) or [`volta`](https://volta.sh/) to install Node.js. We recommend using Node 20 or above.
|
|
15
|
+
- [pnpm](https://pnpm.io/installation): Fast, disk space efficient package manager.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
To install MACI you need to run the following commands:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
git clone https://github.com/privacy-scaling-explorations/maci.git && \
|
|
23
|
+
cd maci && \
|
|
24
|
+
pnpm install && \
|
|
25
|
+
pnpm run build
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
:::note
|
|
29
|
+
We suggest you use the latest released version. You can check all the releases [here](https://github.com/privacy-scaling-explorations/maci/releases).
|
|
30
|
+
:::
|
|
31
|
+
|
|
32
|
+
#### Decide whether you need to compile new circuits or use the test ones
|
|
33
|
+
|
|
34
|
+
If you are going to be making any changes to the circom circuits, then you can follow the [compile circuits guide](./guides/compile-circuits.md) and skip the next section.
|
|
35
|
+
|
|
36
|
+
### Download the zero knowledge artifacts
|
|
37
|
+
|
|
38
|
+
MACI has two main zk-SNARK circuits, and each of them is parameterized. In order to prove and verify them we need to use the `.zkey` Artifacts. There should be one
|
|
39
|
+
`.zkey` file for each circuit and set of parameters.
|
|
40
|
+
|
|
41
|
+
Unless you wish to generate a fresh set of `.zkey` files, you should obtain
|
|
42
|
+
them from someone who has performed a multi-party trusted setup for said
|
|
43
|
+
circuits. For more details on which artifacts have undergone a trusted setup, please refer to the [Trusted Setup](/docs/security/trusted-setup) page.
|
|
44
|
+
|
|
45
|
+
:::important
|
|
46
|
+
Note the locations of the `.zkey` files cause you will need it when deploying contracts.
|
|
47
|
+
:::
|
|
48
|
+
|
|
49
|
+
#### Download test artifacts
|
|
50
|
+
|
|
51
|
+
For all but production use cases, we suggest using the test artifacts, with the latest dev updates you can do it by running:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm download-zkeys:test
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Download ceremony artifacts
|
|
58
|
+
|
|
59
|
+
For production you need to use the ceremony artifacts which have undergone a trusted setup, you can download them with the command:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pnpm download-zkeys:ceremony
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
:::info
|
|
66
|
+
Currently, the ceremony artifacts work with MACI version up to 2.x
|
|
67
|
+
:::
|
|
68
|
+
|
|
69
|
+
## Deploy Contracts
|
|
70
|
+
|
|
71
|
+
### Generate Coordinator Keys
|
|
72
|
+
|
|
73
|
+
In order to run MACI polls, a coordinator is required to publish their MACI public key. You will need to generate a MACI keypair, and treat the private key just as your ethereum private keys. Please store them in a safe place as you won't be able to finish a round if you lose access, or if compromised a bad actor could decrypt the vote and publish them online. You can generate a new key pair using maci-cli by running the following command in the root of the project:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pnpm run genMaciKeyPair
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Set the .env
|
|
80
|
+
|
|
81
|
+
Head to the `packages/contracts` folder and copy the `.env.example` file.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
cd packages/contracts && \
|
|
85
|
+
cp .env.example .env
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Make sure to include a mnemonic and RPC url (make sure to replace NETWORK with the network you want to use).
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
MNEMONIC = "your_ethereum_secret_key";
|
|
92
|
+
NETWORK_RPC_URL = "the_eth_provider_url";
|
|
93
|
+
NETWORK_ETHERSCAN_API_KEY = "etherscan api key";
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Set the configuration file
|
|
97
|
+
|
|
98
|
+
In the folder and copy the config example and update the fields as necessary:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
cd ./packages/contracts && \
|
|
102
|
+
cp deploy-config-example.json deploy-config.json
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### ConstantInitialVoiceCreditProxy
|
|
107
|
+
|
|
108
|
+
Specifies the number of credits allocated to each voter.
|
|
109
|
+
|
|
110
|
+
| Property | Description |
|
|
111
|
+
| ---------- | -------------------------------------------------------- |
|
|
112
|
+
| **deploy** | Defines if the contract needs to be deployed. |
|
|
113
|
+
| **amount** | Defines how many vote credits each participant will get. |
|
|
114
|
+
|
|
115
|
+
#### Policy
|
|
116
|
+
|
|
117
|
+
MACI uses a "policy" contract to configure and enforce the eligibility criteria of voters who can participate in MACI polls. In other words, it is a way to allowlist signups to the system to protect against sybil attacks. Please refer to the [policy page in the documentation](/docs/technical-references/smart-contracts/Policies) for more information on the supported Policies.
|
|
118
|
+
|
|
119
|
+
| Property | Description |
|
|
120
|
+
| ---------- | ------------------------------------------------ |
|
|
121
|
+
| **deploy** | Defines if the contract is going to be deployed. |
|
|
122
|
+
|
|
123
|
+
:::important
|
|
124
|
+
For testing we suggest using the **FreeForAlPolicy** as it allows anyone to signup on MACI.
|
|
125
|
+
:::
|
|
126
|
+
|
|
127
|
+
#### MACI
|
|
128
|
+
|
|
129
|
+
| Property | Description |
|
|
130
|
+
| ------------------ | ------------------------------------------- |
|
|
131
|
+
| **stateTreeDepth** | Defines how many users the system supports. |
|
|
132
|
+
| **policy** | Defines which policy to use. |
|
|
133
|
+
|
|
134
|
+
#### VkRegistry
|
|
135
|
+
|
|
136
|
+
The VkRegistry hold the verifying keys used to verify the proofs, on the zkeys field we define the path to the zero knowledge artifacts we downloaded in the previous steps.
|
|
137
|
+
|
|
138
|
+
| Property | Description |
|
|
139
|
+
| ----------------------- | ------------------------------------------------------------------------------------ |
|
|
140
|
+
| **stateTreeDepth** | Defines how many users the system supports. |
|
|
141
|
+
| **intStateTreeDepth** | Defines how many ballots can be processed per batch when tallying the results. |
|
|
142
|
+
| **messageTreeDepth** | Defines how many messages (votes) the system supports. |
|
|
143
|
+
| **voteOptionTreeDepth** | Defines how many vote options the system supports. |
|
|
144
|
+
| **messageBatchDepth** | Defines how many messages in a batch can the circuit process. |
|
|
145
|
+
| **zkeys** | Defines the path to the zkey files for QV and Non QV keys. |
|
|
146
|
+
| **pollJoiningZkey** | Defines the zkey to the poll joining circuit which allows to join polls for voting. |
|
|
147
|
+
| **pollJoinedZkey** | Defines the zkey to the poll joined circuit which allows to prove you joined a poll. |
|
|
148
|
+
|
|
149
|
+
:::important
|
|
150
|
+
The recommended values for test keys are: **10-1-2-2-1**. For ceremony keys: **14-5-9-3-2**.
|
|
151
|
+
:::
|
|
152
|
+
|
|
153
|
+
#### Poll
|
|
154
|
+
|
|
155
|
+
| Property | Description |
|
|
156
|
+
| --------------------------- | ----------------------------------------------------------------- |
|
|
157
|
+
| **pollStartDate** | Defines when the poll starts in seconds. |
|
|
158
|
+
| **pollEndDate** | Defines how long is going to be the poll in seconds. |
|
|
159
|
+
| **coordinatorPubkey** | Defines the coordinator public MACI key. |
|
|
160
|
+
| **useQuadraticVoting** | Defines if the poll uses quadratic voting or not. |
|
|
161
|
+
| **policy** | Defines the policy of the poll. |
|
|
162
|
+
| **relayers** | Defines an array of addresses that are allowed to relay messages. |
|
|
163
|
+
| **initialVoiceCreditProxy** | Defines the type of voice credit proxy to use for this poll. |
|
|
164
|
+
| **voteOptions** | Defines how many votes options are valid for this poll. |
|
|
165
|
+
|
|
166
|
+
### Deploy MACI Contracts
|
|
167
|
+
|
|
168
|
+
To deploy the MACI contracts to a specific network you can append `:network` to the deployment commands, e.g. `pnpm deploy:sepolia` - please refer to the available networks on the package.json scripts section.
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
pnpm deploy:NETWORK
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
There are already some deployed contracts that could be reused, copy the `default-deployed-contracts.json` file if you need them to avoid deploying redundant contracts and save your gas fee.
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
cp default-deployed-contracts.json deployed-contracts.json
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Delete any contract you want to redeploy and then run the following command to save gas:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
pnpm deploy:NETWORK --incremental
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Deploy Poll
|
|
187
|
+
|
|
188
|
+
Before deploying a Poll, make sure you have set the coordinator MACI public key to which you own the private key. To deploy your first Poll you can run the following command:
|
|
189
|
+
|
|
190
|
+
```sh
|
|
191
|
+
pnpm deploy-poll:NETWORK
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
:::important
|
|
195
|
+
Starting another poll doesn't require deploying MACI contracts again, you can run `pnpm deploy-poll:NETWORK` command and then use the new poll-id.
|
|
196
|
+
:::
|
|
197
|
+
|
|
198
|
+
## Poll Finalization
|
|
199
|
+
|
|
200
|
+
As a coordinator, first you need to merge signups and messages (votes). This optimization is needed to reduce gas cost for voters. Then the coordinator generates proofs for the message processing, and tally calculations. This allows to publish the poll results on-chain and then everyone can verify the results when the poll is over. You run a merge with:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
pnpm merge:[network] --poll [poll-id]
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Then you need to generate the proofs for the message processing, and tally calculations. This allows to publish the poll results on-chain and then everyone can verify the results:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pnpm run prove:[network] --poll [poll-id] \
|
|
210
|
+
--coordinator-private-key [coordinator-maci-private-key] \
|
|
211
|
+
--tally-file ../results/tally.json \
|
|
212
|
+
--output-dir ../results/proofs/ \
|
|
213
|
+
--start-block [block-number]
|
|
214
|
+
--blocks-per-batch [number-of-blocks]
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
:::important
|
|
218
|
+
You can reduce the time of the proving by including more blocks per batch, you can try with 500.
|
|
219
|
+
:::
|
|
220
|
+
|
|
221
|
+
#### Submit On-chain
|
|
222
|
+
|
|
223
|
+
Now it's time to submit the poll results on-chain so that everyone can verify the results:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
pnpm submitOnChain:[network] --poll [poll-id] \
|
|
227
|
+
--output-dir proofs/ \
|
|
228
|
+
--tally-file proofs/tally.json
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Tally
|
|
232
|
+
|
|
233
|
+
Once the proofs are generated, and results tallied, the results (Tally) are written to a file. Let's take a look at one:
|
|
234
|
+
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"maci": "0xd54b47F8e6A1b97F3A84f63c867286272b273b7C",
|
|
238
|
+
"pollId": "0",
|
|
239
|
+
"network": "localhost",
|
|
240
|
+
"chainId": "31337",
|
|
241
|
+
"isQuadratic": true,
|
|
242
|
+
"tallyAddress": "0xD4fbAF1dFe100d07f8Ef73d8c92e93d0Bcf7b45D",
|
|
243
|
+
"newTallyCommitment": "0x2f55cc85f7f141098ba791a9f6a646f8773b9bb4f5852ccc33b5a28e7b0756e5",
|
|
244
|
+
"results": {
|
|
245
|
+
"tally": [
|
|
246
|
+
"9",
|
|
247
|
+
"0",
|
|
248
|
+
"0",
|
|
249
|
+
"0",
|
|
250
|
+
"0",
|
|
251
|
+
"0",
|
|
252
|
+
"0",
|
|
253
|
+
"0",
|
|
254
|
+
"0",
|
|
255
|
+
"0",
|
|
256
|
+
"0",
|
|
257
|
+
"0",
|
|
258
|
+
"0",
|
|
259
|
+
"0",
|
|
260
|
+
"0",
|
|
261
|
+
"0",
|
|
262
|
+
"0",
|
|
263
|
+
"0",
|
|
264
|
+
"0",
|
|
265
|
+
"0",
|
|
266
|
+
"0",
|
|
267
|
+
"0",
|
|
268
|
+
"0",
|
|
269
|
+
"0",
|
|
270
|
+
"0"
|
|
271
|
+
],
|
|
272
|
+
"salt": "0x2e9cd240b86cf456fa4deced8e7420c45e3c16941d2dcec308f8b6d48264dda3",
|
|
273
|
+
"commitment": "0x296eac2a7289974f23497bebd39e86599d0b7032796fb84dcc1f6bbda38262ca"
|
|
274
|
+
},
|
|
275
|
+
"totalSpentVoiceCredits": {
|
|
276
|
+
"spent": "81",
|
|
277
|
+
"salt": "0x24f57b75c227987727c13d1e83409d70478b42bdc12a4a4df8129c72fbaf5aaf",
|
|
278
|
+
"commitment": "0xb4ebe68b0da828c0b978ddee86ba934b8e215499ac766491f236ad85fd606de"
|
|
279
|
+
},
|
|
280
|
+
"perVOSpentVoiceCredits": {
|
|
281
|
+
"tally": [
|
|
282
|
+
"81",
|
|
283
|
+
"0",
|
|
284
|
+
"0",
|
|
285
|
+
"0",
|
|
286
|
+
"0",
|
|
287
|
+
"0",
|
|
288
|
+
"0",
|
|
289
|
+
"0",
|
|
290
|
+
"0",
|
|
291
|
+
"0",
|
|
292
|
+
"0",
|
|
293
|
+
"0",
|
|
294
|
+
"0",
|
|
295
|
+
"0",
|
|
296
|
+
"0",
|
|
297
|
+
"0",
|
|
298
|
+
"0",
|
|
299
|
+
"0",
|
|
300
|
+
"0",
|
|
301
|
+
"0",
|
|
302
|
+
"0",
|
|
303
|
+
"0",
|
|
304
|
+
"0",
|
|
305
|
+
"0",
|
|
306
|
+
"0"
|
|
307
|
+
],
|
|
308
|
+
"salt": "0x2590434ea2d600f7bd2396ba7fa454ad4c975c29424ee481561d9786538a5e48",
|
|
309
|
+
"commitment": "0x54ec996599886da21c4b07c25d1de544292a8b7c38b79726995c869c9e95db"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
We observe an array named results, which holds the aggregated votes for each option. Each option corresponds to an index in the array. In the example above, the first option (index 0) received a total of 9 votes, while all other options received no votes
|
|
315
|
+
|
|
316
|
+
The `totalSpentVoiceCredits` object contains the total amount of voice credits spent in the poll. This is the sum of all voice credits spent by all voters, and in quadratic voting, is the sum of the squares of all votes.
|
|
317
|
+
|
|
318
|
+
The `perVOSpentVoiceCredits` will contain the amount of voice credits spent per vote option. In this case, the first option received 81 voice credits, and every other option received 0 voice credits. This is because there was only one valid vote casted, with a weight of 9. Given the quadratic voting formula, the total amount of voice credits spent is 81.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Resources
|
|
3
|
+
description: A collection of resources for better understanding MACI
|
|
4
|
+
sidebar_label: Resources
|
|
5
|
+
sidebar_position: 13
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Articles
|
|
9
|
+
|
|
10
|
+
- [ethresear](https://ethresear.ch/t/minimal-anti-collusion-infrastructure/5413) - Vitalik Buterin 05/2019
|
|
11
|
+
- [MACI Anonymization](https://ethresear.ch/t/maci-anonymization-using-rerandomizable-encryption/7054) - Kobi Gurkan 03/2020
|
|
12
|
+
- [Release Announcement: MACI 1.0](/blog/maci-1-0-release) - Koh Wei Jie 05/2020
|
|
13
|
+
- [Technical Introduction to MACI 1.0](/blog/maci-1-0-technical-introduction) - Kyle Charbonnet 01/2022
|
|
14
|
+
- [MACI v1.1.1 Release](/blog/maci-v1-1-1-release) - ctrlc03 && chaosma 01/2023
|
|
15
|
+
- [MACI v1.2.0 release post](/blog/maci-v1-2-0-release) - ctrlc03 02/2024
|
|
16
|
+
- [MACI v2.0.0 release post](/blog/2024-v2) - ctrlc03 08/2024
|
|
17
|
+
- [Getting Started With MACI](https://medium.com/@bbaraona/getting-started-with-maci-5cc145d00e04) - Benjamin Barahona 12/04/2024
|
|
18
|
+
|
|
19
|
+
## Videos
|
|
20
|
+
|
|
21
|
+
- [Overview of MACI](https://www.youtube.com/watch?v=sKuNj_IQVYI) - Koh Wei Jie 05/2020
|
|
22
|
+
- [Making sense of MACI](https://www.youtube.com/watch?v=ooxgPzdaZ_s) - Koh Wei Jie 08/2020
|
|
23
|
+
- [MACI on ZKPodcast](https://www.youtube.com/watch?v=f9nUGPD5I3o) - Koh Wei Jie 12/2020
|
|
24
|
+
- [Anonymity in MACI](https://www.youtube.com/watch?v=X54LaXfJTn4) - Marija Mikić 07/2023
|
|
25
|
+
- [Seeing like a Voting](https://youtu.be/euhugXsTUgY?si=jNhqmvFYD9F0r-tB) - Daehyun 11/2023
|
|
26
|
+
- [MACI - Private Voting](https://www.youtube.com/watch?v=85bZwcQIgEo&t=1382s) - ctrlc03 03/2024
|
|
27
|
+
- [Construyendo votaciones privadas onchain con MACI](https://www.youtube.com/watch?v=3u5VJJsKLfg) - Crisgarner 03/2024
|
|
28
|
+
- [MACI - Starting From Scratch](https://www.youtube.com/watch?v=qVuhWlHnQF0) - Doris Chan 03/2024
|
|
29
|
+
- [MACI Workshop](https://www.youtube.com/watch?v=AimgqnMjG0o) - ctrlc03 04/2024
|
|
30
|
+
- [MACI Starter Kit Demo](https://www.youtube.com/watch?v=pYoBLLtVEoI&t=1s) - Yash 05/2024
|
|
31
|
+
- [MACI Tutorial Deploying Contracts and Subgraph](https://www.youtube.com/watch?v=-QA0VB9EUMk) - Crisgarner 09/2024
|
|
32
|
+
- [MACI Tutorial Frontend Deployment 🚀](https://www.youtube.com/watch?v=q0yS8RfwDcw) - Crisgarner 09/2024
|
|
33
|
+
- [Finalizing a MACI Round](https://www.youtube.com/watch?v=nlS3hOC0ljw) - Crisgarner 09/2024
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI Security Audits
|
|
3
|
+
description: Overview of MACI audit history with references to audit reports.
|
|
4
|
+
sidebar_label: Security audits
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# MACI Security Audits
|
|
9
|
+
|
|
10
|
+
## Full reports
|
|
11
|
+
|
|
12
|
+
- Audit by PSE Audit 2024/07 [report](/audit_reports/20240731_PSE_Audit_audit_report.pdf)
|
|
13
|
+
- Audit by PSE Audit 2024/02 [report](/audit_reports/20240223_PSE_Audit_audit_report.pdf)
|
|
14
|
+
- Audit by HashCloak 2022/09 [report](/audit_reports/202220930_Hashcloak_audit_report.pdf)
|
|
15
|
+
- Audit by HashCloak 2021/09 [report](/audit_reports/20210922_Hashcloak_audit_report.pdf)
|
|
16
|
+
|
|
17
|
+
## PSE audit 2024/07
|
|
18
|
+
|
|
19
|
+
In July 2024 the PSE Audit team audited the MACI codebase with a focus on the smart contracts, TypeScript core, and Circom circuits. Nothing serious was found but we made some optimizations to the codebase.
|
|
20
|
+
|
|
21
|
+
Please see the [PSE Audit report](/audit_reports/20240731_PSE_Audit_audit_report.pdf) for details.
|
|
22
|
+
|
|
23
|
+
## PSE audit 2024/02
|
|
24
|
+
|
|
25
|
+
In February 2024 the PSE Audit team audited the MACI codebase with a focus on the smart contracts, TypeScript core, and Circom circuits Three critical bugs were found: two within the Circom circuits and one in the smart contracts. All three of these have been fixed.
|
|
26
|
+
|
|
27
|
+
Please see the [PSE Audit report](/audit_reports/20240223_PSE_Audit_audit_report.pdf) for details.
|
|
28
|
+
|
|
29
|
+
## Veridise disclosure 2023
|
|
30
|
+
|
|
31
|
+
In March 2023, Veridise responsibly disclosed a number of issues to the MACI team, which were identified using their new [tool](https://twitter.com/VeridiseInc/status/1630806464695791616?s=20) for catching ZK circuit bugs.
|
|
32
|
+
|
|
33
|
+
Out of five issues disclosed, only three were relevant and have been since fixed by the MACI team. The other two issues were disregarded as they were present in older version of code which is not in use anymore.
|
|
34
|
+
|
|
35
|
+
We would like to thank the Veridise team for their effort in keeping open source projects safe.
|
|
36
|
+
|
|
37
|
+
### Issue 1
|
|
38
|
+
|
|
39
|
+
**Description**
|
|
40
|
+
|
|
41
|
+
In the template `QuinSelector`, if you want to confirm the input signal index is a valid integer less than 2\*\*3, you should add Num2bits(3) to check it.
|
|
42
|
+
|
|
43
|
+
**Code Location**
|
|
44
|
+
|
|
45
|
+
[`incrementalQuinTree.circom`](https://github.com/privacy-scaling-explorations/maci/blob/78609349aecd94186216ac8743d61b1cb81a097f/circuits/circom/trees/incrementalQuinTree.circom#L30)
|
|
46
|
+
|
|
47
|
+
**Fix**
|
|
48
|
+
|
|
49
|
+
[Code location](https://github.com/chaosma/maci/blob/60727d4d10406edda32ad28e53d399d41d45ed88/circuits/circom/trees/incrementalQuinTree.circom#L37)
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
// Ensure that index < choices
|
|
53
|
+
component lessThan = SafeLessThan(3);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This was fixed by adding a new Template, `SafeLesThan` which uses `Num2Bits` as further check on the signals:
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
// the implicit assumption of LessThan is both inputs are at most n bits
|
|
60
|
+
// so we need to add range check for both inputs
|
|
61
|
+
template SafeLessThan(n) {
|
|
62
|
+
assert(n <= 252);
|
|
63
|
+
signal input in[2];
|
|
64
|
+
signal output out;
|
|
65
|
+
|
|
66
|
+
component n2b1 = Num2Bits(n);
|
|
67
|
+
n2b1.in <== in[0];
|
|
68
|
+
component n2b2 = Num2Bits(n);
|
|
69
|
+
n2b2.in <== in[1];
|
|
70
|
+
|
|
71
|
+
component n2b = Num2Bits(n+1);
|
|
72
|
+
|
|
73
|
+
n2b.in <== in[0]+ (1<<n) - in[1];
|
|
74
|
+
|
|
75
|
+
out <== 1-n2b.out[n];
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Issue 2
|
|
80
|
+
|
|
81
|
+
**Description**
|
|
82
|
+
|
|
83
|
+
This issue is the same issue number 1, this time for the input signal index.
|
|
84
|
+
|
|
85
|
+
**Code Location**
|
|
86
|
+
|
|
87
|
+
[`incrementalQuinTree.circom`](https://github.com/privacy-scaling-explorations/maci/blob/78609349aecd94186216ac8743d61b1cb81a097f/circuits/circom/trees/incrementalQuinTree.circom#L64)
|
|
88
|
+
|
|
89
|
+
**Fix**
|
|
90
|
+
|
|
91
|
+
[PR with fix](https://github.com/privacy-scaling-explorations/maci/pull/646/files#diff-f3ad1f61e9b95b88929664b67c873325fdf70cb8569c2a96da4b0e9f02710391)
|
|
92
|
+
|
|
93
|
+
As with issue number 1, a new template `SafeGreaterThan` was added:
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
// N is the number of bits the input have.
|
|
97
|
+
// The MSF is the sign bit.
|
|
98
|
+
template SafeGreaterThan(n) {
|
|
99
|
+
signal input in[2];
|
|
100
|
+
signal output out;
|
|
101
|
+
|
|
102
|
+
component lt = SafeLessThan(n);
|
|
103
|
+
|
|
104
|
+
lt.in[0] <== in[1];
|
|
105
|
+
lt.in[1] <== in[0];
|
|
106
|
+
lt.out ==> out;
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
And then used it to constrain the [`index` input signal](https://github.com/chaosma/maci/blob/2d7a3a0efd33dfc3a5f4d3f95bec3adda7abb963/circuits/circom/trees/incrementalQuinTree.circom#L115-L117):
|
|
111
|
+
|
|
112
|
+
```javascript
|
|
113
|
+
greaterThan[i] = SafeGreaterThan(3);
|
|
114
|
+
greaterThan[i].in[0] <== i;
|
|
115
|
+
greaterThan[i].in[1] <== index;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Issue 3
|
|
119
|
+
|
|
120
|
+
**Description**
|
|
121
|
+
|
|
122
|
+
In the template `QuinGeneratePathIndices`, the constraints of the `signal n[levels + 1]` don't perform well for division and modulo counting.
|
|
123
|
+
|
|
124
|
+
**Code Location**
|
|
125
|
+
|
|
126
|
+
[`incrementalQuinTree.circom`](https://github.com/privacy-scaling-explorations/maci/blob/7c1b3743ea753786011289a356eaa45ba72f9ca1/circuits/circom/trees/incrementalQuinTree.circom#L228-L242)
|
|
127
|
+
|
|
128
|
+
**Fix**
|
|
129
|
+
|
|
130
|
+
The [updated code](https://github.com/chaosma/maci/blob/2d7a3a0efd33dfc3a5f4d3f95bec3adda7abb963/circuits/circom/trees/incrementalQuinTree.circom#L285-L290) uses the `SafeLessThen` template, as shown below:
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
for (var i = 0; i < levels; i++) {
|
|
134
|
+
// Check that each output element is less than the base
|
|
135
|
+
leq[i] = SafeLessThan(3);
|
|
136
|
+
leq[i].in[0] <== out[i];
|
|
137
|
+
leq[i].in[1] <== BASE;
|
|
138
|
+
leq[i].out === 1;
|
|
139
|
+
|
|
140
|
+
// Re-compute the total sum
|
|
141
|
+
sum.nums[i] <== out[i] * (BASE ** i);
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## HashCloak audit 2022
|
|
146
|
+
|
|
147
|
+
In the summer of 2022, MACI v1 was audited by HashCloak. The audit covered both the zk-SNARK circuits and the Solidity smart contracts.
|
|
148
|
+
|
|
149
|
+
This audit revealed a number of high severity issues which have been remediated by the MACI development team. All issues were successfully fixed and reflected in MACI v1.1.1.
|
|
150
|
+
|
|
151
|
+
Please see the [HashCloak report](/audit_reports/202220930_Hashcloak_audit_report.pdf) for details.
|
|
152
|
+
|
|
153
|
+
## HashCloak audit 2021
|
|
154
|
+
|
|
155
|
+
From July 5th, 2021 to August 2nd, 2021, the Ethereum Foundation’s Applied ZKPs team engaged HashCloak for an audit of the MACI protocol. The audit was conducted with 3 auditors over 15 person weeks.
|
|
156
|
+
|
|
157
|
+
The following packages were in scope:
|
|
158
|
+
|
|
159
|
+
- Circuits
|
|
160
|
+
- Contracts
|
|
161
|
+
- Core
|
|
162
|
+
- Crypto
|
|
163
|
+
- Domainobjs
|
|
164
|
+
|
|
165
|
+
From August 18, 2021 to September 22, 2021, Hashcloak assisted the MACI team in resolving the issues.
|
|
166
|
+
|
|
167
|
+
Please see the [HashCloak report](/audit_reports/20210922_Hashcloak_audit_report.pdf) for details.
|