Skip to content

Commit

Permalink
odis signer release 3.0.0 (#10538)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
alecps authored Sep 1, 2023
1 parent ed9c51b commit 0dfd573
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
1 change: 1 addition & 0 deletions packages/phone-number-privacy/combiner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
31 changes: 15 additions & 16 deletions packages/phone-number-privacy/combiner/test/integration/pnp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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++) {
Expand All @@ -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 () => {
Expand All @@ -1283,7 +1283,6 @@ describe('pnpService', () => {
signature: res.body.signature,
performedQueryCount: 1,
totalQuota: expectedTotalQuota,

warnings: [],
})
threshold_bls.unblind(
Expand Down
2 changes: 1 addition & 1 deletion packages/phone-number-privacy/signer/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions packages/phone-number-privacy/signer/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down

0 comments on commit 0dfd573

Please sign in to comment.