@maci-protocol/website 0.0.0-ci.26f28d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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/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 +143 -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/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,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI Trusted Setup
|
|
3
|
+
description: Introduction to the MACI multi-party trusted setup
|
|
4
|
+
sidebar_label: Trusted Setup
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Trusted setup
|
|
9
|
+
|
|
10
|
+
MACI currently uses Groth16 zk-SNARKs written in `circom`. Teams who wish to
|
|
11
|
+
build on MACI may choose to perform a multi-party trusted setup. This allows
|
|
12
|
+
observers to have a higher degree of confidence that the coordinator cannot
|
|
13
|
+
generate fake proofs. Some teams, however, may forgo the trusted setup.
|
|
14
|
+
|
|
15
|
+
There are two possible reasons for doing so: if a team does not intend
|
|
16
|
+
to manage a large amount of value, and if their users accept that the risk of
|
|
17
|
+
coordinator misbehaviour is insufficient to justify doing the work of a
|
|
18
|
+
trusted setup. After all, MACI's security model presumes a trusted coordinator.
|
|
19
|
+
|
|
20
|
+
The [PSE team](https://pse.dev/) is making available a trusted set of zKeys for MACI's circuits,
|
|
21
|
+
which are available and accessible on
|
|
22
|
+
[p0tion's website](https://ceremony.pse.dev/).
|
|
23
|
+
For more info on trusted setup ceremonies please refer to p0tion's [docs](https://p0tion.super.site/).
|
|
24
|
+
|
|
25
|
+
## Maci v3.0 Trusted Setup Ceremony
|
|
26
|
+
|
|
27
|
+
:::danger
|
|
28
|
+
Maci v3.0 Trusted Setup Ceremony has not started yet. Thus for production use cases, please use [MACI v2.0](https://github.com/privacy-scaling-explorations/maci/releases/tag/v2.5.0).
|
|
29
|
+
:::
|
|
30
|
+
|
|
31
|
+
## Maci v2.0 Trusted Setup Ceremony (most recent)
|
|
32
|
+
|
|
33
|
+
:::info
|
|
34
|
+
Maci v2.0 Trusted Setup Ceremony is now completed and the circuits can be used in production.
|
|
35
|
+
:::
|
|
36
|
+
|
|
37
|
+
For this release, we plan to run two ceremonies, one with smaller size circuits (more accessible to contributors) due to smaller batch sizes for proving on chain, and one with larger circuits and large batch sizes for proving. Smaller size artifacts can be used for smaller rounds or for operators that want to run everything on a local computer vs using a beefy server. On the other hand, we plan to use the artifacts with larger batch sizes for large rounds and solely on a server.
|
|
38
|
+
|
|
39
|
+
### Small Batch Size Ceremony
|
|
40
|
+
|
|
41
|
+
:::info
|
|
42
|
+
To download the artifacts, please run the following command from within MACI monorepo's root directory:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm download-zkeys:ceremony
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
:::
|
|
49
|
+
|
|
50
|
+
Here are the **maximum** values supported by these artifacts:
|
|
51
|
+
|
|
52
|
+
**_ProcessMessages_**
|
|
53
|
+
|
|
54
|
+
- users: $2^14 = 16384$
|
|
55
|
+
- votes: $5^9 = 1953125$
|
|
56
|
+
- batch size for proving: $5^2 = 25$
|
|
57
|
+
- vote options: $5^3 = 125$
|
|
58
|
+
|
|
59
|
+
**_TallyVotes_**
|
|
60
|
+
|
|
61
|
+
- users (ballots): $2^14 = 16384$
|
|
62
|
+
- batch size for proving: $2^5 = 32$
|
|
63
|
+
- vote options: $5^3 = 125$
|
|
64
|
+
|
|
65
|
+
### Large Batch Size Ceremony
|
|
66
|
+
|
|
67
|
+
:::info
|
|
68
|
+
Please note that this ceremony has not started yet. We will inform when it will start and when the artifacts are available for use.
|
|
69
|
+
:::
|
|
70
|
+
|
|
71
|
+
Here are the **maximum** values supported by these artifacts:
|
|
72
|
+
|
|
73
|
+
**_ProcessMessages_**
|
|
74
|
+
|
|
75
|
+
- users: $2^14 = 16384$
|
|
76
|
+
- votes: $5^9 = 1953125$
|
|
77
|
+
- batch size for proving: $5^3 = 125$
|
|
78
|
+
- vote options: $5^3 = 125$
|
|
79
|
+
|
|
80
|
+
**_TallyVotes_**
|
|
81
|
+
|
|
82
|
+
- users (ballots): $2^14 = 16384$
|
|
83
|
+
- batch size for proving: $2^7 = 128$
|
|
84
|
+
- vote options: $5^3 = 125$
|
|
85
|
+
|
|
86
|
+
## Maci v1.2 Trusted Setup Ceremony
|
|
87
|
+
|
|
88
|
+
:::danger
|
|
89
|
+
Please be advised that you will not be able to use these artifacts with MACI v2.
|
|
90
|
+
:::
|
|
91
|
+
|
|
92
|
+
:::info
|
|
93
|
+
MACI v1.2 artifacts are stored on [Amazon S3](https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.2.0/maci_artifacts_6-9-2-3_prod.tar.gz). Please either download directly, or checkout any of the maci v1.2 tags to access the artifacts using the following commands:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git checkout v1.2.5
|
|
97
|
+
download:ceremony-zkeys
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
:::
|
|
101
|
+
|
|
102
|
+
Here are the **maximum** values supported by these artifacts:
|
|
103
|
+
|
|
104
|
+
**_ProcessMessages_**
|
|
105
|
+
|
|
106
|
+
- users: $5^6 = 15625$
|
|
107
|
+
- votes: $5^9 = 1953125$
|
|
108
|
+
- batch size for proving: $5^2 = 25$
|
|
109
|
+
- vote options: $5^3 = 125$
|
|
110
|
+
|
|
111
|
+
**_TallyVotes_**
|
|
112
|
+
|
|
113
|
+
- users (ballots): $5^6 = 15625$
|
|
114
|
+
- batch size for proving: $5^2 = 25$
|
|
115
|
+
- vote options: $5^3 = 125$
|
|
116
|
+
|
|
117
|
+
For your convenience, here is a list of the artifacts that can be used in production:
|
|
118
|
+
|
|
119
|
+
| Artifact | Description | Parameters | Link |
|
|
120
|
+
| -------------------------------------- | -------------------------------------------------------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
121
|
+
| processMessages zKey | The production-ready zKey for the processMessages circuit. | 6-9-2-3 | [processMessages_6-9-2-3_final.zkey](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessages_6-9-2-3/contributions/maci-processmessages_6-9-2-3_final.zkey) |
|
|
122
|
+
| processMessagesNonQv zKey | The production-ready zKey for the processMessagesNonQv circuit. | 6-9-2-3 | [processMessagesNonQv_6-9-2-3_final.zkey](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessagesnonqv_6-9-2-3/contributions/maci-processmessagesnonqv_6-9-2-3_final.zkey) |
|
|
123
|
+
| tallyVotes zKey | The production-ready zKey for the tallyVotes circuit. | 6-2-3 | [tallyVotes_6-2-3_final.zkey](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/contributions/tallyvotes_6-2-3_final.zkey) |
|
|
124
|
+
| tallyVotesNonQv zKey | The production-ready zKey for the tallyVotesNonQv circuit. | 6-2-3 | [tallyVotesNonQv_6-2-3_final.zkey](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-tallyvotesnonqv_6-2-3/contributions/maci-tallyvotesnonqv_6-2-3_final.zkey) |
|
|
125
|
+
| processMessages r1cs | The Rank-1 Constraint System file that was used to generate the zKey | 6-9-2-3 | [MACI-ProcessMessages_6-9-2-3.r1cs ](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessages_6-9-2-3/MACI-ProcessMessages_6-9-2-3.r1cs) |
|
|
126
|
+
| processMessagesNonQv r1cs | The Rank-1 Constraint System file that was used to generate the zKey | 6-9-2-3 | [MACI-ProcessMessagesNonQv_6-9-2-3.r1cs](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessagesnonqv_6-9-2-3/MACI-ProcessMessagesNonQv_6-9-2-3.r1cs) |
|
|
127
|
+
| tallyVotes r1cs | The Rank-1 Constraint System file that was used to generate the zKey | 6-2-3 | [tallyvotes_6-2-3.r1cs](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3.r1cs) |
|
|
128
|
+
| tallyVotesNonQv r1cs | The Rank-1 Constraint System file that was used to generate the zKey | 6-2-3 | [tallyvotesnonqv_6-2-3.r1cs](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-tallyvotesnonqv_6-2-3/MACI-TallyVotesNonQv_6-2-3.r1cs) |
|
|
129
|
+
| processMessages wasm | The WASM file that can be used to generate proofs | 6-9-2-3 | [MACI-ProcessMessages_6-9-2-3.wasm](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessages_6-9-2-3/MACI-ProcessMessages_6-9-2-3.wasm) |
|
|
130
|
+
| processMessagesNonQv wasm | The WASM file that can be used to generate proofs | 6-9-2-3 | [MACI-ProcessMessagesNonQv_6-9-2-3.wasm](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessagesnonqv_6-9-2-3/MACI-ProcessMessagesNonQv_6-9-2-3.wasm) |
|
|
131
|
+
| tallyVotes wasm | The WASM file that can be used to generate proofs | 6-2-3 | [tallyvotes_6-2-3.wasm](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3.wasm) |
|
|
132
|
+
| tallyVotesNonQv wasm | The WASM file that can be used to generate proofs | 6-2-3 | [tallyvotesnonqv_6-2-3.wasm](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-tallyvotesnonqv_6-2-3/MACI-TallyVotesNonQv_6-2-3.wasm) |
|
|
133
|
+
| processMessages vKey | The verification key that can be used to verify the processMessages circuit's proofs | 6-9-2-3 | [maci-processmessages_6-9-2-3_vkey.json](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessages_6-9-2-3/maci-processmessages_6-9-2-3_vkey.json) |
|
|
134
|
+
| processMessagesNonQv vKey | The verification key that can be used to verify the processMessagesNonQv circuit's proofs | 6-9-2-3 | [maci-processmessagesnonqv_6-9-2-3_vkey.json](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessagesnonqv_6-9-2-3/maci-processmessagesnonqv_6-9-2-3_vkey.json) |
|
|
135
|
+
| tallyVotes vKey | The verification key that can be used to verify the tallyVotes circuit's proofs | 6-2-3 | [tallyvotes_6-2-3_vkey.json](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3_vkey.json) |
|
|
136
|
+
| tallyVotesNonQv vKey | The verification key that can be used to verify the tallyVotesNonQv circuit's proofs | 6-2-3 | [tallyvotesnonqv_6-2-3_vkey.json](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-tallyvotesnonqv_6-2-3/maci-tallyvotesnonqv_6-2-3_vkey.json) |
|
|
137
|
+
| processMessages Solidity verifier | The Solidity smart contract which can be used to verify the processMessages circuit proofs on-chain | 6-9-2-3 | [maci-processmessages_6-9-2-3_verifier.sol](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessages_6-9-2-3/maci-processmessages_6-9-2-3_verifier.sol) |
|
|
138
|
+
| processMessagesNonQv Solidity verifier | The Solidity smart contract which can be used to verify the processMessagesNonQv circuit proofs on-chain | 6-9-2-3 | [maci-processmessagesnonqv_6-9-2-3_verifier.sol](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-processmessagesnonqv_6-9-2-3/maci-processmessagesnonqv_6-9-2-3_verifier.sol) |
|
|
139
|
+
| tallyVotes Solidity verifier | The Solidity smart contract which can be used to verify the tallyVotes circuit proofs on-chain | 6-2-3 | [tallyvotes_6-2-3_verifier.sol](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3_verifier.sol) |
|
|
140
|
+
| tallyVotesNonQv Solidity verifier | The Solidity smart contract which can be used to verify the tallyVotesNonQv circuit proofs on-chain | 6-2-3 | [tallyvotesnonqv_6-2-3_verifier.sol](https://maci-v1-2-0-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/maci-tallyvotesnonqv_6-2-3/maci-tallyvotesnonqv_6-2-3_verifier.sol) |
|
|
141
|
+
|
|
142
|
+
## Maci v1.1 Trusted Setup Ceremony
|
|
143
|
+
|
|
144
|
+
Here are the **maximum** values supported by these artifacts:
|
|
145
|
+
|
|
146
|
+
**_ProcessMessages_**
|
|
147
|
+
|
|
148
|
+
- users: $5^6 = 15625$
|
|
149
|
+
- votes: $5^8 = 390625$
|
|
150
|
+
- messages per batch: $5^2 = 25$
|
|
151
|
+
- vote options: $5^3 = 125$
|
|
152
|
+
|
|
153
|
+
**_TallyVotes_**
|
|
154
|
+
|
|
155
|
+
- users (ballots): $5^6 = 15625$
|
|
156
|
+
- batch size: $5^2 = 25$
|
|
157
|
+
- vote options: $5^3 = 125$
|
|
158
|
+
|
|
159
|
+
For your convenience, here is a list of the artifacts that can be used in production:
|
|
160
|
+
|
|
161
|
+
| Artifact | Description | Parameters | Link |
|
|
162
|
+
| --------------------------------- | --------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
163
|
+
| processMessages zKey | The production-ready zKey for the processMessages circuit. | 6-8-2-3 | [processmessages_6-8-2-3_final.zkey](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/processmessages_6-8-2-3/contributions/processmessages_6-8-2-3_final.zkey) |
|
|
164
|
+
| tallyVotes zKey | The production-ready zKey for the tallyVotes circuit. | 6-2-3 | [tallyvotes_6-2-3_final.zkey](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/contributions/tallyvotes_6-2-3_final.zkey) |
|
|
165
|
+
| processMessages r1cs | The Rank-1 Constraint System file that was used to generate the zKey | 6-8-2-3 | [processmessages_6-8-2-3.r1cs](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/processmessages_6-8-2-3/processmessages_6-8-2-3.r1cs) |
|
|
166
|
+
| tallyVotes r1cs | The Rank-1 Constraint System file that was used to generate the zKey | 6-2-3 | [tallyvotes_6-2-3.r1cs](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3.r1cs) |
|
|
167
|
+
| processMessage wasm | The WASM file that can be used to generate proofs | 6-8-2-3 | [processmessages_6-8-2-3.wasm](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/processmessages_6-8-2-3/processmessages_6-8-2-3.wasm) |
|
|
168
|
+
| tallyVotes wasm | The WASM file that can be used to generate proofs | 6-2-3 | [tallyvotes_6-2-3.wasm](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3.wasm) |
|
|
169
|
+
| processMessages vKey | The verification key that can be used to verify the processMessages circuit's proofs | 6-8-2-3 | [processmessages_6-8-2-3_vkey.json](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/processmessages_6-8-2-3/processmessages_6-8-2-3_vkey.json) |
|
|
170
|
+
| tallyVotes vKey | The verification key that can be used to verify the tallyVotes circuit's proofs | 6-2-3 | [tallyvotes_6-2-3_vkey.json](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3_vkey.json) |
|
|
171
|
+
| processMessages Solidity verifier | The Solidity smart contract which can be used to verify the processMessages circuit proofs on-chain | 6-8-2-3 | [processmessages_6-8-2-3_verifier.sol](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/processmessages_6-8-2-3/processmessages_6-8-2-3_verifier.sol) |
|
|
172
|
+
| tallyVotes Solidity verifier | The Solidity smart contract which can be used to verify the tallyVotes circuit proofs on-chain | 6-2-3 | [tallyvotes_6-2-3_verifier.sol](https://maci-v1-trusted-setup-ceremony-pse-p0tion-production.s3.eu-central-1.amazonaws.com/circuits/tallyvotes_6-2-3/tallyvotes_6-2-3_verifier.sol) |
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Deployed MACI Smart Contracts
|
|
3
|
+
description: Deployed MACI Smart Contracts
|
|
4
|
+
sidebar_label: Deployed MACI Smart Contracts
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
There are a number of MACI's smart contracts which can be re-used by different deployments. These are the following:
|
|
9
|
+
|
|
10
|
+
- [VkRegistry](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/VkRegistry.sol)
|
|
11
|
+
- [PoseidonHashers](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/crypto/Hasher.sol)
|
|
12
|
+
- [PollFactory](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/PollFactory.sol)
|
|
13
|
+
- [MessageProcessorFactory](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/MessageProcessorFactory.sol)
|
|
14
|
+
- [TallyFactory](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/TallyFactory.sol)
|
|
15
|
+
- [Verifier](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/crypto/Verifier.sol)
|
|
16
|
+
- [FreeForAllPolicy](https://github.com/privacy-scaling-explorations/excubiae/tree/main/packages/contracts/contracts/extensions/freeForAll)
|
|
17
|
+
- [ConstantInitialVoiceCreditProxy](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol) - if you are happy to work with a fixed amount of credits
|
|
18
|
+
|
|
19
|
+
VkRegistries can be re-used by different protocols to share the same set of verifying keys. Please be advised that you should be verifying that those verifying keys are the ones that have undergone a trusted setup ceremony.
|
|
20
|
+
|
|
21
|
+
In order to verify you will need the following:
|
|
22
|
+
|
|
23
|
+
- configure the cli (`cd cli && cp .env.example .env` and set the correct env vars)
|
|
24
|
+
- download the keys (`pnpm download-zkeys:ceremony` from the monorepo root)
|
|
25
|
+
- run checkVerifyingKeys with the cli (see below)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
cd cli && node build/ts/index.js checkVerifyingKeys -q false -vk 0x74569d524a193daC0D3Df17B9E207C916174745b -s 6 -i 2 -m 9 -v 3 -b 2 -p ./zkeys/ProcessMessages_6-9-2-3/processMessages_6-9-2-3.zkey -t ./zkeys/TallyVotes_6-2-3/tallyVotes_6-2-3.zkey
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
:::info
|
|
32
|
+
You should change the -vk parameter to the VkRegistry address for the chain you are deploying to. Also you might need to modify the parameters based on the circuit configuration. Please refer to the [circuits page](/docs/technical-references/zk-snark-circuits/setup) for more information. Also you can add `-uq false` if you want to check non quadratic voting keys.
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
## Contract Addresses
|
|
36
|
+
|
|
37
|
+
### Arbitrum Sepolia
|
|
38
|
+
|
|
39
|
+
| Contract | Address |
|
|
40
|
+
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| ConstantInitialVoiceCreditProxy (99 Credits) | [0x41a29A58A63A998c9Edde6883Bcec2d89835a8e9](https://sepolia.arbiscan.io/address/0x41a29A58A63A998c9Edde6883Bcec2d89835a8e9) |
|
|
42
|
+
| Verifier | [0xB400794f463d90ce5f462A43d8E6f9155656d02d](https://sepolia.arbiscan.io/address/0xB400794f463d90ce5f462A43d8E6f9155656d02d) |
|
|
43
|
+
| PoseidonT3 | [0xa0e0aC07c211D329ebA2D6ec552F4dC1B230A89A](https://sepolia.arbiscan.io/address/0xa0e0aC07c211D329ebA2D6ec552F4dC1B230A89A) |
|
|
44
|
+
| PoseidonT4 | [0x4f02c99df5731C8C69f6baa62Aa4C9f99C529CE2](https://sepolia.arbiscan.io/address/0x0CC8B7Aed7d79a8B948636242706265548D0B10a) |
|
|
45
|
+
| PoseidonT5 | [0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968](https://sepolia.arbiscan.io/address/0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968) |
|
|
46
|
+
| PoseidonT6 | [0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E](https://sepolia.arbiscan.io/address/0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E) |
|
|
47
|
+
|
|
48
|
+
### Arbitrum Mainnet
|
|
49
|
+
|
|
50
|
+
| Contract | Address |
|
|
51
|
+
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| ConstantInitialVoiceCreditProxy (200 Credits) | [0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856](https://arbiscan.io/address/0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856) |
|
|
53
|
+
| Verifier | [0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27](https://arbiscan.io/address/0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27) |
|
|
54
|
+
| PoseidonT3 | [0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4](https://arbiscan.io/address/0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4) |
|
|
55
|
+
| PoseidonT4 | [0x8778dA47eF619f56341fE95514e95fa0FF3B77C6](https://arbiscan.io/address/0x8778dA47eF619f56341fE95514e95fa0FF3B77C6) |
|
|
56
|
+
| PoseidonT5 | [0x43B519FF023757508311518AC41B5fA1CfD57181](https://arbiscan.io/address/0x43B519FF023757508311518AC41B5fA1CfD57181) |
|
|
57
|
+
| PoseidonT6 | [0xb123798B1b21082100D289BeA24bFF0F8dfcbEe1](https://arbiscan.io/address/0xb123798B1b21082100D289BeA24bFF0F8dfcbEe1) |
|
|
58
|
+
|
|
59
|
+
### Optimism
|
|
60
|
+
|
|
61
|
+
| Contract | Address |
|
|
62
|
+
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| ConstantInitialVoiceCreditProxy (200 Credits) | [0x83dD551541C580e338206f1f677835D427C92dE2](https://optimistic.etherscan.io/address/0x83dD551541C580e338206f1f677835D427C92dE2) |
|
|
64
|
+
| Verifier | [0x88C2c6A7535463962A34757FE63cc4F296381aba](https://optimistic.etherscan.io/address/0x88C2c6A7535463962A34757FE63cc4F296381aba) |
|
|
65
|
+
| PoseidonT3 | [0xF8E637e5c9EC3A8d8fa8843A6dF833348E1F1E66](https://optimistic.etherscan.io/address/0xF8E637e5c9EC3A8d8fa8843A6dF833348E1F1E66) |
|
|
66
|
+
| PoseidonT4 | [0x0a0D66baFDa8c8838281084d9C3d68Dd9a6Fc274](https://optimistic.etherscan.io/address/0x0a0D66baFDa8c8838281084d9C3d68Dd9a6Fc274) |
|
|
67
|
+
| PoseidonT5 | [0xD2F6c828606Ad8e985008Cd825012f269B50CD58](https://optimistic.etherscan.io/address/0xD2F6c828606Ad8e985008Cd825012f269B50CD58) |
|
|
68
|
+
| PoseidonT6 | [0x982530673Ce9e5Efa02438c694d48327Aa4fB592](https://optimistic.etherscan.io/address/0x982530673Ce9e5Efa02438c694d48327Aa4fB592) |
|
|
69
|
+
|
|
70
|
+
### Optimism Sepolia
|
|
71
|
+
|
|
72
|
+
| Contract | Address |
|
|
73
|
+
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
74
|
+
| ConstantInitialVoiceCreditProxy (99 Credits) | [0x4473aC3e68ad78D67757336ABaAa2Dced08cfcdF](https://sepolia-optimism.etherscan.io/address/0x4473aC3e68ad78D67757336ABaAa2Dced08cfcdF) |
|
|
75
|
+
| Verifier | [0xB1abb44291ff487f96636758b07Ccd9881f64c9A](https://sepolia-optimism.etherscan.io/address/0xB1abb44291ff487f96636758b07Ccd9881f64c9A) |
|
|
76
|
+
| PoseidonT3 | [0x07490eba00dc4ACA6721D052Fa4C5002Aa077233](https://sepolia-optimism.etherscan.io/address/0x07490eba00dc4ACA6721D052Fa4C5002Aa077233) |
|
|
77
|
+
| PoseidonT4 | [0xbb0e724CE02e5E7eDd31e632dc6e59F229a1126d](https://sepolia-optimism.etherscan.io/address/0xbb0e724CE02e5E7eDd31e632dc6e59F229a1126d) |
|
|
78
|
+
| PoseidonT5 | [0xE0398F7DFAC494c530F6404AfEaC8669ABeD2679](https://sepolia-optimism.etherscan.io/address/0xE0398F7DFAC494c530F6404AfEaC8669ABeD2679) |
|
|
79
|
+
| PoseidonT6 | [0xfD77833F10a29c76A6a0ede235Eb651D744d0E2F](https://sepolia-optimism.etherscan.io/address/0xfD77833F10a29c76A6a0ede235Eb651D744d0E2F) |
|
|
80
|
+
|
|
81
|
+
### Scroll Sepolia
|
|
82
|
+
|
|
83
|
+
| Contract | Address |
|
|
84
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| ConstantInitialVoiceCreditProxy (99 Credits) | [0xB486cce9B4507A67Db147B0802D5673774C8D278](https://sepolia.scrollscan.com/address/0xB486cce9B4507A67Db147B0802D5673774C8D278) |
|
|
86
|
+
| Verifier | [0xD5C41106db85EDd0298279AcFCE5A722060cc5f9](https://sepolia.scrollscan.com/address/0xD5C41106db85EDd0298279AcFCE5A722060cc5f9) |
|
|
87
|
+
| PoseidonT3 | [0x88C2c6A7535463962A34757FE63cc4F296381aba](https://sepolia.scrollscan.com/address/0x88C2c6A7535463962A34757FE63cc4F296381aba) |
|
|
88
|
+
| PoseidonT4 | [0x0a0D66baFDa8c8838281084d9C3d68Dd9a6Fc274](https://sepolia.scrollscan.com/address/0x0a0D66baFDa8c8838281084d9C3d68Dd9a6Fc274) |
|
|
89
|
+
| PoseidonT5 | [0xE0398F7DFAC494c530F6404AfEaC8669ABeD2679](https://sepolia.scrollscan.com/address/0xE0398F7DFAC494c530F6404AfEaC8669ABeD2679) |
|
|
90
|
+
| PoseidonT6 | [0xD2F6c828606Ad8e985008Cd825012f269B50CD58](https://sepolia.scrollscan.com/address/0xD2F6c828606Ad8e985008Cd825012f269B50CD58) |
|
|
91
|
+
|
|
92
|
+
### Base
|
|
93
|
+
|
|
94
|
+
| Contract | Address |
|
|
95
|
+
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| ConstantInitialVoiceCreditProxy (200 Credits) | [0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856](https://basescan.org/address/0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856) |
|
|
97
|
+
| Verifier | [0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27](https://basescan.org/address/0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27) |
|
|
98
|
+
| PoseidonT3 | [0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4](https://basescan.org/address/0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4) |
|
|
99
|
+
| PoseidonT4 | [0x8778dA47eF619f56341fE95514e95fa0FF3B77C6](https://basescan.org/address/0x8778dA47eF619f56341fE95514e95fa0FF3B77C6) |
|
|
100
|
+
| PoseidonT5 | [0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968](https://basescan.org/address/0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968) |
|
|
101
|
+
| PoseidonT6 | [0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E](https://basescan.org/address/0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E) |
|
|
102
|
+
|
|
103
|
+
### Base Sepolia
|
|
104
|
+
|
|
105
|
+
| Contract | Address |
|
|
106
|
+
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| ConstantInitialVoiceCreditProxy (99 Credits) | [0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856](https://sepolia.basescan.org/address/0x16FC13edD59D4b9F788Fb11A70eA022E1Bb1B856) |
|
|
108
|
+
| Verifier | [0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27](https://sepolia.basescan.org/address/0x2427Ab201488Ac81Bec421F179B1Be23c55ebC27) |
|
|
109
|
+
| PoseidonT3 | [0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4](https://sepolia.basescan.org/address/0x2F1398ab5E322d357dF8CdD2e7ba73122c5FDDA4) |
|
|
110
|
+
| PoseidonT4 | [0x8778dA47eF619f56341fE95514e95fa0FF3B77C6](https://sepolia.basescan.org/address/0x8778dA47eF619f56341fE95514e95fa0FF3B77C6) |
|
|
111
|
+
| PoseidonT5 | [0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968](https://sepolia.basescan.org/address/0xB8Bc2c7cF71441fF7E6F111D3457e3d61c564968) |
|
|
112
|
+
| PoseidonT6 | [0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E](https://sepolia.basescan.org/address/0x37282fEde56aa1d7266Ecb12DC3b342D12044e2E) |
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Supported Networks
|
|
3
|
+
description: Supported Networks
|
|
4
|
+
sidebar_label: Supported Networks
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
:::info
|
|
9
|
+
|
|
10
|
+
Testing was done using MACI v2, we expect similar results with v3.
|
|
11
|
+
|
|
12
|
+
:::
|
|
13
|
+
|
|
14
|
+
MACI has been tested on the following EVM networks:
|
|
15
|
+
|
|
16
|
+
- Optimism
|
|
17
|
+
- Optimism Sepolia
|
|
18
|
+
- Arbitrum
|
|
19
|
+
- Arbitrum Sepolia
|
|
20
|
+
- Base
|
|
21
|
+
- Base Sepolia
|
|
22
|
+
- Gnosis
|
|
23
|
+
- Gnosis Chiado
|
|
24
|
+
- Polygon
|
|
25
|
+
- Polygon Amoy
|
|
26
|
+
|
|
27
|
+
We recommend using either Optimism, Arbitrum or Base. Please open an issue/PR if you intend to use other EVM networks and would like to contribute to this record of deployed and verified contracts as well as benchmarks, that would be greatly appreciated.
|
|
28
|
+
|
|
29
|
+
## Limitations
|
|
30
|
+
|
|
31
|
+
For better UX, MACI clients should be sending votes (messages) in batches. Depending on the number of vote options available, larger batch might be sent. Below you can find the largest batch you can send for each network and how much gas it consumes:
|
|
32
|
+
|
|
33
|
+
| Network | Max Batch Size | Gas used | Price (based on Ether price at the time ~$2595) |
|
|
34
|
+
| ---------------- | -------------- | -------- | ----------------------------------------------- |
|
|
35
|
+
| Optimism | 89 | 28167603 | 0.000036061732019822 ETH ($0.09) |
|
|
36
|
+
| Optimism Sepolia | 89 | 28163331 | 0.005651520470449442 ETH ($10.46) |
|
|
37
|
+
| Arbitrum | 98 | 31017545 | 0.00031017545 ETH ($0.80) |
|
|
38
|
+
| Arbitrum Sepolia | 98 | 31115404 | 0.0031115404 ETH ($8.06) |
|
|
39
|
+
| Base | 89 | 28165467 | 0.000591851649982612 ETH ($1.54) |
|
|
40
|
+
| Base Sepolia | 89 | 28190232 | 0.002072926785842714 ETH ($5.18) |
|
|
41
|
+
| Gnosis | 50 | 15921153 | 0.0000124615 ETH ($0.03) |
|
|
42
|
+
| Gnosis Chiado | 50 | 15921753 | 0.0000188313 ETH ($0.05) |
|
|
43
|
+
| Polygon | 85 | 26915773 | 0.0002193417259598 ETH ($0.54) |
|
|
44
|
+
| Polygon Amoy | 89 | 28192368 | 0.00017069180975304 ETH ($0.43) |
|
|
45
|
+
|
|
46
|
+
## Test yourself
|
|
47
|
+
|
|
48
|
+
To test MACI on a network, whether it's one of the ones listed above, or a new one, you can use the `benchmark` hardhat task:
|
|
49
|
+
|
|
50
|
+
1. Ensure you have copied `.env.example` to `.env` and set the correct values for the network you want to test on.
|
|
51
|
+
2. Configure your `deploy-config.json` - ensure `messageTreeDepth` is set to at least 3 (supporting 5 \*\* 3 votes)
|
|
52
|
+
3. Ensure you have copied the `default-deployed-contracts.json` to `deployed-contracts.json` to avoid deploying unnecessary contracts again.
|
|
53
|
+
4. Run the `benchmark` task: `pnpm benchmark:$NETWORK`
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI Smart Contract
|
|
3
|
+
description: MACI main smart contract
|
|
4
|
+
sidebar_label: MACI
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
:::info
|
|
9
|
+
Code location: [MACI.sol](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/MACI.sol)
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
`MACI.sol` is the core contract of the project, as it provides the base layer for user signups and Polls to be created.
|
|
13
|
+
|
|
14
|
+
The constructor shown below accepts several arguments:
|
|
15
|
+
|
|
16
|
+
- `PollFactory` address
|
|
17
|
+
- `MessageProcessorFactory` address
|
|
18
|
+
- `TallyFactory` address
|
|
19
|
+
- `IBasePolicy` address
|
|
20
|
+
- `InitialVoiceCreditProxy` address
|
|
21
|
+
- The depth of the state tree
|
|
22
|
+
|
|
23
|
+
```solidity
|
|
24
|
+
constructor(
|
|
25
|
+
IPollFactory _pollFactory,
|
|
26
|
+
IMessageProcessorFactory _messageProcessorFactory,
|
|
27
|
+
ITallyFactory _tallyFactory,
|
|
28
|
+
IBasePolicy _signUpPolicy,
|
|
29
|
+
uint8 _stateTreeDepth,
|
|
30
|
+
uint256[5] memory _emptyBallotRoots
|
|
31
|
+
) payable {
|
|
32
|
+
// initialize and insert the blank leaf
|
|
33
|
+
InternalLeanIMT._insert(leanIMTData, PAD_KEY_HASH);
|
|
34
|
+
stateRootsOnSignUp.push(PAD_KEY_HASH);
|
|
35
|
+
|
|
36
|
+
pollFactory = _pollFactory;
|
|
37
|
+
messageProcessorFactory = _messageProcessorFactory;
|
|
38
|
+
tallyFactory = _tallyFactory;
|
|
39
|
+
signUpPolicy = _signUpPolicy;
|
|
40
|
+
stateTreeDepth = _stateTreeDepth;
|
|
41
|
+
maxSignups = uint256(STATE_TREE_ARITY) ** uint256(_stateTreeDepth);
|
|
42
|
+
emptyBallotRoots = _emptyBallotRoots;
|
|
43
|
+
|
|
44
|
+
// Verify linked poseidon libraries
|
|
45
|
+
if (hash2([uint256(1), uint256(1)]) == 0) revert PoseidonHashLibrariesNotLinked();
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Upon deployment, the contract will initialize the state tree, and insert the blank leaf hash.
|
|
50
|
+
|
|
51
|
+
After this, all of the parameters will be stored to state, and then the contract will perform a simple sanity check to ensure that the Poseidon hash libraries were linked successfully.
|
|
52
|
+
|
|
53
|
+
## SignUp
|
|
54
|
+
|
|
55
|
+
Next, we have the `signUp` function, which allows users to `signUp`, as long as they pass the conditions set in the `signUpPolicy` contract. This contract can use any mean necessary to gatekeep access to MACI's polls. For instance, only wallets with a specific ERC721 token can be allowed to sign up.
|
|
56
|
+
|
|
57
|
+
This function does the following:
|
|
58
|
+
|
|
59
|
+
- checks that the maximum number of signups has not been reached. Given a tree depth of 10, this will be $2 ** 10 - 1$.
|
|
60
|
+
- checks that the provided public key is a valid baby-jubjub point
|
|
61
|
+
- registers the user using the sign up policy contract. It is important that whichever policy is used, this reverts if a user tries to sign up twice or the conditions are not met (i.e returning false is not enough)
|
|
62
|
+
- hashes the public key and inserts it into the state tree.
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
function signUp(PubKey memory _pubKey, bytes memory _signUpPolicyData) public virtual {
|
|
66
|
+
// ensure we do not have more signups than what the circuits support
|
|
67
|
+
if (leanIMTData.size >= maxSignups) revert TooManySignups();
|
|
68
|
+
|
|
69
|
+
// ensure that the public key is on the baby jubjub curve
|
|
70
|
+
if (!CurveBabyJubJub.isOnCurve(_pubKey.x, _pubKey.y)) {
|
|
71
|
+
revert InvalidPubKey();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Register the user via the sign-up policy. This function should
|
|
75
|
+
// throw if the user has already registered or if ineligible to do so.
|
|
76
|
+
signUpPolicy.register(msg.sender, _signUpPolicyData);
|
|
77
|
+
|
|
78
|
+
// Hash the public key and insert it into the tree.
|
|
79
|
+
uint256 pubKeyHash = hashLeftRight(_pubKey.x, _pubKey.y);
|
|
80
|
+
uint256 stateRoot = InternalLeanIMT._insert(leanIMTData, pubKeyHash);
|
|
81
|
+
|
|
82
|
+
// Store the current state tree root in the array
|
|
83
|
+
stateRootsOnSignUp.push(stateRoot);
|
|
84
|
+
|
|
85
|
+
emit SignUp(leanIMTData.size - 1, block.timestamp, _pubKey.x, _pubKey.y);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## DeployPoll
|
|
90
|
+
|
|
91
|
+
Once everything has been setup, polls can be deployed using the `deployPoll` function. Polls can be deployed concurrently, as each deployment has its own separate set of contracts and state.
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
function deployPoll(DeployPollArgs calldata args) public virtual returns (PollContracts memory) {
|
|
95
|
+
// cache the poll to a local variable so we can increment it
|
|
96
|
+
uint256 pollId = nextPollId;
|
|
97
|
+
|
|
98
|
+
// Increment the poll ID for the next poll
|
|
99
|
+
// 2 ** 256 polls available
|
|
100
|
+
unchecked {
|
|
101
|
+
nextPollId++;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// check coordinator key is a valid point on the curve
|
|
105
|
+
if (!CurveBabyJubJub.isOnCurve(args.coordinatorPubKey.x, args.coordinatorPubKey.y)) {
|
|
106
|
+
revert InvalidPubKey();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
ExtContracts memory extContracts = ExtContracts({
|
|
110
|
+
maci: IMACI(address(this)),
|
|
111
|
+
verifier: IVerifier(args.verifier),
|
|
112
|
+
vkRegistry: IVkRegistry(args.vkRegistry),
|
|
113
|
+
policy: IsignUpPolicy(args.policy),
|
|
114
|
+
initialVoiceCreditProxy: IInitialVoiceCreditProxy(args.initialVoiceCreditProxy)
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
IPollFactory.DeployPollArgs memory deployPollArgs = IPollFactory.DeployPollArgs({
|
|
118
|
+
startDate: args.startDate,
|
|
119
|
+
endDate: args.endDate,
|
|
120
|
+
treeDepths: args.treeDepths,
|
|
121
|
+
messageBatchSize: args.messageBatchSize,
|
|
122
|
+
coordinatorPubKey: args.coordinatorPubKey,
|
|
123
|
+
extContracts: extContracts,
|
|
124
|
+
emptyBallotRoot: emptyBallotRoots[args.treeDepths.voteOptionTreeDepth - 1],
|
|
125
|
+
pollId: pollId,
|
|
126
|
+
relayers: args.relayers,
|
|
127
|
+
voteOptions: args.voteOptions
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
address p = pollFactory.deploy(deployPollArgs);
|
|
131
|
+
address mp = messageProcessorFactory.deploy(args.verifier, args.vkRegistry, p, msg.sender, args.mode);
|
|
132
|
+
address tally = tallyFactory.deploy(args.verifier, args.vkRegistry, p, mp, msg.sender, args.mode);
|
|
133
|
+
|
|
134
|
+
// store the addresses in a struct so they can be returned
|
|
135
|
+
PollContracts memory pollAddr = PollContracts({ poll: p, messageProcessor: mp, tally: tally });
|
|
136
|
+
|
|
137
|
+
polls[pollId] = pollAddr;
|
|
138
|
+
|
|
139
|
+
emit DeployPoll(pollId, args.coordinatorPubKey.x, args.coordinatorPubKey.y, args.mode);
|
|
140
|
+
|
|
141
|
+
return pollAddr;
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Polls require the following information:
|
|
146
|
+
|
|
147
|
+
- `duration`: the duration of the poll
|
|
148
|
+
- `treeDepths`: the depth of the state tree, message tree, and vote option tree
|
|
149
|
+
- `coordinatorPubKey`: the public key of the poll's coordinator
|
|
150
|
+
- `verifier`: the address of the zk-SNARK verifier contract
|
|
151
|
+
- `vkRegistry`: the address of the vk registry contract
|
|
152
|
+
- `mode`: the mode of the poll, to set whether it supports quadratic voting or non quadratic voting
|
|
153
|
+
- `signUpPolicy`: the address of the sign up policy contract
|
|
154
|
+
- `initialVoiceCreditProxy`: the address of the initial voice credit proxy contract
|
|
155
|
+
- `relayers`: the addresses of the relayers for the poll (if offchain voting is enabled)
|
|
156
|
+
- `voteOptions`: the number of vote options for the poll
|
|
157
|
+
|
|
158
|
+
:::info
|
|
159
|
+
Please be advised that the number of signups in the MACI contract (number of leaves in the merkle tree holding MACI's state) considers the initial zero leaf as one signup. For this reason, when accounting for the real users signed up to MACI, you should subtract one from the value returned from the `numSignUps` function.
|
|
160
|
+
:::
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MessageProcessor Smart Contract
|
|
3
|
+
description: MessageProcessor smart contract
|
|
4
|
+
sidebar_label: MessageProcessor
|
|
5
|
+
sidebar_position: 4
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
:::info
|
|
9
|
+
Code location: [MessageProcessor.sol](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/MessageProcessor.sol)
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
This contract is used to prepare parameters for the zk-SNARK circuits as well as for verifying proofs. It should be deployed alongside a `Poll`.
|
|
13
|
+
It will process messages in batches, and after all batches have been processed, the `sbCommitment` can then be used for the `Tally` contract verification steps.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Params Smart Contract
|
|
3
|
+
description: Params smart contract
|
|
4
|
+
sidebar_label: Params
|
|
5
|
+
sidebar_position: 9
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
:::info
|
|
9
|
+
Code location: [Params.sol](https://github.com/privacy-scaling-explorations/maci/blob/dev/contracts/contracts/utils/Params.sol)
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
A contract holding three structs:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
/// @notice A struct holding the depths of the merkle trees
|
|
16
|
+
struct TreeDepths {
|
|
17
|
+
uint8 intStateTreeDepth;
|
|
18
|
+
uint8 voteOptionTreeDepth;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/// @notice A struct holding the external contracts
|
|
22
|
+
/// that are to be passed to a Poll contract on
|
|
23
|
+
/// deployment
|
|
24
|
+
struct ExtContracts {
|
|
25
|
+
IMACI maci;
|
|
26
|
+
IVerifier verifier;
|
|
27
|
+
IVkRegistry vkRegistry;
|
|
28
|
+
IBasePolicy policy;
|
|
29
|
+
IInitialVoiceCreditProxy initialVoiceCreditProxy;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Struct parameters are used to avoid stack too deep errors in the other contracts.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Policies Smart Contract
|
|
3
|
+
description: Policies smart contract
|
|
4
|
+
sidebar_label: Policies
|
|
5
|
+
sidebar_position: 6
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
:::info
|
|
9
|
+
Code location: [Policies](https://github.com/privacy-scaling-explorations/excubiae/tree/main/packages/contracts/contracts/extensions)
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
MACI is composed of multiple smart contracts, which together with the zk-SNARK circuits, can be used to carry out on-chain voting. Start with an [overview of our smart contracts here](/docs/technical-references/smart-contracts/MACI).
|
|
13
|
+
|
|
14
|
+
MACI uses a "policy" contract from Excubiae, which is used to configure and enforce the eligibility criteria of voters who can participate in MACI polls. In other words, it is a way to whitelist signups to the system. Operators of MACI can use the policy contract to configure signup eligibility and to protect against sybil attacks in their polls.
|
|
15
|
+
|
|
16
|
+
The MACI repository comes with several out-of-the-box options:
|
|
17
|
+
|
|
18
|
+
- `FreeForAllPolicy` - This allows anyone to signup on MACI.
|
|
19
|
+
- `SignUpTokenPolicy` - This restricts signups only to holders of a specific ERC721 token.
|
|
20
|
+
- `EASPolicy` - This restricts signups only to users who have received an attestation of a specific schema from a trusted attester.
|
|
21
|
+
- `HatsPolicy` - This allows gatekeeping signups to only users who have a specific [Hat](https://www.hatsprotocol.xyz/).
|
|
22
|
+
- `GitcoinPassportPolicy` - This allows gatekeeping signups to only users who have a specific [Gitcoin Passport](https://passport.gitcoin.co/) score.
|
|
23
|
+
- `ZupassPolicy` - This allows gatekeeping signups only to users who have a valid [Zupass PCD ticket](https://github.com/proofcarryingdata/zupass).
|
|
24
|
+
- `SemaphorePolicy` - This allows gatekeeping signups only to users who can prove they are part of a [Semaphore](https://semaphore.pse.dev/) group.
|
|
25
|
+
|
|
26
|
+
You can find all of the latest policy contracts here:
|
|
27
|
+
https://github.com/privacy-scaling-explorations/excubiae/tree/main/packages/contracts/contracts/extensions
|
|
28
|
+
|
|
29
|
+
Developers are also welcome to implement a custom policy contract as long as it conforms to the `BasePolicy` - an abstract contract to inherit from with function signature:
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
abstract contract BasePolicy {
|
|
33
|
+
function enforce(address subject, bytes calldata evidence) external override onlyTarget {}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Whenever a user signs up (via the `MACI.signUp` function), this triggers the MACI contract to call the `BasePolicy.enforce` function. Please note that this function should throw if the user is not eligible to sign up, rather than returning true or false.
|
|
38
|
+
|
|
39
|
+
If you'd like to create a policy contract for your project, or if there's specific policy functionality you'd like to see MACI support, we'd be happy to help! Please [create a GitHub issue](https://github.com/privacy-scaling-explorations/maci/issues/new/choose).
|