diff --git a/.github/scripts/download-ceremony-artifacts.sh b/.github/scripts/download-ceremony-artifacts.sh deleted file mode 100755 index e218ae6389..0000000000 --- a/.github/scripts/download-ceremony-artifacts.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -cd "$(dirname "$0")" -cd .. -mkdir -p ../cli/zkeys - -URL=https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.2.0/maci_artifacts_6-9-2-3_prod.tar.gz -DIR_NAME="maci_keys.tar.gz" -OUT_DIR=../cli/ - -echo "downloading $URL" -curl $URL -o "$OUT_DIR/$DIR_NAME" -tar -xvf "$OUT_DIR/$DIR_NAME" -C "$OUT_DIR" diff --git a/.github/scripts/download-zkeys-1-3.sh b/.github/scripts/download-zkeys-1-3.sh deleted file mode 100644 index f1aa10c7dd..0000000000 --- a/.github/scripts/download-zkeys-1-3.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -cd "$(dirname "$0")" -cd .. -mkdir -p ../cli/zkeys - -URL=https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.3.0/maci_artifacts_10-2-1-2_test.tar.gz -DIR_NAME="maci_keys.tar.gz" -OUT_DIR=../cli/ - -echo "downloading $URL" -curl $URL -o "$OUT_DIR/$DIR_NAME" -tar -xvf "$OUT_DIR/$DIR_NAME" -C "$OUT_DIR" diff --git a/.github/workflows/nightly-ceremony.yml b/.github/workflows/nightly-ceremony.yml index 4f201a2fc7..57372a64ce 100644 --- a/.github/workflows/nightly-ceremony.yml +++ b/.github/workflows/nightly-ceremony.yml @@ -56,7 +56,7 @@ jobs: chmod +x ~/rapidsnark/build/prover - name: Download ceremony artifacts - run: ./.github/scripts/download-ceremony-artifacts.sh + run: pnpm download:ceremony-zkeys - name: Run e2e tests run: pnpm test:cli-ceremony diff --git a/.github/workflows/reusable-e2e.yml b/.github/workflows/reusable-e2e.yml index 34a728e48f..eebe425a30 100644 --- a/.github/workflows/reusable-e2e.yml +++ b/.github/workflows/reusable-e2e.yml @@ -88,7 +88,7 @@ jobs: - name: Download zkeys if: ${{ env.CHANGED == 'false' }} run: | - pnpm download:test-zkeys-1-3 + pnpm download:test-zkeys - name: ${{ matrix.command }} run: pnpm run ${{ matrix.command }} diff --git a/cli/scripts/gen_zkey.sh b/cli/scripts/gen_zkey.sh deleted file mode 100755 index 2f51e8d40e..0000000000 --- a/cli/scripts/gen_zkey.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -pnpm exec zkey-manager compile -c ../zkeys.config.yml -pnpm exec zkey-manager downloadPtau -c ../zkeys.config.yml -pnpm exec zkey-manager genZkeys -c ../zkeys.config.yml - - - diff --git a/coordinator/package.json b/coordinator/package.json index a3378e16ff..7a7e1cc4f8 100644 --- a/coordinator/package.json +++ b/coordinator/package.json @@ -19,6 +19,7 @@ "test:coverage": "jest --coverage", "types": "tsc -p tsconfig.json --noEmit", "download-zkeys:test": "ts-node ./scripts/downloadZkeys.ts test", + "download-zkeys:prod": "ts-node ./scripts/downloadZkeys.ts prod", "generate-keypair": "ts-node ./scripts/generateKeypair.ts" }, "dependencies": { diff --git a/coordinator/scripts/downloadZkeys.ts b/coordinator/scripts/downloadZkeys.ts index 187a430d5e..e4bb78ab35 100644 --- a/coordinator/scripts/downloadZkeys.ts +++ b/coordinator/scripts/downloadZkeys.ts @@ -10,6 +10,7 @@ dotenv.config({ path: [path.resolve(__dirname, "../.env"), path.resolve(__dirnam const ZKEY_PATH = path.resolve(process.env.COORDINATOR_ZKEY_PATH!); const ZKEYS_URLS = { test: "https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.3.0/maci_artifacts_10-2-1-2_test.tar.gz", + prod: "https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.2.0/maci_artifacts_6-9-2-3_prod.tar.gz", }; const ARCHIVE_NAME = path.resolve(ZKEY_PATH, "maci_keys.tar.gz"); @@ -34,7 +35,7 @@ export async function downloadZkeys(): Promise { .on("finish", () => { file.close(); - tar.x({ f: ARCHIVE_NAME }).then(() => fs.promises.rm(ARCHIVE_NAME)); + tar.x({ f: ARCHIVE_NAME, C: ZKEY_PATH }).then(() => fs.promises.rm(ARCHIVE_NAME)); }) .on("error", () => fs.promises.unlink(ARCHIVE_NAME)); }) diff --git a/integrationTests/package.json b/integrationTests/package.json index a50de7e13b..0d65d1e15d 100644 --- a/integrationTests/package.json +++ b/integrationTests/package.json @@ -14,8 +14,7 @@ "types": "tsc -p tsconfig.json --noEmit", "test": "ts-mocha --exit ./ts/__tests__/**.test.ts", "test:integration": "NODE_OPTIONS=--max-old-space-size=4096 ts-mocha --exit ./ts/__tests__/integration.test.ts", - "test:maciKeys": "ts-mocha --exit ./ts/__tests__/maci-keys.test.ts", - "download-zkeys": "./scripts/download_zkeys.sh" + "test:maciKeys": "ts-mocha --exit ./ts/__tests__/maci-keys.test.ts" }, "devDependencies": { "@types/chai": "^4.3.11", diff --git a/integrationTests/scripts/download_zkeys.sh b/integrationTests/scripts/download_zkeys.sh deleted file mode 100755 index 66a72cb836..0000000000 --- a/integrationTests/scripts/download_zkeys.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -xe - -cd "$(dirname "$0")" -cd .. - -mkdir -p ../cli/zkeys - -URL=https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.2/maci_keys_10-2-1-2_dev.tar.gz -DIR_NAME="maci_keys.tar.gz" -OUT_DIR=../cli/ - -echo "downloading $URL" -curl $URL -o "$OUT_DIR/$DIR_NAME" -tar -xvf "$OUT_DIR/$DIR_NAME" -C "$OUT_DIR" diff --git a/package.json b/package.json index ce06418be4..dd345df32c 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,8 @@ "setup:zkeys": "NODE_OPTIONS=--max-old-space-size=4096 lerna run gen-zkeys --scope \"maci-circuits\"", "clean": "lerna exec -- rm -rf node_modules build && rm -rf node_modules", "commit": "git cz", - "download:test-zkeys-1-2": "lerna run download-zkeys --scope \"maci-integrationtests\"", - "download:test-zkeys-1-3": "bash .github/scripts/download-zkeys-1-3.sh", - "download:ceremony-zkeys": "bash .github/scripts/download-ceremony-artifacts.sh", + "download:test-zkeys": "export COORDINATOR_ZKEY_PATH=../cli && lerna run download-zkeys:test --scope \"maci-coordinator\"", + "download:ceremony-zkeys": "export COORDINATOR_ZKEY_PATH=../cli && lerna run download-zkeys:prod --scope \"maci-coordinator\"", "prettier": "prettier -c .", "prettier:fix": "prettier -w .", "lint:ts": "eslint './**/**/*.ts' './**/**/*.tsx'", diff --git a/website/versioned_docs/version-v2.0_alpha/quick-start/installation.md b/website/versioned_docs/version-v2.0_alpha/quick-start/installation.md index afd919c63d..4e38531f1f 100644 --- a/website/versioned_docs/version-v2.0_alpha/quick-start/installation.md +++ b/website/versioned_docs/version-v2.0_alpha/quick-start/installation.md @@ -167,19 +167,15 @@ Note the locations of the `.zkey` files as the CLI requires them as command-line If using the latest dev updates: ```bash -pnpm download:test-zkeys-1-3 +pnpm download:test-zkeys ``` -If using **1.2.1** - -```bash -pnpm download:test-zkeys-1-2 -``` - -Note that the below will work up until **1.2.1** - **Download ceremony artifacts** +:::info +Currently, the ceremony artifacts work with MACI version up to 1.2.2. +::: + ```bash pnpm download:ceremony-zkeys ```