@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,21 @@
|
|
|
1
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1745.7428388252538 3896.0760805259206" width="5237.228516475761" height="11688.228241577763">
|
|
2
|
+
<!-- svg-source:excalidraw -->
|
|
3
|
+
|
|
4
|
+
<defs>
|
|
5
|
+
<style class="style-fonts">
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: "Virgil";
|
|
8
|
+
src: url("https://excalidraw.com/Virgil.woff2");
|
|
9
|
+
}
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: "Cascadia";
|
|
12
|
+
src: url("https://excalidraw.com/Cascadia.woff2");
|
|
13
|
+
}
|
|
14
|
+
@font-face {
|
|
15
|
+
font-family: "Assistant";
|
|
16
|
+
src: url("https://excalidraw.com/Assistant-Regular.woff2");
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
|
|
20
|
+
</defs>
|
|
21
|
+
<rect x="0" y="0" width="1745.7428388252538" height="3896.0760805259206" fill="#ffffff"></rect><g stroke-linecap="round" transform="translate(1160.6460401616528 10) rotate(0 217.3787705561797 235)"><path d="M272.5 59 C299.62 85.02, 317.17 109.77, 380.26 177 C437.4 238.13, 436.83 238.32, 380.26 295 C354.6 324.87, 331.54 353.5, 272.5 411 C220.47 467.2, 215.95 472.01, 163.5 411 C139.59 381.37, 107.76 351.63, 54.5 295 C2.62 239.08, 0.79 235.05, 54.5 177 C83.57 144.05, 117.7 111.1, 163.5 59 C214.74 -3.36, 220.05 2.09, 272.5 59" stroke="none" stroke-width="0" fill="#ffffff"></path><path d="M272.5 59 C300.8 91.01, 329.03 120.37, 380.26 177 M272.5 59 C301.04 89.64, 329.89 120.04, 380.26 177 M380.26 177 C433.34 235.22, 434.68 234.1, 380.26 295 M380.26 177 C436.41 237.53, 435.88 233.77, 380.26 295 M380.26 295 C338.98 340.18, 297.21 384.45, 272.5 411 M380.26 295 C353.87 323.65, 326.28 352.65, 272.5 411 M272.5 411 C219.5 468.4, 219.39 468.94, 163.5 411 M272.5 411 C216.27 468.59, 217.78 471.96, 163.5 411 M163.5 411 C142.15 387.06, 117.44 362.09, 54.5 295 M163.5 411 C138.33 383.37, 111.37 357.23, 54.5 295 M54.5 295 C-1.32 236.72, 0.27 234.09, 54.5 177 M54.5 295 C-0.17 235.14, -1.14 237.32, 54.5 177 M54.5 177 C97.17 133.85, 138.26 87.11, 163.5 59 M54.5 177 C85.75 144.32, 116.81 112.15, 163.5 59 M163.5 59 C218.11 -1.35, 219.81 -1.46, 272.5 59 M163.5 59 C216.24 -0.28, 217.73 -1.27, 272.5 59" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1282.0020895632779 200) rotate(0 95.83333587646484 45)"><text x="95.83333587646484" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">1. Process </text><text x="95.83333587646484" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">messages</text></g><g stroke-linecap="round" transform="translate(1098.7565794265697 679.5217573111763) rotate(0 272.14759196711384 197.76647841846895)"><path d="M341.25 49.5 C377.36 77.26, 415.82 110.66, 476.05 148.5 C547.7 195.28, 546.02 194.7, 476.05 247.5 C442.54 274.33, 406.95 298.21, 341.25 346.03 C270.74 396.7, 272.16 397.74, 204.75 346.03 C165.94 317.26, 120.77 287.37, 68.25 247.5 C-1.63 194.77, 0.56 197.76, 68.25 148.5 C109.25 118.83, 146.16 92.77, 204.75 49.5 C269.68 0.11, 272.31 -0.73, 341.25 49.5" stroke="none" stroke-width="0" fill="#ffffff"></path><path d="M341.25 49.5 C371.42 71.39, 403.31 92.43, 476.05 148.5 M341.25 49.5 C383.56 81.51, 423.96 111.27, 476.05 148.5 M476.05 148.5 C542.31 199.87, 542.51 196.97, 476.05 247.5 M476.05 148.5 C546.53 196.26, 543.39 197.37, 476.05 247.5 M476.05 247.5 C428.1 283.48, 378 319.88, 341.25 346.03 M476.05 247.5 C446.43 266.78, 418.07 287.83, 341.25 346.03 M341.25 346.03 C271.38 396.07, 274.08 396.69, 204.75 346.03 M341.25 346.03 C275.01 395.26, 272.41 393.27, 204.75 346.03 M204.75 346.03 C171.42 319.67, 133.78 294.01, 68.25 247.5 M204.75 346.03 C167.68 318.21, 129.58 291.83, 68.25 247.5 M68.25 247.5 C0.16 199.15, -0.35 197.33, 68.25 148.5 M68.25 247.5 C-0.87 198.71, 0.75 197.8, 68.25 148.5 M68.25 148.5 C106.71 119.37, 150.73 88.89, 204.75 49.5 M68.25 148.5 C115.62 114.28, 162.47 79.74, 204.75 49.5 M204.75 49.5 C272.72 -0.23, 274.52 0.07, 341.25 49.5 M204.75 49.5 C275.03 1.9, 271.03 -1.2, 341.25 49.5" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1242.0637128124704 787.4049965204108) rotate(0 128.76666259765625 90)"><text x="128.76666259765625" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">2. Generate </text><text x="128.76666259765625" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">commitments </text><text x="128.76666259765625" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">of the current</text><text x="128.76666259765625" y="135" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">state</text></g><g stroke-linecap="round"><g transform="translate(1036.532903079994 841.6336436959298) rotate(0 -88.45874715919786 10.28590083246479)"><path d="M0.02 1.02 C-29.37 4.11, -147.65 16.08, -176.97 19.52 M-1.43 0.52 C-30.93 3.63, -148.82 17.28, -177.95 20.5" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1036.532903079994 841.6336436959298) rotate(0 -88.45874715919786 10.28590083246479)"><path d="M-151.1 7.13 C-155.97 10.37, -166.12 15.41, -177.95 20.5 M-151.1 7.13 C-160.62 13.05, -171 16.88, -177.95 20.5" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1036.532903079994 841.6336436959298) rotate(0 -88.45874715919786 10.28590083246479)"><path d="M-148.78 27.52 C-154.4 25.68, -165.12 25.65, -177.95 20.5 M-148.78 27.52 C-159.26 25.52, -170.54 21.42, -177.95 20.5" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round" transform="translate(28.514621498436554 611.2294650487165) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C109.79 0.58, 184.41 0.7, 334.18 0 M32 0 C144.77 1.09, 256.5 2.24, 334.18 0 M334.18 0 C357.06 -1.72, 364.54 9.5, 366.18 32 M334.18 0 C354.21 1.8, 365.04 9.94, 366.18 32 M366.18 32 C367.48 79.44, 365.77 123.4, 366.18 194.29 M366.18 32 C366.83 90.03, 367.01 147.18, 366.18 194.29 M366.18 194.29 C365.35 213.89, 353.97 225.72, 334.18 226.29 M366.18 194.29 C366.18 214.29, 354.77 224, 334.18 226.29 M334.18 226.29 C236.01 225.69, 136.02 225.97, 32 226.29 M334.18 226.29 C217.35 224.43, 102.12 224.66, 32 226.29 M32 226.29 C10.34 224.85, -0.85 216.79, 0 194.29 M32 226.29 C10.63 226.63, -0.19 215.12, 0 194.29 M0 194.29 C-0.83 143.21, 0.45 92.57, 0 32 M0 194.29 C0.57 151.26, -0.51 109, 0 32 M0 32 C0.35 11.7, 11.91 0.66, 32 0 M0 32 C-1.61 12.71, 9.26 -0.42, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(35.75365021279549 656.8743742058302) rotate(0 175.85000610351562 67.5)"><text x="175.85000610351562" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">currentPerVOSpentV</text><text x="175.85000610351562" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">oiceCreditsCommitme</text><text x="175.85000610351562" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">nt</text></g><g stroke-linecap="round" transform="translate(10 888.9487875252682) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C96.91 0.82, 163.57 2.61, 334.18 0 M32 0 C121.46 -1.93, 210.66 -1.35, 334.18 0 M334.18 0 C356.78 1.06, 367.22 9.74, 366.18 32 M334.18 0 C353.33 1.16, 366.55 11.36, 366.18 32 M366.18 32 C366.81 71.29, 366.61 111.11, 366.18 194.29 M366.18 32 C365.91 83.16, 366.35 135.15, 366.18 194.29 M366.18 194.29 C365.51 216.84, 354.86 226.48, 334.18 226.29 M366.18 194.29 C366 214.2, 355.3 226.06, 334.18 226.29 M334.18 226.29 C224.9 226.62, 115.63 226.51, 32 226.29 M334.18 226.29 C229.33 228.06, 124.78 228.27, 32 226.29 M32 226.29 C11.06 224.89, 1.91 214.19, 0 194.29 M32 226.29 C8.51 228.06, 1.95 216.72, 0 194.29 M0 194.29 C-0.38 146.46, -0.08 101.7, 0 32 M0 194.29 C-0.67 134.65, -0.94 75.52, 0 32 M0 32 C-1.74 11.49, 12.2 1.08, 32 0 M0 32 C0.33 10.56, 9.87 -1.28, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(20.28903176611675 957.093696682382) rotate(0 172.8000030517578 45)"><text x="172.8000030517578" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">currentSpentVoiceCr</text><text x="172.8000030517578" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">editsCommitment</text></g><g stroke-linecap="round" transform="translate(430.0341144118411 894.1712292000765) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C109.03 1.61, 187.69 0.17, 334.18 0 M32 0 C143.62 -1.27, 256.37 -1.22, 334.18 0 M334.18 0 C353.82 -1.4, 364.37 10.57, 366.18 32 M334.18 0 C355 -0.56, 364.11 10.27, 366.18 32 M366.18 32 C365.5 89.72, 364.3 151.52, 366.18 194.29 M366.18 32 C365.94 79.62, 367.28 125.85, 366.18 194.29 M366.18 194.29 C367.34 215.49, 354.12 227.19, 334.18 226.29 M366.18 194.29 C368.37 216.64, 357.77 224.76, 334.18 226.29 M334.18 226.29 C219.4 225.79, 107.81 228.2, 32 226.29 M334.18 226.29 C221.62 225.35, 107.85 224.27, 32 226.29 M32 226.29 C10.36 228.19, 0.31 214.02, 0 194.29 M32 226.29 C11.64 224.02, 0.96 214.23, 0 194.29 M0 194.29 C-0.46 143.22, -2.56 95.58, 0 32 M0 194.29 C1.4 144.66, 1.04 96.38, 0 32 M0 32 C0.72 11.99, 10 1.53, 32 0 M0 32 C-2.12 10.79, 9.31 0.79, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(435.72315533323126 962.3161383571902) rotate(0 177.39999389648438 45)"><text x="177.39999389648438" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">currentTallyCommitm</text><text x="177.39999389648438" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">ent</text></g><g stroke-linecap="round" transform="translate(429.66475396456735 613.2866452152105) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C113.97 0.87, 195.95 2, 334.18 0 M32 0 C149.56 0.31, 268.14 -0.49, 334.18 0 M334.18 0 C355.72 1.26, 365.76 11.83, 366.18 32 M334.18 0 C354.5 0.44, 365.46 8.54, 366.18 32 M366.18 32 C368.97 86.7, 368.53 140.72, 366.18 194.29 M366.18 32 C365.31 79.26, 364.74 124, 366.18 194.29 M366.18 194.29 C366 216.36, 356.81 227.01, 334.18 226.29 M366.18 194.29 C364.91 216, 357.55 228.52, 334.18 226.29 M334.18 226.29 C254.04 224.83, 172.31 225.18, 32 226.29 M334.18 226.29 C263.44 226.67, 192.76 226.16, 32 226.29 M32 226.29 C12.06 225.6, 0.44 216.63, 0 194.29 M32 226.29 C12.7 228.23, 0.72 217.18, 0 194.29 M0 194.29 C1.61 137.04, 3.1 80.02, 0 32 M0 194.29 C-0.67 148.45, -1.01 102.69, 0 32 M0 32 C-0.3 9.59, 9.18 -1.02, 32 0 M0 32 C0.53 10.56, 11.14 2.15, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(438.5537918341997 681.4315543723242) rotate(0 174.1999969482422 45)"><text x="174.1999969482422" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">currentResultsComm</text><text x="174.1999969482422" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">itment</text></g><g stroke-linecap="round" transform="translate(1105.877218750717 1193.026682626903) rotate(0 272.14759196711384 197.76647841846895)"><path d="M341.25 49.5 C367.6 76.95, 396.94 94.82, 476.05 148.5 C544.07 200.51, 542.09 195.45, 476.05 247.5 C432.03 282.43, 387.34 309.76, 341.25 346.03 C273.5 395.35, 273.4 393.85, 204.75 346.03 C170.76 318.31, 140.14 301.04, 68.25 247.5 C-2.93 199.43, -2.03 197.38, 68.25 148.5 C96.94 128.14, 125.09 107.1, 204.75 49.5 C276.13 0.28, 272.1 -2.93, 341.25 49.5" stroke="none" stroke-width="0" fill="#ffffff"></path><path d="M341.25 49.5 C373.82 75, 410.05 99.19, 476.05 148.5 M341.25 49.5 C368.33 69.69, 395.2 90.62, 476.05 148.5 M476.05 148.5 C542.8 197.41, 544.7 199.88, 476.05 247.5 M476.05 148.5 C545.65 199.9, 543.13 196.1, 476.05 247.5 M476.05 247.5 C436.75 274.27, 397.26 305.65, 341.25 346.03 M476.05 247.5 C443.79 270.85, 411.94 295.52, 341.25 346.03 M341.25 346.03 C271.56 393.92, 274.63 394.98, 204.75 346.03 M341.25 346.03 C274.61 393.5, 273.75 397.27, 204.75 346.03 M204.75 346.03 C176.42 324.73, 144.91 300.63, 68.25 247.5 M204.75 346.03 C153.67 309.05, 104.6 273.12, 68.25 247.5 M68.25 247.5 C1.43 196.8, 1.77 199.44, 68.25 148.5 M68.25 247.5 C-1.34 199.49, 1.73 196.56, 68.25 148.5 M68.25 148.5 C104.12 122.13, 142.99 91.91, 204.75 49.5 M68.25 148.5 C122.6 108.61, 174.42 71.07, 204.75 49.5 M204.75 49.5 C273.77 1.72, 274.18 -0.05, 341.25 49.5 M204.75 49.5 C274.22 1.64, 274.02 -1.52, 341.25 49.5" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1274.7510177860318 1323.4099218361375) rotate(0 103.19999694824219 67.5)"><text x="103.19999694824219" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">3. Process </text><text x="103.19999694824219" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">the next </text><text x="103.19999694824219" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">batch</text></g><g stroke-linecap="round"><g transform="translate(1112.7047609314545 1433.629380372696) rotate(0 -126.54467608492541 59.89430046490236)"><path d="M-0.32 0.31 C-42.27 20.3, -210.18 99.86, -252.31 119.75 M1.71 -0.57 C-40.28 19.64, -210.25 101.02, -252.85 121.27" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1112.7047609314545 1433.629380372696) rotate(0 -126.54467608492541 59.89430046490236)"><path d="M-231.83 99.86 C-236.63 106.49, -242.5 110.59, -252.85 121.27 M-231.83 99.86 C-238.02 104.98, -243.18 111.33, -252.85 121.27" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1112.7047609314545 1433.629380372696) rotate(0 -126.54467608492541 59.89430046490236)"><path d="M-222.99 118.38 C-229.98 120.33, -238.08 119.76, -252.85 121.27 M-222.99 118.38 C-231.65 118.07, -239.38 119.05, -252.85 121.27" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round" transform="translate(198.40732001475544 2309.2648886748657) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C127.08 -2.72, 224.3 -1.61, 334.18 0 M32 0 C102.4 0.88, 172.86 2.09, 334.18 0 M334.18 0 C356.49 1.85, 367.11 10.01, 366.18 32 M334.18 0 C357.14 2.15, 365.99 12.72, 366.18 32 M366.18 32 C364.1 91.54, 365.08 151.17, 366.18 194.29 M366.18 32 C365.55 71.81, 364.58 110.28, 366.18 194.29 M366.18 194.29 C364.76 214.42, 356.11 227.41, 334.18 226.29 M366.18 194.29 C366.99 216.95, 356.6 224.45, 334.18 226.29 M334.18 226.29 C248.61 227.76, 163.03 226.29, 32 226.29 M334.18 226.29 C238.4 227.98, 141.83 228.07, 32 226.29 M32 226.29 C9.64 225.9, 0.38 216.13, 0 194.29 M32 226.29 C10.28 224.95, 1.1 215.35, 0 194.29 M0 194.29 C1.49 135.34, 1.74 78.46, 0 32 M0 194.29 C-0.3 133.92, 0.48 74.41, 0 32 M0 32 C1.53 10.24, 9.07 -0.19, 32 0 M0 32 C-0.42 10.39, 11.78 0.82, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(205.6630265855597 2354.9097978319796) rotate(0 175.8333282470703 67.5)"><text x="175.8333282470703" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">add to total votes</text><text x="175.8333282470703" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">for x project the </text><text x="175.8333282470703" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">current vote</text></g><g stroke-linecap="round" transform="translate(465.12200440206425 2027.144215609831) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C101.14 -0.13, 171.29 -0.81, 334.18 0 M32 0 C101.91 -1.46, 171.45 -2.38, 334.18 0 M334.18 0 C356.93 1.87, 366.01 12.45, 366.18 32 M334.18 0 C357.16 -1.3, 367.06 9.33, 366.18 32 M366.18 32 C364.88 72.94, 364.44 118.59, 366.18 194.29 M366.18 32 C365.04 87.34, 366.05 144.43, 366.18 194.29 M366.18 194.29 C366.89 216.78, 356.45 224.69, 334.18 226.29 M366.18 194.29 C365.77 214.8, 356.66 225.9, 334.18 226.29 M334.18 226.29 C236.19 225.82, 139.13 224.92, 32 226.29 M334.18 226.29 C263.1 224.97, 192.92 225.3, 32 226.29 M32 226.29 C10.33 225.13, 0.96 215.38, 0 194.29 M32 226.29 C12.07 224.95, -0.31 216.24, 0 194.29 M0 194.29 C0.78 148.83, 0.04 102.74, 0 32 M0 194.29 C-0.13 147.48, -1.69 101.01, 0 32 M0 32 C-0.37 10.43, 11.63 0.72, 32 0 M0 32 C-0.62 12.83, 9.54 -1.29, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(471.2610422716966 2072.789124766945) rotate(0 176.9499969482422 67.5)"><text x="176.9499969482422" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">add to the spent </text><text x="176.9499969482422" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">per this vote option</text><text x="176.9499969482422" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">the squared vote</text></g><g stroke-linecap="round" transform="translate(20.36935211050786 2009.9582971201903) rotate(0 183.08903481787456 113.14490915711372)"><path d="M32 0 C100.81 -0.4, 166.45 -0.05, 334.18 0 M32 0 C151.39 -2.38, 270.02 -2.39, 334.18 0 M334.18 0 C354.76 -0.18, 364.77 9.52, 366.18 32 M334.18 0 C353.62 -1.83, 367.8 11.69, 366.18 32 M366.18 32 C364.26 77.03, 366.58 121.57, 366.18 194.29 M366.18 32 C366.77 89.7, 367.44 147.95, 366.18 194.29 M366.18 194.29 C366.68 214.91, 354 226.64, 334.18 226.29 M366.18 194.29 C368.05 217.89, 355.98 224.77, 334.18 226.29 M334.18 226.29 C263.83 225.43, 194.42 224.91, 32 226.29 M334.18 226.29 C261.51 225.6, 187.86 226.22, 32 226.29 M32 226.29 C10.28 227.08, 1.31 217.05, 0 194.29 M32 226.29 C10.76 227.07, -0.53 215.33, 0 194.29 M0 194.29 C-1.4 135.09, -1.16 78.72, 0 32 M0 194.29 C-1.05 148.47, -1.27 100.21, 0 32 M0 32 C-0.13 8.93, 10.72 0, 32 0 M0 32 C1.1 10.65, 11.58 0.61, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(26.441724330726174 2055.603206277304) rotate(0 177.01666259765625 67.5)"><text x="177.01666259765625" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">add to the total </text><text x="177.01666259765625" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">spent voice credits </text><text x="177.01666259765625" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">the squared vote</text></g><g stroke-linecap="round" transform="translate(373.17925293129383 1515.496201329021) rotate(0 183.08903481787456 140)"><path d="M32 0 C98.17 -0.4, 163.62 -2.81, 334.18 0 M32 0 C138.11 -0.04, 245.62 -0.58, 334.18 0 M334.18 0 C356.82 -0.21, 365.66 12.45, 366.18 32 M334.18 0 C353.97 1.53, 368.01 11.5, 366.18 32 M366.18 32 C366.6 101.71, 366.92 168.95, 366.18 248 M366.18 32 C367.48 77.02, 366.82 123.69, 366.18 248 M366.18 248 C366.48 270.95, 353.97 280.51, 334.18 280 M366.18 248 C366.54 269.66, 357.49 282.14, 334.18 280 M334.18 280 C238.02 279.98, 141.51 280.82, 32 280 M334.18 280 C257.64 280.65, 181.47 281.59, 32 280 M32 280 C9.54 278.85, -1.94 271.26, 0 248 M32 280 C9.9 278.58, 1.33 268.67, 0 248 M0 248 C0.68 178.46, 2.63 111.76, 0 32 M0 248 C0.32 200.36, -0.1 154.12, 0 32 M0 32 C-0.37 11.97, 10.8 -1.61, 32 0 M0 32 C1.5 9.69, 12.64 1.48, 32 0" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(386.2682877491684 1520.496201329021) rotate(0 170 135)"><text x="170" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">for each ballot in </text><text x="170" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">this batch, loop </text><text x="170" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">through all of the </text><text x="170" y="135" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">vote options and </text><text x="170" y="180" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">do the processing </text><text x="170" y="225" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">below</text></g><g stroke-linecap="round"><g transform="translate(513.6355198039269 1861.2624341609815) rotate(0 1.8724999428559386 61.792498114242676)"><path d="M0.72 0.99 C1.26 21.66, 3.76 103.92, 4.31 124.51 M-0.36 0.47 C-0.02 20.77, 3.03 102.51, 3.65 122.87" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(513.6355198039269 1861.2624341609815) rotate(0 1.8724999428559386 61.792498114242676)"><path d="M-7.56 95.05 C-1.45 106.72, 2.8 117.02, 3.65 122.87 M-7.56 95.05 C-2.28 106.16, 1.11 116.86, 3.65 122.87" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(513.6355198039269 1861.2624341609815) rotate(0 1.8724999428559386 61.792498114242676)"><path d="M12.94 94.35 C11.1 106.41, 7.39 116.99, 3.65 122.87 M12.94 94.35 C10.51 105.69, 6.17 116.64, 3.65 122.87" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round"><g transform="translate(1355.3910326081686 508.5917908584188) rotate(0 -1.8724999428557112 65.53749799995433)"><path d="M-0.45 0.65 C-1.11 22.68, -4.27 110.44, -4.91 132.17 M1.52 -0.06 C1.29 21.67, -1.67 108.56, -2.81 130.62" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1355.3910326081686 508.5917908584188) rotate(0 -1.8724999428557112 65.53749799995433)"><path d="M-11.9 102.03 C-8.83 106.44, -6.07 113.83, -2.81 130.62 M-11.9 102.03 C-9.79 110.8, -5.89 119.18, -2.81 130.62" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1355.3910326081686 508.5917908584188) rotate(0 -1.8724999428557112 65.53749799995433)"><path d="M8.6 102.87 C7.15 107.02, 5.37 114.23, -2.81 130.62 M8.6 102.87 C4.71 111.48, 2.59 119.62, -2.81 130.62" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round"><g transform="translate(1370.3710321510139 1081.5767733723048) rotate(0 7.489999771423527 48.68499851425179)"><path d="M0.42 0.74 C2.57 17.08, 11.44 80.88, 14.01 96.86 M-0.81 0.08 C1.6 16.68, 13.49 81.88, 16.21 98.13" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1370.3710321510139 1081.5767733723048) rotate(0 7.489999771423527 48.68499851425179)"><path d="M1.23 72.14 C8.1 80.69, 11.92 93.95, 16.21 98.13 M1.23 72.14 C5.28 78.74, 9.38 85.27, 16.21 98.13" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1370.3710321510139 1081.5767733723048) rotate(0 7.489999771423527 48.68499851425179)"><path d="M21.45 68.59 C20.32 78.62, 16.18 93.27, 16.21 98.13 M21.45 68.59 C20.65 75.85, 19.89 83.24, 16.21 98.13" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round" transform="translate(1125.4662688370117 1774.8159346081234) rotate(0 272.14759196711384 325)"><path d="M341.25 81.5 C378.24 123.36, 408.68 166.48, 476.05 244.5 C543.3 326.6, 546.78 326.6, 476.05 407.5 C439.65 451.31, 406.09 486.92, 341.25 568.5 C269.71 648.91, 276.24 651.2, 204.75 568.5 C173.24 529.53, 137.83 493.39, 68.25 407.5 C1.03 322.46, 3.39 324.62, 68.25 244.5 C118.21 182.23, 163.69 127.5, 204.75 81.5 C270.78 2.01, 275.69 -3.13, 341.25 81.5" stroke="none" stroke-width="0" fill="#ffffff"></path><path d="M341.25 81.5 C390.73 138.36, 440.05 198.21, 476.05 244.5 M341.25 81.5 C381.05 128.56, 420.2 176.54, 476.05 244.5 M476.05 244.5 C542.63 324.28, 542.6 327.43, 476.05 407.5 M476.05 244.5 C545.12 326.83, 545.07 324.45, 476.05 407.5 M476.05 407.5 C430.46 461.9, 382.94 515.41, 341.25 568.5 M476.05 407.5 C432.88 460.7, 389.03 512.71, 341.25 568.5 M341.25 568.5 C275 649.11, 274.6 648.96, 204.75 568.5 M341.25 568.5 C271.35 648.72, 272.05 648.27, 204.75 568.5 M204.75 568.5 C162.02 516.49, 115.41 464.95, 68.25 407.5 M204.75 568.5 C155.6 510.67, 106.97 452.85, 68.25 407.5 M68.25 407.5 C0.12 326.08, 1.84 325.42, 68.25 244.5 M68.25 407.5 C-1.24 324.26, -0.86 325.39, 68.25 244.5 M68.25 244.5 C118.87 188.09, 166.61 128.24, 204.75 81.5 M68.25 244.5 C108.47 195.77, 147.79 148.43, 204.75 81.5 M204.75 81.5 C273.25 -0.93, 274.62 -0.07, 341.25 81.5 M204.75 81.5 C271.7 0.4, 273.04 -1.56, 341.25 81.5" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1270.8067350476194 1942.3159346081234) rotate(0 126.73332977294922 157.5)"><text x="126.73332977294922" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">4. If this is </text><text x="126.73332977294922" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">the last </text><text x="126.73332977294922" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">batch then fill</text><text x="126.73332977294922" y="135" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">the rest of </text><text x="126.73332977294922" y="180" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">the ballots </text><text x="126.73332977294922" y="225" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">array with </text><text x="126.73332977294922" y="270" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">empty ballots</text></g><g stroke-linecap="round"><g transform="translate(1385.9475303862678 1603.1486164610776) rotate(0 -1.9443884029765286 77.7755361190558)"><path d="M0.08 -0.04 C-0.79 25.68, -3.93 128.68, -4.54 154.52 M-1.33 -1.11 C-1.88 24.72, -1.69 129.32, -2.17 155.52" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1385.9475303862678 1603.1486164610776) rotate(0 -1.9443884029765286 77.7755361190558)"><path d="M-12.23 127.25 C-8.64 136.35, -6.66 148.15, -2.17 155.52 M-12.23 127.25 C-10.04 134.97, -6.62 141.06, -2.17 155.52" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1385.9475303862678 1603.1486164610776) rotate(0 -1.9443884029765286 77.7755361190558)"><path d="M8.29 127.4 C4.48 136.46, -0.94 148.21, -2.17 155.52 M8.29 127.4 C5.24 135.04, 3.42 141.1, -2.17 155.52" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round" transform="translate(1041.4307729558413 2633.620371873916) rotate(0 347.1560329347062 235)"><path d="M435 59 C496.74 105.72, 558.95 150.89, 607.31 177 C690.92 239.41, 696.38 239.18, 607.31 295 C575.21 319.86, 540.43 341.86, 435 411 C347.95 467.88, 350.28 468.85, 261 411 C212.33 376.9, 157.03 344.92, 87 295 C-0.2 233.56, -3.35 236.69, 87 177 C147.3 136.41, 205.36 96.3, 261 59 C345.04 -0.23, 349.12 0.5, 435 59" stroke="none" stroke-width="0" fill="#ffffff"></path><path d="M435 59 C489.26 97.72, 545.6 135.11, 607.31 177 M435 59 C480.9 91.88, 525.66 122.29, 607.31 177 M607.31 177 C693.18 236.28, 695.35 237.24, 607.31 295 M607.31 177 C692.77 237.65, 695.78 237.94, 607.31 295 M607.31 295 C554.57 330.07, 497.31 368.53, 435 411 M607.31 295 C539.64 339.69, 471.23 386.95, 435 411 M435 411 C347.29 471.83, 349.99 470.96, 261 411 M435 411 C347.1 469.27, 347.03 469.39, 261 411 M261 411 C215.11 381.97, 168.66 349.3, 87 295 M261 411 C195.43 367.43, 131.59 324.46, 87 295 M87 295 C1.32 236.15, 1.09 236.95, 87 177 M87 295 C0.02 234, -0.67 237.88, 87 177 M87 177 C153.38 131.23, 219.28 88.96, 261 59 M87 177 C138.8 142.13, 190.21 108.73, 261 59 M261 59 C348.53 -0.64, 348.44 1.04, 435 59 M261 59 C349.35 -2.07, 347.64 1.11, 435 59" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1222.3587955267099 2756.120371873916) rotate(0 166.14999389648438 112.5)"><text x="166.14999389648438" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">5. Generate </text><text x="166.14999389648438" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">random salts to </text><text x="166.14999389648438" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">be used while </text><text x="166.14999389648438" y="135" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">computing the new </text><text x="166.14999389648438" y="180" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">commitments</text></g><g stroke-linecap="round"><g transform="translate(1386.9654193929996 2449.371032218245) rotate(0 -1.6119932378437625 79.72832802402718)"><path d="M0.97 0.04 C0.49 26.5, -2.39 133.21, -3.13 159.89 M0.03 -0.99 C-0.58 25.62, -3.29 131.48, -4.02 157.99" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1386.9654193929996 2449.371032218245) rotate(0 -1.6119932378437625 79.72832802402718)"><path d="M-13.54 129.54 C-10.54 137.61, -7.21 145.02, -4.02 157.99 M-13.54 129.54 C-11.13 140.5, -6.29 150.32, -4.02 157.99" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1386.9654193929996 2449.371032218245) rotate(0 -1.6119932378437625 79.72832802402718)"><path d="M6.98 130.08 C4.22 138.17, 1.78 145.43, -4.02 157.99 M6.98 130.08 C2.15 140.81, -0.23 150.44, -4.02 157.99" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round"><g transform="translate(1388.0866492388755 3127.0642688287703) rotate(0 0 106.9708724143319)"><path d="M0.67 0.44 C0.3 36.09, -0.89 179.3, -1.09 214.92 M-0.44 -0.37 C-0.54 35.47, 1.25 177.32, 1.06 213.31" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1388.0866492388755 3127.0642688287703) rotate(0 0 106.9708724143319)"><path d="M-9.34 185.17 C-4.3 194.3, 0.66 206.22, 1.06 213.31 M-9.34 185.17 C-6.43 194.84, -2.35 203.76, 1.06 213.31" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1388.0866492388755 3127.0642688287703) rotate(0 0 106.9708724143319)"><path d="M11.18 185.07 C8.21 194.35, 5.15 206.31, 1.06 213.31 M11.18 185.07 C7.53 194.87, 5.06 203.82, 1.06 213.31" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g></g><mask></mask><g stroke-linecap="round" transform="translate(1037.0589383439928 3416.0760805259206) rotate(0 347.1560329347062 235)"><path d="M435 59 C488.78 93.26, 541.34 134.31, 607.31 177 C697.35 234.31, 693.67 238.91, 607.31 295 C554.57 330.38, 499.34 362.67, 435 411 C349.92 471.51, 351.17 472.56, 261 411 C207.22 375.65, 154.56 341.78, 87 295 C-2.23 233.09, 3 236.75, 87 177 C128.92 141.99, 179.27 110.13, 261 59 C345.37 -1.61, 348.97 -3.59, 435 59" stroke="none" stroke-width="0" fill="#ffffff"></path><path d="M435 59 C502.59 105.09, 568.86 149.87, 607.31 177 M435 59 C482.13 90.43, 528.77 121.96, 607.31 177 M607.31 177 C693.84 236.35, 696.06 236.06, 607.31 295 M607.31 177 C695.36 237.59, 693.98 236.26, 607.31 295 M607.31 295 C571.01 320.86, 534.26 343.7, 435 411 M607.31 295 C544.14 338.82, 478.9 382.04, 435 411 M435 411 C349.96 470.64, 349.39 468.12, 261 411 M435 411 C350.19 468.8, 347.2 467.91, 261 411 M261 411 C224.52 385.08, 185.41 359.13, 87 295 M261 411 C197.66 370.29, 135.08 328.67, 87 295 M87 295 C-0.37 234.52, 1.84 234.5, 87 177 M87 295 C-1.97 237.48, 0.51 234.29, 87 177 M87 177 C139.95 141.22, 194.76 102.52, 261 59 M87 177 C137.13 142.87, 187.96 109.22, 261 59 M261 59 C347.77 -0.84, 347.34 -0.4, 435 59 M261 59 C346.69 0.58, 347.93 -0.45, 435 59" stroke="#1e1e1e" stroke-width="2" fill="none"></path></g><g transform="translate(1229.4202952654473 3583.5760805259206) rotate(0 154.71665954589844 67.5)"><text x="154.71665954589844" y="0" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">6. Generate new </text><text x="154.71665954589844" y="45" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">commitments and </text><text x="154.71665954589844" y="90" font-family="Virgil, Segoe UI Emoji" font-size="36px" fill="#1e1e1e" text-anchor="middle" style="white-space: pre;" direction="ltr" dominant-baseline="text-before-edge">circuit inputs</text></g></svg>
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
// This file is not used in compilation. It is here just for a nice editor experience.
|
|
3
|
+
"extends": "./node_modules/@docusaurus/tsconfig/tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"baseUrl": ".",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"noUnusedLocals": true,
|
|
9
|
+
"noUnusedParameters": true,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"target": "ES2020",
|
|
12
|
+
"lib": ["es2020", "DOM", "ES2021.String"],
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noImplicitAny": true,
|
|
17
|
+
"strictPropertyInitialization": true,
|
|
18
|
+
"strictNullChecks": true,
|
|
19
|
+
"module": "commonjs",
|
|
20
|
+
"moduleResolution": "node",
|
|
21
|
+
"resolveJsonModule": true,
|
|
22
|
+
"skipLibCheck": true,
|
|
23
|
+
"esModuleInterop": true,
|
|
24
|
+
"isolatedModules": true,
|
|
25
|
+
"forceConsistentCasingInFileNames": true,
|
|
26
|
+
"allowSyntheticDefaultImports": true,
|
|
27
|
+
"composite": true,
|
|
28
|
+
"incremental": true,
|
|
29
|
+
"declarationMap": true,
|
|
30
|
+
"sourceMap": true,
|
|
31
|
+
"stripInternal": true
|
|
32
|
+
},
|
|
33
|
+
"include": ["./src", "./docusaurus.config.ts"]
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI v0.x Circuits
|
|
3
|
+
sidebar_label: MACI Circuits
|
|
4
|
+
sidebar_position: 3
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Circuits
|
|
8
|
+
|
|
9
|
+
There are two zk-SNARK circuits in MACI: one which allows the coordinator to prove the correctness of each state root transition, and the other which proves that they have correctly tallied all the votes.
|
|
10
|
+
|
|
11
|
+
Note that the circuit pseudocode in this specification does not describe zk-SNARK outputs. The difference between inputs and outputs is only semantic. As such, we consider so-called outputs as values computed from inputs, and then verified via a public input designated as an `output` in the circom code.
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
(Minimum Anti-Collusion Infrastructure, 2020, Koh Wei Jie: [YouTube MACI Explainer](https://www.youtube.com/watch?v=sKuNj_IQVYI))
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
(Minimum Anti-Collusion Infrastructure, 2020, Koh Wei Jie: [YouTube MACI Explainer](https://www.youtube.com/watch?v=sKuNj_IQVYI))
|
|
18
|
+
|
|
19
|
+
See:
|
|
20
|
+
|
|
21
|
+
- [The state root transition proof circuit](https://github.com/privacy-scaling-explorations/maci/blob/master/specs/04_state_root_transition_circuit.md), and
|
|
22
|
+
- [The quadratic vote tallying circuit](https://github.com/privacy-scaling-explorations/maci/blob/master/specs/05_quadratic_vote_tallying_circuit.md)
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI v0.x Contract
|
|
3
|
+
sidebar_label: MACI Contract
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Contract
|
|
8
|
+
|
|
9
|
+
There is an Ethereum contract (`MACI`) which provides the following interface:
|
|
10
|
+
|
|
11
|
+
## Merkle trees in storage
|
|
12
|
+
|
|
13
|
+
We maintain two Merkle roots in the MACI contract:
|
|
14
|
+
|
|
15
|
+
| Tree root | Represents |
|
|
16
|
+
| ------------- | ----------------------------------------------------------------------------------------- |
|
|
17
|
+
| `messageTree` | Messages — both valid and invalid — submitted by users. |
|
|
18
|
+
| `stateTree` | The current mapping between public keys and votes. Leaf 0 is reserved for a random value. |
|
|
19
|
+
|
|
20
|
+
The zero value (for empty leaves) for each tree is a nothing-up-my-sleeve value: the Keccak256 hash of the string 'Maci':
|
|
21
|
+
|
|
22
|
+
```solidity
|
|
23
|
+
uint256 SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
|
|
24
|
+
uint ZERO_VALUE = uint256(keccak256(abi.encodePacked('Maci'))) % SNARK_SCALAR_FIELD;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
which is equal to:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
5503045433092194285660061905880311622788666850989422096966288514930349325741
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Vote option trees
|
|
34
|
+
|
|
35
|
+
We use a Quinary Merkle tree (5 leaves per node) to store votes.
|
|
36
|
+
|
|
37
|
+
## `signUp(PubKey _userPubKey, bytes memory _signUpGatekeeperData, bytes memory _initialVoiceCreditProxyData)`
|
|
38
|
+
|
|
39
|
+
Signups can only occur during the signup period. The `signUp` function passes the sender's address, along with the `_signUpGatekeeperData` to a `SignUpGateway` contract, which determines whether or not to allow the user to sign up. For instance, this contract can be a simple whitelist.
|
|
40
|
+
|
|
41
|
+
The `signUp` function also passes `_initialVoiceCreditProxyData` to an `InitialVoiceCreditProxy` contract which determines how many voice credits the user should have initially. This can be a constant value for all users, or a different credits per user.
|
|
42
|
+
|
|
43
|
+
Next, it adds a new leaf to the state tree, starting from index `1` (as index 0 is reserved for invalid leaves). This leaf is the hash of the public key, the user's voice credits, the nonce `0`, and the root of an empty vote option tree.
|
|
44
|
+
|
|
45
|
+
The sign-up period ends after a predefined deadline. A later version of MACI will allow ongoing sign-ups where state trees will be merged once per week.
|
|
46
|
+
|
|
47
|
+
## `publishMessage(uint256 _msg, PubKey _encPubKey)`
|
|
48
|
+
|
|
49
|
+
This function ensures that the current block time is past the signup period, increments the message counter, and then updates the message root.
|
|
50
|
+
|
|
51
|
+
This function must be public and anyone should be able to call it.
|
|
52
|
+
|
|
53
|
+
## `batchProcessMessage(...)`
|
|
54
|
+
|
|
55
|
+
The parameters are:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
uint256 _newStateRoot,
|
|
59
|
+
uint256[] memory _stateTreeRoots,
|
|
60
|
+
PubKey[] memory _ecdhPubKeys,
|
|
61
|
+
uint256[8] memory _proof
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This function accepts a batch update state root transition zk-SNARK proof (`_proof`) and public inputs to the zk-SNARK.
|
|
65
|
+
|
|
66
|
+
It verifies the proof, updates the processed message counter, and updates the state root in storage with `newStateRoot`.
|
|
67
|
+
|
|
68
|
+
If the proof is valid, this means that the coordinator has correctly updated the state tree root according to the commands in the given batch of messages.
|
|
69
|
+
|
|
70
|
+
It also increments the message tree index by the number of commands whose processing is verified by the given zk-SNARK proof.
|
|
71
|
+
|
|
72
|
+
This function should, however, only do so if the processed message counter indicates that all previous messages have already been processed.
|
|
73
|
+
|
|
74
|
+
Although anyone may call this contract function, only the coordinator should know the ECDH shared keys used to encrypt the messages.
|
|
75
|
+
|
|
76
|
+
## `proveVoteTallyBatch()`
|
|
77
|
+
|
|
78
|
+
The parameters are:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
uint256 _intermediateStateRoot,
|
|
82
|
+
uint256 _newResultsCommitment,
|
|
83
|
+
uint256[] memory _finalSaltedResults,
|
|
84
|
+
uint256[8] memory _proof
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
This allows the coordinator to prove the correctness of their vote tally (in `_finalSaltedResults`). They do this in batches of state leaves. Each batch of state leaves is accumulated into an intermediate state root, and the Merkle root of all the intermediate state roots is the full state root. The proof shows that the result of adding the votes in the current batch to the culmulative results is computed correctly, but hides the results by salting and hashing them.
|
|
88
|
+
|
|
89
|
+
`_finalSaltedResults` can be any value but for the final batch, it must be the correct quadratic vote tally.
|
|
90
|
+
|
|
91
|
+
It does not matter that the contract does or does not restrict access to this function as anyone who can produce a valid proof should be able to tally the votes, and it should not be possible for anyone to tamper with the results anyway.
|
|
92
|
+
|
|
93
|
+
## State leaves
|
|
94
|
+
|
|
95
|
+
Each state leaf contains a user's public key, the Merkle root of their unique vote option tree, the number of voice credits they have left, and the nonce.
|
|
96
|
+
|
|
97
|
+
The nonce is either 0 or that of their most recent valid command. For instance, a user who has published 0 valid commands has a nonce of `0`, and their first valid command should have the nonce `1`.
|
|
98
|
+
|
|
99
|
+
Each user's public key is associated with exactly one state leaf. This leaf is the single source of truth of their vote option tree. Additionally, since a user may vote for multiple options, and allocate different amounts of voice credits to each option, we represent their votes as a Merkle tree.
|
|
100
|
+
|
|
101
|
+
### Schema
|
|
102
|
+
|
|
103
|
+
| Data | Bits | Comments |
|
|
104
|
+
| -------------------- | ---- | ---------------------------------------------------------------------------------------------- |
|
|
105
|
+
| `publicKeyX` | 253 | The public key's x-coordinate. |
|
|
106
|
+
| `publicKeyY` | 253 | The public key's y-coordinate. |
|
|
107
|
+
| `voteOptionTreeRoot` | 253 | The Merkle root of the tree which represents the options which this particular user voted for. |
|
|
108
|
+
| `voiceCreditBalance` | 32 | The number of remaining voice credits that the user can spend. |
|
|
109
|
+
| `nonce` | 32 | The nonce of the most recently inserted command for this user. |
|
|
110
|
+
|
|
111
|
+
The schema for leaves of the vote option tree, which we dub _vote leaves_, is as such:
|
|
112
|
+
|
|
113
|
+
| Data | Bits | Comments |
|
|
114
|
+
| ------- | ---- | ----------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `votes` | 32 | In the quadratic voting use case, this is the square root of the voice credits spent for this option. |
|
|
116
|
+
|
|
117
|
+
## Commands
|
|
118
|
+
|
|
119
|
+
Each command may convey a key-change request, a vote, or both. There is only one schema for all commands.
|
|
120
|
+
|
|
121
|
+
### Schema
|
|
122
|
+
|
|
123
|
+
Be careful not to confuse the following leaf schema for commands with the state leaf schema. Each user may submit multiple commands, but should only be associated with one state leaf.
|
|
124
|
+
|
|
125
|
+
| Data | Bits | Comments |
|
|
126
|
+
| ----------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
127
|
+
| `stateIndex` | State tree depth | The index of the leaf in the state tree which contains the public key used to sign the message. This is used to point to the state leaf to update. |
|
|
128
|
+
| `encPublicKeyX` | 253 | The x-coordinate of the ephemeral public key. Its associated private key is used to encrypt the message. |
|
|
129
|
+
| `encPublicKeyY` | 253 | The y-coordinate of the ephemeral public key. (We may use 1 bit, depending on the implementation) |
|
|
130
|
+
| `newPublicKeyX` | 253 | The new public key's x-coordinate. If no change is required, it should be that of the current key. |
|
|
131
|
+
| `newPublicKeyY` | 253 | The new public key's y-coordinate. If no change is required, it should be that of the current key. (We may use 1 bit, depending on the implementation) |
|
|
132
|
+
| `voteOptionIndex` | Vote option tree depth | The index of the leaf in the vote option tree to which this state leaf refers. |
|
|
133
|
+
| `newVoteWeight` | 32 | In the quadratic voting use case, this is the square root of the number of voice credits a user wishes to spend on this vote. |
|
|
134
|
+
| `nonce` | 32 | Prevents replay attacks. Starts from `0` and for each message. A message meant to fool a briber may contain _any nonce necessary_ to do so. For more details, see the section on nonces below. |
|
|
135
|
+
|
|
136
|
+
A useful rule of thumb is that the coordinator -- not the user -- should provide information that they know if they possess it. As such, the command does not contain information such as the Merkle path to the root of the vote option tree, since the coordinator should have it.
|
|
137
|
+
|
|
138
|
+
### About nonces
|
|
139
|
+
|
|
140
|
+
Messages are processed in reverse order of being published. This has important implications for the way that nonces should be set.
|
|
141
|
+
|
|
142
|
+
The last valid message per user should have a nonce of `1`. Each valid message that comes before it should have an increasing nonce.
|
|
143
|
+
|
|
144
|
+
`0` and negative values are invalid nonces.
|
|
145
|
+
|
|
146
|
+
For example, Alice publishes 5 messages, all of which vote for the same option:
|
|
147
|
+
|
|
148
|
+
- (a) Nonce: 2; vote weight: 10
|
|
149
|
+
- (b) Nonce: 1; vote weight: 20
|
|
150
|
+
- (c) Nonce: 3; vote weight: 10
|
|
151
|
+
- (d) Nonce: 2; vote weight: 1
|
|
152
|
+
- (e) Nonce: 1; vote weight: 0
|
|
153
|
+
|
|
154
|
+
Since messages are processed in reverse order, messages (e), (d), and (c) are valid, but (b) and (a) are not. As such, her option receives 11 votes.
|
|
155
|
+
|
|
156
|
+
(b) is invalid because at the point at which it is processed, the latest nonce is 3, but (b) gives a nonce of (1). The same applies for (a), whose nonce has been seen before.
|
|
157
|
+
|
|
158
|
+
Take another example, where Eve bribes Bob to vote for option 1, but Bob wants to vote for option 2 instead.
|
|
159
|
+
|
|
160
|
+
- (a) Nonce: 1; vote weight: 10; option: 1
|
|
161
|
+
- (b) Nonce: 1; vote weight: 10; option: 2
|
|
162
|
+
|
|
163
|
+
Bob casts vote (a) and shows it to Eve. Later, he secretly casts (b). Since (b) is processed first, it makes (a) invalid, but Eve has no way to tell.
|
|
164
|
+
|
|
165
|
+
If a user changes their mind, they may have to cast new votes to invalidate their old ones:
|
|
166
|
+
|
|
167
|
+
- (a) Nonce: 2; vote weight: 10; option: 1
|
|
168
|
+
- (b) Nonce: 1; vote weight: 10; option: 2
|
|
169
|
+
- (c) Nonce: 2; vote weight: 5; option: 1
|
|
170
|
+
- (d) Nonce: 1; vote weight: 5; option: 1
|
|
171
|
+
|
|
172
|
+
In the above example, if a user changes their mind after casting vote (b), they have to start over.
|
|
173
|
+
|
|
174
|
+
## Message verification
|
|
175
|
+
|
|
176
|
+
Given a `command` from a user Alice, we say that the state transition from an `oldStateRoot` to a `newStateRoot` is _valid_ if and only if (not in order of processing):
|
|
177
|
+
|
|
178
|
+
1. The nonce equals the total number of valid commands from Alice processed by the coordinator in order to produce `oldStateRoot`, minus one. See the section on nonces.
|
|
179
|
+
2. The decrypted message is signed by Alice's current EdDSA private key.
|
|
180
|
+
3. The signature is valid. <!--This includes edge cases such as whether the points of the signature (like `R8`) are valid points.-->
|
|
181
|
+
<!--4. The command has the correct length.-->
|
|
182
|
+
<!--5. Each command field has the correct length.-->
|
|
183
|
+
4. The specified vote option is indeed a choice that the user may make in the system.
|
|
184
|
+
5. The user has enough voice credits left.
|
|
185
|
+
6. Inserting the newly produced state leaf into the current state tree with `oldStateRoot` results in a new state tree with a root equal to `newStateRoot`.
|
|
186
|
+
7. The state leaf index is less or equal to than the maximum state leaf index (2 \*\* state tree depth) and is not equal to 0.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: MACI v0.x FAQ
|
|
3
|
+
sidebar_label: FAQ
|
|
4
|
+
sidebar_position: 6
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# FAQ
|
|
8
|
+
|
|
9
|
+
## I: Attacks and mitigations
|
|
10
|
+
|
|
11
|
+
### If the coordinator censors messages
|
|
12
|
+
|
|
13
|
+
If the coordinator censors a message `N` by excluding it from the final vote tally, the logic in `processMessage()` will prevent them from processing message `N+1` or any future message until they do so.
|
|
14
|
+
|
|
15
|
+
### If a user submits a message with an invalid signature
|
|
16
|
+
|
|
17
|
+
The coordinator should verify the message's signature off-chain and if it is invalid, set the no-op flag to true and pass it into the state transition proof circuit. If the coordinator does not do this, they will fail to generate a valid proof anyway.
|
|
18
|
+
|
|
19
|
+
### If an adversarial miner bribes a user and controls the `randomLeaf` value passed into the state transition snark
|
|
20
|
+
|
|
21
|
+
This adversary does not know the value of the other leaves of the state tree, so even if the coordinator updates leaf 0 with the adversary's entropy, the adversary cannot tell if the processed command is invalid.
|
|
22
|
+
|
|
23
|
+
### User creates a command that the snark cannot process
|
|
24
|
+
|
|
25
|
+
The system must be designed and built in a way such that this cannot happen.
|
|
26
|
+
|
|
27
|
+
### If a briber locks the user's key in trusted hardware
|
|
28
|
+
|
|
29
|
+
Assuming that the locked key is not the user's initial public key, the briber has no way to tell if the user has not already changed their key. This scenario is therefore the same as that in which the user gives a public key to a briber without trusted hardware.
|
|
30
|
+
|
|
31
|
+
> [name=kobi]
|
|
32
|
+
> I don't think the reasoning works, for example for a user with trusted hardware:
|
|
33
|
+
>
|
|
34
|
+
> 1. User has trusted hardware that allows a single key change. The user has initial public key $pk$ and public key $pk2$
|
|
35
|
+
> 2. User registers with $pk$
|
|
36
|
+
> 3. User changes to $pk2$, with the trusted hardware attesting this is the second public key and no further key changes are allowed
|
|
37
|
+
> 4. Briber gets $sk2$ and the attestation and then uses $pk2$
|
|
38
|
+
|
|
39
|
+
> [name=barry] I think that the attack is where you lock the initial key in trusted hardware. The solution is to use https://www.vitalik.ca/general/2019/10/01/story.html
|
|
40
|
+
|
|
41
|
+
### Deposit my public key and I will pay you
|
|
42
|
+
|
|
43
|
+
> [name=barry] This is the most serious attack IMO. The deposit stake is weak prevention for this.
|
|
44
|
+
|
|
45
|
+
### If an attacker fills up the message tree with such a large number of commands that the coordinator cannot afford to generate enough proofs to process them all
|
|
46
|
+
|
|
47
|
+
Each user should be allowed to publish at no cost as many messages as there are vote options, plus a small number (e.g. 2). Each subsequent message should cost the user an increasing amount of ETH. When the coordinator processes the message, the contract should return the ETH to the user. As such, the majority of non-malicious users will not have to pay any more than the gas costs to vote, and spammers must put up capital to attack the coordinator.
|
|
48
|
+
|
|
49
|
+
> [barry] there is no way to enforce this limit without allowing for bribary.
|
|
50
|
+
> [name=wei jie] how does this have to do with bribery? i understand this to only be an anti-spam mechanism.
|
|
51
|
+
|
|
52
|
+
## II: Claims / required invariants
|
|
53
|
+
|
|
54
|
+
1. It is impossible for a coordinator to find a collision in message decryptions. i.e. they cannot decrypt a message to a different command.
|
|
55
|
+
2. It is impossible for a user to create a message that the coordinator is not able to process.
|
|
56
|
+
3. It is impossible for a user to create a message such that the coordinator is unable to create a zk-SNARK proof of a state root transition.
|
|
57
|
+
4. No-one but the coordinator can trustlessly bribe someone.
|
|
58
|
+
|
|
59
|
+
## III: Desired features not described in this specification
|
|
60
|
+
|
|
61
|
+
- A perpetual sign-up process
|
|
62
|
+
- Reuse the MACI contract for a new vote. This requires the operator to zero out each user's vote option tree.
|
|
63
|
+
- Mitigations for some of the attacks described above
|
|
64
|
+
|
|
65
|
+
## IV: Quadratic and sybil-resistant million-dollar-homepages
|
|
66
|
+
|
|
67
|
+
Another use case for MACI is a [million-dollar-homepage](http://www.milliondollarhomepage.com/) style bulletin board where users can post and quadratically vote on images. A user who owns a [POAP](https://www.poap.xyz/) token from a real-life event can sign up and receive 2 ^ 32 voting tokens per week. To add a picture to the board, they have to burn 1 ETH, which disincentivises spam. The visual prominence of size of each picture scales with the sum of square roots of the votes that it receives.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction to MACI v0.x
|
|
3
|
+
description: High-level introduction to Minimum Anti-Collusion Infrastructure (MACI) v0.x
|
|
4
|
+
sidebar_label: Introduction
|
|
5
|
+
sidebar_position: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Minimum Anti-Collusion Infrastructure
|
|
9
|
+
|
|
10
|
+
_Barry WhiteHat, Kendrick Tan, Kobi Gurkan, Chih-Cheng Liang, and Koh Wei Jie_
|
|
11
|
+
|
|
12
|
+
## Introduction
|
|
13
|
+
|
|
14
|
+
This specification is for an implementation of Minimum Anti-Collusion Infrastructure (MACI). Originally proposed by Vitalik Buterin in [this ethresear.ch post](https://ethresear.ch/t/minimal-anti-collusion-infrastructure/5413), systems built with MACI make collusion among participants difficult, while retaining the censorship resistance and correct-execution benefits of smart contracts. Although MACI can provide collusion resistance only if the coordinator is honest, a dishonest coordinator can neither censor nor tamper with its execution.
|
|
15
|
+
|
|
16
|
+
Note that MACI presumes an identity system where each legitimate member controls a unique Ethereum private key.
|
|
17
|
+
|
|
18
|
+
## High-level process
|
|
19
|
+
|
|
20
|
+
Whitelisted voters named Alice, Bob, and Charlie register to vote by sending their public key to a smart contract. Additionally, there is a central coordinator Dave, whose public key is known to all.
|
|
21
|
+
|
|
22
|
+
A later version of MACI will have to mitigate a [vote-buying attack](https://ethresear.ch/t/minimal-anti-collusion-infrastructure/5413/3) where a user may be bribed immediately when the voting period starts, such that their very first message is influenced by a briber. One solution to this is to have the contract to mandate that the first message that each participant sends is to change their key (see below). For the sake of simplicity, however, this specification will not address this issue.
|
|
23
|
+
|
|
24
|
+
When Alice casts her vote, she signs her vote with her private key, encrypts her signature with Dave's public key, and submits the result to the smart contract.
|
|
25
|
+
|
|
26
|
+
Each voter may change her keypair at any time. To do this, she creates and signs a key-change command, encrypts it, and sends it to the smart contract. This makes it impossible for a briber to ever be sure that their bribe has any effect on the bribee's vote.
|
|
27
|
+
|
|
28
|
+
If Bob, for instance, bribes Alice to vote a certain way, she can simply use the first public key she had registered — which is now void — to cast a vote. Since said vote is encrypted, as was the key-changing message which Alice had previously sent to Dave, Bob has no way to tell if Alice had indeed voted the way he wanted her to.
|
|
29
|
+
|
|
30
|
+
Even if Alice reveals the cleartext of her vote to Bob, she just needs to not show him the updated key command that she previously used to invalidate that key. In short, as long as she had submitted a single encrypted command before her vote, there is no way to tell if said vote is valid or not.
|
|
31
|
+
|
|
32
|
+
## Technical process
|
|
33
|
+
|
|
34
|
+
Refer to the [Glossary](#glossary) for definitions of terms.
|
|
35
|
+
|
|
36
|
+
1. The coordinator deploys the MACI contract to an Ethereum blockchain and starts the sign-up period. The same transaction that deploys the contract also stores the value of an empty vote option tree.
|
|
37
|
+
2. To sign up, each user creates an EdDSA keypair and invokes the contract's `signUp()` function. Alternatively, there is a mechanism where some contract function checks if the user owns a particular ERC721 token and adds them to the whitelist. It in turn generates a new leaf to the state tree and updates the state tree root.
|
|
38
|
+
|
|
39
|
+
<!--Additionally, the user must pay a deposit, which discourages them from sharing their EdDSA private key with a potential briber. The user may redeem this deposit anytime after the voting period starts.-->
|
|
40
|
+
|
|
41
|
+
3. The signup period ends after a fixed amount of time. From that point onwards, users may no longer invoke `signUp()` in this contract.
|
|
42
|
+
|
|
43
|
+
4. Each user votes. To do this, they:
|
|
44
|
+
|
|
45
|
+
- Sign their command using the key which they had signed up with and then use a random (ephemeral) key as well as the coordinator's public key to generate a shared key (via ECDH) encrypt it.
|
|
46
|
+
|
|
47
|
+
- If they are bribed, the user should sign it using an old public key which has already been replaced with a new one.
|
|
48
|
+
|
|
49
|
+
- Otherwise, the user should use the most current public key they have registered.
|
|
50
|
+
|
|
51
|
+
- Submit the message, as well as the ephemeral public key in the clear to the contract using its `publishMessage()` function, which hashes the command and inserts it into the message tree.
|
|
52
|
+
|
|
53
|
+
5. The coordinator processes all the commands after the voting period ends.
|
|
54
|
+
|
|
55
|
+
6. For each batch of commands, they perform the following steps:
|
|
56
|
+
|
|
57
|
+
- Generate a new state root which is the result of:
|
|
58
|
+
|
|
59
|
+
- For each valid command, in reverse order, update the state leaf accordingly
|
|
60
|
+
|
|
61
|
+
- Ignore all invalid commands
|
|
62
|
+
|
|
63
|
+
- Update leaf 0 with a random leaf
|
|
64
|
+
|
|
65
|
+
- Generate a zk-SNARK proof that this state root transition is valid. (Note that "state root" refers to the root of the state tree in the contract, not the Ethereum state root as defined in the Yellow Paper.)
|
|
66
|
+
|
|
67
|
+
- An invalid message can one which is signed by a public key which a user had already replaced with another key, among other criteria. To allow a bribee to plausibly claim that they have voted correctly even if they use an old public key, we insert a random leaf at index `0` whether or not the message is valid.
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
_Figure 1: The relationship between each users, the coordinator, the contract functions, as well as the state tree and the message tree._
|
|
72
|
+
|
|
73
|
+
7. When the voting period ends, the coordinator tallies all the votes. It then generates zk-SNARK proof that the computed result is valid without revealing the plaintext of the votes. While this specification specifically describes a quadratic voting use case, the circuit used to generate this proof should differ based on the particular nature of the voting system.
|
|
74
|
+
|
|
75
|
+
## Availability and visibility of messages
|
|
76
|
+
|
|
77
|
+
The coordinator may decrypt all commands.
|
|
78
|
+
|
|
79
|
+
Each participant may only decrypt their own messages, and should not be able to decrypt other users' messages or access their commands.
|
|
80
|
+
|
|
81
|
+
No-one else should be able to decrypt any messages.
|
|
82
|
+
|
|
83
|
+
## System components
|
|
84
|
+
|
|
85
|
+
### Roles
|
|
86
|
+
|
|
87
|
+
There are two roles: users and a coordinator.
|
|
88
|
+
|
|
89
|
+
### Cryptographic operations
|
|
90
|
+
|
|
91
|
+
#### Key generation
|
|
92
|
+
|
|
93
|
+
Each user owns an EdDSA keypair, as does the coordinator. Every user should have a copy of the coordinator's public key, which is stored and available from the smart contract. Likewise, the coordinator should have a copy of each user's public key, which they publish on-chain to sign up.
|
|
94
|
+
|
|
95
|
+
We define an EdDSA private key as a random value (initially 256 bits large) modulo the snark field size as described in [EIP197](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-197.md). This results in a key size of roughly 253 bits and no more than 254 bits. Additionally, we use [this efficient algorithm](http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/libc/crypt/arc4random_uniform.c) to prevent modulo bias.
|
|
96
|
+
|
|
97
|
+
#### Command signing and encryption
|
|
98
|
+
|
|
99
|
+
The following steps are needed to sign and encrypt a message:
|
|
100
|
+
|
|
101
|
+
1. Hash the command
|
|
102
|
+
2. Sign the hash with the user's EdDSA private key
|
|
103
|
+
3. Generate an ECDH shared key using a random private key (the ephemeral key) and the coordinator's public key.
|
|
104
|
+
4. Encrypt both the signature and the data included in the command with the shared key
|
|
105
|
+
5. Note that when we call `publishMessage`, we pass in the encrypted data, the signing public key, and random public key.
|
|
106
|
+
|
|
107
|
+
## Glossary
|
|
108
|
+
|
|
109
|
+
Some terms in this specification are similar to one another but should not be used interchangeably. This glossary should help to resolve such ambiguities.
|
|
110
|
+
|
|
111
|
+
| Term | Meaning |
|
|
112
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| Command | Unencrypted data whose fields include the user's public key, vote etc. |
|
|
114
|
+
| Message | An encrypted command and signature (`Encrypt([Command, Signature], Key)`. |
|
|
115
|
+
| State | The mapping between each user's public key and the full set of information about which options they voted for and the weight per vote. Note that this does not refer to the Ethereum state as defined in the Yellow Paper. |
|
|
116
|
+
| Vote | The options which the user voted for |
|
|
117
|
+
| Vote option | One out of many possible choices which a user may vote for |
|
|
118
|
+
| Vote option tree | The unique tree of weights that each user assigns to vote options. This represents the full set of information about which options a user had voted for and how many voice credits they had spent per vote. |
|
|
119
|
+
| Voice credit | One unit which denotes the strength of a user's vote for a particular option. In a quadratic voting use case, users start out with a limited number of voice credits and spend them on votes. |
|