From 0dfd5730c19cb0b96cf05c7cff3e82d2f1f109cd Mon Sep 17 00:00:00 2001 From: Alec Schaefer Date: Fri, 1 Sep 2023 12:23:44 -0400 Subject: [PATCH] odis signer release 3.0.0 (#10538) * build signer with only published versions * point combiner to published versions so CI checks pass * add node types to combiner dev dependencies * add node-fetch types to combiner * revert all combiner changes * actually revert all combiner changes * fix node type versions * fix combiner integration tests * fix combiner integration tests, close server before destroying db * revert depending on published dependencies for merge to master, delete unused commands from package.json, bump signer to -dev version * lockfile --- .../combiner/package.json | 1 + .../combiner/test/integration/pnp.test.ts | 31 +++++++++---------- packages/phone-number-privacy/signer/.env | 2 +- .../phone-number-privacy/signer/package.json | 5 ++- yarn.lock | 2 +- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/packages/phone-number-privacy/combiner/package.json b/packages/phone-number-privacy/combiner/package.json index 3154c33434e..fd432f11a9f 100644 --- a/packages/phone-number-privacy/combiner/package.json +++ b/packages/phone-number-privacy/combiner/package.json @@ -53,6 +53,7 @@ "uuid": "^7.0.3" }, "devDependencies": { + "@types/node": "18.15.13", "@celo/utils": "^4.1.2-dev", "@celo/phone-utils": "^4.1.2-dev", "@types/express": "^4.17.6", diff --git a/packages/phone-number-privacy/combiner/test/integration/pnp.test.ts b/packages/phone-number-privacy/combiner/test/integration/pnp.test.ts index 29bd022ffbe..a300adf9976 100644 --- a/packages/phone-number-privacy/combiner/test/integration/pnp.test.ts +++ b/packages/phone-number-privacy/combiner/test/integration/pnp.test.ts @@ -313,12 +313,12 @@ describe('pnpService', () => { }) afterEach(async () => { - await signerDB1?.destroy() - await signerDB2?.destroy() - await signerDB3?.destroy() await serverClose(signer1) await serverClose(signer2) await serverClose(signer3) + await signerDB1?.destroy() + await signerDB2?.destroy() + await signerDB3?.destroy() }) describe('when signers are operating correctly', () => { @@ -563,10 +563,10 @@ describe('pnpService', () => { // This previously returned 502 instead of 500 it('Should respond with 500 when insufficient signer responses', async () => { - await signerDB1?.destroy() - await signerDB2?.destroy() await serverClose(signer1) await serverClose(signer2) + await signerDB1?.destroy() + await signerDB2?.destroy() const req = { account: ACCOUNT_ADDRESS1, @@ -1242,11 +1242,11 @@ describe('pnpService', () => { signerDB4 = await initSignerDatabase(signerConfig, signerMigrationsPath) signerDB5 = await initSignerDatabase(signerConfig, signerMigrationsPath) - signer1 = startSigner(signerConfig, signerDB1, keyProvider1).listen(3001) - signer2 = startSigner(signerConfig, signerDB2, keyProvider2).listen(3002) - signer3 = startSigner(signerConfig, signerDB3, keyProvider3).listen(3003) - signer4 = startSigner(signerConfig, signerDB4, keyProvider4).listen(3004) - signer5 = startSigner(signerConfig, signerDB5, keyProvider5).listen(3005) + signer1 = startSigner(signerConfig, signerDB1, keyProvider1, mockKit).listen(3001) + signer2 = startSigner(signerConfig, signerDB2, keyProvider2, mockKit).listen(3002) + signer3 = startSigner(signerConfig, signerDB3, keyProvider3, mockKit).listen(3003) + signer4 = startSigner(signerConfig, signerDB4, keyProvider4, mockKit).listen(3004) + signer5 = startSigner(signerConfig, signerDB5, keyProvider5, mockKit).listen(3005) userSeed = new Uint8Array(32) for (let i = 0; i < userSeed.length - 1; i++) { @@ -1258,16 +1258,16 @@ describe('pnpService', () => { }) afterEach(async () => { - await signerDB1?.destroy() - await signerDB2?.destroy() - await signerDB3?.destroy() - await signerDB4?.destroy() - await signerDB5?.destroy() await serverClose(signer1) await serverClose(signer2) await serverClose(signer3) await serverClose(signer4) await serverClose(signer5) + await signerDB1?.destroy() + await signerDB2?.destroy() + await signerDB3?.destroy() + await signerDB4?.destroy() + await signerDB5?.destroy() }) it('Should respond with 200 on valid request', async () => { @@ -1283,7 +1283,6 @@ describe('pnpService', () => { signature: res.body.signature, performedQueryCount: 1, totalQuota: expectedTotalQuota, - warnings: [], }) threshold_bls.unblind( diff --git a/packages/phone-number-privacy/signer/.env b/packages/phone-number-privacy/signer/.env index 8dfa0ea6050..1e91f1b99a4 100644 --- a/packages/phone-number-privacy/signer/.env +++ b/packages/phone-number-privacy/signer/.env @@ -32,7 +32,7 @@ ALFAJORES_ODIS_BLOCKCHAIN_PROVIDER=https://alfajores-forno.celo-testnet.org MAINNET_ODIS_BLOCKCHAIN_PROVIDER=https://forno.celo.org ODIS_DOMAINS_TEST_KEY_VERSION=1 ODIS_PNP_TEST_KEY_VERSION=1 -DEPLOYED_SIGNER_SERVICE_VERSION=3.0.0-beta.16 +DEPLOYED_SIGNER_SERVICE_VERSION=3.0.0 # PUBKEYS STAGING_DOMAINS_PUBKEY=7FsWGsFnmVvRfMDpzz95Np76wf/1sPaK0Og9yiB+P8QbjiC8FV67NBans9hzZEkBaQMhiapzgMR6CkZIZPvgwQboAxl65JWRZecGe5V3XO4sdKeNemdAZ2TzQuWkuZoA ALFAJORES_DOMAINS_PUBKEY=+ZrxyPvLChWUX/DyPw6TuGwQH0glDJEbSrSxUARyP5PuqYyP/U4WZTV1e0bAUioBZ6QCJMiLpDwTaFvy8VnmM5RBbLQUMrMg5p4+CBCqj6HhsMfcyUj8V0LyuNdStlCB diff --git a/packages/phone-number-privacy/signer/package.json b/packages/phone-number-privacy/signer/package.json index 8cef02e01d0..f7d4806b8a5 100644 --- a/packages/phone-number-privacy/signer/package.json +++ b/packages/phone-number-privacy/signer/package.json @@ -1,6 +1,6 @@ { "name": "@celo/phone-number-privacy-signer", - "version": "3.0.0-beta.17-dev", + "version": "3.0.1-dev", "description": "Signing participator of ODIS", "author": "Celo", "license": "Apache-2.0", @@ -27,10 +27,8 @@ "test:e2e:alfajores:1": "CONTEXT_NAME=alfajores ODIS_SIGNER_SERVICE_URL=https://odis-alfajores-signer-1-b.azurefd.net yarn test:e2e", "test:e2e:alfajores:2": "CONTEXT_NAME=alfajores ODIS_SIGNER_SERVICE_URL=https://odis-alfajores-signer2.azurefd.net yarn test:e2e", "test:e2e:alfajores:3": "CONTEXT_NAME=alfajores ODIS_SIGNER_SERVICE_URL=https://odis-alfajores-signer3.azurefd.net yarn test:e2e", - "test:e2e:mainnet:westus2": "CONTEXT_NAME=mainnet ODIS_SIGNER_SERVICE_URL=https://mainnet-pgpnp-westus2.azurefd.net yarn test:e2e", "test:e2e:mainnet:brazilsouth": "CONTEXT_NAME=mainnet ODIS_SIGNER_SERVICE_URL=https://mainnet-pgpnp-brazilsouth.azurefd.net yarn test:e2e", "test:e2e:mainnet:eastasia": "CONTEXT_NAME=mainnet ODIS_SIGNER_SERVICE_URL=https://mainnet-pgpnp-eastasia.azurefd.net yarn test:e2e", - "test:e2e:mainnet:westeurope": "CONTEXT_NAME=mainnet ODIS_SIGNER_SERVICE_URL=https://mainnet-pgpnp-westeurope.azurefd.net yarn test:e2e", "test:signer:mainnet": "MAINNET_ODIS_BLOCKCHAIN_PROVIDER=https://alfajores-forno.celo-testnet.org CONTEXT_NAME=mainnet yarn jest test/end-to-end -t='\\[Signer configuration test\\]'", "db:migrate": "ts-node scripts/run-migrations.ts", "db:migrate:make": "knex --migrations-directory ./src/common/database/migrations migrate:make -x ts", @@ -68,6 +66,7 @@ "lru-cache": "^10.0.1" }, "devDependencies": { + "@types/node": "18.15.13", "@types/express": "^4.17.6", "@types/supertest": "^2.0.12", "sqlite3": "^5.0.8", diff --git a/yarn.lock b/yarn.lock index 1d94ed08576..bc941833aaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6448,7 +6448,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^18.7.16": +"@types/node@*", "@types/node@18.15.13", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^18.7.16": version "18.15.13" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==