@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,472 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Testing MACI
|
|
3
|
+
description: An introduction on how to test MACI
|
|
4
|
+
sidebar_label: Testing
|
|
5
|
+
sidebar_position: 11
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Testing introduction
|
|
9
|
+
|
|
10
|
+
## Unit tests
|
|
11
|
+
|
|
12
|
+
Unit tests within the project are built using [Mocha](https://mochajs.org/) and [Chai](https://www.chaijs.com/). Mocha is a test framework that provides the environment to write and run JavaScript tests, while Chai is an assertion library that allows us to write assertions in a more expressive and readable way.
|
|
13
|
+
|
|
14
|
+
The following submodules contain unit tests: `core`, `crypto`, `circuits`,
|
|
15
|
+
`contracts`, and `domainobjs`.
|
|
16
|
+
|
|
17
|
+
You can run all unit tests from the root directory of the repo by running:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm run test
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or you can run unit tests within each submodule. for example to run the `crypto` tests:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd crypto
|
|
27
|
+
pnpm run test
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
You can also run individual tests within submodules, for example:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd contracts
|
|
34
|
+
pnpm run test:accQueue
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This test command will run `AccQueue.test.ts`
|
|
38
|
+
|
|
39
|
+
### Contracts
|
|
40
|
+
|
|
41
|
+
First, compile the contracts.
|
|
42
|
+
|
|
43
|
+
From the main `maci/` directory, run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd contracts && \
|
|
47
|
+
pnpm run compileSol
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To run Contracts only tests, run:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm run test
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Circuits
|
|
57
|
+
|
|
58
|
+
To test the circuits, from the main `maci/` directory, run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
cd circuits && \
|
|
62
|
+
pnpm run test
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Tests are run using [Mocha](https://mochajs.org/) and [`circom_tester`](https://github.com/iden3/circom_tester).
|
|
66
|
+
|
|
67
|
+
## CLI
|
|
68
|
+
|
|
69
|
+
You can test the CLI locally. First, you need to either generate `.zkey` files,
|
|
70
|
+
or download them. Please remember to not use these testing `.zkey` files in production.
|
|
71
|
+
|
|
72
|
+
### Download `.zkey` files or the witness generation binaries
|
|
73
|
+
|
|
74
|
+
MACI has two main zk-SNARK circuits, `processMessages` and `tallyVotes` (`subsidyPerBatch` is optional).
|
|
75
|
+
|
|
76
|
+
:::info
|
|
77
|
+
The `processMessages` and `tallyVotes` circuits are also provided in a non-quadratic voting (non-QV) version. Currently these new versions have not undergone a trusted setup ceremony.
|
|
78
|
+
:::
|
|
79
|
+
|
|
80
|
+
Each circuit is parameterised and there should be one
|
|
81
|
+
`.zkey` file for each circuit and set of parameters.
|
|
82
|
+
|
|
83
|
+
Unless you wish to generate a fresh set of `.zkey` files, you should obtain
|
|
84
|
+
them from someone who has performed a multi-party trusted setup for said
|
|
85
|
+
circuits.
|
|
86
|
+
|
|
87
|
+
Note the locations of the `.zkey` files as the CLI requires them as
|
|
88
|
+
command-line flags.
|
|
89
|
+
|
|
90
|
+
For testing purposes you can download the required artifacts using the [`download_zkeys`](https://github.com/privacy-scaling-explorations/maci/blob/dev/integrationTests/scripts/download_zkeys.sh) script inside the `integrationTests/scripts` folder. The script will place all required artifacts inside the `cli/zkeys` folder.
|
|
91
|
+
You can run the script directly with bash or use pnpm: `pnpm run download:test-zkeys` from the monorepo root.
|
|
92
|
+
|
|
93
|
+
### Compile the circuits and generate zkeys (if decided to generate from scratch)
|
|
94
|
+
|
|
95
|
+
From the root folder, run:
|
|
96
|
+
|
|
97
|
+
**for c++ witness generator**
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pnpm build:circuits-c
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**for wasm witness generator**
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pnpm build:circuits-wasm
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
You should see the following files in `maci/cli/`:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
zkeys/
|
|
113
|
+
zkeys/TallyVotes_10-1-2_test/
|
|
114
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test.sym
|
|
115
|
+
zkeys/TallyVotes_10-1-2_test/groth16_vkey.json
|
|
116
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test.r1cs
|
|
117
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/
|
|
118
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/calcwit.cpp
|
|
119
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/circom.hpp
|
|
120
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/TallyVotes_10-1-2_test
|
|
121
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/fr.o
|
|
122
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/TallyVotes_10-1-2_test.o
|
|
123
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/main.o
|
|
124
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/calcwit.o
|
|
125
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/fr.hpp
|
|
126
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/Makefile
|
|
127
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/fr.asm
|
|
128
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/TallyVotes_10-1-2_test.dat
|
|
129
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/fr_asm.o
|
|
130
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/main.cpp
|
|
131
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/TallyVotes_10-1-2_test.cpp
|
|
132
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/fr.cpp
|
|
133
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_cpp/calcwit.hpp
|
|
134
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test.0.zkey
|
|
135
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_js/
|
|
136
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_js/generate_witness.js
|
|
137
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_js/witness_calculator.js
|
|
138
|
+
zkeys/TallyVotes_10-1-2_test/TallyVotes_10-1-2_test_js/TallyVotes_10-1-2_test.wasm
|
|
139
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/
|
|
140
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test.0.zkey
|
|
141
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/
|
|
142
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/calcwit.cpp
|
|
143
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/circom.hpp
|
|
144
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/fr.o
|
|
145
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/ProcessMessagesNonQv_10-2-1-2_test.dat
|
|
146
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/ProcessMessagesNonQv_10-2-1-2_test
|
|
147
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/ProcessMessagesNonQv_10-2-1-2_test.o
|
|
148
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/main.o
|
|
149
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/calcwit.o
|
|
150
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/fr.hpp
|
|
151
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/Makefile
|
|
152
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/fr.asm
|
|
153
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/fr_asm.o
|
|
154
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/main.cpp
|
|
155
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/fr.cpp
|
|
156
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/calcwit.hpp
|
|
157
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_cpp/ProcessMessagesNonQv_10-2-1-2_test.cpp
|
|
158
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test.sym
|
|
159
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/groth16_vkey.json
|
|
160
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test.r1cs
|
|
161
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_js/
|
|
162
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_js/generate_witness.js
|
|
163
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_js/witness_calculator.js
|
|
164
|
+
zkeys/ProcessMessagesNonQv_10-2-1-2_test/ProcessMessagesNonQv_10-2-1-2_test_js/ProcessMessagesNonQv_10-2-1-2_test.wasm
|
|
165
|
+
zkeys/processMessages_6-8-2-3/
|
|
166
|
+
zkeys/powersOfTau28_hez_final_19.ptau
|
|
167
|
+
zkeys/TallyVotesNonQv_10-1-2_test/
|
|
168
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/
|
|
169
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/calcwit.cpp
|
|
170
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/circom.hpp
|
|
171
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/fr.o
|
|
172
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/main.o
|
|
173
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/calcwit.o
|
|
174
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/fr.hpp
|
|
175
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/TallyVotesNonQv_10-1-2_test
|
|
176
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/Makefile
|
|
177
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/fr.asm
|
|
178
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/TallyVotesNonQv_10-1-2_test.o
|
|
179
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/fr_asm.o
|
|
180
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/TallyVotesNonQv_10-1-2_test.cpp
|
|
181
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/main.cpp
|
|
182
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/TallyVotesNonQv_10-1-2_test.dat
|
|
183
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/fr.cpp
|
|
184
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_cpp/calcwit.hpp
|
|
185
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_js/
|
|
186
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_js/TallyVotesNonQv_10-1-2_test.wasm
|
|
187
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_js/generate_witness.js
|
|
188
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test_js/witness_calculator.js
|
|
189
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test.sym
|
|
190
|
+
zkeys/TallyVotesNonQv_10-1-2_test/groth16_vkey.json
|
|
191
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test.r1cs
|
|
192
|
+
zkeys/TallyVotesNonQv_10-1-2_test/TallyVotesNonQv_10-1-2_test.0.zkey
|
|
193
|
+
zkeys/ProcessMessages_10-2-1-2_test/
|
|
194
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_js/
|
|
195
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_js/ProcessMessages_10-2-1-2_test.wasm
|
|
196
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_js/generate_witness.js
|
|
197
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_js/witness_calculator.js
|
|
198
|
+
zkeys/ProcessMessages_10-2-1-2_test/groth16_vkey.json
|
|
199
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test.r1cs
|
|
200
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test.0.zkey
|
|
201
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test.sym
|
|
202
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/
|
|
203
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/calcwit.cpp
|
|
204
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/circom.hpp
|
|
205
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/fr.o
|
|
206
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/ProcessMessages_10-2-1-2_test.o
|
|
207
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/ProcessMessages_10-2-1-2_test.cpp
|
|
208
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/main.o
|
|
209
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/calcwit.o
|
|
210
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/fr.hpp
|
|
211
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/Makefile
|
|
212
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/ProcessMessages_10-2-1-2_test
|
|
213
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/fr.asm
|
|
214
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/fr_asm.o
|
|
215
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/main.cpp
|
|
216
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/ProcessMessages_10-2-1-2_test.dat
|
|
217
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/fr.cpp
|
|
218
|
+
zkeys/ProcessMessages_10-2-1-2_test/ProcessMessages_10-2-1-2_test_cpp/calcwit.hpp
|
|
219
|
+
zkeys/powersOfTau28_hez_final_17.ptau
|
|
220
|
+
zkeys/SubsidyPerBatch_10-1-2_test/
|
|
221
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test.sym
|
|
222
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test.0.zkey
|
|
223
|
+
zkeys/SubsidyPerBatch_10-1-2_test/groth16_vkey.json
|
|
224
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test.r1cs
|
|
225
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_js/
|
|
226
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_js/generate_witness.js
|
|
227
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_js/witness_calculator.js
|
|
228
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_js/SubsidyPerBatch_10-1-2_test.wasm
|
|
229
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/
|
|
230
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/calcwit.cpp
|
|
231
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/circom.hpp
|
|
232
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/fr.o
|
|
233
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/SubsidyPerBatch_10-1-2_test.dat
|
|
234
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/main.o
|
|
235
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/SubsidyPerBatch_10-1-2_test.cpp
|
|
236
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/calcwit.o
|
|
237
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/fr.hpp
|
|
238
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/Makefile
|
|
239
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/fr.asm
|
|
240
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/fr_asm.o
|
|
241
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/main.cpp
|
|
242
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/fr.cpp
|
|
243
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/SubsidyPerBatch_10-1-2_test.o
|
|
244
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/calcwit.hpp
|
|
245
|
+
zkeys/SubsidyPerBatch_10-1-2_test/SubsidyPerBatch_10-1-2_test_cpp/SubsidyPerBatch_10-1-2_test
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**generate zkeys**
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
pnpm setup:zkeys
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Check the Rapidsnark binary
|
|
255
|
+
|
|
256
|
+
Next, ensure that the `prover` binary of `rapidsnark` is in
|
|
257
|
+
`~/rapidsnark/build/prover`.
|
|
258
|
+
|
|
259
|
+
:::info
|
|
260
|
+
This step is only required if you wish to use rapidsnark, for faster proof generation. You can also use the WASM witnesses provided in the `cli/zkeys` folder.
|
|
261
|
+
:::
|
|
262
|
+
|
|
263
|
+
### Run CLI tests
|
|
264
|
+
|
|
265
|
+
You can find the tests in `maci/cli/tests`.
|
|
266
|
+
|
|
267
|
+
To run the tests first start a hardhat node in the background:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
cd contracts
|
|
271
|
+
pnpm run hardhat &
|
|
272
|
+
cd ../cli
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Then run the tests (this will run all tests):
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
pnpm run test
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
To run e2e without subsidy:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
pnpm run test:e2e
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
To run e2e with subsidy:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
pnpm run test:e2e-subsidy
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
To run e2e tests with normal voting (not quadratic voting):
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
pnpm run test:e2e-non-qv
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Run integration tests
|
|
300
|
+
|
|
301
|
+
You can find the tests in `maci/integrationTests/`.
|
|
302
|
+
|
|
303
|
+
You can run them with:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
pnpm run test
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Pre-Compiled Artifacts for testing
|
|
310
|
+
|
|
311
|
+
The following compiled circuits and zkeys are available to download:
|
|
312
|
+
|
|
313
|
+
- [Prod && Ceremony](#prod-size-ceremony) (`6-8-2-3`)
|
|
314
|
+
- [Large](#large-size) (`7-9-3-4`)
|
|
315
|
+
- [Micro](#micro-size) (`10-2-1-2`)
|
|
316
|
+
- [Small](#small-size) (`4-6-3-4`)
|
|
317
|
+
- [Medium](#medium-size) (`7-7-3-3`)
|
|
318
|
+
- [6-8-3-3](#6-8-3-3)
|
|
319
|
+
|
|
320
|
+
### Dependency (if running on intel chip and using rapidsnark)
|
|
321
|
+
|
|
322
|
+
- glibc 2.11 (Default of Ubuntu 20.04 LTS)
|
|
323
|
+
|
|
324
|
+
### Prod Size Ceremony
|
|
325
|
+
|
|
326
|
+
:::info
|
|
327
|
+
These artifacts have undergone a trusted setup and can be used in production. Subsidy is not included.
|
|
328
|
+
:::
|
|
329
|
+
|
|
330
|
+
- [maci-ceremony-artifacts-v1.2.0.tar.gz](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.2.0/maci-ceremony-artifacts-v1.2.0.tar.gz) (0.76 GB)
|
|
331
|
+
|
|
332
|
+
### Large Size
|
|
333
|
+
|
|
334
|
+
:::danger
|
|
335
|
+
Please do not use in production. These artifacts have not undergone a trusted setup.
|
|
336
|
+
:::
|
|
337
|
+
|
|
338
|
+
- [zkeys-7-9-3-4.tar.gz](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/7-9-3-4/zkeys_7-9-3-4_glibc-211.tar.gz) (2.8 GB)
|
|
339
|
+
- [ProcessMessages_7-9-3-4_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/7-9-3-4/ProcessMessages_7-9-3-4_test.0.zkey) (3.8 GB)
|
|
340
|
+
- generated using `powersOfTau28_hez_final_22.ptau`
|
|
341
|
+
- [TallyVotes_7-3-4_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/7-9-3-4/TallyVotes_7-3-4_test.0.zkey) (8.5 GB)
|
|
342
|
+
- generated using `powersOfTau28_hez_final_23.ptau`
|
|
343
|
+
|
|
344
|
+
#### Message processing
|
|
345
|
+
|
|
346
|
+
| Parameter | Value | Description |
|
|
347
|
+
| ------------------------ | ----- | ---------------------------------------------- |
|
|
348
|
+
| State tree depth | 7 | Allows 78,125 signups. |
|
|
349
|
+
| Message tree depth | 9 | Allows 1,953,125 votes or key-change messages. |
|
|
350
|
+
| Message batch tree depth | 3 | Allows 125 messages to be processed per batch. |
|
|
351
|
+
| Vote option tree depth | 4 | Allows 625 vote options. |
|
|
352
|
+
|
|
353
|
+
#### Vote tallying
|
|
354
|
+
|
|
355
|
+
| Parameter | Value | Description |
|
|
356
|
+
| ---------------------- | ----- | -------------------------------------------------- |
|
|
357
|
+
| State tree depth | 7 | Allows 78,125 signups. |
|
|
358
|
+
| State leaf batch depth | 3 | Allows 125 user's votes to be processed per batch. |
|
|
359
|
+
| Vote option tree depth | 4 | Allows 625 vote options. |
|
|
360
|
+
|
|
361
|
+
#### Micro size
|
|
362
|
+
|
|
363
|
+
- [zkeys_10-2-1-2_glibc-211.tar.gz](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/10-2-1-2/zkeys_10-2-1-2_glibc-211.tar.gz) (403 MB)
|
|
364
|
+
- [ProcessMessages_10-2-1-2_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/10-2-1-2/ProcessMessages_10-2-1-2_test.0.zkey) (190 MB)
|
|
365
|
+
- [TallyVotes_10-1-2_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/10-2-1-2/TallyVotes_10-1-2_test.0.zkey) (71 MB)
|
|
366
|
+
- [SubsidyPerBatch_10-1-2_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/10-2-1-2/SubsidyPerBatch_10-1-2_test.0.zkey) (202 MB)
|
|
367
|
+
|
|
368
|
+
`*.zkey` files are generated using `powersOfTau28_hez_final_20.ptau`
|
|
369
|
+
|
|
370
|
+
#### Message processing
|
|
371
|
+
|
|
372
|
+
| Parameter | Value | Description |
|
|
373
|
+
| ------------------------ | ----- | -------------------------------------------- |
|
|
374
|
+
| State tree depth | 10 | Allows 9,765,625 signups. |
|
|
375
|
+
| Message tree depth | 2 | Allows 25 votes or key-change messages. |
|
|
376
|
+
| Message batch tree depth | 1 | Allows 5 messages to be processed per batch. |
|
|
377
|
+
| Vote option tree depth | 2 | Allows 25 vote options. |
|
|
378
|
+
|
|
379
|
+
#### Vote tallying
|
|
380
|
+
|
|
381
|
+
| Parameter | Value | Description |
|
|
382
|
+
| ---------------------- | ----- | ------------------------------------------------ |
|
|
383
|
+
| State tree depth | 10 | Allows 9,765,625 signups. |
|
|
384
|
+
| State leaf batch depth | 1 | Allows 5 user's votes to be processed per batch. |
|
|
385
|
+
| Vote option tree depth | 2 | Allows 25 vote options. |
|
|
386
|
+
|
|
387
|
+
### Small size
|
|
388
|
+
|
|
389
|
+
:::danger
|
|
390
|
+
Please do not use in production. These artifacts have not undergone a trusted setup.
|
|
391
|
+
:::
|
|
392
|
+
|
|
393
|
+
- [zkeys_4-6-3-4_glibc-211.tar.gz](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/4-6-3-4/zkeys_4-6-3-4_glibc-211.tar.gz) (2.6 GB)
|
|
394
|
+
- [ProcessMessages_4-6-3-4_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/4-6-3-4/ProcessMessages_4-6-3-4_test.0.zkey) (2.9 GB)
|
|
395
|
+
- generated using `powersOfTau28_hez_final_22.ptau`
|
|
396
|
+
- [TallyVotes_4-3-4_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/4-6-3-4/TallyVotes_4-3-4_test.0.zkey) (8.5 GB)
|
|
397
|
+
- generated using `powersOfTau28_hez_final_23.ptau`
|
|
398
|
+
|
|
399
|
+
#### Message processing
|
|
400
|
+
|
|
401
|
+
| Parameter | Value | Description |
|
|
402
|
+
| ------------------------ | ----- | ---------------------------------------------- |
|
|
403
|
+
| State tree depth | 4 | Allows 625 signups. |
|
|
404
|
+
| Message tree depth | 6 | Allows 15,625 votes or key-change messages. |
|
|
405
|
+
| Message batch tree depth | 3 | Allows 125 messages to be processed per batch. |
|
|
406
|
+
| Vote option tree depth | 4 | Allows 625 vote options. |
|
|
407
|
+
|
|
408
|
+
#### Vote tallying
|
|
409
|
+
|
|
410
|
+
| Parameter | Value | Description |
|
|
411
|
+
| ---------------------- | ----- | -------------------------------------------------- |
|
|
412
|
+
| State tree depth | 4 | Allows 9,765,625 signups. |
|
|
413
|
+
| State leaf batch depth | 3 | Allows 125 user's votes to be processed per batch. |
|
|
414
|
+
| Vote option tree depth | 2 | Allows 25 vote options. |
|
|
415
|
+
|
|
416
|
+
### Medium size
|
|
417
|
+
|
|
418
|
+
:::danger
|
|
419
|
+
Please do not use in production. These artifacts have not undergone a trusted setup.
|
|
420
|
+
:::
|
|
421
|
+
|
|
422
|
+
- [zkeys_7-7-3-3_glibc-211.tar.gz](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/7-7-3-3/zkeys_7-7-3-3_glibc-211.tar.gz) (4.9 GB)
|
|
423
|
+
- [ProcessMessages_7-7-3-3_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/7-7-3-3/ProcessMessages_7-7-3-3_test.0.zkey) (2.2 GB)
|
|
424
|
+
- generated using `powersOfTau28_hez_final_22.ptau`
|
|
425
|
+
- [TallyVotes_7-3-3_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/7-7-3-3/TallyVotes_7-3-3_test.0.zkey) (884 MB)
|
|
426
|
+
- generated using `powersOfTau28_hez_final_22.ptau`
|
|
427
|
+
|
|
428
|
+
#### Message processing
|
|
429
|
+
|
|
430
|
+
| Parameter | Value | Description |
|
|
431
|
+
| ------------------------ | ----- | ---------------------------------------------- |
|
|
432
|
+
| State tree depth | 7 | Allows 78,125 signups. |
|
|
433
|
+
| Message tree depth | 7 | Allows 78,125 votes or key-change messages. |
|
|
434
|
+
| Message batch tree depth | 3 | Allows 125 messages to be processed per batch. |
|
|
435
|
+
| Vote option tree depth | 3 | Allows 125 vote options. |
|
|
436
|
+
|
|
437
|
+
#### Vote tallying
|
|
438
|
+
|
|
439
|
+
| Parameter | Value | Description |
|
|
440
|
+
| ---------------------- | ----- | -------------------------------------------------- |
|
|
441
|
+
| State tree depth | 7 | Allows 78,125 signups. |
|
|
442
|
+
| State leaf batch depth | 3 | Allows 125 user's votes to be processed per batch. |
|
|
443
|
+
| Vote option tree depth | 2 | Allows 25 vote options. |
|
|
444
|
+
|
|
445
|
+
### 6-8-3-3
|
|
446
|
+
|
|
447
|
+
:::danger
|
|
448
|
+
Please do not use in production. These artifacts have not undergone a trusted setup.
|
|
449
|
+
:::
|
|
450
|
+
|
|
451
|
+
- [zkeys_6-8-3-3_glibc-211.tar.gz](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/6-8-3-3/zkeys_6-8-3-3_glibc-211.tar.gz) (1.1 GB)
|
|
452
|
+
- [ProcessMessages_6-8-3-3_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/6-8-3-3/ProcessMessages_6-8-3-3_test.0.zkey) (3.4 GB)
|
|
453
|
+
- generated using `powersOfTau28_hez_final_22.ptau`
|
|
454
|
+
- [TallyVotes_6-3-3_test.0.zkey](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/6-8-3-3/TallyVotes_6-3-3_test.0.zkey) (1.8 MB)
|
|
455
|
+
- generated using `powersOfTau28_hez_final_22.ptau`
|
|
456
|
+
|
|
457
|
+
#### Message processing
|
|
458
|
+
|
|
459
|
+
| Parameter | Value | Description |
|
|
460
|
+
| ------------------------ | ----- | ---------------------------------------------- |
|
|
461
|
+
| State tree depth | 6 | Allows 15,625 signups. |
|
|
462
|
+
| Message tree depth | 8 | Allows 390,625 votes or key-change messages. |
|
|
463
|
+
| Message batch tree depth | 3 | Allows 125 messages to be processed per batch. |
|
|
464
|
+
| Vote option tree depth | 3 | Allows 125 vote options. |
|
|
465
|
+
|
|
466
|
+
#### Vote tallying
|
|
467
|
+
|
|
468
|
+
| Parameter | Value | Description |
|
|
469
|
+
| ---------------------- | ----- | -------------------------------------------------- |
|
|
470
|
+
| State tree depth | 6 | Allows 15,625 signups. |
|
|
471
|
+
| State leaf batch depth | 3 | Allows 125 user's votes to be processed per batch. |
|
|
472
|
+
| Vote option tree depth | 2 | Allows 25 vote options. |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI Topup
|
|
3
|
+
description: How the Topup feature works
|
|
4
|
+
sidebar_label: Topup
|
|
5
|
+
sidebar_position: 22
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Topup
|
|
9
|
+
|
|
10
|
+
MACI v1.1.1 introduced the topup feature. This was developed by [chaosma](https://github.com/chaosma): you can find more information on their [post](https://hackmd.io/@chaosma/rkyPfI7Iq) and the original idea post [here](https://hackmd.io/@ef-zkp/rk6uaQBrI).
|
|
11
|
+
|
|
12
|
+
In a nutshell, this feature was added to support some application like quadratic funding, where once a user uses all of their voice credits when voting, they would need to signup again to be able to vote again. This is not ideal, and thus with this feature, a user can topup their voice credits, and continue to vote for a poll/quadratic funding round.
|
|
13
|
+
|
|
14
|
+
## How topup messages are processed
|
|
15
|
+
|
|
16
|
+
Topup messages are submitted on chain using the same smart contract used for voting, [`Poll`](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/Poll.sol). With the current design, a TopUpCredit token smart contract is required. In this implementation of MACI, there is an example token, which is an ERC20 contract with 1 decimal, of which the coordinator (or MACI's operator) has ownership of. This privileged figure can mint tokens to users (at their discretion) and users will need to deposit such tokens to the Poll contract in order to topup their voice credits.
|
|
17
|
+
|
|
18
|
+
:::info
|
|
19
|
+
MACI is not concerned with the way of distributing such tokens. The operators of the MACI instance should implement their own way of distributing such tokens, as well as withdrawing them from the Poll contract. For instance, if the operator chooses to use a token with a monetary value, the Poll balance could be withdrawn and sent to fund public goods.
|
|
20
|
+
:::
|
|
21
|
+
|
|
22
|
+
To submit a topup message, a user will then need to call the TopUpCredit token approve function and approve the Poll contract to spend their tokens. Then, they will need to call the `topup` function in the Poll contract, passing the amount of tokens they want to topup and their state index.
|
|
23
|
+
|
|
24
|
+
## Considerations
|
|
25
|
+
|
|
26
|
+
### Voice credits
|
|
27
|
+
|
|
28
|
+
:::danger
|
|
29
|
+
As a MACI operator, you should be aware that voice credits should ideally be small values (< 2 \*\* 32) to avoid overflows or issues in the circuits operations. It is recommended to use a factor to scale down voice credits in the smart contract.
|
|
30
|
+
:::
|
|
31
|
+
|
|
32
|
+
### Reverse processing
|
|
33
|
+
|
|
34
|
+
As with normal vote messages (or key changes), topup messages are processed in [reverse order](https://maci.pse.dev/docs/key-change/#why-are-messages-processed-in-reverse-order), you should be aware that as a user, you will first need to spend your voice credits, then topup.
|
|
35
|
+
|
|
36
|
+
Here is an [extract from Chao's post](https://hackmd.io/@chaosma/rkyPfI7Iq#Remarks):
|
|
37
|
+
|
|
38
|
+
> With above design, the order of vote type and topup type message matters. MACI process the message queue in reverse order. Suppose the initial > credit balance for any user is 100. Consider the following two scenarios in message queue:
|
|
39
|
+
>
|
|
40
|
+
> **Case 1** > [topup(balance=350), vote(weight=20,nonce=2), vote(weight=9,nonce=1)]
|
|
41
|
+
>
|
|
42
|
+
> **case 2** > [vote(weight=20,nonce=2), topup(balance=350), vote(weight=9,nonce=1)]
|
|
43
|
+
> The first case, the topup message is processed at last, so the vote(weight=20,nonce=2) will fail because 20 \* 20 > 100. vote(weight=9,nonce=1) is the final result. In the second case, the topup message is processed before the second vote, so vote(weight=20,nonce=2) will invalidate the first vote and become the final result.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Troubleshooting
|
|
3
|
+
description: How to troubleshoot MACI's failures
|
|
4
|
+
sidebar_label: Troubleshooting
|
|
5
|
+
sidebar_position: 19
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Troubleshooting
|
|
9
|
+
|
|
10
|
+
## cli: `genProofs` command failure
|
|
11
|
+
|
|
12
|
+
### Case: missing `.dat` files
|
|
13
|
+
|
|
14
|
+
If your logs look like the following, then make sure you have `ProcessMessages_10-2-1-2_test.dat` and `TallyVotes_10-1-2_test.dat` files in the same directory as your zkeys:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
node build/ts/index.js genProofs -x 0xf204a4Ef082f5c04bB89F7D5E6568B796096735a \
|
|
18
|
+
> -sk macisk.49953af3585856f539d194b46c82f4ed54ec508fb9b882940cbe68bbc57e59e \
|
|
19
|
+
> -o 0 \
|
|
20
|
+
> -r ~/rapidsnark/build/prover \
|
|
21
|
+
> -wp ./zkeys/ProcessMessages_10-2-1-2_test \
|
|
22
|
+
> -wt ./zkeys/TallyVotes_10-1-2_test \
|
|
23
|
+
> -zp ./zkeys/ProcessMessages_10-2-1-2_test.0.zkey \
|
|
24
|
+
> -zt ./zkeys/TallyVotes_10-1-2_test.0.zkey \
|
|
25
|
+
> -t tally.json \
|
|
26
|
+
> -f proofs
|
|
27
|
+
|
|
28
|
+
fromBlock = 0
|
|
29
|
+
Generating proofs of message processing...
|
|
30
|
+
terminate called after throwing an instance of 'std::system_error'
|
|
31
|
+
what(): open: No such file or directory
|
|
32
|
+
Aborted (core dumped)
|
|
33
|
+
|
|
34
|
+
terminate called after throwing an instance of 'std::system_error'
|
|
35
|
+
what(): open: No such file or directory
|
|
36
|
+
Aborted (core dumped)
|
|
37
|
+
|
|
38
|
+
Error: could not generate proof.
|
|
39
|
+
Error: Error executing ./zkeys/ProcessMessages_10-2-1-2_test /tmp/tmp-9904-zG0k8YPTATWB/input.json /tmp/tmp-9904-zG0k8YPTATWB/output.wtns
|
|
40
|
+
at genProof (/home/ubuntu/maci/circuits/ts/index.ts:44:15)
|
|
41
|
+
at /home/ubuntu/maci/cli/ts/genProofs.ts:339:25
|
|
42
|
+
at step (/home/ubuntu/maci/cli/build/genProofs.js:33:23)
|
|
43
|
+
at Object.next (/home/ubuntu/maci/cli/build/genProofs.js:14:53)
|
|
44
|
+
at fulfilled (/home/ubuntu/maci/cli/build/genProofs.js:5:58)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
You can generate the missing `.dat` files using the following command:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm build:circuits-c
|
|
51
|
+
```
|