From a65ac683d6d578579fa0c3f943e16da825ff1bac Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Sat, 9 Nov 2024 14:00:18 +0100 Subject: [PATCH 1/4] [types] fix `NotesBucketInfo` type --- packages/types/src/interfaces/integriteeWorker/definitions.ts | 4 ++-- packages/types/src/interfaces/integriteeWorker/types.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/types/src/interfaces/integriteeWorker/definitions.ts b/packages/types/src/interfaces/integriteeWorker/definitions.ts index 8aae261..d7ac94c 100644 --- a/packages/types/src/interfaces/integriteeWorker/definitions.ts +++ b/packages/types/src/interfaces/integriteeWorker/definitions.ts @@ -207,8 +207,8 @@ export default { bytes: 'u32', }, NotesBucketInfo: { - first: 'BucketInfo', - last: 'BucketInfo', + first: 'Option', + last: 'Option', }, GuessTheNumberPublicGetter: { _enum: { diff --git a/packages/types/src/interfaces/integriteeWorker/types.ts b/packages/types/src/interfaces/integriteeWorker/types.ts index 40ac12a..9267269 100644 --- a/packages/types/src/interfaces/integriteeWorker/types.ts +++ b/packages/types/src/interfaces/integriteeWorker/types.ts @@ -295,8 +295,8 @@ export interface NoteIndex extends u64 {} /** @name NotesBucketInfo */ export interface NotesBucketInfo extends Struct { - readonly first: BucketInfo; - readonly last: BucketInfo; + readonly first: Option; + readonly last: Option; } /** @name NotesForArgs */ From acb264f5600c14a0ce432d43176e15709fda3e14 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Sat, 9 Nov 2024 14:01:00 +0100 Subject: [PATCH 2/4] change integration test such that it works on a blank worker state --- packages/worker-api/src/integriteeWorker.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/worker-api/src/integriteeWorker.spec.ts b/packages/worker-api/src/integriteeWorker.spec.ts index 78e12f0..7d418ed 100644 --- a/packages/worker-api/src/integriteeWorker.spec.ts +++ b/packages/worker-api/src/integriteeWorker.spec.ts @@ -42,7 +42,7 @@ describe('worker', () => { // skip it, as this requires a worker (and hence a node) to be running // To my knowledge jest does not have an option to run skipped tests specifically, does it? // Todo: add proper CI to test this too. - describe.skip('needs worker and node running', () => { + describe('needs worker and node running', () => { describe('getWorkerPubKey', () => { it('should return value', async () => { const result = await worker.getShieldingKey(); @@ -140,11 +140,11 @@ describe('worker', () => { it('should return balance transfer with note as note', async () => { const shard = network.shard; const result = await worker.trustedBalanceTransfer( - charlie, + alice, shard, network.mrenclave, - charlie.address, alice.address, + charlie.address, 1100000000000, "My test note" ); From 070b9b8d51b0a98c381681f714d8139e628b2584 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Sat, 9 Nov 2024 14:01:19 +0100 Subject: [PATCH 3/4] skip test again --- packages/worker-api/src/integriteeWorker.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker-api/src/integriteeWorker.spec.ts b/packages/worker-api/src/integriteeWorker.spec.ts index 7d418ed..c0dc399 100644 --- a/packages/worker-api/src/integriteeWorker.spec.ts +++ b/packages/worker-api/src/integriteeWorker.spec.ts @@ -42,7 +42,7 @@ describe('worker', () => { // skip it, as this requires a worker (and hence a node) to be running // To my knowledge jest does not have an option to run skipped tests specifically, does it? // Todo: add proper CI to test this too. - describe('needs worker and node running', () => { + describe.skip('needs worker and node running', () => { describe('getWorkerPubKey', () => { it('should return value', async () => { const result = await worker.getShieldingKey(); From 922955f6b2f5dc143e9093a113e313a5f6c6004c Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Sat, 9 Nov 2024 14:01:49 +0100 Subject: [PATCH 4/4] v0.17.0-alpha.1 --- lerna.json | 2 +- packages/node-api/package.json | 4 ++-- packages/types/package.json | 2 +- packages/util/package.json | 2 +- packages/worker-api/package.json | 8 ++++---- yarn.lock | 14 +++++++------- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lerna.json b/lerna.json index a05472e..2e85cf6 100644 --- a/lerna.json +++ b/lerna.json @@ -6,5 +6,5 @@ "publishConfig": { "directory": "build" }, - "version": "0.17.0-alpha.0" + "version": "0.17.0-alpha.1" } diff --git a/packages/node-api/package.json b/packages/node-api/package.json index 8f917df..04809f9 100644 --- a/packages/node-api/package.json +++ b/packages/node-api/package.json @@ -18,10 +18,10 @@ }, "sideEffects": false, "type": "module", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "dependencies": { - "@encointer/types": "^0.17.0-alpha.0", + "@encointer/types": "^0.17.0-alpha.1", "@polkadot/api": "^11.2.1", "tslib": "^2.6.2" }, diff --git a/packages/types/package.json b/packages/types/package.json index 823a133..e2593be 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -18,7 +18,7 @@ }, "sideEffects": false, "type": "module", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "scripts": { "generate:defs": "node --experimental-specifier-resolution=node --loader ts-node/esm ../../node_modules/.bin/polkadot-types-from-defs --package @encointer/types/interfaces --input ./src/interfaces", diff --git a/packages/util/package.json b/packages/util/package.json index 16ec101..76cc8cb 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -20,7 +20,7 @@ "sideEffects": false, "type": "module", "types": "./index.d.ts", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "dependencies": { "@babel/runtime": "^7.18.9", diff --git a/packages/worker-api/package.json b/packages/worker-api/package.json index 595e851..18b3bbd 100644 --- a/packages/worker-api/package.json +++ b/packages/worker-api/package.json @@ -19,12 +19,12 @@ "sideEffects": false, "type": "module", "types": "./index.d.ts", - "version": "0.17.0-alpha.0", + "version": "0.17.0-alpha.1", "main": "index.js", "dependencies": { - "@encointer/node-api": "^0.17.0-alpha.0", - "@encointer/types": "^0.17.0-alpha.0", - "@encointer/util": "^0.17.0-alpha.0", + "@encointer/node-api": "^0.17.0-alpha.1", + "@encointer/types": "^0.17.0-alpha.1", + "@encointer/util": "^0.17.0-alpha.1", "@peculiar/webcrypto": "^1.4.6", "@polkadot/api": "^11.2.1", "@polkadot/keyring": "^12.6.2", diff --git a/yarn.lock b/yarn.lock index 0572f8b..4ce1565 100644 --- a/yarn.lock +++ b/yarn.lock @@ -755,18 +755,18 @@ __metadata: languageName: node linkType: hard -"@encointer/node-api@npm:^0.17.0-alpha.0, @encointer/node-api@workspace:packages/node-api": +"@encointer/node-api@npm:^0.17.0-alpha.1, @encointer/node-api@workspace:packages/node-api": version: 0.0.0-use.local resolution: "@encointer/node-api@workspace:packages/node-api" dependencies: - "@encointer/types": "npm:^0.17.0-alpha.0" + "@encointer/types": "npm:^0.17.0-alpha.1" "@polkadot/api": "npm:^11.2.1" "@polkadot/util-crypto": "npm:^12.6.2" tslib: "npm:^2.6.2" languageName: unknown linkType: soft -"@encointer/types@npm:^0.17.0-alpha.0, @encointer/types@workspace:packages/types": +"@encointer/types@npm:^0.17.0-alpha.1, @encointer/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@encointer/types@workspace:packages/types" dependencies: @@ -781,7 +781,7 @@ __metadata: languageName: unknown linkType: soft -"@encointer/util@npm:^0.17.0-alpha.0, @encointer/util@workspace:packages/util": +"@encointer/util@npm:^0.17.0-alpha.1, @encointer/util@workspace:packages/util": version: 0.0.0-use.local resolution: "@encointer/util@workspace:packages/util" dependencies: @@ -798,9 +798,9 @@ __metadata: version: 0.0.0-use.local resolution: "@encointer/worker-api@workspace:packages/worker-api" dependencies: - "@encointer/node-api": "npm:^0.17.0-alpha.0" - "@encointer/types": "npm:^0.17.0-alpha.0" - "@encointer/util": "npm:^0.17.0-alpha.0" + "@encointer/node-api": "npm:^0.17.0-alpha.1" + "@encointer/types": "npm:^0.17.0-alpha.1" + "@encointer/util": "npm:^0.17.0-alpha.1" "@peculiar/webcrypto": "npm:^1.4.6" "@polkadot/api": "npm:^11.2.1" "@polkadot/keyring": "npm:^12.6.2"