@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,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,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"label": "Coordinator Service",
|
|
3
|
+
"position": 1,
|
|
4
|
+
"link": {
|
|
5
|
+
"type": "generated-index",
|
|
6
|
+
"description": "The Coordinator Service is a backend service that aims to automate MACI-related operations, such as contracts deployment, proof generation and poll finalisation."
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: The Coordinator Service is a service that allows to automate MACI coordinator tasks.
|
|
4
|
+
sidebar_label: Introduction
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Coordinator Service
|
|
9
|
+
|
|
10
|
+
Welcome to the Coordinator Service technical reference. Here you will find the technical details of the Coordinator Service, including the API endpoints and code examples.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation and setup
|
|
3
|
+
description: Learn how to install and setup the Coordinator Service.
|
|
4
|
+
sidebar_label: Installation
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
1. Add `.env` file (see `.env.example`).
|
|
9
|
+
2. Generate RSA key pair with `pnpm run generate-keypair`.
|
|
10
|
+
3. Download zkey files using `pnpm run download-zkeys:{type}` (only test type is available for now).
|
|
11
|
+
4. Make sure you copied RSA public key to your application. This will be needed for encrypting `Authorization` header and coordinator private key for proof generation. Also it can be accessed through API method `GET v1/proof/publicKey`.
|
|
12
|
+
5. Run `pnpm run start` to run the service.
|
|
13
|
+
6. All API calls must be called with `Authorization` header, where the value is encrypted with RSA public key you generated before. Header value contains message signature and message digest created by `COORDINATOR_ADDRESSES`. The format is `publicEncrypt({signature}:{digest})`.
|
|
14
|
+
Make sure you set `COORDINATOR_ADDRESSES` env variable and sign any message with the addresses from your application (see [AccountSignatureGuard](./ts/auth/AccountSignatureGuard.service.ts)).
|
|
15
|
+
7. Proofs can be generated with `POST v1/proof/generate` API method or with Websockets (see [dto spec](./ts/proof/dto.ts), [controller](./ts/app.controller.ts) and [wsgateway](./ts/events/events.gateway.ts)).
|
|
16
|
+
|
|
17
|
+
## Subgraph deployment
|
|
18
|
+
|
|
19
|
+
It is possible to deploy subgraph using coordinator service.
|
|
20
|
+
|
|
21
|
+
First, you need to setup subgraph and create a project. [Subgraph dashboard](https://thegraph.com/studio/).
|
|
22
|
+
|
|
23
|
+
Then, set env variables:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
# Subgraph name
|
|
27
|
+
SUBGRAPH_NAME="maci-subgraph"
|
|
28
|
+
|
|
29
|
+
# Subgraph provider url
|
|
30
|
+
SUBGRAPH_PROVIDER_URL=https://api.studio.thegraph.com/deploy/
|
|
31
|
+
|
|
32
|
+
# Subgraph deploy key
|
|
33
|
+
SUBGRAPH_DEPLOY_KEY=*******
|
|
34
|
+
|
|
35
|
+
# Subgraph project folder
|
|
36
|
+
SUBGRAPH_FOLDER=../subgraph
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After deployment, subgraph url will be available in studio dashboard and you can use this type of url to get latest deployed version in your application:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
https://api.studio.thegraph.com/.../{SUBGRAPH_NAME}/version/latest
|
|
43
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: The Offchain Relayer is a service that allows users to vote on MACI polls free of charge.
|
|
4
|
+
sidebar_label: Introduction
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Coordinator Service
|
|
9
|
+
|
|
10
|
+
Welcome to the Offchain Relayer technical reference. Here you will find the technical details of the Offchain Relayer: how to set it up and and how to use it.
|
|
11
|
+
|
|
12
|
+
## Flow Diagram
|
|
13
|
+
|
|
14
|
+
Below is a high-level diagram illustrating the flow of the Relayer Service:
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
## High-Level Overview of the Relayer:
|
|
19
|
+
|
|
20
|
+
### Functionality
|
|
21
|
+
|
|
22
|
+
The Relayer serves as an intermediary between users and the MACI system. It performs the following tasks:
|
|
23
|
+
|
|
24
|
+
- Allows users to send messages without having to pay gas fees by processing these messages off-chain.
|
|
25
|
+
- Receives user messages.
|
|
26
|
+
- Prepare messages batches and upload it to IPFS
|
|
27
|
+
- Submits the message hashes to the Poll contract with IPFS hash of the batch.
|
|
28
|
+
|
|
29
|
+
This process ensures that user actions are recorded on-chain without compromising their privacy.
|
|
30
|
+
|
|
31
|
+
### Privacy Preservation
|
|
32
|
+
|
|
33
|
+
By verifying the zero-knowledge proofs, the Relayer ensures that only authorized users can send messages.
|
|
34
|
+
Users must know the pre-image to a state leaf in the poll state tree.
|
|
35
|
+
|
|
36
|
+
### Decentralization and Trust
|
|
37
|
+
|
|
38
|
+
It's recommended that the coordinator only runs this service for now. That is because if the service malfunctions and batch hashes are pushed on chain without the messages actually being stored on ipfs, then polls can't be finalized.
|
|
39
|
+
|
|
40
|
+
### Integration with MACI Components
|
|
41
|
+
|
|
42
|
+
The Relayer interacts with other components of the MACI system, such as the **Coordinator** and the on-chain smart contracts:
|
|
43
|
+
|
|
44
|
+
- The **Coordinator** fetches all the messages stored in IPFS and uses them as regular on-chain messages.
|
|
45
|
+
- This ensures that user messages are properly processed and recorded, contributing to the overall functionality and security of the voting protocol.
|
|
46
|
+
|
|
47
|
+
### Additional Information
|
|
48
|
+
|
|
49
|
+
For more details, you can read the following post on EthResearch:
|
|
50
|
+
|
|
51
|
+
[MACI with Mostly Off-Chain Happy Path](https://ethresear.ch/t/maci-with-mostly-off-chain-happy-path/19527)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation and setup
|
|
3
|
+
description: Learn how to install and setup the Offchain Relayer service.
|
|
4
|
+
sidebar_label: Setup
|
|
5
|
+
sidebar_position: 2
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
Make sure you have the following tools installed on your system:
|
|
11
|
+
|
|
12
|
+
- **Docker**: [Install Docker](https://www.docker.com/products/docker-desktop)
|
|
13
|
+
- **Docker Compose**: [Install Docker Compose](https://docs.docker.com/compose/install/)
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
Follow these steps to run the MACI Relayer service using Docker.
|
|
18
|
+
|
|
19
|
+
### 1. Clone the Repository
|
|
20
|
+
|
|
21
|
+
First, clone the repository to your local machine.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git clone https://github.com/privacy-scaling-explorations/maci
|
|
25
|
+
cd maci
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 2. Configure Environment Variables
|
|
29
|
+
|
|
30
|
+
The `.env` file contains sensitive configuration values that will be injected into the Docker containers at runtime. To set them up:
|
|
31
|
+
|
|
32
|
+
1. Copy the `.env.example` file to `.env`.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cp .env.example .env
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Edit the `.env` file and configure the variables.
|
|
39
|
+
|
|
40
|
+
## 3. Build and Run the Docker Containers
|
|
41
|
+
|
|
42
|
+
Now that your environment is set up, it's time to build and run the Docker containers.
|
|
43
|
+
|
|
44
|
+
Run the following command from the root directory of your project:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
docker-compose up --build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This command does the following:
|
|
51
|
+
|
|
52
|
+
- Builds the Docker images based on the Dockerfile and `docker-compose.yml` files.
|
|
53
|
+
- Starts the service container (the MACI relayer application) and the mongodb container.
|
|
54
|
+
|
|
55
|
+
The MACI Relayer service will be available on port 3000 by default (you can modify this in the `.env` file).
|
|
56
|
+
|
|
57
|
+
## 4. Access the Service
|
|
58
|
+
|
|
59
|
+
Once the containers are up and running, you can access the relayer service at:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
http://localhost:3000
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Additionally, the Swagger UI documentation for the Relayer service API can be accessed at:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
http://localhost:3000/api
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
You can interact with the API through the Swagger interface, which provides a convenient way to test endpoints and view the API methods.
|
|
72
|
+
|
|
73
|
+
## 5. Check Logs
|
|
74
|
+
|
|
75
|
+
To view the logs from the containers and troubleshoot any issues, run:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
docker-compose logs
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This will display logs from both the service (relayer) and mongodb containers.
|
|
82
|
+
|
|
83
|
+
## 6. Stop the Services
|
|
84
|
+
|
|
85
|
+
To stop the containers and remove the containers (but keep the volumes), use the following command:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
docker-compose down
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This will stop and remove the containers but retain the volumes (like MongoDB data). To also remove the volumes, run:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
docker-compose down --volumes
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## 7. MongoDB Persistence
|
|
98
|
+
|
|
99
|
+
MongoDB data is persisted using Docker volumes (`mongodb-data`). Even if you remove and recreate the MongoDB container, the data will persist.
|
|
100
|
+
|
|
101
|
+
This ensures that any data stored in the MongoDB database is not lost even if the container is restarted or removed.
|
|
102
|
+
|
|
103
|
+
If you'd like to remove the persisted data as well, you can remove the volume by running:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
docker volume rm your-repo_mongodb-data
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This will delete the volume, along with all the data stored in MongoDB.
|