From 3aa4f33aa7f4558f16da65b5a3fb93b282bd4fe5 Mon Sep 17 00:00:00 2001 From: 0xmad <0xmad@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:26:35 -0600 Subject: [PATCH] docs(cli): clarify cli commands - [x] Circuit files clarification - [x] Tally file and verify command clarification --- cli/ts/commands/checkVerifyingKeys.ts | 1 + cli/ts/commands/genProofs.ts | 1 + cli/ts/commands/setVerifyingKeys.ts | 1 + cli/ts/commands/verify.ts | 14 +++++--- cli/ts/index.ts | 40 ++++++++++++++++----- website/versioned_docs/version-v1.x/cli.md | 42 +++++++++++----------- 6 files changed, 65 insertions(+), 34 deletions(-) diff --git a/cli/ts/commands/checkVerifyingKeys.ts b/cli/ts/commands/checkVerifyingKeys.ts index ad6718f4ee..bd866f3e0c 100644 --- a/cli/ts/commands/checkVerifyingKeys.ts +++ b/cli/ts/commands/checkVerifyingKeys.ts @@ -21,6 +21,7 @@ import { /** * Command to confirm that the verifying keys in the contract match the * local ones + * @note see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing * @param stateTreeDepth the depth of the state tree * @param intStateTreeDepth the depth of the state subtree * @param messageTreeDepth the depth of the message tree diff --git a/cli/ts/commands/genProofs.ts b/cli/ts/commands/genProofs.ts index 81fc728cea..d17711a88d 100644 --- a/cli/ts/commands/genProofs.ts +++ b/cli/ts/commands/genProofs.ts @@ -35,6 +35,7 @@ import { Proof, TallyData } from "../utils/interfaces"; /** * Generate proofs for the message processing, tally and subsidy calculations + * @note see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing * @param outputDir - the directory to store the proofs * @param tallyFile - the file to store the tally proof * @param tallyZkey - the path to the tally zkey file diff --git a/cli/ts/commands/setVerifyingKeys.ts b/cli/ts/commands/setVerifyingKeys.ts index 6c73a02195..fffd426b87 100644 --- a/cli/ts/commands/setVerifyingKeys.ts +++ b/cli/ts/commands/setVerifyingKeys.ts @@ -14,6 +14,7 @@ import { info, logError, logGreen, logYellow, success } from "../utils/theme"; /** * Function that sets the verifying keys in the VkRegistry contract + * @note see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing * @param stateTreeDepth - the depth of the state tree * @param intStateTreeDepth - the depth of the state subtree * @param messageTreeDepth - the depth of the message tree diff --git a/cli/ts/commands/verify.ts b/cli/ts/commands/verify.ts index 2a1d0b33b9..61cbc8783c 100644 --- a/cli/ts/commands/verify.ts +++ b/cli/ts/commands/verify.ts @@ -10,10 +10,10 @@ import { banner, contractExists, info, logError, logGreen, logYellow, readContra import { verifyPerVOSpentVoiceCredits, verifyTallyResults } from "../utils/verifiers"; /** - * Verify the results of a poll and optionally the subsidy results + * Verify the results of a poll and optionally the subsidy results on-chain * @param pollId - the id of the poll * @param subsidyEnabled - whether to deploy subsidy contract - * @param tallyFile - the path to the tally file + * @param tallyFile - the path to the tally file with results, per vote option spent credits, spent voice credits total * @param maciAddress - the address of the MACI contract * @param tallyAddress - the address of the Tally contract * @param subsidyAddress - the address of the Subsidy contract @@ -51,6 +51,7 @@ export const verify = async ( const tallyContractAddress = tallyAddress || readContractAddress(`Tally-${pollId}`); let subsidyContractAddress = ""; + if (subsidyEnabled) { subsidyContractAddress = subsidyAddress || readContractAddress(`Subsidy-${pollId}`); } @@ -79,9 +80,9 @@ export const verify = async ( : undefined; // verification - const onChainTallycomment = BigInt(await tallyContract.tallyCommitment()); + const onChainTallyCommitment = BigInt(await tallyContract.tallyCommitment()); - logYellow(quiet, info(`on-chain tally commitment: ${onChainTallycomment.toString(16)}`)); + logYellow(quiet, info(`on-chain tally commitment: ${onChainTallyCommitment.toString(16)}`)); // ensure we have either tally data or tally file if (!(tallyData || tallyFile)) { @@ -89,6 +90,7 @@ export const verify = async ( } // if we have the data as param, then use that let tallyResults: TallyData; + if (tallyData) { tallyResults = tallyData; } else { @@ -149,7 +151,7 @@ export const verify = async ( newPerVOSpentVoiceCreditsCommitment, ]); - if (onChainTallycomment !== newTallyCommitment) { + if (onChainTallyCommitment !== newTallyCommitment) { logError("The on-chain tally commitment does not match."); } logGreen(quiet, success("The on-chain tally commitment matches.")); @@ -161,6 +163,7 @@ export const verify = async ( newResultsCommitment, newPerVOSpentVoiceCreditsCommitment, ); + if (isValid) { logGreen(quiet, success("The on-chain verification of total spent voice credits passed.")); } else { @@ -175,6 +178,7 @@ export const verify = async ( newSpentVoiceCreditsCommitment, newResultsCommitment, ); + if (failedSpentCredits.length === 0) { logGreen(quiet, success("The on-chain verification of per vote option spent voice credits passed")); } else { diff --git a/cli/ts/index.ts b/cli/ts/index.ts index c2b853c71f..12cb31c179 100644 --- a/cli/ts/index.ts +++ b/cli/ts/index.ts @@ -72,9 +72,18 @@ program .requiredOption("-m, --msg-tree-depth ", "the message tree depth", parseInt) .requiredOption("-v, --vote-option-tree-depth ", "the vote option tree depth", parseInt) .requiredOption("-b, --msg-batch-depth ", "the message batch depth", parseInt) - .requiredOption("-p, --process-messages-zkey ", "the process messages zkey path") - .requiredOption("-t, --tally-votes-zkey ", "the tally votes zkey path") - .option("-ss, --subsidy-zkey ", "the subsidy zkey path") + .requiredOption( + "-p, --process-messages-zkey ", + "the process messages zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", + ) + .requiredOption( + "-t, --tally-votes-zkey ", + "the tally votes zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", + ) + .option( + "-ss, --subsidy-zkey ", + "the subsidy zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", + ) .action(async (cmdOptions) => { try { await checkVerifyingKeys( @@ -199,12 +208,21 @@ program .requiredOption("-m, --msg-tree-depth ", "the message tree depth", parseInt) .requiredOption("-v, --vote-option-tree-depth ", "the vote option tree depth", parseInt) .requiredOption("-b, --msg-batch-depth ", "the message batch depth", parseInt) - .requiredOption("-p, --process-messages-zkey ", "the process messages zkey path") - .requiredOption("-t, --tally-votes-zkey ", "the tally votes zkey path") + .requiredOption( + "-p, --process-messages-zkey ", + "the process messages zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", + ) + .requiredOption( + "-t, --tally-votes-zkey ", + "the tally votes zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", + ) .option("-k, --vk-registry ", "the vk registry contract address") .option("-q, --quiet ", "whether to print values to the console", (value) => value === "true", false) .option("-r, --rpc-provider ", "the rpc provider URL") - .option("-ss, --subsidy-zkey ", "the subsidy zkey path") + .option( + "-ss, --subsidy-zkey ", + "the subsidy zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)", + ) .action(async (cmdObj) => { try { await setVerifyingKeys( @@ -351,7 +369,10 @@ program .command("verify") .description("verify the results of a poll and optionally the subsidy results") .requiredOption("-o, --poll-id ", "the poll id", parseInt) - .requiredOption("-t, --tally-file ", "the tally file") + .requiredOption( + "-t, --tally-file ", + "the tally file with results, per vote option spent credits, spent voice credits total", + ) .requiredOption( "-se, --subsidy-enabled ", "whether to deploy subsidy contract", @@ -387,7 +408,10 @@ program .option("-sk, --privkey ", "your serialized MACI private key") .option("-x, --contract ", "the MACI contract address") .requiredOption("-o, --poll-id ", "the poll id", parseInt) - .requiredOption("-t, --tally-file ", "the tally file") + .requiredOption( + "-t, --tally-file ", + "the tally file with results, per vote option spent credits, spent voice credits total", + ) .option("-s, --subsidy-file ", "the subsidy file") .option("-r, --rapidsnark ", "the path to the rapidsnark binary") .option("-wp, --process-witnessgen ", "the path to the process witness generation binary") diff --git a/website/versioned_docs/version-v1.x/cli.md b/website/versioned_docs/version-v1.x/cli.md index e43c11c5ab..1be69d14e5 100644 --- a/website/versioned_docs/version-v1.x/cli.md +++ b/website/versioned_docs/version-v1.x/cli.md @@ -27,27 +27,27 @@ pnpm run hardhat ## Subcommands -| Command | Description | Options | -| -------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `create` | Deploy the contracts | `-v, --vkRegistryAddress `: The vk registry contract address
`-i, --initialVoiceCredits `: The initial voice credits
`-p, --initialVoiceCreditsProxyAddress `: The initial voice credits proxy contract address
`-g, --signupGatekeeperAddress `: The signup gatekeeper contract address
`-q, --quiet`: Whether to print values to the console
`-s, --stateTreeDepth `: The state tree depth | -| `checkVerifyingKeys` | Check that the verifying keys in the contract match the local ones | `-q, --quiet`: Whether to print values to the console
`-vk, --vk-contract `: The VkRegistry contract address
`-s, --state-tree-depth `: The state tree depth
`-i, --int-state-tree-depth `: The intermediate state tree depth
`-m, --msg-tree-depth `: The message tree depth
`-v, --vote-option-tree-depth `: The vote option tree depth
`-b, --msg-batch-depth `: The message batch depth
`-p, --process-messages-zkey `: The process messages zkey path
`-t, --tally-votes-zkey `: The tally votes zkey path
`-ss, --subsidy-zkey `: The subsidy zkey path | -| `genMaciPubKey` | Generate a new MACI public key | `-sk, --privkey `: The private key | -| `genMaciKeyPair` | Generate a new MACI key pair | No options | -| `airdrop` | Airdrop topup credits to the coordinator | `-a, --amount `: The amount of topup
`-x, --contract `: The MACI contract address
`-o, --poll-id `: Poll id
`-t, --token-address `: The token address
`-q, --quiet`: Whether to print values to the console | -| `deployVkRegistry` | Deploy a new verification key registry contract | `-q, --quiet`: Whether to print values to the console | -| `show` | Show the deployed contract addresses | No options | -| `deployPoll` | Deploy a new poll | `-t, --duration `: The poll duration
`-g, --max-messages `: The max messages
`-mv, --max-vote-options `: The max vote options
`-i, --int-state-tree-depth `: The int state tree depth
`-b, --msg-batch-depth `: The message tree sub depth
`-m, --msg-tree-depth `: The message tree depth
`-v, --vote-option-tree-depth `: The vote option tree depth
`-pk, --pubkey `: The coordinator public key
`-x, --maci-address `: The MACI contract address
`-q, --quiet`: Whether to print values to the console | -| `setVerifyingKeys` | Set the verifying keys | `-s, --state-tree-depth `: The state tree depth
`-i, --int-state-tree-depth `: The intermediate state tree depth
`-m, --msg-tree-depth `: The message tree depth
`-v, --vote-option-tree-depth `: The vote option tree depth
`-b, --msg-batch-depth `: The message batch depth
`-p, --process-messages-zkey `: The process messages zkey path
`-t, --tally-votes-zkey `: The tally votes zkey path
`-k, --vk-registry `: The vk registry contract address
`-q, --quiet`: Whether to print values to the console
`-ss, --subsidy-zkey `: The subsidy zkey path | -| `publish` | Publish a new message to a MACI Poll contract | `-p, --pubkey `: The MACI public key which should replace the user's public key in the state tree
`-x, --contract `: The MACI contract address
`-sk, --privkey `: Your serialized MACI private key
`-i, --state-index `: The user's state index
`-v, --vote-option-index `: The vote option index
`-n, --nonce `: The message nonce
`-s, --salt `: The message salt
`-o, --poll-id `: The poll id
`-w, --new-vote-weight `: The new vote weight
`-q, --quiet`: Whether to print values to the console | -| `mergeMessages` | Merge the message accumulator queue | `-q, --quiet`: Whether to print values to the console
`-x, --maci-contract-address `: The MACI contract address
`-o, --poll-id `: The poll id
`-n, --num-queue-ops `: The number of queue operations | -| `mergeSignups` | Merge the signups accumulator queue | `-q, --quiet`: Whether to print values to the console
`-x, --maci-contract-address `: The MACI contract address
`-o, --poll-id `: The poll id
`-n, --num-queue-ops `: The number of queue operations | -| `timeTravel` | Fast-forward the time (only works for local hardhat testing) | `-s, --seconds `: The number of seconds to fast-forward
`-q, --quiet`: Whether to print values to the console | -| `signup` | Sign up to a MACI contract | `-p, --pubkey `: The MACI public key
`-x, --maci-address `: The MACI contract address
`-s, --sg-data `: The signup gateway data
`-i, --ivcp-data `: The initial voice credit proxy data
`-q, --quiet`: Whether to print values to the console | -| `topup` | Top up an account with voice credits | `-a, --amount `: The amount of topup
`-x, --maci-address `: The MACI contract address
`-i, --state-index `: State leaf index
`-o, --poll-id `: Poll id
`-q, --quiet`: Whether to print values to the console | -| `fundWallet` | Fund a wallet with Ether | `-a, --amount `: The amount of Ether
`-w, --address
`: The address to fund
`-q, --quiet`: Whether to print values to the console | -| `verify` | Verify the results of a poll and optionally the subsidy results | `-o, --poll-id `: The poll id
`-t, --tally-file `: The tally file
`-s, --subsidy-file `: The subsidy file
`-x, --contract `: The MACI contract address
`-tc, --tally-contract `: The tally contract address
`-sc, --subsidy-contract `: The subsidy contract address
`-q, --quiet`: Whether to print values to the console | -| `genProofs` | Generate the proofs for a poll | `-sk, --privkey `: Your serialized MACI private key
`-x, --contract `: The MACI contract address
`-o, --poll-id `: The poll id
`-t, --tally-file `: The tally file
`-s, --subsidy-file `: The subsidy file
`-r, --rapidsnark `: The path to the rapidsnark binary
`-wp, --process-witnessgen `: The path to the process witness generation binary
`-wt, --tally-witnessgen `: The path to the tally witness generation binary
`-ws, --subsidy-witnessgen `: The path to the subsidy witness generation binary
`-zp, --process-zkey `-zt, --tally-zkey `: The path to the tally zkey
`-zs, --subsidy-zkey `: The path to the subsidy zkey
`-q, --quiet`: Whether to print values to the console
`-f, --output `: The output directory for proofs
`-tx, --transaction-hash :` Transaction hash of MACI contract creation
`-w, --wasm`: Whether to use the wasm binaries
`-pw, --process-wasm `: The path to the process witness generation wasm binary
`-tw, --tally-wasm `: The path to the tally witness generation wasm binary
`-sw, --subsidy-wasm `: The path to the subsidy witness generation wasm binary | -| proveOnChain | Prove the results of a poll on chain | `-o, --poll-id `: The poll id
`-q, --quiet`: Whether to print values to the console
`-x, --contract `: The MACI contract address
`-p, --message-processor-address `: The message processor contract address
`-t, --tally-contract `: The tally contract address
`-s, --subsidy-contract `: The subsidy contract address
`-f, --proof-dir `: The proof output directory from the genProofs subcommand | +| Command | Description | Options | +| -------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `create` | Deploy the contracts | `-v, --vkRegistryAddress `: The vk registry contract address
`-i, --initialVoiceCredits `: The initial voice credits
`-p, --initialVoiceCreditsProxyAddress `: The initial voice credits proxy contract address
`-g, --signupGatekeeperAddress `: The signup gatekeeper contract address
`-q, --quiet`: Whether to print values to the console
`-s, --stateTreeDepth `: The state tree depth | +| `checkVerifyingKeys` | Check that the verifying keys in the contract match the local ones | `-q, --quiet`: Whether to print values to the console
`-vk, --vk-contract `: The VkRegistry contract address
`-s, --state-tree-depth `: The state tree depth
`-i, --int-state-tree-depth `: The intermediate state tree depth
`-m, --msg-tree-depth `: The message tree depth
`-v, --vote-option-tree-depth `: The vote option tree depth
`-b, --msg-batch-depth `: The message batch depth
`-p, --process-messages-zkey `: The process messages zkey path (see different options to use specific circuits [Trusted setup](https://maci.pse.dev/docs/trusted-setup) or [Testing](https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing))
`-t, --tally-votes-zkey `: The tally votes zkey path (see different options to use specific circuits [Trusted setup](https://maci.pse.dev/docs/trusted-setup) or [Testing](https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing))
`-ss, --subsidy-zkey `: The subsidy zkey path (see different options to use specific circuits [Trusted setup](https://maci.pse.dev/docs/trusted-setup) or [Testing](https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)) | +| `genMaciPubKey` | Generate a new MACI public key | `-sk, --privkey `: The private key | +| `genMaciKeyPair` | Generate a new MACI key pair | No options | +| `airdrop` | Airdrop topup credits to the coordinator | `-a, --amount `: The amount of topup
`-x, --contract `: The MACI contract address
`-o, --poll-id `: Poll id
`-t, --token-address `: The token address
`-q, --quiet`: Whether to print values to the console | +| `deployVkRegistry` | Deploy a new verification key registry contract | `-q, --quiet`: Whether to print values to the console | +| `show` | Show the deployed contract addresses | No options | +| `deployPoll` | Deploy a new poll | `-t, --duration `: The poll duration
`-g, --max-messages `: The max messages
`-mv, --max-vote-options `: The max vote options
`-i, --int-state-tree-depth `: The int state tree depth
`-b, --msg-batch-depth `: The message tree sub depth
`-m, --msg-tree-depth `: The message tree depth
`-v, --vote-option-tree-depth `: The vote option tree depth
`-pk, --pubkey `: The coordinator public key
`-x, --maci-address `: The MACI contract address
`-q, --quiet`: Whether to print values to the console | +| `setVerifyingKeys` | Set the verifying keys | `-s, --state-tree-depth `: The state tree depth
`-i, --int-state-tree-depth `: The intermediate state tree depth
`-m, --msg-tree-depth `: The message tree depth
`-v, --vote-option-tree-depth `: The vote option tree depth
`-b, --msg-batch-depth `: The message batch depth
`-p, --process-messages-zkey `: The process messages zkey path (see different options to use specific circuits [Trusted setup](https://maci.pse.dev/docs/trusted-setup) or [Testing](https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing))
`-t, --tally-votes-zkey `: The tally votes zkey path (see different options to use specific circuits [Trusted setup](https://maci.pse.dev/docs/trusted-setup) or [Testing](https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing))
`-k, --vk-registry `: The vk registry contract address
`-q, --quiet`: Whether to print values to the console
`-ss, --subsidy-zkey `: The subsidy zkey path (see different options to use specific circuits [Trusted setup](https://maci.pse.dev/docs/trusted-setup) or [Testing](https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)) | +| `publish` | Publish a new message to a MACI Poll contract | `-p, --pubkey `: The MACI public key which should replace the user's public key in the state tree
`-x, --contract `: The MACI contract address
`-sk, --privkey `: Your serialized MACI private key
`-i, --state-index `: The user's state index
`-v, --vote-option-index `: The vote option index
`-n, --nonce `: The message nonce
`-s, --salt `: The message salt
`-o, --poll-id `: The poll id
`-w, --new-vote-weight `: The new vote weight
`-q, --quiet`: Whether to print values to the console | +| `mergeMessages` | Merge the message accumulator queue | `-q, --quiet`: Whether to print values to the console
`-x, --maci-contract-address `: The MACI contract address
`-o, --poll-id `: The poll id
`-n, --num-queue-ops `: The number of queue operations | +| `mergeSignups` | Merge the signups accumulator queue | `-q, --quiet`: Whether to print values to the console
`-x, --maci-contract-address `: The MACI contract address
`-o, --poll-id `: The poll id
`-n, --num-queue-ops `: The number of queue operations | +| `timeTravel` | Fast-forward the time (only works for local hardhat testing) | `-s, --seconds `: The number of seconds to fast-forward
`-q, --quiet`: Whether to print values to the console | +| `signup` | Sign up to a MACI contract | `-p, --pubkey `: The MACI public key
`-x, --maci-address `: The MACI contract address
`-s, --sg-data `: The signup gateway data
`-i, --ivcp-data `: The initial voice credit proxy data
`-q, --quiet`: Whether to print values to the console | +| `topup` | Top up an account with voice credits | `-a, --amount `: The amount of topup
`-x, --maci-address `: The MACI contract address
`-i, --state-index `: State leaf index
`-o, --poll-id `: Poll id
`-q, --quiet`: Whether to print values to the console | +| `fundWallet` | Fund a wallet with Ether | `-a, --amount `: The amount of Ether
`-w, --address
`: The address to fund
`-q, --quiet`: Whether to print values to the console | +| `verify` | Verify the results of a poll and optionally the subsidy results on-chain | `-o, --poll-id `: The poll id
`-t, --tally-file `: The tally file with results, per vote option spent credits, spent voice credits total
`-s, --subsidy-file `: The subsidy file
`-x, --contract `: The MACI contract address
`-tc, --tally-contract `: The tally contract address
`-sc, --subsidy-contract `: The subsidy contract address
`-q, --quiet`: Whether to print values to the console | +| `genProofs` | Generate the proofs for a poll | `-sk, --privkey `: Your serialized MACI private key
`-x, --contract `: The MACI contract address
`-o, --poll-id `: The poll id
`-t, --tally-file `: The tally file
`-s, --subsidy-file `: The subsidy file
`-r, --rapidsnark `: The path to the rapidsnark binary
`-wp, --process-witnessgen `: The path to the process witness generation binary
`-wt, --tally-witnessgen `: The path to the tally witness generation binary
`-ws, --subsidy-witnessgen `: The path to the subsidy witness generation binary
`-zp, --process-zkey `-zt, --tally-zkey `: The path to the tally zkey
`-zs, --subsidy-zkey `: The path to the subsidy zkey
`-q, --quiet`: Whether to print values to the console
`-f, --output `: The output directory for proofs
`-tx, --transaction-hash :` Transaction hash of MACI contract creation
`-w, --wasm`: Whether to use the wasm binaries
`-pw, --process-wasm `: The path to the process witness generation wasm binary
`-tw, --tally-wasm `: The path to the tally witness generation wasm binary
`-sw, --subsidy-wasm `: The path to the subsidy witness generation wasm binary | +| proveOnChain | Prove the results of a poll on chain | `-o, --poll-id `: The poll id
`-q, --quiet`: Whether to print values to the console
`-x, --contract `: The MACI contract address
`-p, --message-processor-address `: The message processor contract address
`-t, --tally-contract `: The tally contract address
`-s, --subsidy-contract `: The subsidy contract address
`-f, --proof-dir `: The proof output directory from the genProofs subcommand | ## Public and private key format