From ba5e58bc85b450576325bd63f9f1263d9960c9e2 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:21:25 +0100 Subject: [PATCH 1/2] chore(merge) - dev to staging (#192) * fix(setup): remove S3 usage and download from URL * fix(imports): use adoby-node-fetch * fix(vm): stop vm even on verification failing * feat(contribute): cli flag for auth token (run on VM) * fix(vm): fix VM setup * ci: update string literals in ts files for staging/dev environment * fix(ci): missing environment specifier in cli publish workflow * fix(timeout): fix issue with timing out while in upload phase * fix(finalization): fix various bugs and add non interactive auth * build(cleanup): removed puppeteer and related tests * chore(release): publish 1.0.7 * refactor(ui/ux): small changes for a better ui/ux * refactor(ui/ux): add information about private profiles failing sybil checks * fix(ui): fix wording * chore(release): publish 1.0.8 * feat(cors): add more CORS options * fix: don't reject on first iteration of waitForVMCommandExecutioncution * chore: prettier --------- Co-authored-by: Daehyun Paik Co-authored-by: daodesigner <58278045+daodesigner@users.noreply.github.com> Co-authored-by: Sladuca --- .github/workflows/deploy-and-test-dev.yaml | 1 - .github/workflows/deploy-production.yaml | 1 - .github/workflows/firebase-deploy.yaml | 8 +- .github/workflows/firebase-test.yaml | 8 +- CHANGELOG.md | 326 +++++++++--------- lerna.json | 140 ++++---- packages/actions/CHANGELOG.md | 245 ++++++------- packages/actions/src/helpers/constants.ts | 2 +- packages/actions/src/helpers/functions.ts | 2 +- packages/actions/src/helpers/security.ts | 6 +- packages/actions/src/helpers/services.ts | 2 +- packages/actions/src/helpers/utils.ts | 117 ++++--- packages/actions/src/helpers/vm.ts | 2 +- packages/actions/src/index.ts | 4 +- packages/actions/src/types/index.ts | 14 +- .../test/data/artifacts/ceremonySetup.json | 8 +- packages/actions/test/unit/finalize.test.ts | 2 +- .../test/unit/nonInteractiveSetup.test.ts | 11 +- packages/actions/test/unit/security.test.ts | 15 +- packages/actions/test/unit/storage.test.ts | 4 +- packages/actions/test/utils/authentication.ts | 1 - packages/actions/test/utils/configs.ts | 3 +- packages/backend/CHANGELOG.md | 180 +++++----- packages/backend/README.md | 10 +- packages/backend/firestore.indexes.json | 54 +-- packages/backend/src/functions/ceremony.ts | 6 +- packages/backend/src/functions/circuit.ts | 225 ++++++------ packages/backend/src/functions/participant.ts | 14 +- packages/backend/src/functions/storage.ts | 2 +- packages/backend/src/functions/user.ts | 22 +- packages/backend/src/lib/errors.ts | 5 + packages/backend/src/lib/utils.ts | 4 +- packages/phase2cli/CHANGELOG.md | 89 ++--- packages/phase2cli/src/commands/auth.ts | 10 +- packages/phase2cli/src/commands/contribute.ts | 6 +- packages/phase2cli/src/commands/finalize.ts | 6 +- packages/phase2cli/src/commands/index.ts | 2 +- .../phase2cli/src/commands/listCeremonies.ts | 3 +- packages/phase2cli/src/commands/observe.ts | 2 +- packages/phase2cli/src/commands/setup.ts | 59 +++- packages/phase2cli/src/commands/validate.ts | 3 +- packages/phase2cli/src/index.ts | 23 +- packages/phase2cli/src/lib/services.ts | 2 - packages/phase2cli/src/lib/utils.ts | 22 +- 44 files changed, 830 insertions(+), 841 deletions(-) diff --git a/.github/workflows/deploy-and-test-dev.yaml b/.github/workflows/deploy-and-test-dev.yaml index c62f779a..9ce03a95 100644 --- a/.github/workflows/deploy-and-test-dev.yaml +++ b/.github/workflows/deploy-and-test-dev.yaml @@ -13,7 +13,6 @@ concurrency: cancel-in-progress: true jobs: - deploy-dev: uses: ./.github/workflows/firebase-deploy.yaml secrets: inherit diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index 84484169..0a79c5f2 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -13,7 +13,6 @@ concurrency: cancel-in-progress: true jobs: - deploy-production: uses: ./.github/workflows/firebase-deploy.yaml secrets: inherit diff --git a/.github/workflows/firebase-deploy.yaml b/.github/workflows/firebase-deploy.yaml index 9a005ccc..38709af2 100644 --- a/.github/workflows/firebase-deploy.yaml +++ b/.github/workflows/firebase-deploy.yaml @@ -4,27 +4,25 @@ on: workflow_call: inputs: branch: - description: 'Branch to deploy' + description: "Branch to deploy" required: true type: string environment: - description: 'Environment to deploy to' + description: "Environment to deploy to" required: true type: string firebase_project: - description: 'The name of the Firebase project to deploy to' + description: "The name of the Firebase project to deploy to" required: true type: string - jobs: deploy-p0tion: runs-on: ubuntu-22.04 environment: ${{ inputs.environment }} steps: - - uses: actions/checkout@v3 with: ref: ${{ inputs.branch }} diff --git a/.github/workflows/firebase-test.yaml b/.github/workflows/firebase-test.yaml index 5d465f73..4d1aa194 100644 --- a/.github/workflows/firebase-test.yaml +++ b/.github/workflows/firebase-test.yaml @@ -4,27 +4,25 @@ on: workflow_call: inputs: github_ref: - description: 'The branch or tag ref that triggered the workflow' + description: "The branch or tag ref that triggered the workflow" required: true type: string environment: - description: 'Environment to deploy to' + description: "Environment to deploy to" required: true type: string firebase_project: - description: 'The name of the Firebase project to test' + description: "The name of the Firebase project to test" required: true type: string - jobs: test-p0tion: runs-on: ubuntu-22.04 environment: ${{ inputs.environment }} steps: - - uses: actions/checkout@v3 with: ref: ${{ inputs.github_ref }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0765c7cc..b0f2beb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,202 +7,186 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package p0tion - - ## [1.0.4](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.2...v1.0.4) (2023-07-20) - ### Bug Fixes -* **setup:** fix vm command due to differences in AMI config between regions ([1d6a748](https://github.com/privacy-scaling-explorations/p0tion/commit/1d6a748a9acdd67632e2637a3f1fcd9a61e95303)) - - +- **setup:** fix vm command due to differences in AMI config between regions ([1d6a748](https://github.com/privacy-scaling-explorations/p0tion/commit/1d6a748a9acdd67632e2637a3f1fcd9a61e95303)) ## [1.0.2](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.1...v1.0.2) (2023-07-20) - ### Bug Fixes -* **vms:** fix default region ([14e9f49](https://github.com/privacy-scaling-explorations/p0tion/commit/14e9f49a6c1f83523c9ce16827b8ff056161e3b2)) -* **vms:** missing doc ([8c6d7e0](https://github.com/privacy-scaling-explorations/p0tion/commit/8c6d7e0e33f3d6f347e10cd717aeeca2ee75213b)) -* **vms:** specify region in sns command ([1cc1485](https://github.com/privacy-scaling-explorations/p0tion/commit/1cc148533d1fedabaec0220c4dd55f16f9131ff4)) - - +- **vms:** fix default region ([14e9f49](https://github.com/privacy-scaling-explorations/p0tion/commit/14e9f49a6c1f83523c9ce16827b8ff056161e3b2)) +- **vms:** missing doc ([8c6d7e0](https://github.com/privacy-scaling-explorations/p0tion/commit/8c6d7e0e33f3d6f347e10cd717aeeca2ee75213b)) +- **vms:** specify region in sns command ([1cc1485](https://github.com/privacy-scaling-explorations/p0tion/commit/1cc148533d1fedabaec0220c4dd55f16f9131ff4)) ## [1.0.1](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.1) (2023-07-19) - ### Features -* **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) -* **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) -* **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) -* **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) -* **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) -* **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) -* **setup:** add cloud function for file transfer and unit tests ([f7b059d](https://github.com/privacy-scaling-explorations/p0tion/commit/f7b059db9bca336c981980a93a2d422d643d183f)) -* **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) -* **setup:** add transfer of object inside phase2cli ([7c743bb](https://github.com/privacy-scaling-explorations/p0tion/commit/7c743bbbb3e2a76c7656ccbc4f63716ee8e831f5)) -* **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) -* **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) -* **setup:** remove return value and amend tests ([c407bee](https://github.com/privacy-scaling-explorations/p0tion/commit/c407bee2225758ce10f99842a1f63f41d28f62db)) -* **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) -* **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) -* **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) -* **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) -* **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) -* **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) -* **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) -* **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) - +- **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) +- **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) +- **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) +- **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) +- **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) +- **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) +- **setup:** add cloud function for file transfer and unit tests ([f7b059d](https://github.com/privacy-scaling-explorations/p0tion/commit/f7b059db9bca336c981980a93a2d422d643d183f)) +- **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) +- **setup:** add transfer of object inside phase2cli ([7c743bb](https://github.com/privacy-scaling-explorations/p0tion/commit/7c743bbbb3e2a76c7656ccbc4f63716ee8e831f5)) +- **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) +- **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) +- **setup:** remove return value and amend tests ([c407bee](https://github.com/privacy-scaling-explorations/p0tion/commit/c407bee2225758ce10f99842a1f63f41d28f62db)) +- **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) +- **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) +- **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) +- **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) +- **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) +- **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) +- **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) +- **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) ### Bug Fixes -* add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) -* **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) -* correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) -* duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) -* imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) -* missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) -* missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) -* missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) -* **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) -* **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) -* **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) -* **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) -* **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) -* **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) -* **setup:** fix not waiting for file download ([a233767](https://github.com/privacy-scaling-explorations/p0tion/commit/a2337675d12bd4c154def8716451fe50ee320e47)) -* **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) -* **setup:** remove redundant function ([8467f62](https://github.com/privacy-scaling-explorations/p0tion/commit/8467f62ec3d08e86d074919379ef6130f82e69f9)) -* **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) -* **tests and setup:** fix tests and cleanup config file ([152b4da](https://github.com/privacy-scaling-explorations/p0tion/commit/152b4da3c85266faa55b5a409f33b6a06f2d5624)) -* **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) -* **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) -* **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) -* **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) -* **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) -* **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) -* **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) -* **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) -* unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) -* **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) -* **verifycontribution:** fix issue with failing to deconstruct undefined object (vm) ([12b99f1](https://github.com/privacy-scaling-explorations/p0tion/commit/12b99f153c5f59ac5d4a86281331a95f9a7870f7)) -* **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) -* **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) -* **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) -* **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) -* **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) -* **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) -* **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) -* **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) -* **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) -* **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) -* **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) -* **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) -* **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) -* **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) -* **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) -* **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) -* **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) -* **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) -* **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) -* **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) -* **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) -* **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) -* **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) -* **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) -* wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) -* wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) -* wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) - - +- add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) +- **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) +- correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) +- duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) +- imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) +- missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) +- missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) +- missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) +- **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) +- **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) +- **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) +- **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) +- **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) +- **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) +- **setup:** fix not waiting for file download ([a233767](https://github.com/privacy-scaling-explorations/p0tion/commit/a2337675d12bd4c154def8716451fe50ee320e47)) +- **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) +- **setup:** remove redundant function ([8467f62](https://github.com/privacy-scaling-explorations/p0tion/commit/8467f62ec3d08e86d074919379ef6130f82e69f9)) +- **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) +- **tests and setup:** fix tests and cleanup config file ([152b4da](https://github.com/privacy-scaling-explorations/p0tion/commit/152b4da3c85266faa55b5a409f33b6a06f2d5624)) +- **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) +- **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) +- **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) +- **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) +- **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) +- **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) +- **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) +- **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) +- unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) +- **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) +- **verifycontribution:** fix issue with failing to deconstruct undefined object (vm) ([12b99f1](https://github.com/privacy-scaling-explorations/p0tion/commit/12b99f153c5f59ac5d4a86281331a95f9a7870f7)) +- **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) +- **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) +- **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) +- **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) +- **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) +- **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) +- **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) +- **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) +- **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) +- **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) +- **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) +- **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) +- **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) +- **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) +- **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) +- **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) +- **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) +- **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) +- **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) +- **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) +- **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) +- **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) +- **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) +- **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) +- wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) +- wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) +- wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) ## [1.0.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.0) (2023-07-11) - ### Features -* **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) -* **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) -* **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) -* **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) -* **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) -* **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) -* **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) -* **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) -* **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) -* **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) -* **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) -* **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) -* **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) -* **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) -* **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) -* **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) - +- **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) +- **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) +- **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) +- **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) +- **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) +- **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) +- **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) +- **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) +- **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) +- **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) +- **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) +- **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) +- **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) +- **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) +- **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) +- **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) ### Bug Fixes -* add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) -* **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) -* correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) -* duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) -* imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) -* missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) -* missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) -* missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) -* **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) -* **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) -* **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) -* **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) -* **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) -* **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) -* **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) -* **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) -* **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) -* **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) -* **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) -* **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) -* **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) -* **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) -* **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) -* unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) -* **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) -* **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) -* **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) -* **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) -* **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) -* **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) -* **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) -* **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) -* **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) -* **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) -* **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) -* **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) -* **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) -* **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) -* **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) -* **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) -* **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) -* **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) -* **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) -* **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) -* **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) -* **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) -* **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) -* **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) -* **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) -* wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) -* wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) -* wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) - - +- add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) +- **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) +- correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) +- duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) +- imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) +- missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) +- missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) +- missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) +- **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) +- **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) +- **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) +- **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) +- **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) +- **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) +- **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) +- **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) +- **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) +- **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) +- **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) +- **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) +- **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) +- **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) +- **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) +- unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) +- **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) +- **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) +- **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) +- **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) +- **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) +- **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) +- **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) +- **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) +- **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) +- **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) +- **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) +- **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) +- **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) +- **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) +- **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) +- **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) +- **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) +- **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) +- **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) +- **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) +- **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) +- **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) +- **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) +- **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) +- **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) +- wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) +- wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) +- wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) ## [0.5.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v0.5.0) (2023-07-04) diff --git a/lerna.json b/lerna.json index 0daf0c2f..46fe54a2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,74 +1,70 @@ { - "packages": [ - "packages/*" - ], - "npmClient": "yarn", - "version": "1.0.8", - "changelogPreset": { - "name": "conventionalcommits", - "issuePrefixes": [ - "#" - ], - "issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}", - "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}", - "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}", - "userUrlFormat": "{{host}}/{{user}}", - "types": [ - { - "type": "feat", - "section": "Features" - }, - { - "type": "feature", - "section": "Features" - }, - { - "type": "fix", - "section": "Bug Fixes" - }, - { - "type": "perf", - "section": "Performance Improvements" - }, - { - "type": "revert", - "section": "Reverts" - }, - { - "type": "docs", - "section": "Documentation", - "hidden": true - }, - { - "type": "style", - "section": "Styles", - "hidden": true - }, - { - "type": "chore", - "section": "Miscellaneous Chores", - "hidden": true - }, - { - "type": "refactor", - "section": "Code Refactoring", - "hidden": true - }, - { - "type": "test", - "section": "Tests", - "hidden": true - }, - { - "type": "build", - "section": "Build System", - "hidden": true - }, - { - "type": "ci", - "section": "Continuous Integration", - "hidden": true - } - ] - } + "packages": ["packages/*"], + "npmClient": "yarn", + "version": "1.0.8", + "changelogPreset": { + "name": "conventionalcommits", + "issuePrefixes": ["#"], + "issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}", + "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}", + "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}", + "userUrlFormat": "{{host}}/{{user}}", + "types": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "feature", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "docs", + "section": "Documentation", + "hidden": true + }, + { + "type": "style", + "section": "Styles", + "hidden": true + }, + { + "type": "chore", + "section": "Miscellaneous Chores", + "hidden": true + }, + { + "type": "refactor", + "section": "Code Refactoring", + "hidden": true + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System", + "hidden": true + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ] + } } diff --git a/packages/actions/CHANGELOG.md b/packages/actions/CHANGELOG.md index 6e72a77d..5525c781 100644 --- a/packages/actions/CHANGELOG.md +++ b/packages/actions/CHANGELOG.md @@ -3,166 +3,149 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ## [1.0.5](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.4...v1.0.5) (2023-07-24) **Note:** Version bump only for package @p0tion/actions - - ## [1.0.4](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.2...v1.0.4) (2023-07-20) - ### Bug Fixes -* **setup:** fix vm command due to differences in AMI config between regions ([1d6a748](https://github.com/privacy-scaling-explorations/p0tion/commit/1d6a748a9acdd67632e2637a3f1fcd9a61e95303)) - - +- **setup:** fix vm command due to differences in AMI config between regions ([1d6a748](https://github.com/privacy-scaling-explorations/p0tion/commit/1d6a748a9acdd67632e2637a3f1fcd9a61e95303)) ## [1.0.2](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.1...v1.0.2) (2023-07-20) - ### Bug Fixes -* **vms:** missing doc ([8c6d7e0](https://github.com/privacy-scaling-explorations/p0tion/commit/8c6d7e0e33f3d6f347e10cd717aeeca2ee75213b)) -* **vms:** specify region in sns command ([1cc1485](https://github.com/privacy-scaling-explorations/p0tion/commit/1cc148533d1fedabaec0220c4dd55f16f9131ff4)) - - +- **vms:** missing doc ([8c6d7e0](https://github.com/privacy-scaling-explorations/p0tion/commit/8c6d7e0e33f3d6f347e10cd717aeeca2ee75213b)) +- **vms:** specify region in sns command ([1cc1485](https://github.com/privacy-scaling-explorations/p0tion/commit/1cc148533d1fedabaec0220c4dd55f16f9131ff4)) ## [1.0.1](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.1) (2023-07-19) - ### Features -* **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) -* **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) -* **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) -* **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) -* **setup:** add cloud function for file transfer and unit tests ([f7b059d](https://github.com/privacy-scaling-explorations/p0tion/commit/f7b059db9bca336c981980a93a2d422d643d183f)) -* **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) -* **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) -* **setup:** remove return value and amend tests ([c407bee](https://github.com/privacy-scaling-explorations/p0tion/commit/c407bee2225758ce10f99842a1f63f41d28f62db)) -* **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) -* **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) -* **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) -* **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) -* **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) -* **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) -* **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) - +- **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) +- **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) +- **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) +- **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) +- **setup:** add cloud function for file transfer and unit tests ([f7b059d](https://github.com/privacy-scaling-explorations/p0tion/commit/f7b059db9bca336c981980a93a2d422d643d183f)) +- **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) +- **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) +- **setup:** remove return value and amend tests ([c407bee](https://github.com/privacy-scaling-explorations/p0tion/commit/c407bee2225758ce10f99842a1f63f41d28f62db)) +- **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) +- **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) +- **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) +- **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) +- **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) +- **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) +- **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) ### Bug Fixes -* add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) -* **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) -* correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) -* imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) -* **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) -* **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) -* **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) -* **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) -* **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) -* **setup:** fix not waiting for file download ([a233767](https://github.com/privacy-scaling-explorations/p0tion/commit/a2337675d12bd4c154def8716451fe50ee320e47)) -* **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) -* **setup:** remove redundant function ([8467f62](https://github.com/privacy-scaling-explorations/p0tion/commit/8467f62ec3d08e86d074919379ef6130f82e69f9)) -* **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) -* **tests and setup:** fix tests and cleanup config file ([152b4da](https://github.com/privacy-scaling-explorations/p0tion/commit/152b4da3c85266faa55b5a409f33b6a06f2d5624)) -* **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) -* **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) -* **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) -* **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) -* **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) -* **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) -* **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) -* **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) -* **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) -* **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) -* **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) -* **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) -* **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) -* **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) -* **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) -* **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) -* **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) -* **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) -* **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) -* **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) -* **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) -* **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) -* **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) -* **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) -* **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) -* **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) -* wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) - - +- add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) +- **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) +- correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) +- imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) +- **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) +- **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) +- **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) +- **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) +- **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) +- **setup:** fix not waiting for file download ([a233767](https://github.com/privacy-scaling-explorations/p0tion/commit/a2337675d12bd4c154def8716451fe50ee320e47)) +- **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) +- **setup:** remove redundant function ([8467f62](https://github.com/privacy-scaling-explorations/p0tion/commit/8467f62ec3d08e86d074919379ef6130f82e69f9)) +- **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) +- **tests and setup:** fix tests and cleanup config file ([152b4da](https://github.com/privacy-scaling-explorations/p0tion/commit/152b4da3c85266faa55b5a409f33b6a06f2d5624)) +- **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) +- **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) +- **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) +- **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) +- **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) +- **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) +- **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) +- **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) +- **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) +- **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) +- **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) +- **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) +- **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) +- **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) +- **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) +- **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) +- **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) +- **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) +- **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) +- **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) +- **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) +- **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) +- **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) +- **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) +- **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) +- **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) +- wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) ## [1.0.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.0) (2023-07-11) - ### Features -* **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) -* **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) -* **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) -* **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) -* **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) -* **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) -* **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) -* **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) -* **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) -* **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) -* **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) -* **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) - +- **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) +- **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) +- **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) +- **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) +- **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) +- **setup:** start to implement non interactive setup ([e72c2f8](https://github.com/privacy-scaling-explorations/p0tion/commit/e72c2f87e09c73eb002f060a688a741af0833b20)) +- **vms:** add marker file in userData to avoid running initialization code more than once ([dfda857](https://github.com/privacy-scaling-explorations/p0tion/commit/dfda857093133de8113d8aeb3963555b59e90cc8)) +- **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) +- **vms:** added tests ([89b621b](https://github.com/privacy-scaling-explorations/p0tion/commit/89b621ba08ffe09cde3afa98b444fddf7a065f7a)) +- **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) +- **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) +- **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) ### Bug Fixes -* add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) -* **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) -* correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) -* imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) -* **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) -* **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) -* **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) -* **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) -* **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) -* **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) -* **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) -* **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) -* **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) -* **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) -* **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) -* **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) -* **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) -* **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) -* **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) -* **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) -* **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) -* **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) -* **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) -* **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) -* **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) -* **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) -* **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) -* **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) -* **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) -* **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) -* **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) -* **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) -* **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) -* **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) -* **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) -* **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) -* wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) - - +- add missing alternative case; fix wrong tests ([5044da6](https://github.com/privacy-scaling-explorations/p0tion/commit/5044da612bb576837077c65bc3ee579dff1c492e)) +- **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) +- correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) +- imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) +- **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) +- **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) +- **setup:** change setup test file ([cf8e698](https://github.com/privacy-scaling-explorations/p0tion/commit/cf8e6982bc584533d1e5042aa8a78d9df433469e)) +- **setup:** change test file ([46260eb](https://github.com/privacy-scaling-explorations/p0tion/commit/46260eb1b0af45d99b5946a7232423552c50be7f)) +- **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) +- **setup:** remove non working test ([2e21885](https://github.com/privacy-scaling-explorations/p0tion/commit/2e218854c6989b9a2642f184a43e3d40c2978a59)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) +- **tests:** add extra coordinator user to resolve random test failure ([6745c45](https://github.com/privacy-scaling-explorations/p0tion/commit/6745c45158ae13c6f4e0c8e7d1b397f1eb3f7061)) +- **tests:** add extra sleep after user creation ([b637b9e](https://github.com/privacy-scaling-explorations/p0tion/commit/b637b9e96c569af191cd15802df7d3ebbaeda07f)) +- **tests:** add extra sleep and coordinator checks within tests ([3e31cd2](https://github.com/privacy-scaling-explorations/p0tion/commit/3e31cd25c956aeb4de60708ec4b1d03baa6de225)) +- **tests:** add extra sleep when setting custom claims to allow propagation ([19ba15d](https://github.com/privacy-scaling-explorations/p0tion/commit/19ba15dc9f2db1ab72a61864852062c0d532eb16)) +- **tests:** fix issues with user not being recognized as coordinator ([14a6ecd](https://github.com/privacy-scaling-explorations/p0tion/commit/14a6ecd2ec9e065071c58a84548b243fff808ace)) +- **tests:** fix tests ([905b6c0](https://github.com/privacy-scaling-explorations/p0tion/commit/905b6c0fb660fb457456c7d1376557fcbd277508)) +- **tests:** fixed tests ([d4a6dc8](https://github.com/privacy-scaling-explorations/p0tion/commit/d4a6dc838771b2f0f76d7eca1698bf84918d9053)) +- **tests:** skip a test that would fail due to environment not clean ([9346a6f](https://github.com/privacy-scaling-explorations/p0tion/commit/9346a6f1bd95181bfc95cb842c9f951af1f9ca17)) +- **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) +- **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) +- **vms:** cleanup test ([c0a2922](https://github.com/privacy-scaling-explorations/p0tion/commit/c0a29220cce5a75b2e8ee1f6a7d3f713d5fbe2ec)) +- **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) +- **vms:** fix cloud function multipartupload wrong parameter name ([b98e088](https://github.com/privacy-scaling-explorations/p0tion/commit/b98e08864736f22cf8199a953dec46912b8f55f0)) +- **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) +- **vms:** fix import error ([7e7f9f6](https://github.com/privacy-scaling-explorations/p0tion/commit/7e7f9f697f004ee2506601ce350293cd9b3eec77)) +- **vms:** fix prod test - wrong parameter order in ec2 tests ([86beca7](https://github.com/privacy-scaling-explorations/p0tion/commit/86beca72c6b7b77bea90214a42442918b8a3e10b)) +- **vms:** fix prod tests ([f8b4397](https://github.com/privacy-scaling-explorations/p0tion/commit/f8b439755c1665539ded525890d8e5972b2c8d84)) +- **vms:** fix userData commands ([cd65566](https://github.com/privacy-scaling-explorations/p0tion/commit/cd65566d4298d64f7bebff4ec0579df9bfa174fa)) +- **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) +- **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) +- **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) +- **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) +- **vms:** remove redundant code ([80ce491](https://github.com/privacy-scaling-explorations/p0tion/commit/80ce491cf77d49c2f5899c05f8720634743aa437)) +- **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) +- **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) +- **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) +- wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) ## [0.5.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v0.5.0) (2023-07-04) diff --git a/packages/actions/src/helpers/constants.ts b/packages/actions/src/helpers/constants.ts index 330635b2..cf44ea2f 100644 --- a/packages/actions/src/helpers/constants.ts +++ b/packages/actions/src/helpers/constants.ts @@ -313,6 +313,6 @@ export const commonTerms = { finalizeCircuit: "finalizeCircuit", finalizeCeremony: "finalizeCeremony", downloadCircuitArtifacts: "downloadCircuitArtifacts", - transferObject: "transferObject", + transferObject: "transferObject" } } diff --git a/packages/actions/src/helpers/functions.ts b/packages/actions/src/helpers/functions.ts index f6c43a79..cac1714c 100644 --- a/packages/actions/src/helpers/functions.ts +++ b/packages/actions/src/helpers/functions.ts @@ -435,4 +435,4 @@ export const finalizeCeremony = async (functions: Functions, ceremonyId: string) await cf({ ceremonyId }) -} \ No newline at end of file +} diff --git a/packages/actions/src/helpers/security.ts b/packages/actions/src/helpers/security.ts index 2e6c01a9..6a02e066 100644 --- a/packages/actions/src/helpers/security.ts +++ b/packages/actions/src/helpers/security.ts @@ -16,14 +16,14 @@ const getGitHubStats = async (user: string): Promise => { const jsonData: any = await response.json() - const data = { + const data = { following: jsonData.following, followers: jsonData.followers, publicRepos: jsonData.public_repos, avatarUrl: jsonData.avatar_url } - return data + return data } /** @@ -56,7 +56,7 @@ export const githubReputation = async ( reputable: false, avatarUrl: "" } - + return { reputable: true, avatarUrl: avatarUrl diff --git a/packages/actions/src/helpers/services.ts b/packages/actions/src/helpers/services.ts index a74dfc4e..7799996f 100644 --- a/packages/actions/src/helpers/services.ts +++ b/packages/actions/src/helpers/services.ts @@ -22,7 +22,7 @@ export const getFirestoreDatabase = (app: FirebaseApp): Firestore => getFirestor * @param app - the Firebase application. * @returns - the Cloud Functions associated to the application. */ -export const getFirebaseFunctions = (app: FirebaseApp): Functions => getFunctions(app, 'europe-west1') +export const getFirebaseFunctions = (app: FirebaseApp): Functions => getFunctions(app, "europe-west1") /** * Retrieve the configuration variables for the AWS services (S3, EC2). diff --git a/packages/actions/src/helpers/utils.ts b/packages/actions/src/helpers/utils.ts index 94672483..388c6412 100644 --- a/packages/actions/src/helpers/utils.ts +++ b/packages/actions/src/helpers/utils.ts @@ -3,16 +3,16 @@ import fs, { ReadPosition, createWriteStream } from "fs" import { utils as ffUtils } from "ffjavascript" import winston, { Logger } from "winston" import fetch from "@adobe/node-fetch-retry" -import { - CircuitMetadata, - Contribution, - CircuitDocument, +import { + CircuitMetadata, + Contribution, + CircuitDocument, CircuitInputData, - ContributionValidity, - FirebaseDocumentInfo, - SetupCeremonyData, + ContributionValidity, + FirebaseDocumentInfo, + SetupCeremonyData, CeremonySetupTemplate, - CeremonySetupTemplateCircuitArtifacts, + CeremonySetupTemplateCircuitArtifacts } from "../types/index" import { finalContributionIndex, genesisZkeyIndex, potFilenameTemplate } from "./constants" import { @@ -22,10 +22,10 @@ import { getContributionsCollectionPath } from "./database" import { CeremonyTimeoutType } from "../types/enums" -import { - getPotStorageFilePath, - getR1csStorageFilePath, - getWasmStorageFilePath, +import { + getPotStorageFilePath, + getR1csStorageFilePath, + getWasmStorageFilePath, getZkeyStorageFilePath } from "./storage" import { blake512FromPath } from "./crypto" @@ -41,23 +41,29 @@ import { promisify } from "util" */ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): Promise => { // check that the path exists - if (!fs.existsSync(path)) throw new Error("The provided path to the configuration file does not exist. Please provide an absolute path and try again.") - + if (!fs.existsSync(path)) + throw new Error( + "The provided path to the configuration file does not exist. Please provide an absolute path and try again." + ) + try { // read the data const data: CeremonySetupTemplate = JSON.parse(fs.readFileSync(path).toString()) // verify that the data is correct - if (data['timeoutMechanismType'] !== CeremonyTimeoutType.DYNAMIC && data['timeoutMechanismType'] !== CeremonyTimeoutType.FIXED) + if ( + data["timeoutMechanismType"] !== CeremonyTimeoutType.DYNAMIC && + data["timeoutMechanismType"] !== CeremonyTimeoutType.FIXED + ) throw new Error("Invalid timeout type. Please choose between DYNAMIC and FIXED.") - + // validate that we have at least 1 circuit input data - if (!data.circuits || data.circuits.length === 0) + if (!data.circuits || data.circuits.length === 0) throw new Error("You need to provide the data for at least 1 circuit.") // validate that the end date is in the future - let endDate: Date - let startDate: Date + let endDate: Date + let startDate: Date try { endDate = new Date(data.endDate) startDate = new Date(data.startDate) @@ -66,12 +72,12 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): } if (endDate <= startDate) throw new Error("The end date should be greater than the start date.") - + const currentDate = new Date() - if (endDate <= currentDate || startDate <= currentDate) + if (endDate <= currentDate || startDate <= currentDate) throw new Error("The start and end dates should be in the future.") - + // validate penalty if (data.penalty <= 0) throw new Error("The penalty should be greater than zero.") @@ -100,30 +106,36 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): const responseR1CS = await fetch(artifacts.r1csStoragePath) // Handle errors. - if (!responseR1CS.ok && responseR1CS.status !== 200) - throw new Error(`There was an error while trying to download the r1cs file for circuit ${circuitData.name}. Please check that the file has the correct permissions (public) set.`) + if (!responseR1CS.ok && responseR1CS.status !== 200) + throw new Error( + `There was an error while trying to download the r1cs file for circuit ${circuitData.name}. Please check that the file has the correct permissions (public) set.` + ) await streamPipeline(responseR1CS.body!, createWriteStream(localR1csPath)) // Write the file locally - + // extract the metadata from the r1cs const metadata = getR1CSInfo(localR1csPath) // download wasm too to ensure it's available const responseWASM = await fetch(artifacts.wasmStoragePath) - if (!responseWASM.ok && responseWASM.status !== 200) - throw new Error(`There was an error while trying to download the WASM file for circuit ${circuitData.name}. Please check that the file has the correct permissions (public) set.`) + if (!responseWASM.ok && responseWASM.status !== 200) + throw new Error( + `There was an error while trying to download the WASM file for circuit ${circuitData.name}. Please check that the file has the correct permissions (public) set.` + ) await streamPipeline(responseWASM.body!, createWriteStream(localWasmPath)) // validate that the circuit hash and template links are valid const template = circuitData.template const URLMatch = template.source.match(urlPattern) - if (!URLMatch || URLMatch.length === 0 || URLMatch.length > 1) throw new Error("You should provide the URL to the circuits templates on GitHub.") + if (!URLMatch || URLMatch.length === 0 || URLMatch.length > 1) + throw new Error("You should provide the URL to the circuits templates on GitHub.") const hashMatch = template.commitHash.match(commitHashPattern) - if (!hashMatch || hashMatch.length === 0 || hashMatch.length > 1) throw new Error("You should provide a valid commit hash of the circuit templates.") - + if (!hashMatch || hashMatch.length === 0 || hashMatch.length > 1) + throw new Error("You should provide a valid commit hash of the circuit templates.") + // calculate the hash of the r1cs file const r1csBlake2bHash = await blake512FromPath(localR1csPath) @@ -136,12 +148,12 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): const smallestPowersOfTauCompleteFilenameForCircuit = `${potFilenameTemplate}${doubleDigitsPowers}.ptau` const firstZkeyCompleteFilename = `${circuitPrefix}_${genesisZkeyIndex}.zkey` - // storage paths + // storage paths const r1csStorageFilePath = getR1csStorageFilePath(circuitPrefix, r1csCompleteFilename) const wasmStorageFilePath = getWasmStorageFilePath(circuitPrefix, wasmCompleteFilename) const potStorageFilePath = getPotStorageFilePath(smallestPowersOfTauCompleteFilenameForCircuit) const zkeyStorageFilePath = getZkeyStorageFilePath(circuitPrefix, firstZkeyCompleteFilename) - + const files: any = { potFilename: smallestPowersOfTauCompleteFilenameForCircuit, r1csFilename: r1csCompleteFilename, @@ -154,14 +166,15 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): r1csBlake2bHash: r1csBlake2bHash } - // validate that the compiler hash is a valid hash + // validate that the compiler hash is a valid hash const compiler = circuitData.compiler const compilerHashMatch = compiler.commitHash.match(commitHashPattern) - if (!compilerHashMatch || compilerHashMatch.length === 0 || compilerHashMatch.length > 1) throw new Error("You should provide a valid commit hash of the circuit compiler.") + if (!compilerHashMatch || compilerHashMatch.length === 0 || compilerHashMatch.length > 1) + throw new Error("You should provide a valid commit hash of the circuit compiler.") // validate that the verification options are valid const verification = circuitData.verification - if (verification.cfOrVm !== "CF" && verification.cfOrVm !== "VM") + if (verification.cfOrVm !== "CF" && verification.cfOrVm !== "VM") throw new Error("Please enter a valid verification mechanism: either CF or VM") // @todo VM parameters verification @@ -174,8 +187,7 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): let circuit: CircuitDocument | CircuitInputData = {} as CircuitDocument | CircuitInputData if (data.timeoutMechanismType === CeremonyTimeoutType.DYNAMIC) { - if (circuitData.dynamicThreshold <= 0) - throw new Error("The dynamic threshold should be > 0.") + if (circuitData.dynamicThreshold <= 0) throw new Error("The dynamic threshold should be > 0.") dynamicThreshold = circuitData.dynamicThreshold // the Circuit data for the ceremony setup @@ -183,7 +195,7 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): name: circuitData.name, description: circuitData.description, prefix: circuitPrefix, - sequencePosition: i+1, + sequencePosition: i + 1, metadata: metadata, files: files, template: template, @@ -194,23 +206,20 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): contributionComputation: 0, fullContribution: 0, verifyCloudFunction: 0 - }, - + } } } if (data.timeoutMechanismType === CeremonyTimeoutType.FIXED) { - if (circuitData.fixedTimeWindow <= 0) - throw new Error("The fixed time window threshold should be > 0.") + if (circuitData.fixedTimeWindow <= 0) throw new Error("The fixed time window threshold should be > 0.") fixedTimeWindow = circuitData.fixedTimeWindow - // the Circuit data for the ceremony setup circuit = { name: circuitData.name, description: circuitData.description, prefix: circuitPrefix, - sequencePosition: i+1, + sequencePosition: i + 1, metadata: metadata, files: files, template: template, @@ -221,18 +230,15 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): contributionComputation: 0, fullContribution: 0, verifyCloudFunction: 0 - }, - + } } } - circuits.push(circuit) // remove the local r1cs and wasm downloads (if used for verifying the config only vs setup) - if (cleanup) - fs.unlinkSync(localR1csPath) - fs.unlinkSync(localWasmPath) + if (cleanup) fs.unlinkSync(localR1csPath) + fs.unlinkSync(localWasmPath) } const setupData: SetupCeremonyData = { @@ -250,7 +256,6 @@ export const parseCeremonyFile = async (path: string, cleanup: boolean = false): } return setupData - } catch (error: any) { throw new Error(`Error while parsing up the ceremony setup file. ${error.message}`) } @@ -444,9 +449,11 @@ export const getPublicAttestationPreambleForContributor = ( ceremonyName: string, isFinalizing: boolean ) => - `Hey, I'm ${contributorIdentifier} and I have ${ - isFinalizing ? "finalized" : "contributed to" - } the ${ceremonyName}${ceremonyName.toLowerCase().includes('trusted setup') || ceremonyName.toLowerCase().includes("ceremony") ? "." : " MPC Phase2 Trusted Setup ceremony."}\nThe following are my contribution signatures:` + `Hey, I'm ${contributorIdentifier} and I have ${isFinalizing ? "finalized" : "contributed to"} the ${ceremonyName}${ + ceremonyName.toLowerCase().includes("trusted setup") || ceremonyName.toLowerCase().includes("ceremony") + ? "." + : " MPC Phase2 Trusted Setup ceremony." + }\nThe following are my contribution signatures:` /** * Check and prepare public attestation for the contributor made only of its valid contributions. @@ -727,4 +734,4 @@ export const getR1CSInfo = (localR1CSFilePath: string): CircuitMetadata => { * @param in - the input number to be converted. * @returns - the two digits stringified number derived from the conversion. */ -export const convertToDoubleDigits = (amount: number): string => (amount < 10 ? `0${amount}` : amount.toString()) \ No newline at end of file +export const convertToDoubleDigits = (amount: number): string => (amount < 10 ? `0${amount}` : amount.toString()) diff --git a/packages/actions/src/helpers/vm.ts b/packages/actions/src/helpers/vm.ts index ddc4c78f..c1ff4d04 100644 --- a/packages/actions/src/helpers/vm.ts +++ b/packages/actions/src/helpers/vm.ts @@ -82,7 +82,7 @@ export const vmDependenciesAndCacheArtifactsCommand = ( zKeyPath: string, potPath: string, snsTopic: string, - region: string + region: string ): Array => [ "#!/bin/bash", 'MARKER_FILE="/var/run/my_script_ran"', diff --git a/packages/actions/src/index.ts b/packages/actions/src/index.ts index f8d12530..1f4a960b 100644 --- a/packages/actions/src/index.ts +++ b/packages/actions/src/index.ts @@ -87,7 +87,7 @@ export { verifyContribution, checkAndPrepareCoordinatorForFinalization, finalizeCircuit, - finalizeCeremony + finalizeCeremony } from "./helpers/functions" export { toHex, blake512FromPath, computeSHA256ToHex, compareHashes } from "./helpers/crypto" export { @@ -159,4 +159,4 @@ export { createEC2Client, vmContributionVerificationCommand, retrieveCommandStatus -} from "./helpers/vm" \ No newline at end of file +} from "./helpers/vm" diff --git a/packages/actions/src/types/index.ts b/packages/actions/src/types/index.ts index fa074552..d2cd355e 100644 --- a/packages/actions/src/types/index.ts +++ b/packages/actions/src/types/index.ts @@ -620,7 +620,6 @@ export type SetupCeremonyData = { circuitArtifacts: Array } - export type CeremonySetupTemplateCircuitArtifacts = { artifacts: { bucket: string @@ -640,11 +639,16 @@ export type CeremonySetupTemplateCircuitName = { } export type CeremonySetupTemplate = { - title: string + title: string description: string startDate: string endDate: string timeoutMechanismType: CeremonyTimeoutType - penalty: number - circuits: Array -} \ No newline at end of file + penalty: number + circuits: Array< + CircuitDocument & + CeremonySetupTemplateCircuitArtifacts & + CeremonySetupTemplateCircuitTimeout & + CeremonySetupTemplateCircuitName + > +} diff --git a/packages/actions/test/data/artifacts/ceremonySetup.json b/packages/actions/test/data/artifacts/ceremonySetup.json index 1a6d3370..4850bb89 100644 --- a/packages/actions/test/data/artifacts/ceremonySetup.json +++ b/packages/actions/test/data/artifacts/ceremonySetup.json @@ -15,14 +15,14 @@ "template": { "source": "https://github.com/circuit.circom", "commitHash": "b7ad01b11f9b4195e38ecc772291251260ab2c67", - "paramConfiguration": [6,8,3,2] + "paramConfiguration": [6, 8, 3, 2] }, "verification": { "cfOrVm": "CF" }, "artifacts": { - "r1csStoragePath": "https://p0tion-test-definitely-setup.s3.amazonaws.com/circuit.r1cs", - "wasmStoragePath": "https://p0tion-test-definitely-setup.s3.amazonaws.com/circuit.wasm" + "r1csStoragePath": "https://p0tion-test-definitely-setup.s3.amazonaws.com/circuit.r1cs", + "wasmStoragePath": "https://p0tion-test-definitely-setup.s3.amazonaws.com/circuit.wasm" }, "name": "circuit", "dynamicThreshold": 0, @@ -30,4 +30,4 @@ "sequencePosition": 1 } ] -} \ No newline at end of file +} diff --git a/packages/actions/test/unit/finalize.test.ts b/packages/actions/test/unit/finalize.test.ts index 571dcc3f..9464376c 100644 --- a/packages/actions/test/unit/finalize.test.ts +++ b/packages/actions/test/unit/finalize.test.ts @@ -459,4 +459,4 @@ describe("Finalize", () => { // Delete app. await deleteAdminApp() }) -}) \ No newline at end of file +}) diff --git a/packages/actions/test/unit/nonInteractiveSetup.test.ts b/packages/actions/test/unit/nonInteractiveSetup.test.ts index 1a81b198..7eff711f 100644 --- a/packages/actions/test/unit/nonInteractiveSetup.test.ts +++ b/packages/actions/test/unit/nonInteractiveSetup.test.ts @@ -1,8 +1,5 @@ import { cwd } from "process" -import { - TestingEnvironment, - parseCeremonyFile -} from "../../src/" +import { TestingEnvironment, parseCeremonyFile } from "../../src/" import { envType } from "../utils" import { expect } from "chai" @@ -12,7 +9,7 @@ describe("non interactive setup", () => { if (envType === TestingEnvironment.PRODUCTION) path = `${cwd()}/packages/actions/test/data/artifacts/ceremonySetup.json` else path = `${cwd()}/../actions/test/data/artifacts/ceremonySetup.json` - + it("return the parsed object", () => {}) it("should throw when given an invalid path", () => { expect(() => parseCeremonyFile("invalid path")).to.throw @@ -23,6 +20,4 @@ describe("non interactive setup", () => { it("should throw when given an invalid end date", () => {}) it("should throw when given an invalid start date", () => {}) it("should throw when given an invalid penalty", () => {}) - - -}) \ No newline at end of file +}) diff --git a/packages/actions/test/unit/security.test.ts b/packages/actions/test/unit/security.test.ts index ea805feb..fab6a2d8 100644 --- a/packages/actions/test/unit/security.test.ts +++ b/packages/actions/test/unit/security.test.ts @@ -1,12 +1,6 @@ import chai, { expect } from "chai" import chaiAsPromised from "chai-as-promised" -import { - getAuth, - signOut, - signInWithEmailAndPassword, - OAuthCredential, - signInAnonymously -} from "firebase/auth" +import { getAuth, signOut, signInWithEmailAndPassword, OAuthCredential, signInAnonymously } from "firebase/auth" import { where } from "firebase/firestore" import { randomBytes } from "crypto" import { fakeCeremoniesData, fakeCircuitsData, fakeParticipantsData, fakeUsersData } from "../data/samples" @@ -328,7 +322,7 @@ describe("Security", () => { coordinatorUID = await createMockUser(userApp, coordinatorEmail, coordinatorPassword, true, adminAuth) await sleep(60000) const currentUser = getCurrentFirebaseAuthUser(userApp) - expect(await isCoordinator(currentUser)).to.be.true + expect(await isCoordinator(currentUser)).to.be.true await createS3Bucket(userFunctions, bucketName) await sleep(2000) storagePath = getZkeyStorageFilePath( @@ -547,8 +541,7 @@ describe("Security", () => { coordinatorUID = await createMockUser(userApp, coordinatorEmail, coordinatorPassword, true, adminAuth) await sleep(60000) const cuurentUser = getCurrentFirebaseAuthUser(userApp) - expect(await isCoordinator(cuurentUser)).to.be.true - + expect(await isCoordinator(cuurentUser)).to.be.true }) /// @note prove that a non authenticated user cannot create a ceremony it("should not be possible to call privileged functions related to setup when not authenticated", async () => { @@ -666,7 +659,7 @@ describe("Security", () => { const circuitData = fakeCircuitsData.fakeCircuitSmallContributors.data const ceremonyBucket = getBucketName(ceremonyData.prefix, ceremonyBucketPostfix) - await signInWithEmailAndPassword(userAuth, coordinatorEmail, coordinatorPassword) + await signInWithEmailAndPassword(userAuth, coordinatorEmail, coordinatorPassword) await sleep(5000) const currentUser = getCurrentFirebaseAuthUser(userApp) expect(await isCoordinator(currentUser)).to.be.true diff --git a/packages/actions/test/unit/storage.test.ts b/packages/actions/test/unit/storage.test.ts index a911134f..f996754c 100644 --- a/packages/actions/test/unit/storage.test.ts +++ b/packages/actions/test/unit/storage.test.ts @@ -17,7 +17,7 @@ import { cleanUpMockUsers, sleep, cleanUpRecursively, - mockCeremoniesCleanup, + mockCeremoniesCleanup } from "../utils/index" import { fakeCeremoniesData, fakeCircuitsData, fakeUsersData } from "../data/samples" import { @@ -34,7 +34,7 @@ import { commonTerms, genesisZkeyIndex, checkIfObjectExist, - generateGetObjectPreSignedUrl, + generateGetObjectPreSignedUrl } from "../../src/index" import { TestingEnvironment } from "../../src/types/enums" import { ChunkWithUrl, ETagWithPartNumber } from "../../src/types/index" diff --git a/packages/actions/test/utils/authentication.ts b/packages/actions/test/utils/authentication.ts index 9e33214b..f4c49b9a 100644 --- a/packages/actions/test/utils/authentication.ts +++ b/packages/actions/test/utils/authentication.ts @@ -85,7 +85,6 @@ export const getLastGithubVerificationCode = async ( return otp } - /** * Test function to set custom claims of a user. * @param adminAuth - the admin auth instance. diff --git a/packages/actions/test/utils/configs.ts b/packages/actions/test/utils/configs.ts index f2bf9385..259085a3 100644 --- a/packages/actions/test/utils/configs.ts +++ b/packages/actions/test/utils/configs.ts @@ -66,7 +66,8 @@ export const initializeUserServices = (): { // Init services. const auth = getAuth(userApp) const userFirestore = envType === TestingEnvironment.PRODUCTION ? getFirestore(userApp) : getFirestore() - const userFunctions = envType === TestingEnvironment.PRODUCTION ? getFunctions(userApp) : getFunctions(getApp(), "europe-west1") + const userFunctions = + envType === TestingEnvironment.PRODUCTION ? getFunctions(userApp) : getFunctions(getApp(), "europe-west1") if (envType === TestingEnvironment.DEVELOPMENT) { // Connect the emulator for dev environment (default endpoints). diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index c94234c8..a227aec7 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -3,133 +3,115 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ## [1.0.5](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.4...v1.0.5) (2023-07-24) **Note:** Version bump only for package @p0tion/backend - - ## [1.0.4](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.2...v1.0.4) (2023-07-20) **Note:** Version bump only for package @p0tion/backend - - - - ## [1.0.2](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.1...v1.0.2) (2023-07-20) - ### Bug Fixes -* **vms:** fix default region ([14e9f49](https://github.com/privacy-scaling-explorations/p0tion/commit/14e9f49a6c1f83523c9ce16827b8ff056161e3b2)) -* **vms:** specify region in sns command ([1cc1485](https://github.com/privacy-scaling-explorations/p0tion/commit/1cc148533d1fedabaec0220c4dd55f16f9131ff4)) - - +- **vms:** fix default region ([14e9f49](https://github.com/privacy-scaling-explorations/p0tion/commit/14e9f49a6c1f83523c9ce16827b8ff056161e3b2)) +- **vms:** specify region in sns command ([1cc1485](https://github.com/privacy-scaling-explorations/p0tion/commit/1cc148533d1fedabaec0220c4dd55f16f9131ff4)) ## [1.0.1](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.1) (2023-07-19) - ### Features -* **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) -* **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) -* **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) -* **setup:** add cloud function for file transfer and unit tests ([f7b059d](https://github.com/privacy-scaling-explorations/p0tion/commit/f7b059db9bca336c981980a93a2d422d643d183f)) -* **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) -* **setup:** remove return value and amend tests ([c407bee](https://github.com/privacy-scaling-explorations/p0tion/commit/c407bee2225758ce10f99842a1f63f41d28f62db)) -* **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) -* **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) -* **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) -* **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) -* **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) - +- **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) +- **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) +- **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) +- **setup:** add cloud function for file transfer and unit tests ([f7b059d](https://github.com/privacy-scaling-explorations/p0tion/commit/f7b059db9bca336c981980a93a2d422d643d183f)) +- **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) +- **setup:** remove return value and amend tests ([c407bee](https://github.com/privacy-scaling-explorations/p0tion/commit/c407bee2225758ce10f99842a1f63f41d28f62db)) +- **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) +- **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) +- **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) +- **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) +- **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) ### Bug Fixes -* correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) -* imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) -* missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) -* missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) -* missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) -* **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) -* **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) -* unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) -* **verifycontribution:** fix issue with failing to deconstruct undefined object (vm) ([12b99f1](https://github.com/privacy-scaling-explorations/p0tion/commit/12b99f153c5f59ac5d4a86281331a95f9a7870f7)) -* **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) -* **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) -* **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) -* **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) -* **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) -* **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) -* **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) -* **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) -* **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) -* **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) -* **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) -* **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) -* **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) -* **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) -* **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) -* **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) -* **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) -* wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) -* wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) - - +- correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) +- imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) +- missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) +- missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) +- missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) +- **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) +- **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) +- unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) +- **verifycontribution:** fix issue with failing to deconstruct undefined object (vm) ([12b99f1](https://github.com/privacy-scaling-explorations/p0tion/commit/12b99f153c5f59ac5d4a86281331a95f9a7870f7)) +- **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) +- **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) +- **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) +- **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) +- **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) +- **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) +- **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) +- **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) +- **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) +- **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) +- **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) +- **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) +- **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) +- **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) +- **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) +- **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) +- **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) +- wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) +- wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) ## [1.0.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.0) (2023-07-11) - ### Features -* **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) -* **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) -* **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) -* **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) -* **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) -* **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) -* **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) -* **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) - +- **ec2:** added tests and ip function ([2658c1a](https://github.com/privacy-scaling-explorations/p0tion/commit/2658c1a049c8fa79dde93617d6a7190c53e6ad9f)) +- **ec2:** fixed bug in running commands at deployment and refactored setup ([f7e8de7](https://github.com/privacy-scaling-explorations/p0tion/commit/f7e8de702faa62565e197073db6096cf6734955a)) +- **ec2:** merge udpates and add tests ([5e8a76f](https://github.com/privacy-scaling-explorations/p0tion/commit/5e8a76fe68154998b72ab12b478a057c91da8bf4)) +- **vms:** added ssm code and more tests + changes on backend ([f9a251a](https://github.com/privacy-scaling-explorations/p0tion/commit/f9a251a9cc9812e28956a003a17ea2046fcdf10b)) +- **vms:** implement SNS topic command to trigger Lambda that stops the VM after initialization ([f5f73bb](https://github.com/privacy-scaling-explorations/p0tion/commit/f5f73bb546aeefa8da263dacbef7e84eb2bb97e6)) +- **vms:** implement terraform script to deploy AWS inf ([b168cd0](https://github.com/privacy-scaling-explorations/p0tion/commit/b168cd0b8461c79fd18a3aa2334a8aff24b93bcc)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) +- **vms:** refactoring ([08486b2](https://github.com/privacy-scaling-explorations/p0tion/commit/08486b2fc1e3b871f1bf2a341a1bc394063ddf06)) +- **vms:** tests and refactoring ([3a19f95](https://github.com/privacy-scaling-explorations/p0tion/commit/3a19f952f2206de7d5a04f511dc7a947e47e50ad)) ### Bug Fixes -* correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) -* imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) -* missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) -* missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) -* missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) -* **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) -* unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) -* **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) -* **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) -* **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) -* **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) -* **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) -* **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) -* **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) -* **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) -* **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) -* **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) -* **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) -* **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) -* **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) -* **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) -* **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) -* **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) -* **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) -* wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) -* wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) - - +- correct failing tests ([f55e832](https://github.com/privacy-scaling-explorations/p0tion/commit/f55e832391ebf0d42340dfb8ce3727977016ecc2)) +- imports and package version ([8b8b84f](https://github.com/privacy-scaling-explorations/p0tion/commit/8b8b84fa836a2a33f549c3a4dfd26adc4a3c79c5)) +- missing else statement for verifycontribution function; wrong return on custom promise ([716843d](https://github.com/privacy-scaling-explorations/p0tion/commit/716843dbd393a105536c4f2d221ee0cd021439c9)) +- missing sort for ceremony circuits ([819b792](https://github.com/privacy-scaling-explorations/p0tion/commit/819b7928e0dd40b143b3013513e5a29649cc26f8)) +- missing updates for current contributor fields when coordinating ([88a730b](https://github.com/privacy-scaling-explorations/p0tion/commit/88a730b7ba44093127320197e888b3579255ba5b)) +- **s3:** creating public bucket with object ACL enabled ([12ad715](https://github.com/privacy-scaling-explorations/p0tion/commit/12ad715e09cd6fe0efb43604b6c5a7201194cd56)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- **sybil checks:** amended env var name and added to the backend ([c28e2f0](https://github.com/privacy-scaling-explorations/p0tion/commit/c28e2f0579cc86f716731d793fccfb31e14d11c7)) +- unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) +- **vm:** bug fix ([f4ae99d](https://github.com/privacy-scaling-explorations/p0tion/commit/f4ae99d586f625ac073ce079f100a25e21b77d25)) +- **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) +- **vms:** add tags on EC2 creation ([0347289](https://github.com/privacy-scaling-explorations/p0tion/commit/0347289f414800d2c7ce45ba1bafe4e36e32788b)) +- **vms:** disable eslint rule for regex ([2c426cb](https://github.com/privacy-scaling-explorations/p0tion/commit/2c426cb8145ca6c533f12a47aae5d7d66b6c1808)) +- **vms:** fix cloud function bug related to the wrong verification transcript path ([db35a5f](https://github.com/privacy-scaling-explorations/p0tion/commit/db35a5f0010be7b84217ba5fd146a7adf245e5dc)) +- **vms:** fix emulator tests ([98af9d0](https://github.com/privacy-scaling-explorations/p0tion/commit/98af9d021ca72c173e1da491da1bfd859862c8e6)) +- **vms:** fix terraform and lambda config ([2714912](https://github.com/privacy-scaling-explorations/p0tion/commit/271491275f6ad75510f4018f01594720afa93a6c)) +- **vms:** fix VM commands ([a39fd5f](https://github.com/privacy-scaling-explorations/p0tion/commit/a39fd5fa9543af412eae7f7e505660547c29b4b3)) +- **vms:** fixed cloud function for VM verification ([3ca22a5](https://github.com/privacy-scaling-explorations/p0tion/commit/3ca22a53253f500caa0227b529aed0d145433295)) +- **vms:** fixed wrong path in blake3 bin command and various fixes on the verification CF ([9aec4e7](https://github.com/privacy-scaling-explorations/p0tion/commit/9aec4e7188653acb4bdce5f17f5a161918ee768d)) +- **vms:** refactoring and code fixes ([0ebe401](https://github.com/privacy-scaling-explorations/p0tion/commit/0ebe401894befb4dddab414392bcb29e656ba456)) +- **vms:** remove redundant parameter on VM startup - ssh keypair ([8f3dc42](https://github.com/privacy-scaling-explorations/p0tion/commit/8f3dc42f6ddad9c755ae6e2370b6a783f6aae306)) +- **vms:** removed stdin/stdout redirection in VM command and added regex match for blake3 hash ([0bf3034](https://github.com/privacy-scaling-explorations/p0tion/commit/0bf30346fe60850df76e3125866bdaeda86cc502)) +- **vms:** retry mechanism for VM startup ([1f5accd](https://github.com/privacy-scaling-explorations/p0tion/commit/1f5accd6c85a909eeee365c539af8f6f6b558122)) +- **vms:** revert part of the verifyContribution refactoring and update terraform ([1e74a4c](https://github.com/privacy-scaling-explorations/p0tion/commit/1e74a4c2a9ecf20e8b2610546b0edeb1a098d7bb)) +- **vms:** temp revert of retry feature in verifyContribution ([5d0375d](https://github.com/privacy-scaling-explorations/p0tion/commit/5d0375d4bc90646a9225cf7ffb280e1ec0df52ee)) +- **vms:** tests ([dfbf3a7](https://github.com/privacy-scaling-explorations/p0tion/commit/dfbf3a7422e773d87d5d1e94ddc1a85aa99c6220)) +- wrong ci env project ([1304473](https://github.com/privacy-scaling-explorations/p0tion/commit/1304473cf4d6122b9866e60fbecf936a3961a608)) +- wrong document property lead to error when checking github antisybil ([fbe22ea](https://github.com/privacy-scaling-explorations/p0tion/commit/fbe22ea6d84becee1dcb8b1beb594de5c11a25ae)) ## [0.5.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v0.5.0) (2023-07-04) diff --git a/packages/backend/README.md b/packages/backend/README.md index 3598cd1f..e675df07 100644 --- a/packages/backend/README.md +++ b/packages/backend/README.md @@ -102,10 +102,10 @@ yarn firebase:init #### AWS Infrastructure -0. Login or create a [new AWS Account](https://portal.aws.amazon.com/billing/signup?nc2=h_ct&src=header_signup&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email). +0. Login or create a [new AWS Account](https://portal.aws.amazon.com/billing/signup?nc2=h_ct&src=header_signup&redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email). - The AWS free tier account will cover a good number of requests for ceremonies but there could be some costs based on your ceremony circuits size. -1. Create an access key for a user with Admin privileges (__NOT ROOT USER__) -2. Setup the `awscli` ([docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)) and add the keys for this user. +1. Create an access key for a user with Admin privileges (**NOT ROOT USER**) +2. Setup the `awscli` ([docs](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)) and add the keys for this user. 3. Install `terraform` ([docs](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)) 4. Decide on an AWS region (by default this is **us-east-1**) - if you want to change you will need to do the following: 1. update **aws/lambda/index.mjs** ([exact line](https://github.com/privacy-scaling-explorations/p0tion/blob/dev/packages/backend/aws/lambda/index.mjs#L3)) to the new region @@ -117,9 +117,9 @@ yarn firebase:init 1. `terraform init` 2. `terraform plan` 3. `terraform apply` - 4. `terraform output secret_key` + 4. `terraform output secret_key` - To print the secret access key for the IAM user - 6. Store the other values (sns_topic_arn etc.) + 5. Store the other values (sns_topic_arn etc.) - These will be needed for the .env file configuration The IAM user created with the steps above can be used for all p0tion's features. diff --git a/packages/backend/firestore.indexes.json b/packages/backend/firestore.indexes.json index b9e83f41..a96ab11d 100644 --- a/packages/backend/firestore.indexes.json +++ b/packages/backend/firestore.indexes.json @@ -1,33 +1,33 @@ { - "indexes": [ - { - "collectionGroup": "ceremonies", - "queryScope": "COLLECTION", - "fields": [ + "indexes": [ { - "fieldPath": "state", - "order": "ASCENDING" + "collectionGroup": "ceremonies", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "state", + "order": "ASCENDING" + }, + { + "fieldPath": "endDate", + "order": "ASCENDING" + } + ] }, { - "fieldPath": "endDate", - "order": "ASCENDING" + "collectionGroup": "ceremonies", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "state", + "order": "ASCENDING" + }, + { + "fieldPath": "startDate", + "order": "ASCENDING" + } + ] } - ] - }, - { - "collectionGroup": "ceremonies", - "queryScope": "COLLECTION", - "fields": [ - { - "fieldPath": "state", - "order": "ASCENDING" - }, - { - "fieldPath": "startDate", - "order": "ASCENDING" - } - ] - } - ], - "fieldOverrides": [] + ], + "fieldOverrides": [] } diff --git a/packages/backend/src/functions/ceremony.ts b/packages/backend/src/functions/ceremony.ts index a115ef28..0e255e24 100644 --- a/packages/backend/src/functions/ceremony.ts +++ b/packages/backend/src/functions/ceremony.ts @@ -166,7 +166,11 @@ export const setupCeremony = functions // Upload the post-startup commands script file. printLog(`Uploading VM post-startup commands script file ${vmBootstrapScriptFilename}`, LogLevel.DEBUG) - await uploadFileToBucketNoFile(bucketName, `circuits/${circuit.name!}/${vmBootstrapScriptFilename}`, vmCommands.join("\n")) + await uploadFileToBucketNoFile( + bucketName, + `circuits/${circuit.name!}/${vmBootstrapScriptFilename}`, + vmCommands.join("\n") + ) // Compute the VM disk space requirement (in GB). const vmDiskSize = computeDiskSizeForVM(circuit.zKeySizeInBytes!, circuit.metadata?.pot!) diff --git a/packages/backend/src/functions/circuit.ts b/packages/backend/src/functions/circuit.ts index 13805b66..b6c33eb8 100644 --- a/packages/backend/src/functions/circuit.ts +++ b/packages/backend/src/functions/circuit.ts @@ -58,6 +58,7 @@ import { uploadFileToBucket } from "../lib/utils" import { EC2Client } from "@aws-sdk/client-ec2" +import { HttpsError } from "firebase-functions/v2/https" dotenv.config() @@ -214,57 +215,71 @@ const coordinate = async ( * Wait until the command has completed its execution inside the VM. * @dev this method implements a custom interval to check 5 times after 1 minute if the command execution * has been completed or not by calling the `retrieveCommandStatus` method. - * @param {any} resolve the promise. - * @param {any} reject the promise. * @param {SSMClient} ssm the SSM client. * @param {string} vmInstanceId the unique identifier of the VM instance. * @param {string} commandId the unique identifier of the VM command. * @returns > true when the command execution succeed; otherwise false. */ -const waitForVMCommandExecution = ( - resolve: any, - reject: any, - ssm: SSMClient, - vmInstanceId: string, - commandId: string -) => { - const interval = setInterval(async () => { - try { - // Get command status. - const cmdStatus = await retrieveCommandStatus(ssm, vmInstanceId, commandId) - printLog(`Checking command ${commandId} status => ${cmdStatus}`, LogLevel.DEBUG) - - if (cmdStatus === CommandInvocationStatus.SUCCESS) { - printLog(`Command ${commandId} successfully completed`, LogLevel.DEBUG) - - // Resolve the promise. - resolve() - } else if (cmdStatus === CommandInvocationStatus.FAILED) { - logAndThrowError(SPECIFIC_ERRORS.SE_VM_FAILED_COMMAND_EXECUTION) - reject() - } else if (cmdStatus === CommandInvocationStatus.TIMED_OUT) { - logAndThrowError(SPECIFIC_ERRORS.SE_VM_TIMEDOUT_COMMAND_EXECUTION) - reject() - } else if (cmdStatus === CommandInvocationStatus.CANCELLED) { - logAndThrowError(SPECIFIC_ERRORS.SE_VM_CANCELLED_COMMAND_EXECUTION) - reject() - } else if (cmdStatus === CommandInvocationStatus.DELAYED) { - logAndThrowError(SPECIFIC_ERRORS.SE_VM_DELAYED_COMMAND_EXECUTION) - reject() - } - } catch (error: any) { - printLog(`Invalid command ${commandId} execution`, LogLevel.DEBUG) +const waitForVMCommandExecution = (ssm: SSMClient, vmInstanceId: string, commandId: string): Promise => + new Promise((resolve, reject) => { + const poll = async () => { + try { + // Get command status. + const cmdStatus = await retrieveCommandStatus(ssm, vmInstanceId, commandId) + printLog(`Checking command ${commandId} status => ${cmdStatus}`, LogLevel.DEBUG) + + let error: HttpsError | undefined + switch (cmdStatus) { + case CommandInvocationStatus.CANCELLING: + case CommandInvocationStatus.CANCELLED: { + error = SPECIFIC_ERRORS.SE_VM_CANCELLED_COMMAND_EXECUTION + break + } + case CommandInvocationStatus.DELAYED: { + error = SPECIFIC_ERRORS.SE_VM_DELAYED_COMMAND_EXECUTION + break + } + case CommandInvocationStatus.FAILED: { + error = SPECIFIC_ERRORS.SE_VM_FAILED_COMMAND_EXECUTION + break + } + case CommandInvocationStatus.TIMED_OUT: { + error = SPECIFIC_ERRORS.SE_VM_TIMEDOUT_COMMAND_EXECUTION + break + } + case CommandInvocationStatus.IN_PROGRESS: + case CommandInvocationStatus.PENDING: { + // wait a minute and poll again + setTimeout(poll, 60000) + return + } + case CommandInvocationStatus.SUCCESS: { + printLog(`Command ${commandId} successfully completed`, LogLevel.DEBUG) + + // Resolve the promise. + resolve() + return + } + default: { + logAndThrowError(SPECIFIC_ERRORS.SE_VM_UNKNOWN_COMMAND_STATUS) + } + } - if (!error.toString().includes(commandId)) logAndThrowError(COMMON_ERRORS.CM_INVALID_COMMAND_EXECUTION) + if (error) { + logAndThrowError(error) + } + } catch (error: any) { + printLog(`Invalid command ${commandId} execution`, LogLevel.DEBUG) - // Reject the promise. - reject() - } finally { - // Clear the interval. - clearInterval(interval) + if (!error.toString().includes(commandId)) logAndThrowError(COMMON_ERRORS.CM_INVALID_COMMAND_EXECUTION) + + // Reject the promise. + reject() + } } - }, 60000) // 1 minute. -} + + setTimeout(poll, 60000) + }) /** * This method is used to coordinate the waiting queues of ceremony circuits. @@ -286,7 +301,7 @@ const waitForVMCommandExecution = ( * - Just completed a contribution or all contributions for each circuit. If yes, coordinate (multi-participant scenario). */ export const coordinateCeremonyParticipant = functionsV1 - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -387,7 +402,6 @@ export const coordinateCeremonyParticipant = functionsV1 } }) - /** * Recursive function to check whether an EC2 is in a running state * @notice required step to run commands @@ -396,16 +410,12 @@ export const coordinateCeremonyParticipant = functionsV1 * @param attempts - how many times to retry before failing * @returns > - whether the VM was started */ -const checkIfVMRunning = async ( - ec2: EC2Client, - vmInstanceId: string, - attempts = 5 - ): Promise => { +const checkIfVMRunning = async (ec2: EC2Client, vmInstanceId: string, attempts = 5): Promise => { // if we tried 5 times, then throw an error if (attempts <= 0) logAndThrowError(SPECIFIC_ERRORS.SE_VM_NOT_RUNNING) - await sleep(60000); // Wait for 1 min - const isVMRunning = await checkIfRunning(ec2, vmInstanceId) + await sleep(60000) // Wait for 1 min + const isVMRunning = await checkIfRunning(ec2, vmInstanceId) if (!isVMRunning) { printLog(`VM not running, ${attempts - 1} attempts remaining. Retrying in 1 minute...`, LogLevel.DEBUG) @@ -442,7 +452,7 @@ const checkIfVMRunning = async ( * 2) Send all updates atomically to the Firestore database. */ export const verifycontribution = functionsV2.https.onCall( - { memory: "16GiB", timeoutSeconds: 3600, region: 'europe-west1' }, + { memory: "16GiB", timeoutSeconds: 3600, region: "europe-west1" }, async (request: functionsV2.https.CallableRequest): Promise => { if (!request.auth || (!request.auth.token.participant && !request.auth.token.coordinator)) logAndThrowError(SPECIFIC_ERRORS.SE_AUTH_NO_CURRENT_AUTH_USER) @@ -610,7 +620,6 @@ export const verifycontribution = functionsV2.https.onCall( verificationTranscriptTemporaryLocalPath, true ) - } else { // Upload verification transcript. /// nb. do not use multi-part upload here due to small file size. @@ -709,7 +718,7 @@ export const verifycontribution = functionsV2.https.onCall( ? (avgVerifyCloudFunctionTime + verifyCloudFunctionTime) / 2 : verifyCloudFunctionTime - // Prepare tx to update circuit average contribution/verification time. + // Prepare tx to update circuit average contribution/verification time. const updatedCircuitDoc = await getDocumentById(getCircuitsCollectionPath(ceremonyId), circuitId) const { waitingQueue: updatedWaitingQueue } = updatedCircuitDoc.data()! /// @dev this must happen only for valid contributions. @@ -783,9 +792,7 @@ export const verifycontribution = functionsV2.https.onCall( printLog(`Starting the execution of command ${commandId}`, LogLevel.DEBUG) // Step (1.A.3.3). - return new Promise((resolve, reject) => - waitForVMCommandExecution(resolve, reject, ssm, vmInstanceId, commandId) - ) + return waitForVMCommandExecution(ssm, vmInstanceId, commandId) .then(async () => { // Command execution successfully completed. printLog(`Command ${commandId} execution has been successfully completed`, LogLevel.DEBUG) @@ -797,59 +804,57 @@ export const verifycontribution = functionsV2.https.onCall( logAndThrowError(COMMON_ERRORS.CM_INVALID_COMMAND_EXECUTION) }) - } else { - // CF approach. - printLog(`CF mechanism`, LogLevel.DEBUG) + } - const potStoragePath = getPotStorageFilePath(files.potFilename) - const firstZkeyStoragePath = getZkeyStorageFilePath(prefix, `${prefix}_${genesisZkeyIndex}.zkey`) - // Prepare temporary file paths. - // (nb. these are needed to download the necessary artifacts for verification from AWS S3). - verificationTranscriptTemporaryLocalPath = createTemporaryLocalPath( - verificationTranscriptCompleteFilename - ) - const potTempFilePath = createTemporaryLocalPath(`${circuitId}_${participantDoc.id}.pot`) - const firstZkeyTempFilePath = createTemporaryLocalPath(`${circuitId}_${participantDoc.id}_genesis.zkey`) - const lastZkeyTempFilePath = createTemporaryLocalPath(`${circuitId}_${participantDoc.id}_last.zkey`) - - // Create and populate transcript. - const transcriptLogger = createCustomLoggerForFile(verificationTranscriptTemporaryLocalPath) - transcriptLogger.info( - `${ - isFinalizing ? `Final verification` : `Verification` - } transcript for ${prefix} circuit Phase 2 contribution.\n${ - isFinalizing ? `Coordinator ` : `Contributor # ${Number(lastZkeyIndex)}` - } (${contributorOrCoordinatorIdentifier})\n` - ) + // CF approach. + printLog(`CF mechanism`, LogLevel.DEBUG) + + const potStoragePath = getPotStorageFilePath(files.potFilename) + const firstZkeyStoragePath = getZkeyStorageFilePath(prefix, `${prefix}_${genesisZkeyIndex}.zkey`) + // Prepare temporary file paths. + // (nb. these are needed to download the necessary artifacts for verification from AWS S3). + verificationTranscriptTemporaryLocalPath = createTemporaryLocalPath(verificationTranscriptCompleteFilename) + const potTempFilePath = createTemporaryLocalPath(`${circuitId}_${participantDoc.id}.pot`) + const firstZkeyTempFilePath = createTemporaryLocalPath(`${circuitId}_${participantDoc.id}_genesis.zkey`) + const lastZkeyTempFilePath = createTemporaryLocalPath(`${circuitId}_${participantDoc.id}_last.zkey`) + + // Create and populate transcript. + const transcriptLogger = createCustomLoggerForFile(verificationTranscriptTemporaryLocalPath) + transcriptLogger.info( + `${ + isFinalizing ? `Final verification` : `Verification` + } transcript for ${prefix} circuit Phase 2 contribution.\n${ + isFinalizing ? `Coordinator ` : `Contributor # ${Number(lastZkeyIndex)}` + } (${contributorOrCoordinatorIdentifier})\n` + ) - // Step (1.A.2). - await downloadArtifactFromS3Bucket(bucketName, potStoragePath, potTempFilePath) - await downloadArtifactFromS3Bucket(bucketName, firstZkeyStoragePath, firstZkeyTempFilePath) - await downloadArtifactFromS3Bucket(bucketName, lastZkeyStoragePath, lastZkeyTempFilePath) - - // Step (1.A.4). - isContributionValid = await zKey.verifyFromInit( - firstZkeyTempFilePath, - potTempFilePath, - lastZkeyTempFilePath, - transcriptLogger - ) - - // Compute contribution hash. - lastZkeyBlake2bHash = await blake512FromPath(lastZkeyTempFilePath) - - // Free resources by unlinking temporary folders. - // Do not free-up verification transcript path here. - try { - fs.unlinkSync(potTempFilePath) - fs.unlinkSync(firstZkeyTempFilePath) - fs.unlinkSync(lastZkeyTempFilePath) - } catch (error: any) { - printLog(`Error while unlinking temporary files - Error ${error}`, LogLevel.WARN) - } - - await completeVerification() + // Step (1.A.2). + await downloadArtifactFromS3Bucket(bucketName, potStoragePath, potTempFilePath) + await downloadArtifactFromS3Bucket(bucketName, firstZkeyStoragePath, firstZkeyTempFilePath) + await downloadArtifactFromS3Bucket(bucketName, lastZkeyStoragePath, lastZkeyTempFilePath) + + // Step (1.A.4). + isContributionValid = await zKey.verifyFromInit( + firstZkeyTempFilePath, + potTempFilePath, + lastZkeyTempFilePath, + transcriptLogger + ) + + // Compute contribution hash. + lastZkeyBlake2bHash = await blake512FromPath(lastZkeyTempFilePath) + + // Free resources by unlinking temporary folders. + // Do not free-up verification transcript path here. + try { + fs.unlinkSync(potTempFilePath) + fs.unlinkSync(firstZkeyTempFilePath) + fs.unlinkSync(lastZkeyTempFilePath) + } catch (error: any) { + printLog(`Error while unlinking temporary files - Error ${error}`, LogLevel.WARN) } + + await completeVerification() } } ) @@ -860,7 +865,7 @@ export const verifycontribution = functionsV2.https.onCall( * this does not happen if the participant is actually the coordinator who is finalizing the ceremony. */ export const refreshParticipantAfterContributionVerification = functionsV1 - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -943,7 +948,7 @@ export const refreshParticipantAfterContributionVerification = functionsV1 * and verification key extracted from the circuit final contribution (as part of the ceremony finalization process). */ export const finalizeCircuit = functionsV1 - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) diff --git a/packages/backend/src/functions/participant.ts b/packages/backend/src/functions/participant.ts index df3dba4e..a8f69978 100644 --- a/packages/backend/src/functions/participant.ts +++ b/packages/backend/src/functions/participant.ts @@ -44,7 +44,7 @@ dotenv.config() * @dev true when the participant can participate (1.A, 3.B, 1.D); otherwise false. */ export const checkParticipantForCeremony = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -175,7 +175,7 @@ export const checkParticipantForCeremony = functions * 2) the participant has just finished the contribution for a circuit (contributionProgress != 0 && status = CONTRIBUTED && contributionStep = COMPLETED). */ export const progressToNextCircuitForContribution = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -233,7 +233,7 @@ export const progressToNextCircuitForContribution = functions * 5) Completed contribution computation and verification. */ export const progressToNextContributionStep = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -296,7 +296,7 @@ export const progressToNextContributionStep = functions * @dev enable the current contributor to resume a contribution from where it had left off. */ export const permanentlyStoreCurrentContributionTimeAndHash = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -355,7 +355,7 @@ export const permanentlyStoreCurrentContributionTimeAndHash = functions * @dev enable the current contributor to resume a multi-part upload from where it had left off. */ export const temporaryStoreCurrentContributionMultiPartUploadId = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -409,7 +409,7 @@ export const temporaryStoreCurrentContributionMultiPartUploadId = functions * @dev enable the current contributor to resume a multi-part upload from where it had left off. */ export const temporaryStoreCurrentContributionUploadedChunkData = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) @@ -469,7 +469,7 @@ export const temporaryStoreCurrentContributionUploadedChunkData = functions * contributed to every selected ceremony circuits (= DONE). */ export const checkAndPrepareCoordinatorForFinalization = functions - .region('europe-west1') + .region("europe-west1") .runWith({ memory: "512MB" }) diff --git a/packages/backend/src/functions/storage.ts b/packages/backend/src/functions/storage.ts index 56420224..8f6609de 100644 --- a/packages/backend/src/functions/storage.ts +++ b/packages/backend/src/functions/storage.ts @@ -196,7 +196,7 @@ export const createBucket = functions AllowedMethods: ["GET", "PUT"], AllowedOrigins: ["*"], ExposeHeaders: ["ETag", "Content-Length"], - AllowedHeaders: ["*"], + AllowedHeaders: ["*"] } ] } diff --git a/packages/backend/src/functions/user.ts b/packages/backend/src/functions/user.ts index f646269f..6d39d123 100644 --- a/packages/backend/src/functions/user.ts +++ b/packages/backend/src/functions/user.ts @@ -41,7 +41,8 @@ export const registerAuthUser = functions // Reference to a document using uid. const userRef = firestore.collection(commonTerms.collections.users.name).doc(uid) // html encode the display name (or put the ID if the name is not displayed) - const encodedDisplayName = user.displayName === "Null" || user.displayName === null ? user.uid : encode(displayName) + const encodedDisplayName = + user.displayName === "Null" || user.displayName === null ? user.uid : encode(displayName) // store the avatar URL of a contributor let avatarUrl: string = "" @@ -73,13 +74,22 @@ export const registerAuthUser = functions makeError( "permission-denied", "The user is not allowed to sign up because their Github reputation is not high enough.", - `The user ${user.displayName === "Null" || user.displayName === null ? user.uid : user.displayName } is not allowed to sign up because their Github reputation is not high enough. Please contact the administrator if you think this is a mistake.` + `The user ${ + user.displayName === "Null" || user.displayName === null + ? user.uid + : user.displayName + } is not allowed to sign up because their Github reputation is not high enough. Please contact the administrator if you think this is a mistake.` ) ) - } + } // store locally avatarUrl = avatarURL - printLog(`Github reputation check passed for user ${user.displayName === "Null" || user.displayName === null ? user.uid : user.displayName }`, LogLevel.DEBUG) + printLog( + `Github reputation check passed for user ${ + user.displayName === "Null" || user.displayName === null ? user.uid : user.displayName + }`, + LogLevel.DEBUG + ) } catch (error: any) { // Delete user await auth.deleteUser(user.uid) @@ -95,7 +105,7 @@ export const registerAuthUser = functions } // Set document (nb. we refer to providerData[0] because we use Github OAuth provider only). // In future releases we might want to loop through the providerData array as we support - // more providers. + // more providers. await userRef.set({ name: encodedDisplayName, encodedDisplayName, @@ -112,7 +122,7 @@ export const registerAuthUser = functions // we want to create a new collection for the users to store the avatars const avatarRef = firestore.collection(commonTerms.collections.avatars.name).doc(uid) await avatarRef.set({ - avatarUrl: avatarUrl || "", + avatarUrl: avatarUrl || "" }) printLog(`Authenticated user document with identifier ${uid} has been correctly stored`, LogLevel.DEBUG) printLog(`Authenticated user avatar with identifier ${uid} has been correctly stored`, LogLevel.DEBUG) diff --git a/packages/backend/src/lib/errors.ts b/packages/backend/src/lib/errors.ts index fcd9eb97..73ea305f 100644 --- a/packages/backend/src/lib/errors.ts +++ b/packages/backend/src/lib/errors.ts @@ -184,6 +184,11 @@ export const SPECIFIC_ERRORS = { "unavailable", "VM command execution has been delayed since there were no available instance at the moment", "Please, contact the coordinator if this error persists." + ), + SE_VM_UNKNOWN_COMMAND_STATUS: makeError( + "unavailable", + "VM command execution has failed due to an unknown status code", + "Please, contact the coordinator if this error persists." ) } diff --git a/packages/backend/src/lib/utils.ts b/packages/backend/src/lib/utils.ts index a7fc6c0d..4b512f8c 100644 --- a/packages/backend/src/lib/utils.ts +++ b/packages/backend/src/lib/utils.ts @@ -217,7 +217,7 @@ export const downloadArtifactFromS3Bucket = async (bucketName: string, objectKey const streamPipeline = promisify(pipeline) await streamPipeline(response.body, writeStream) - writeStream.on('finish', () => { + writeStream.on("finish", () => { writeStream.end() }) } @@ -305,7 +305,7 @@ export const deleteObject = async (bucketName: string, objectKey: string) => { // Prepare command. const command = new DeleteObjectCommand({ Bucket: bucketName, Key: objectKey }) - + // Execute command. const data = await client.send(command) diff --git a/packages/phase2cli/CHANGELOG.md b/packages/phase2cli/CHANGELOG.md index 7c60d8ab..e34655e6 100644 --- a/packages/phase2cli/CHANGELOG.md +++ b/packages/phase2cli/CHANGELOG.md @@ -3,87 +3,68 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ## [1.0.5](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.4...v1.0.5) (2023-07-24) **Note:** Version bump only for package @p0tion/phase2cli - - ## [1.0.4](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.2...v1.0.4) (2023-07-20) **Note:** Version bump only for package @p0tion/phase2cli - - - - ## [1.0.2](https://github.com/privacy-scaling-explorations/p0tion/compare/v1.0.1...v1.0.2) (2023-07-20) **Note:** Version bump only for package @p0tion/phase2cli - - - - ## [1.0.1](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.1) (2023-07-19) - ### Features -* **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) -* **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) -* **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) -* **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) -* **setup:** add transfer of object inside phase2cli ([7c743bb](https://github.com/privacy-scaling-explorations/p0tion/commit/7c743bbbb3e2a76c7656ccbc4f63716ee8e831f5)) -* **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) -* **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) - +- **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) +- **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) +- **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) +- **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) +- **setup:** add transfer of object inside phase2cli ([7c743bb](https://github.com/privacy-scaling-explorations/p0tion/commit/7c743bbbb3e2a76c7656ccbc4f63716ee8e831f5)) +- **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) +- **setup:** non interactive setup with artifacts download ([d032f37](https://github.com/privacy-scaling-explorations/p0tion/commit/d032f37a609448ec1741cd822967737c4d37515b)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) ### Bug Fixes -* **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) -* duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) -* **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) -* **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) -* **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) -* **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) -* **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) -* **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) -* wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) - - +- **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) +- duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) +- **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) +- **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) +- **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) +- **setup:** revert transfer of object and add region to config ([690da25](https://github.com/privacy-scaling-explorations/p0tion/commit/690da25addc9005ec3a5ce21a22fb7044293f772)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) +- **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) +- **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) +- wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) ## [1.0.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v1.0.0) (2023-07-11) - ### Features -* **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) -* **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) -* **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) -* **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) -* **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) -* **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) - +- **list ceremonies:** add a command to list all ceremonies ([d2723f2](https://github.com/privacy-scaling-explorations/p0tion/commit/d2723f2243ddfe250c086349242ccd178741978a)) +- **list:** exit with code 1 when calling showError with exit=true ([805c28e](https://github.com/privacy-scaling-explorations/p0tion/commit/805c28e286e20132d3673e4d76b419ccfa3890b4)) +- **setup:** add a cli command to validate the ceremony setup file and the constraints ([66f8837](https://github.com/privacy-scaling-explorations/p0tion/commit/66f88378d79ec789a025f296e5abd565f5d1e8db)) +- **setup:** add option to pass the authentication token as cli param ([9306eae](https://github.com/privacy-scaling-explorations/p0tion/commit/9306eaee98326f01f098ba5a73db9bb4bd27a1b7)) +- **setup:** implement non interactive setup ([c3638d4](https://github.com/privacy-scaling-explorations/p0tion/commit/c3638d4ab963d03038e76178af48f32148034b4d)) +- **vms:** implemented e2e test for contribution verification ([684123a](https://github.com/privacy-scaling-explorations/p0tion/commit/684123af219d7ad4b38d8f1378952f657982e845)) ### Bug Fixes -* **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) -* duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) -* **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) -* **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) -* **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) -* spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) -* unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) -* **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) -* **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) -* wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) - - +- **auth:** fix non interactive auth and force token refresh for coordinator ([0f4dfea](https://github.com/privacy-scaling-explorations/p0tion/commit/0f4dfea3b3961aa5b8024400431ede78d9f3a0b1)) +- duplicate messages when waiting for contribution; remove wrong listener ([61fbd19](https://github.com/privacy-scaling-explorations/p0tion/commit/61fbd19eb13f35d34963fbd350441f54cd8e1c91)) +- **setup:** add missing circuit artifacts local path ([15b8743](https://github.com/privacy-scaling-explorations/p0tion/commit/15b87439e147d7210cd54d72ea8bcc3bd496010c)) +- **setup:** amend after PR review ([8c104ef](https://github.com/privacy-scaling-explorations/p0tion/commit/8c104ef7e8a9bfeca4d18e3ce8ff22ab9be6a4f4)) +- **setup:** fix local path to circuit artifacts + change error in security tests ([865a06f](https://github.com/privacy-scaling-explorations/p0tion/commit/865a06f8f369f941282be26183079932b3bdfb1b)) +- spinner does not stop correctly after contribution verification ([345bdcb](https://github.com/privacy-scaling-explorations/p0tion/commit/345bdcb8a09915aba29b37ac988b7109a67490e0)) +- unconsistency when resuming a contribution ([07fc79b](https://github.com/privacy-scaling-explorations/p0tion/commit/07fc79b8415935eb7f5d0f11372f60d04f7d997c)) +- **ux:** added more verbose messages to inform the user of waiting times and errors ([80d9858](https://github.com/privacy-scaling-explorations/p0tion/commit/80d985887b3dd5966b3e98cd7a8fac19b8aa2658)) +- **vm:** missing files ([64f5019](https://github.com/privacy-scaling-explorations/p0tion/commit/64f50195905d472d07de2e007382ab49ab7f9642)) +- wrong path to Verifier smart contract template ([b414166](https://github.com/privacy-scaling-explorations/p0tion/commit/b41416617851fe3744a3975b5300378f21c963d9)) ## [0.5.0](https://github.com/privacy-scaling-explorations/p0tion/compare/v0.3.0...v0.5.0) (2023-07-04) diff --git a/packages/phase2cli/src/commands/auth.ts b/packages/phase2cli/src/commands/auth.ts index 6fc431ce..e044ad90 100644 --- a/packages/phase2cli/src/commands/auth.ts +++ b/packages/phase2cli/src/commands/auth.ts @@ -73,12 +73,12 @@ export const onVerification = async (verification: Verification): Promise )} on this device to generate a new token and authenticate\n` ) - console.log(theme.colors.magenta(figlet.textSync("Code is Below", { font: "ANSI Shadow" })), '\n') - + console.log(theme.colors.magenta(figlet.textSync("Code is Below", { font: "ANSI Shadow" })), "\n") + console.log( - `${theme.symbols.info} Your auth code: ${theme.text.bold(verification.user_code)} has been copied to your clipboard (${theme.emojis.clipboard} ${ - theme.symbols.success - })\n` + `${theme.symbols.info} Your auth code: ${theme.text.bold( + verification.user_code + )} has been copied to your clipboard (${theme.emojis.clipboard} ${theme.symbols.success})\n` ) const spinner = customSpinner(`Redirecting to Github...`, `clock`) diff --git a/packages/phase2cli/src/commands/contribute.ts b/packages/phase2cli/src/commands/contribute.ts index 6d31fd88..9ff99dec 100644 --- a/packages/phase2cli/src/commands/contribute.ts +++ b/packages/phase2cli/src/commands/contribute.ts @@ -811,7 +811,9 @@ export const listenToParticipantDocumentChanges = async ( await getLatestVerificationResult(firestoreDatabase, ceremony.id, circuit.id, participant.id) // Get next circuit for contribution. - const nextCircuit = timeoutExpired ? getCircuitBySequencePosition(circuits, changedContributionProgress) : getCircuitBySequencePosition(circuits, changedContributionProgress + 1) + const nextCircuit = timeoutExpired + ? getCircuitBySequencePosition(circuits, changedContributionProgress) + : getCircuitBySequencePosition(circuits, changedContributionProgress + 1) // Check disk space requirements for participant. const wannaGenerateAttestation = await handleDiskSpaceRequirementForNextContribution( @@ -895,7 +897,7 @@ const contribute = async (opt: any) => { // Get options. const ceremonyOpt = opt.ceremony const entropyOpt = opt.entropy - const auth = opt.auth + const auth = opt.auth // Check for authentication. const { user, providerUserId, token } = auth ? await authWithToken(firebaseApp, auth) : await checkAuth(firebaseApp) diff --git a/packages/phase2cli/src/commands/finalize.ts b/packages/phase2cli/src/commands/finalize.ts index 2e5c8bd8..10a6a959 100644 --- a/packages/phase2cli/src/commands/finalize.ts +++ b/packages/phase2cli/src/commands/finalize.ts @@ -249,7 +249,11 @@ const finalize = async (opt: any) => { // Check for authentication. const auth = opt.auth - const { user, providerUserId, token: coordinatorAccessToken } = auth ? await authWithToken(firebaseApp, auth) : await checkAuth(firebaseApp) + const { + user, + providerUserId, + token: coordinatorAccessToken + } = auth ? await authWithToken(firebaseApp, auth) : await checkAuth(firebaseApp) // Preserve command execution only for coordinators. if (!(await isCoordinator(user))) showError(COMMAND_ERRORS.COMMAND_NOT_COORDINATOR, true) diff --git a/packages/phase2cli/src/commands/index.ts b/packages/phase2cli/src/commands/index.ts index 5f94ebea..2ebc6ffd 100644 --- a/packages/phase2cli/src/commands/index.ts +++ b/packages/phase2cli/src/commands/index.ts @@ -6,4 +6,4 @@ export { default as finalize } from "./finalize.js" export { default as clean } from "./clean.js" export { default as logout } from "./logout.js" export { default as validate } from "./validate.js" -export { default as listCeremonies} from "./listCeremonies.js" \ No newline at end of file +export { default as listCeremonies } from "./listCeremonies.js" diff --git a/packages/phase2cli/src/commands/listCeremonies.ts b/packages/phase2cli/src/commands/listCeremonies.ts index be4fc175..c5df3cfc 100644 --- a/packages/phase2cli/src/commands/listCeremonies.ts +++ b/packages/phase2cli/src/commands/listCeremonies.ts @@ -17,11 +17,10 @@ const listCeremonies = async () => { // loop through all ceremonies for (const ceremony of ceremonies) names.push(ceremony.data().prefix) - + // print them to the console console.log(names.join(", ")) process.exit(0) - } catch (err: any) { showError(`${err.toString()}`, false) // we want to exit with a non-zero exit code diff --git a/packages/phase2cli/src/commands/observe.ts b/packages/phase2cli/src/commands/observe.ts index d2d71a83..8fc05fb1 100644 --- a/packages/phase2cli/src/commands/observe.ts +++ b/packages/phase2cli/src/commands/observe.ts @@ -15,7 +15,7 @@ import { COMMAND_ERRORS, GENERIC_ERRORS, showError } from "../lib/errors.js" import { promptForCeremonySelection } from "../lib/prompts.js" import { bootstrapCommandExecutionAndServices, checkAuth } from "../lib/services.js" import theme from "../lib/theme.js" -import {customSpinner, getSecondsMinutesHoursFromMillis, sleep } from "../lib/utils.js" +import { customSpinner, getSecondsMinutesHoursFromMillis, sleep } from "../lib/utils.js" /** * Clean cursor lines from current position back to root (default: zero). diff --git a/packages/phase2cli/src/commands/setup.ts b/packages/phase2cli/src/commands/setup.ts index cf31b88e..a796db91 100644 --- a/packages/phase2cli/src/commands/setup.ts +++ b/packages/phase2cli/src/commands/setup.ts @@ -466,7 +466,7 @@ export const handleCircuitArtifactUploadToStorage = async ( * from Hermez's ceremony Phase 1 Reliable Setup Ceremony. * @param cmd? - the path to the ceremony setup file. */ -const setup = async (cmd: { template?: string, auth?: string}) => { +const setup = async (cmd: { template?: string; auth?: string }) => { // Setup command state. const circuits: Array = [] // Circuits. let ceremonyId: string = "" // The unique identifier of the ceremony. @@ -474,8 +474,10 @@ const setup = async (cmd: { template?: string, auth?: string}) => { const { firebaseApp, firebaseFunctions, firestoreDatabase } = await bootstrapCommandExecutionAndServices() // Check for authentication. - const { user, providerUserId } = cmd.auth ? await authWithToken(firebaseApp, cmd.auth) : await checkAuth(firebaseApp) - + const { user, providerUserId } = cmd.auth + ? await authWithToken(firebaseApp, cmd.auth) + : await checkAuth(firebaseApp) + // Preserve command execution only for coordinators. if (!(await isCoordinator(user))) showError(COMMAND_ERRORS.COMMAND_NOT_COORDINATOR, true) @@ -501,7 +503,7 @@ const setup = async (cmd: { template?: string, auth?: string}) => { // if there is the file option, then set up the non interactively if (cmd.template) { // 1. parse the file - // tmp data - do not cleanup files as we need them + // tmp data - do not cleanup files as we need them const spinner = customSpinner(`Parsing ${theme.text.bold(cmd.template!)} setup configuration file...`, `clock`) spinner.start() const setupCeremonyData = await parseCeremonyFile(cmd.template!) @@ -524,13 +526,26 @@ const setup = async (cmd: { template?: string, auth?: string}) => { const zkeyLocalPathAndFileName = getZkeyLocalFilePath(circuit.files.initialZkeyFilename) // 2. download the pot and wasm files - await checkAndDownloadSmallestPowersOfTau(convertToDoubleDigits(circuit.metadata?.pot!), circuit.files.potFilename) - + await checkAndDownloadSmallestPowersOfTau( + convertToDoubleDigits(circuit.metadata?.pot!), + circuit.files.potFilename + ) + // 3. generate the zKey - const spinner = customSpinner(`Generating genesis zKey for circuit ${theme.text.bold(circuit.name)}...`, `clock`) + const spinner = customSpinner( + `Generating genesis zKey for circuit ${theme.text.bold(circuit.name)}...`, + `clock` + ) spinner.start() - await zKey.newZKey(r1csLocalPathAndFileName, getPotLocalFilePath(circuit.files.potFilename), zkeyLocalPathAndFileName, undefined) - spinner.succeed(`Generation of the genesis zKey for citcui ${theme.text.bold(circuit.name)} completed successfully`) + await zKey.newZKey( + r1csLocalPathAndFileName, + getPotLocalFilePath(circuit.files.potFilename), + zkeyLocalPathAndFileName, + undefined + ) + spinner.succeed( + `Generation of the genesis zKey for citcui ${theme.text.bold(circuit.name)} completed successfully` + ) // 4. calculate the hashes const wasmBlake2bHash = await blake512FromPath(wasmLocalPathAndFileName) @@ -547,7 +562,7 @@ const setup = async (cmd: { template?: string, auth?: string}) => { zkeyLocalPathAndFileName, circuit.files.initialZkeyFilename ) - + // Check if PoT file has been already uploaded to storage. const alreadyUploadedPot = await checkIfObjectExist( firebaseFunctions, @@ -595,18 +610,24 @@ const setup = async (cmd: { template?: string, auth?: string}) => { ceremonySetupData.circuits[index].zKeySizeInBytes = getFileStats(zkeyLocalPathAndFileName).size } - // 7. setup the ceremony - const ceremonyId = await setupCeremony(firebaseFunctions, ceremonySetupData.ceremonyInputData, ceremonySetupData.ceremonyPrefix, ceremonySetupData.circuits) - console.log( `Congratulations, the setup of ceremony ${theme.text.bold( - ceremonySetupData.ceremonyInputData.title - )} (${`UID: ${theme.text.bold(ceremonyId)}`}) has been successfully completed ${ - theme.emojis.tada - }. You will be able to find all the files and info respectively in the ceremony bucket and database document.`) - + const ceremonyId = await setupCeremony( + firebaseFunctions, + ceremonySetupData.ceremonyInputData, + ceremonySetupData.ceremonyPrefix, + ceremonySetupData.circuits + ) + console.log( + `Congratulations, the setup of ceremony ${theme.text.bold( + ceremonySetupData.ceremonyInputData.title + )} (${`UID: ${theme.text.bold(ceremonyId)}`}) has been successfully completed ${ + theme.emojis.tada + }. You will be able to find all the files and info respectively in the ceremony bucket and database document.` + ) + terminate(providerUserId) - } + } // Look for R1CS files. const r1csFilePaths = await filterDirectoryFilesByExtension(cwd, `.r1cs`) diff --git a/packages/phase2cli/src/commands/validate.ts b/packages/phase2cli/src/commands/validate.ts index 34c9da2e..7e389942 100644 --- a/packages/phase2cli/src/commands/validate.ts +++ b/packages/phase2cli/src/commands/validate.ts @@ -4,7 +4,7 @@ import { showError } from "../lib/errors.js" /** * Validate ceremony setup command. */ -const validate = async (cmd: { template: string, constraints?: number }) => { +const validate = async (cmd: { template: string; constraints?: number }) => { try { // parse the file and cleanup after const parsedFile = await parseCeremonyFile(cmd.template, true) @@ -18,7 +18,6 @@ const validate = async (cmd: { template: string, constraints?: number }) => { } console.log(true) - } catch (err: any) { showError(`${err.toString()}`, false) // we want to exit with a non-zero exit code diff --git a/packages/phase2cli/src/index.ts b/packages/phase2cli/src/index.ts index dc6f385e..95db01c3 100755 --- a/packages/phase2cli/src/index.ts +++ b/packages/phase2cli/src/index.ts @@ -4,7 +4,17 @@ import { createCommand } from "commander" import { readFileSync } from "fs" import { dirname } from "path" import { fileURLToPath } from "url" -import { setup, auth, contribute, observe, finalize, clean, logout, validate, listCeremonies } from "./commands/index.js" +import { + setup, + auth, + contribute, + observe, + finalize, + clean, + logout, + validate, + listCeremonies +} from "./commands/index.js" // Get pkg info (e.g., name, version). const packagePath = `${dirname(fileURLToPath(import.meta.url))}/..` @@ -27,10 +37,7 @@ program .command("clean") .description("clean up output generated by commands from the current working directory") .action(clean) -program - .command("list") - .description("List all ceremonies prefixes") - .action(listCeremonies) +program.command("list").description("List all ceremonies prefixes").action(listCeremonies) program .command("logout") .description("sign out from Firebae Auth service and delete Github OAuth 2.0 token from local storage") @@ -48,10 +55,10 @@ const ceremony = program.command("coordinate").description("commands for coordin ceremony .command("setup") .description("setup a Groth16 Phase 2 Trusted Setup ceremony for zk-SNARK circuits") - .option('-t, --template ', 'The path to the ceremony setup template', '') - .option('-a, --auth ', 'The Github OAuth 2.0 token', '') + .option("-t, --template ", "The path to the ceremony setup template", "") + .option("-a, --auth ", "The Github OAuth 2.0 token", "") .action(setup) - + ceremony .command("observe") .description("observe in real-time the waiting queue of each ceremony circuit") diff --git a/packages/phase2cli/src/lib/services.ts b/packages/phase2cli/src/lib/services.ts index ee18b6f3..b9663c4b 100644 --- a/packages/phase2cli/src/lib/services.ts +++ b/packages/phase2cli/src/lib/services.ts @@ -117,8 +117,6 @@ export const signInToFirebase = async (firebaseApp: FirebaseApp, credentials: OA } } - - /** * Ensure that the callee is an authenticated user. * @notice The token will be passed as parameter. diff --git a/packages/phase2cli/src/lib/utils.ts b/packages/phase2cli/src/lib/utils.ts index 877c6e19..98a8b083 100644 --- a/packages/phase2cli/src/lib/utils.ts +++ b/packages/phase2cli/src/lib/utils.ts @@ -311,8 +311,22 @@ export const generateCustomUrlToTweetAboutParticipation = ( isFinalizing: boolean ) => isFinalizing - ? `https://twitter.com/intent/tweet?text=I%20have%20finalized%20the%20${ceremonyName}${ceremonyName.toLowerCase().includes("trusted") || ceremonyName.toLowerCase().includes("setup") || ceremonyName.toLowerCase().includes("phase2") || ceremonyName.toLowerCase().includes("ceremony") ? "!" : "%20Phase%202%20Trusted%20Setup%20ceremony!"}%20You%20can%20view%20my%20final%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP%20#PSE` - : `https://twitter.com/intent/tweet?text=I%20contributed%20to%20the%20${ceremonyName}${ceremonyName.toLowerCase().includes("trusted") || ceremonyName.toLowerCase().includes("setup") || ceremonyName.toLowerCase().includes("phase2") || ceremonyName.toLowerCase().includes("ceremony") ? "!" : "%20Phase%202%20Trusted%20Setup%20ceremony!"}%20You%20can%20view%20the%20steps%20to%20contribute%20here:%20https://ceremony.pse.dev%20You%20can%20view%20my%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP` + ? `https://twitter.com/intent/tweet?text=I%20have%20finalized%20the%20${ceremonyName}${ + ceremonyName.toLowerCase().includes("trusted") || + ceremonyName.toLowerCase().includes("setup") || + ceremonyName.toLowerCase().includes("phase2") || + ceremonyName.toLowerCase().includes("ceremony") + ? "!" + : "%20Phase%202%20Trusted%20Setup%20ceremony!" + }%20You%20can%20view%20my%20final%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP%20#PSE` + : `https://twitter.com/intent/tweet?text=I%20contributed%20to%20the%20${ceremonyName}${ + ceremonyName.toLowerCase().includes("trusted") || + ceremonyName.toLowerCase().includes("setup") || + ceremonyName.toLowerCase().includes("phase2") || + ceremonyName.toLowerCase().includes("ceremony") + ? "!" + : "%20Phase%202%20Trusted%20Setup%20ceremony!" + }%20You%20can%20view%20the%20steps%20to%20contribute%20here:%20https://ceremony.pse.dev%20You%20can%20view%20my%20attestation%20here:%20${gistUrl}%20#Ethereum%20#ZKP` /** * Return a custom progress bar. @@ -540,7 +554,9 @@ export const handleStartOrResumeContribution = async ( const { completedContributions } = waitingQueue // = current progress. console.log( - `${theme.text.bold(`\n- Circuit # ${theme.colors.magenta(`${sequencePosition}/${circuitsLength}`)}`)} (Contribution Steps)` + `${theme.text.bold( + `\n- Circuit # ${theme.colors.magenta(`${sequencePosition}/${circuitsLength}`)}` + )} (Contribution Steps)` ) // Get most up-to-date data from the participant document. From f4b8ae4c74c1c8b1fcbc0aa96dd6cff0fdb6640d Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:56:58 +0100 Subject: [PATCH 2/2] chore(merge) - dev to staging (#198) * fix(setup): remove S3 usage and download from URL * fix(imports): use adoby-node-fetch * fix(vm): stop vm even on verification failing * feat(contribute): cli flag for auth token (run on VM) * fix(vm): fix VM setup * ci: update string literals in ts files for staging/dev environment * fix(ci): missing environment specifier in cli publish workflow * fix(timeout): fix issue with timing out while in upload phase * fix(finalization): fix various bugs and add non interactive auth * build(cleanup): removed puppeteer and related tests * chore(release): publish 1.0.7 * refactor(ui/ux): small changes for a better ui/ux * refactor(ui/ux): add information about private profiles failing sybil checks * fix(ui): fix wording * chore(release): publish 1.0.8 * feat(cors): add more CORS options * fix: don't reject on first iteration of waitForVMCommandExecutioncution * chore: prettier * fix(vm): fix deprecated node setup script * fix: cfOrVm prompt cases on truthy value * fix(vm): fix verification script * fix(vm): verification script fix --------- Co-authored-by: Daehyun Paik Co-authored-by: daodesigner <58278045+daodesigner@users.noreply.github.com> Co-authored-by: Sladuca --- packages/actions/src/helpers/vm.ts | 10 ++++++++-- packages/phase2cli/src/lib/prompts.ts | 23 ++++++++++++----------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/actions/src/helpers/vm.ts b/packages/actions/src/helpers/vm.ts index c1ff4d04..372f9218 100644 --- a/packages/actions/src/helpers/vm.ts +++ b/packages/actions/src/helpers/vm.ts @@ -93,8 +93,13 @@ export const vmDependenciesAndCacheArtifactsCommand = ( // eslint-disable-next-line no-template-curly-in-string "touch ${MARKER_FILE}", "sudo yum update -y", - "curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash - ", - "sudo yum install -y nodejs", + "curl -O https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.xz", + "tar -xf node-v16.13.0-linux-x64.tar.xz", + "mv node-v16.13.0-linux-x64 nodejs", + "sudo mv nodejs /opt/", + "echo 'export NODEJS_HOME=/opt/nodejs' >> /etc/profile", + "echo 'export PATH=$NODEJS_HOME/bin:$PATH' >> /etc/profile", + "source /etc/profile", "npm install -g snarkjs", `aws s3 cp s3://${zKeyPath} /var/tmp/genesisZkey.zkey`, `aws s3 cp s3://${potPath} /var/tmp/pot.ptau`, @@ -118,6 +123,7 @@ export const vmContributionVerificationCommand = ( lastZkeyStoragePath: string, verificationTranscriptStoragePathAndFilename: string ): Array => [ + `source /etc/profile`, `aws s3 cp s3://${bucketName}/${lastZkeyStoragePath} /var/tmp/lastZKey.zkey > /var/tmp/log.txt`, `snarkjs zkvi /var/tmp/genesisZkey.zkey /var/tmp/pot.ptau /var/tmp/lastZKey.zkey > /var/tmp/verification_transcript.log`, `aws s3 cp /var/tmp/verification_transcript.log s3://${bucketName}/${verificationTranscriptStoragePathAndFilename} &>/dev/null`, diff --git a/packages/phase2cli/src/lib/prompts.ts b/packages/phase2cli/src/lib/prompts.ts index 0c0837ae..064bd9a0 100644 --- a/packages/phase2cli/src/lib/prompts.ts +++ b/packages/phase2cli/src/lib/prompts.ts @@ -343,7 +343,7 @@ export const promptCircuitInputData = async ( let circomVersion: string = "" let circomCommitHash: string = "" let circuitInputData: CircuitInputData - let useCfOrVm: CircuitContributionVerificationMechanism + let cfOrVm: CircuitContributionVerificationMechanism let vmDiskType: DiskTypeForVM let vmConfigurationType: string = "" @@ -429,12 +429,17 @@ export const promptCircuitInputData = async ( `CF`, // eq. true. `VM` // eq. false. ) - useCfOrVm = confirmation - } else useCfOrVm = CircuitContributionVerificationMechanism.VM + cfOrVm = confirmation + ? CircuitContributionVerificationMechanism.CF + : CircuitContributionVerificationMechanism.VM - if (useCfOrVm === undefined) showError(COMMAND_ERRORS.COMMAND_ABORT_PROMPT, true) + } else { + cfOrVm = CircuitContributionVerificationMechanism.VM + } + + if (cfOrVm === undefined) showError(COMMAND_ERRORS.COMMAND_ABORT_PROMPT, true) - if (!useCfOrVm) { + if (cfOrVm === CircuitContributionVerificationMechanism.VM) { // Ask for selecting the specific VM configuration type. vmConfigurationType = await promptVMTypeSelector(constraintSize) @@ -478,9 +483,7 @@ export const promptCircuitInputData = async ( paramsConfiguration: circuitConfigurationValues }, verification: { - cfOrVm: useCfOrVm - ? CircuitContributionVerificationMechanism.CF - : CircuitContributionVerificationMechanism.VM, + cfOrVm, vm: { vmConfigurationType, vmDiskType @@ -520,9 +523,7 @@ export const promptCircuitInputData = async ( paramsConfiguration: circuitConfigurationValues }, verification: { - cfOrVm: useCfOrVm - ? CircuitContributionVerificationMechanism.CF - : CircuitContributionVerificationMechanism.VM, + cfOrVm, vm: { vmConfigurationType, vmDiskType