Skip to content

Commit

Permalink
use official circuit 6-9-2-3
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed Mar 6, 2024
1 parent ee144f0 commit ba5c317
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -e

# TODO: replace this with params from public ceremony
BASE_URL="https://maci-zkeys.s3.amazonaws.com/v1.1.2/6-8-2-3"
PKGS="maci-zkeys-6-8-2-3.tar.gz"
BASE_URL="https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.2.0"
PKGS="maci_artifacts_6-9-2-3_prod.tar.gz"

for p in $PKGS
do
Expand All @@ -16,3 +16,5 @@ do
tar -zxvf $p
fi
done

mv zkeys params
2 changes: 1 addition & 1 deletion .github/workflows/finalize-round.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
COORDINATOR_MACISK: ${{ secrets.COORDINATOR_MACI_PRIVATE_KEY }}
WALLET_PRIVATE_KEY: ${{ secrets.ARBITRUM_GOERLI_COORDINATOR_WALLET_PRIVATE_KEY }}
CIRCUIT_TYPE: micro
ZKEYS_DOWNLOAD_SCRIPT: "download-6-8-2-3.sh"
ZKEYS_DOWNLOAD_SCRIPT: "download-6-9-2-3.sh"
JSONRPC_HTTP_URL: ${{ github.event.inputs.jsonrpc_url }}

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
NODE_VERSION: 20.x
CIRCUIT_TYPE: micro
ZKEYS_DOWNLOAD_SCRIPT: "download-6-8-2-3.sh"
ZKEYS_DOWNLOAD_SCRIPT: "download-6-9-2-3.sh"

jobs:
e2e-test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
NODE_VERSION: 20.x
ZKEYS_DOWNLOAD_SCRIPT: "download-6-8-2-3.sh"
ZKEYS_DOWNLOAD_SCRIPT: "download-6-9-2-3.sh"

jobs:
script-tests:
Expand Down
31 changes: 17 additions & 14 deletions contracts/utils/circuits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,25 @@ export type CircuitInfo = {

export const CIRCUITS: { [name: string]: CircuitInfo } = {
micro: {
processMessagesZkey: 'ProcessMessages_6-8-2-3_test.0.zkey',
processWitness: 'ProcessMessages_6-8-2-3_test',
processWasm: 'ProcessMessages_6-8-2-3_test.wasm',
processDatFile: 'ProcessMessages_6-8-2-3_test.dat',
tallyVotesZkey: 'tallyvotes_6-2-3_final.zkey',
tallyWitness: 'tallyVotes_6-2-3_test',
tallyWasm: 'tallyvotes_6-2-3.wasm',
tallyDatFile: 'tallyVotes_6-2-3_test.dat',
// 1st param in processmessages_6-8-2-3
processMessagesZkey: 'ProcessMessages_6-9-2-3/processMessages_6-9-2-3.zkey',
processWitness:
'ProcessMessages_6-9-2-3/ProcessMessages_6-9-2-3_cpp/ProcessMessages_6-9-2-3',
processWasm:
'ProcessMessages_6-9-2-3/ProcessMessages_6-9-2-3_js/ProcessMessages_6-9-2-3.wasm',
processDatFile:
'ProcessMessages_6-9-2-3/ProcessMessages_6-9-2-3_cpp/ProcessMessages_6-9-2-3.dat',
tallyVotesZkey: 'TallyVotes_6-2-3/tallyVotes_6-2-3.zkey',
tallyWitness: 'TallyVotes_6-2-3/TallyVotes_6-2-3_cpp/TallyVotes_6-2-3',
tallyWasm: 'TallyVotes_6-2-3/TallyVotes_6-2-3_js/TallyVotes_6-2-3.wasm',
tallyDatFile: 'TallyVotes_6-2-3/TallyVotes_6-2-3_cpp/TallyVotes_6-2-3.dat',
// 1st param in processmessages_6-9-2-3
stateTreeDepth: 6,
treeDepths: {
// 2nd param in processmessages_6-8-2-3
messageTreeDepth: 8,
// 3rd param in processmessages_6-8-2-3
// 2nd param in processmessages_6-9-2-3
messageTreeDepth: 9,
// 3rd param in processmessages_6-9-2-3
messageTreeSubDepth: 2,
// last param of processMessages_6-8-2-3 and tallyvotes_6-2-3
// last param of processMessages_6-9-2-3 and tallyvotes_6-2-3
voteOptionTreeDepth: 3,
// 2nd param in tallyvotes_6-2-3
intStateTreeDepth: 2,
Expand All @@ -62,7 +65,7 @@ export const CIRCUITS: { [name: string]: CircuitInfo } = {
// maxMessages and maxVoteOptions are calculated using treeArity = 5 as seen in the following code:
// https://github.com/privacy-scaling-explorations/maci/blob/master/contracts/contracts/Poll.sol#L115
// treeArity ** messageTreeDepth
maxMessages: BigInt(TREE_ARITY ** 8),
maxMessages: BigInt(TREE_ARITY ** 9),
// treeArity ** voteOptionTreeDepth
maxVoteOptions: BigInt(TREE_ARITY ** 3),
},
Expand Down

0 comments on commit ba5c317

Please sign in to comment.