Skip to content

Commit

Permalink
Alecps/release3.0.1 (#10062)
Browse files Browse the repository at this point in the history
* add Identifier to OdisUtils

* fixes error

* fix error

* update combiner e2e tests, add isE1164Number check to getBlindedIdentifier

* 3.0.1

* 3.0.2-dev
  • Loading branch information
alecps authored Dec 8, 2022
1 parent e81462b commit 86c1aa9
Show file tree
Hide file tree
Showing 38 changed files with 318 additions and 186 deletions.
6 changes: 3 additions & 3 deletions packages/attestation-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"test-send-sms-twilio": "TS_NODE_FILES=true CONFIG=config/.env.development ts-node scripts/test-send-sms-twilio.ts"
},
"dependencies": {
"@celo/contractkit": "3.0.1-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/identity": "3.0.0",
"@celo/keystores": "3.0.1-dev",
"@celo/phone-utils": "3.0.1-dev",
"@celo/keystores": "3.0.2-dev",
"@celo/phone-utils": "3.0.2-dev",
"bignumber.js": "^9.0.0",
"body-parser": "1.19.0",
"bunyan": "1.8.12",
Expand Down
18 changes: 9 additions & 9 deletions packages/celotool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"author": "Celo",
"license": "Apache-2.0",
"dependencies": {
"@celo/base": "3.0.1-dev",
"@celo/connect": "3.0.1-dev",
"@celo/cryptographic-utils": "3.0.1-dev",
"@celo/contractkit": "3.0.1-dev",
"@celo/base": "3.0.2-dev",
"@celo/connect": "3.0.2-dev",
"@celo/cryptographic-utils": "3.0.2-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/env-tests": "1.0.0",
"@types/ethereumjs-util": "^5.2.0",
"@celo/explorer": "3.0.1-dev",
"@celo/governance": "3.0.1-dev",
"@celo/identity": "3.0.1-dev",
"@celo/network-utils": "3.0.1-dev",
"@celo/utils": "3.0.1-dev",
"@celo/explorer": "3.0.2-dev",
"@celo/governance": "3.0.2-dev",
"@celo/identity": "3.0.2-dev",
"@celo/network-utils": "3.0.2-dev",
"@celo/utils": "3.0.2-dev",
"@google-cloud/monitoring": "0.7.1",
"@google-cloud/pubsub": "^0.28.1",
"@google-cloud/secret-manager": "3.0.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
},
"dependencies": {
"@celo/bls12377js": "0.1.1",
"@celo/contractkit": "3.0.1-dev",
"@celo/explorer": "3.0.1-dev",
"@celo/governance": "3.0.1-dev",
"@celo/identity": "3.0.1-dev",
"@celo/phone-utils": "3.0.1-dev",
"@celo/utils": "3.0.1-dev",
"@celo/cryptographic-utils": "3.0.1-dev",
"@celo/wallet-hsm-azure": "3.0.1-dev",
"@celo/wallet-ledger": "3.0.1-dev",
"@celo/wallet-local": "3.0.1-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/explorer": "3.0.2-dev",
"@celo/governance": "3.0.2-dev",
"@celo/identity": "3.0.2-dev",
"@celo/phone-utils": "3.0.2-dev",
"@celo/utils": "3.0.2-dev",
"@celo/cryptographic-utils": "3.0.2-dev",
"@celo/wallet-hsm-azure": "3.0.2-dev",
"@celo/wallet-ledger": "3.0.2-dev",
"@celo/wallet-local": "3.0.2-dev",
"@ledgerhq/hw-transport-node-hid": "~5.11.0",
"@oclif/command": "^1.6.0",
"@oclif/config": "^1.6.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/env-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@celo/contractkit": "3.0.1-dev",
"@celo/utils": "3.0.1-dev",
"@celo/base": "3.0.1-dev",
"@celo/connect": "3.0.1-dev",
"@celo/identity": "3.0.1-dev",
"@celo/phone-utils": "3.0.1-dev",
"@celo/cryptographic-utils": "3.0.1-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/utils": "3.0.2-dev",
"@celo/base": "3.0.2-dev",
"@celo/connect": "3.0.2-dev",
"@celo/identity": "3.0.2-dev",
"@celo/phone-utils": "3.0.2-dev",
"@celo/cryptographic-utils": "3.0.2-dev",
"bunyan": "1.8.12",
"bunyan-gke-stackdriver": "0.1.2",
"bunyan-debug-stream": "2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/metadata-crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"homepage": "https://github.com/celo-org/celo-monorepo/tree/master/packages/metadata-crawler",
"repository": "https://github.com/celo-org/celo-monorepo/tree/master/packages/metadata-crawler",
"dependencies": {
"@celo/connect": "3.0.1-dev",
"@celo/contractkit": "3.0.1-dev",
"@celo/utils": "3.0.1-dev",
"@celo/connect": "3.0.2-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/utils": "3.0.2-dev",
"@types/pg": "^7.14.3",
"bunyan": "1.8.12",
"bunyan-gke-stackdriver": "0.1.2",
Expand Down
12 changes: 6 additions & 6 deletions packages/phone-number-privacy/combiner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"test:e2e:alfajores": "FLAKEY=true CONTEXT_NAME=alfajores yarn test:e2e"
},
"dependencies": {
"@celo/contractkit": "3.0.1-dev",
"@celo/phone-number-privacy-common": "2.0.1-dev",
"@celo/identity": "3.0.1-dev",
"@celo/encrypted-backup": "3.0.1-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/phone-number-privacy-common": "2.0.2-dev",
"@celo/identity": "3.0.2-dev",
"@celo/encrypted-backup": "3.0.2-dev",
"@celo/identity-prev": "npm:@celo/identity@1.2.0",
"@celo/poprf": "^0.1.9",
"blind-threshold-bls": "https://github.com/celo-org/blind-threshold-bls-wasm#e1e2f8a",
Expand All @@ -45,8 +45,8 @@
"uuid": "^7.0.3"
},
"devDependencies": {
"@celo/utils": "3.0.1-dev",
"@celo/phone-utils": "3.0.1-dev",
"@celo/utils": "3.0.2-dev",
"@celo/phone-utils": "3.0.2-dev",
"@types/express": "^4.17.6",
"@types/supertest": "^2.0.12",
"@types/uuid": "^7.0.3",
Expand Down
45 changes: 30 additions & 15 deletions packages/phone-number-privacy/combiner/test/end-to-end/pnp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import {
walletAuthSigner,
} from './resources'

const { IdentifierPrefix } = OdisUtils.Identifier

require('dotenv').config()

jest.setTimeout(60000)
Expand Down Expand Up @@ -179,8 +181,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
// Raw key is used as the blinding client's seed, so we need a new PN
// Create a fake PN that is always incrementing and shouldn't ever repeat
const unusedPN = `+1${Date.now()}`
await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
await OdisUtils.Identifier.getObfuscatedIdentifier(
unusedPN,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT
Expand All @@ -201,8 +204,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
})

it('Should increment performedQueryCount on success with WALLET_KEY auth', async () => {
await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
walletAuthSigner,
SERVICE_CONTEXT,
Expand Down Expand Up @@ -230,15 +234,17 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
)
beforeAll(async () => {
// Ensure that these are each called at least once for the first test runs
await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
walletAuthSigner,
SERVICE_CONTEXT,
replayedBlindingFactor
)
await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT
Expand All @@ -260,8 +266,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
})

it('Should succeed and not update performedQueryCount when authenticated with WALLET_KEY', async () => {
const res = await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
const res = await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
walletAuthSigner,
SERVICE_CONTEXT,
Expand All @@ -282,8 +289,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
})

it('Should succeed and not update performedQueryCount when authenticated with DEK', async () => {
const res = await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
const res = await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT
Expand All @@ -306,8 +314,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
// NOTE: these are also replayed requests
for (let i = 1; i <= 2; i++) {
it(`Should succeed on valid request with key version header ${i}`, async () => {
const res = await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
const res = await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT,
Expand All @@ -326,8 +335,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
}

it(`Should succeed on invalid key version`, async () => {
const res = await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
const res = await OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT,
Expand All @@ -346,8 +356,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi

it(`Should reject to throw ${ErrorMessages.ODIS_INPUT_ERROR} on unsupported key version`, async () => {
await expect(
OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT,
Expand All @@ -362,8 +373,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi

it(`Should reject to throw ${ErrorMessages.ODIS_INPUT_ERROR} on invalid address`, async () => {
await expect(
OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
'not an address',
dekAuthSigner(0),
SERVICE_CONTEXT,
Expand All @@ -378,8 +390,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi

it(`Should reject to throw ${ErrorMessages.ODIS_INPUT_ERROR} on invalid phone number`, async () => {
await expect(
OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
'not a phone number',
OdisUtils.Identifier.getObfuscatedIdentifier(
'12345',
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(0),
SERVICE_CONTEXT,
Expand All @@ -389,7 +402,7 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi
undefined,
1
)
).rejects.toThrow('Invalid phone number: not a phone number')
).rejects.toThrow('Invalid phone number: 12345')
})

it(`Should reject to throw ${ErrorMessages.ODIS_AUTH_ERROR} with invalid WALLET_KEY auth`, async () => {
Expand All @@ -416,8 +429,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi

it(`Should reject to throw ${ErrorMessages.ODIS_AUTH_ERROR} with invalid DEK auth`, async () => {
await expect(
OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS,
dekAuthSigner(1), // DEK auth signer doesn't match the registered DEK for ACCOUNT_ADDRESS
SERVICE_CONTEXT
Expand All @@ -427,8 +441,9 @@ describe(`Running against service deployed at ${combinerUrl} w/ blockchain provi

it(`Should reject to throw ${ErrorMessages.ODIS_QUOTA_ERROR} when account has no quota`, async () => {
await expect(
OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
OdisUtils.Identifier.getObfuscatedIdentifier(
PHONE_NUMBER,
IdentifierPrefix.PHONE_NUMBER,
ACCOUNT_ADDRESS_NO_QUOTA,
dekAuthSigner(0),
SERVICE_CONTEXT
Expand Down
12 changes: 6 additions & 6 deletions packages/phone-number-privacy/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@celo/phone-number-privacy-common",
"version": "2.0.1-dev",
"version": "2.0.2-dev",
"description": "Common library for the combiner and signer libraries",
"author": "Celo",
"license": "Apache-2.0",
Expand All @@ -18,10 +18,10 @@
"lib/**/*"
],
"dependencies": {
"@celo/base": "3.0.1-dev",
"@celo/contractkit": "3.0.1-dev",
"@celo/utils": "3.0.1-dev",
"@celo/phone-utils": "3.0.1-dev",
"@celo/base": "3.0.2-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/utils": "3.0.2-dev",
"@celo/phone-utils": "3.0.2-dev",
"bignumber.js": "^9.0.0",
"bunyan": "1.8.12",
"bunyan-debug-stream": "2.0.0",
Expand All @@ -33,7 +33,7 @@
},
"devDependencies": {
"@celo/poprf": "^0.1.9",
"@celo/wallet-local": "3.0.1-dev",
"@celo/wallet-local": "3.0.2-dev",
"@types/bunyan": "1.8.4",
"@types/elliptic": "^6.4.12",
"@types/express": "^4.17.6",
Expand Down
14 changes: 7 additions & 7 deletions packages/phone-number-privacy/monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"loadTest": "ts-node src/scripts/run-load-test.ts"
},
"dependencies": {
"@celo/contractkit": "3.0.1-dev",
"@celo/cryptographic-utils": "3.0.1-dev",
"@celo/encrypted-backup": "3.0.1-dev",
"@celo/identity": "3.0.1-dev",
"@celo/wallet-local": "3.0.1-dev",
"@celo/phone-number-privacy-common": "2.0.1-dev",
"@celo/utils": "3.0.1-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/cryptographic-utils": "3.0.2-dev",
"@celo/encrypted-backup": "3.0.2-dev",
"@celo/identity": "3.0.2-dev",
"@celo/wallet-local": "3.0.2-dev",
"@celo/phone-number-privacy-common": "2.0.1",
"@celo/utils": "3.0.2-dev",
"firebase-admin": "^9.12.0",
"firebase-functions": "^3.15.7"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/phone-number-privacy/signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"ssl:keygen": "./scripts/create-ssl-cert.sh"
},
"dependencies": {
"@celo/base": "3.0.1-dev",
"@celo/contractkit": "3.0.1-dev",
"@celo/phone-number-privacy-common": "2.0.1-dev",
"@celo/base": "3.0.2-dev",
"@celo/contractkit": "3.0.2-dev",
"@celo/phone-number-privacy-common": "2.0.2-dev",
"@celo/poprf": "^0.1.9",
"@celo/utils": "3.0.1-dev",
"@celo/wallet-hsm-azure": "3.0.1-dev",
"@celo/utils": "3.0.2-dev",
"@celo/wallet-hsm-azure": "3.0.2-dev",
"@google-cloud/secret-manager": "3.0.0",
"@types/bunyan": "^1.8.6",
"@types/promise.allsettled": "^1.0.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"@0x/sol-profiler": "^3.0.0",
"@0x/sol-trace": "^2.0.16",
"@0x/subproviders": "^5.0.0",
"@celo/base": "3.0.1-dev",
"@celo/base": "3.0.2-dev",
"@celo/bls12377js": "0.1.1",
"@celo/connect": "3.0.1-dev",
"@celo/connect": "3.0.2-dev",
"@celo/ganache-cli": "git+https://github.com/celo-org/ganache-cli.git#e933297",
"@celo/utils": "3.0.1-dev",
"@celo/cryptographic-utils": "3.0.1-dev",
"@celo/utils": "3.0.2-dev",
"@celo/cryptographic-utils": "3.0.2-dev",
"@openzeppelin/upgrades": "^2.8.0",
"bip39": "https://github.com/bitcoinjs/bip39#d8ea080a18b40f301d4e2219a2991cd2417e83c2",
"chai-subset": "^1.6.0",
Expand Down Expand Up @@ -93,7 +93,7 @@
},
"devDependencies": {
"@celo/flake-tracker": "0.0.1-dev",
"@celo/phone-utils": "3.0.1-dev",
"@celo/phone-utils": "3.0.2-dev",
"@celo/typechain-target-web3-v1-celo": "0.2.0",
"@celo/typescript": "0.0.1",
"@types/bn.js": "^4.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@celo/base",
"version": "3.0.1-dev",
"version": "3.0.2-dev",
"description": "Celo base common utils, no dependencies",
"author": "Celo",
"license": "Apache-2.0",
Expand Down
Loading

0 comments on commit 86c1aa9

Please sign in to comment.