From 57658c9af8ca02b91aff70b4cb2580a0316d1085 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Tue, 5 Nov 2024 21:39:48 +0100 Subject: [PATCH] refactor key iteration (#854) * refactor & fix key iteration * remove resolutions --- package.json | 11 - packages/chopsticks/package.json | 2 +- .../src/utils/fetch-storages.test.ts | 2 +- .../chopsticks/src/utils/fetch-storages.ts | 2 +- packages/core/package.json | 2 +- .../src/blockchain/get-keys-paged.test.ts | 189 +++++++++++- packages/core/src/blockchain/storage-layer.ts | 168 ++-------- packages/db/package.json | 2 +- packages/testing/package.json | 2 +- packages/utils/package.json | 2 +- yarn.lock | 292 +++++++++--------- 11 files changed, 369 insertions(+), 305 deletions(-) diff --git a/package.json b/package.json index 94637975..236f2252 100644 --- a/package.json +++ b/package.json @@ -9,17 +9,6 @@ "packages/*", "executor" ], - "resolutions": { - "@polkadot/api": "14.0.1", - "@polkadot/types": "14.0.1", - "@polkadot/api-base": "14.0.1", - "@polkadot/api-derive": "14.0.1", - "@polkadot/api-augment": "14.0.1", - "@polkadot/rpc-provider": "14.0.1", - "@polkadot/types-codec": "14.0.1", - "@polkadot/types-create": "14.0.1", - "@polkadot/types-known": "14.0.1" - }, "scripts": { "lint": "tsc --noEmit --project tsconfig.lint.json && eslint . --ext .js,.ts && prettier --check .", "fix": "eslint . --ext .js,.ts --fix && prettier -w .", diff --git a/packages/chopsticks/package.json b/packages/chopsticks/package.json index 17083c32..98f18bc9 100644 --- a/packages/chopsticks/package.json +++ b/packages/chopsticks/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks", - "version": "1.0.0", + "version": "1.0.1-1", "author": "Acala Developers ", "license": "Apache-2.0", "bin": "./chopsticks.cjs", diff --git a/packages/chopsticks/src/utils/fetch-storages.test.ts b/packages/chopsticks/src/utils/fetch-storages.test.ts index c31ed470..fc5a85a7 100644 --- a/packages/chopsticks/src/utils/fetch-storages.test.ts +++ b/packages/chopsticks/src/utils/fetch-storages.test.ts @@ -18,7 +18,7 @@ describe('fetch-storages', () => { beforeAll(async () => { provider = new WsProvider(endpoint, 30_000) - api = new ApiPromise({ provider }) + api = new ApiPromise({ provider, noInitWarn: true }) await api.isReady }) diff --git a/packages/chopsticks/src/utils/fetch-storages.ts b/packages/chopsticks/src/utils/fetch-storages.ts index bc941fce..7aeccd64 100644 --- a/packages/chopsticks/src/utils/fetch-storages.ts +++ b/packages/chopsticks/src/utils/fetch-storages.ts @@ -127,7 +127,7 @@ export const fetchStorages = async ({ block, endpoint, dbPath, config }: FetchSt if (!endpoint) throw new Error('endpoint is required') const provider = new WsProvider(endpoint, 3_000) - const apiPromise = new ApiPromise({ provider }) + const apiPromise = new ApiPromise({ provider, noInitWarn: true }) await apiPromise.isReady let blockHash: string diff --git a/packages/core/package.json b/packages/core/package.json index 8c8fea81..25b2092c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-core", - "version": "1.0.0", + "version": "1.0.1-1", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module", diff --git a/packages/core/src/blockchain/get-keys-paged.test.ts b/packages/core/src/blockchain/get-keys-paged.test.ts index 692c64c8..67f7578f 100644 --- a/packages/core/src/blockchain/get-keys-paged.test.ts +++ b/packages/core/src/blockchain/get-keys-paged.test.ts @@ -1,12 +1,12 @@ import { Api } from '../api.js' -import { RemoteStorageLayer, StorageLayer, StorageValueKind } from './storage-layer.js' +import { RemoteStorageLayer, StorageLayer, StorageValue, StorageValueKind } from './storage-layer.js' import { describe, expect, it, vi } from 'vitest' import _ from 'lodash' describe('getKeysPaged', () => { const hash = '0x1111111111111111111111111111111111111111111111111111111111111111' - const allKeys = [ + const remoteKeys = [ '0x0000000000000000000000000000000000000000000000000000000000000000_00', '0x0000000000000000000000000000000000000000000000000000000000000000_03', '0x0000000000000000000000000000000000000000000000000000000000000000_04', @@ -22,10 +22,13 @@ describe('getKeysPaged', () => { ] Api.prototype['getKeysPaged'] = vi.fn(async (prefix, pageSize, startKey) => { - const withPrefix = allKeys.filter((k) => k.startsWith(prefix) && k > startKey) + const withPrefix = remoteKeys.filter((k) => k.startsWith(prefix) && k > startKey) const result = withPrefix.slice(0, pageSize) return result }) + Api.prototype['getStorage'] = vi.fn(async (_key, _at) => { + return '0x1' as any + }) const mockApi = new Api(undefined!) const remoteLayer = new RemoteStorageLayer(mockApi, hash, undefined) @@ -90,6 +93,17 @@ describe('getKeysPaged', () => { }) it('remote layer works', async () => { + expect( + await remoteLayer.getKeysPaged( + '0x0000000000000000000000000000000000000000000000000000000000000000', + 10, + '0x0000000000000000000000000000000000000000000000000000000000000000', + ), + ).toEqual([ + '0x0000000000000000000000000000000000000000000000000000000000000000_00', + '0x0000000000000000000000000000000000000000000000000000000000000000_03', + '0x0000000000000000000000000000000000000000000000000000000000000000_04', + ]) expect( await remoteLayer.getKeysPaged( '0x1111111111111111111111111111111111111111111111111111111111111111', @@ -140,10 +154,7 @@ describe('getKeysPaged', () => { it('updated values', async () => { const layer2 = new StorageLayer(storageLayer) - layer2.setAll([ - ['0x1111111111111111111111111111111111111111111111111111111111111111_00', '0x00'], - ['0x1111111111111111111111111111111111111111111111111111111111111111_04', '0x04'], - ]) + layer2.setAll([['0x1111111111111111111111111111111111111111111111111111111111111111_04', '0x04']]) expect( await layer2.getKeysPaged( '0x1111111111111111111111111111111111111111111111111111111111111111', @@ -156,6 +167,20 @@ describe('getKeysPaged', () => { '0x1111111111111111111111111111111111111111111111111111111111111111_07', ]) + expect( + await layer2.getKeysPaged( + '0x1111111111111111111111111111111111111111111111111111111111111111', + 4, + '0x1111111111111111111111111111111111111111111111111111111111111111', + ), + ).toEqual([ + '0x1111111111111111111111111111111111111111111111111111111111111111_01', + '0x1111111111111111111111111111111111111111111111111111111111111111_02', + '0x1111111111111111111111111111111111111111111111111111111111111111_03', + '0x1111111111111111111111111111111111111111111111111111111111111111_04', + ]) + + layer2.setAll([['0x1111111111111111111111111111111111111111111111111111111111111111_00', '0x00']]) expect( await layer2.getKeysPaged( '0x1111111111111111111111111111111111111111111111111111111111111111', @@ -303,5 +328,155 @@ describe('getKeysPaged', () => { '0xcd710b30bd2eab0352ddcc26417aa19463c716fb8fff3de61a883bb76adb34a2', ), ).toEqual([]) + + layer3.setAll([['0xcd710b30bd2eab0352ddcc26417aa19463c716fb8fff3de61a883bb76adb34a2_01', '0x01']]) + expect( + await layer3.getKeysPaged( + '0xcd710b30bd2eab0352ddcc26417aa19463c716fb8fff3de61a883bb76adb34a2', + 1, + '0xcd710b30bd2eab0352ddcc26417aa19463c716fb8fff3de61a883bb76adb34a2', + ), + ).toEqual(['0xcd710b30bd2eab0352ddcc26417aa19463c716fb8fff3de61a883bb76adb34a2_01']) + }) + + it('deleted key is ignored', async () => { + const pages = [ + { + 1: '0x1', + 2: '0x2', + 3: '0x3', + 8: '0x8', + }, + { + 3: StorageValueKind.Deleted, + 7: '0x7', + }, + { + 1: StorageValueKind.Deleted, + 7: '0x77', + 8: StorageValueKind.Deleted, + 9: '0x9', + }, + { + 3: '0x33', + 4: '0x4', + }, + ] + + const prefix = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + const makeKey = (x: string) => prefix + '_' + Number(x).toString().padStart(2, '0') + + // build layers + const layers: StorageLayer[] = [] + for (const page of pages) { + const layer = new StorageLayer(layers[layers.length - 1]) + layer.setAll(Object.entries(page).map(([k, v]) => [makeKey(k), v] as [string, StorageValue])) + layers.push(layer) + } + + // last layer + expect(await layers[3].getKeysPaged(prefix, 100, prefix)).toEqual([ + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_02', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_03', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_04', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_07', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_09', + ]) + + expect( + await layers[3].getKeysPaged( + prefix, + 100, + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_05', + ), + ).toEqual([ + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_07', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_09', + ]) + + expect( + await layers[3].getKeysPaged( + prefix, + 100, + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_08', + ), + ).toEqual(['0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_09']) + + expect( + // previous layer + await layers[2].getKeysPaged(prefix, 100, prefix), + ).toEqual([ + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_02', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_07', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_09', + ]) + + expect( + // previous layer + await layers[1].getKeysPaged(prefix, 100, prefix), + ).toEqual([ + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_01', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_02', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_07', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_08', + ]) + + expect( + // previous layer + await layers[1].getKeysPaged( + prefix, + 100, + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_02', + ), + ).toEqual([ + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_07', + '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_08', + ]) + }) + + it('fuzz', async () => { + const oddPrefix = '0x1111111111111111111111111111111111111111111111111111111111111111' + const evenPrefix = '0x2222222222222222222222222222222222222222222222222222222222222222' + const makeKey = (x: number) => (x % 2 === 0 ? evenPrefix : oddPrefix) + '_' + x.toString().padStart(2, '0') + + // create some random keys + const pages: number[][] = [] + let p = Math.floor(Math.random() * 10) + 5 + while (p) { + p-- + const page: number[] = [] + let i = Math.floor(Math.random() * 10) + 5 + while (i) { + i-- + page.push(Math.floor(Math.random() * 30) + 1) + } + pages.push(page) + } + + // build layers + const layers: StorageLayer[] = [] + for (const page of pages) { + const layer = new StorageLayer(layers[layers.length - 1]) + layer.setAll(page.map((x) => [makeKey(x), '0x' + Number(x).toString(16)] as [string, StorageValue])) + layers.push(layer) + } + + const allKeys = pages + .flatMap((x) => x) + .reduce((acc, x) => { + if (acc.includes(x)) { + return acc + } + acc.push(x) + return acc + }, [] as number[]) + .sort((a, b) => a - b) + .map(makeKey) + + const oddKeys = await layers[layers.length - 1].getKeysPaged(oddPrefix, 100, oddPrefix) + expect(oddKeys, 'oddKeys').toEqual(allKeys.filter((x) => x.startsWith(oddPrefix))) + + const evenKeys = await layers[layers.length - 1].getKeysPaged(evenPrefix, 100, evenPrefix) + expect(evenKeys, 'evenKeys').toEqual(allKeys.filter((x) => x.startsWith(evenPrefix))) }) }) diff --git a/packages/core/src/blockchain/storage-layer.ts b/packages/core/src/blockchain/storage-layer.ts index c6fddc30..b75141ee 100644 --- a/packages/core/src/blockchain/storage-layer.ts +++ b/packages/core/src/blockchain/storage-layer.ts @@ -23,18 +23,14 @@ export interface StorageLayerProvider { * Get the value of a storage key. */ get(key: string, cache: boolean): Promise - /** - * Fold the storage layer into another layer. - */ - foldInto(into: StorageLayer): Promise - /** - * Fold the storage layer into the parent if it exists. - */ - fold(): Promise /** * Get paged storage keys. */ getKeysPaged(prefix: string, pageSize: number, startKey: string): Promise + /** + * Find next storage key. + */ + findNextKey(prefix: string, startKey: string, knownBest?: string): Promise } export class RemoteStorageLayer implements StorageLayerProvider { @@ -63,10 +59,10 @@ export class RemoteStorageLayer implements StorageLayerProvider { return data ?? undefined } - async foldInto(_into: StorageLayer): Promise { - return this + async findNextKey(prefix: string, startKey: string, _knownBest?: string): Promise { + const keys = await this.getKeysPaged(prefix, 1, startKey) + return keys[0] } - async fold(): Promise {} async getKeysPaged(prefix: string, pageSize: number, startKey: string): Promise { if (pageSize > BATCH_SIZE) throw new Error(`pageSize must be less or equal to ${BATCH_SIZE}`) @@ -76,7 +72,7 @@ export class RemoteStorageLayer implements StorageLayerProvider { const minPrefixLen = isChild ? CHILD_PREFIX_LENGTH : PREFIX_LENGTH // can't handle keyCache without prefix - if (prefix.length < minPrefixLen || startKey.length < minPrefixLen) { + if (prefix === startKey || prefix.length < minPrefixLen || startKey.length < minPrefixLen) { return this.#api.getKeysPaged(prefix, pageSize, startKey, this.#at) } @@ -209,136 +205,40 @@ export class StorageLayer implements StorageLayerProvider { } } - async foldInto(into: StorageLayer): Promise { - const newParent = await this.#parent?.foldInto(into) - - for (const deletedPrefix of this.#deletedPrefix) { - into.set(deletedPrefix, StorageValueKind.DeletedPrefix) - } - - for (const [key, value] of this.#store) { - into.set(key, await value) - } - - return newParent - } - - async fold(): Promise { - if (this.#parent) { - this.#parent = await this.#parent.foldInto(this) - } - } - - async getKeysPaged(prefix: string, pageSize: number, startKey: string): Promise { - let parentFetchComplete = false - const parentFetchKeys = async (batchSize: number, startKey: string) => { - if (!this.#deletedPrefix.some((dp) => startKey.startsWith(dp))) { - const newKeys: string[] = [] - while (newKeys.length < batchSize) { - const remote = (await this.#parent?.getKeysPaged(prefix, batchSize, startKey)) ?? [] - if (remote.length) { - startKey = remote[remote.length - 1] - } - for (const key of remote) { - if (this.#store.get(key) === StorageValueKind.Deleted) { - continue - } - if (this.#deletedPrefix.some((dp) => key.startsWith(dp))) { - continue - } - newKeys.push(key) - } - if (remote.length < batchSize) { - parentFetchComplete = true - break - } - } - return newKeys - } else { - parentFetchComplete = true - return [] - } - } - - const res: string[] = [] - - const foundNextKey = (key: string) => { - // make sure keys are unique and start with the prefix - if (!res.includes(key) && key.startsWith(prefix)) { - res.push(key) - } + async findNextKey(prefix: string, startKey: string, knownBest?: string): Promise { + const maybeBest = this.#keys.find((key) => key.startsWith(prefix) && key > startKey) + if (!knownBest) { + knownBest = maybeBest + } else if (maybeBest && maybeBest < knownBest) { + knownBest = maybeBest } - - const iterLocalKeys = (prefix: string, startKey: string, includeFirst: boolean, endKey?: string) => { - let idx = this.#keys.findIndex((x) => x.startsWith(startKey)) - if (this.#keys[idx] !== startKey) { - idx = this.#keys.findIndex((x) => x.startsWith(prefix) && x > startKey) - const key = this.#keys[idx] - if (key) { - if (endKey && key >= endKey) { - return startKey - } - foundNextKey(key) - ++idx + if (this.#parent && !this.#deletedPrefix.some((dp) => dp === prefix)) { + const parentBest = await this.#parent.findNextKey(prefix, startKey, knownBest) + if (parentBest) { + if (!maybeBest) { + return parentBest + } else if (parentBest < maybeBest) { + return parentBest } } - if (idx !== -1) { - if (includeFirst) { - const key = this.#keys[idx] - if (key && key.startsWith(prefix) && key > startKey) { - foundNextKey(key) - } - } - while (res.length < pageSize) { - ++idx - const key: string = this.#keys[idx] - if (!key || !key.startsWith(prefix)) { - break - } - if (endKey && key >= endKey) { - break - } - foundNextKey(key) - } - return _.last(res) ?? startKey - } - return startKey } + return knownBest + } - if (prefix !== startKey && this.#keys.find((x) => x === startKey)) { - startKey = iterLocalKeys(prefix, startKey, false) + async getKeysPaged(prefix: string, pageSize: number, startKey: string): Promise { + if (!startKey || startKey === '0x') { + startKey = prefix } - // then iterate the parent keys - let keys = await parentFetchKeys(pageSize - res.length, startKey) - if (keys.length) { - let idx = 0 - while (res.length < pageSize) { - const key = keys[idx] - if (!key || !key.startsWith(prefix)) { - if (parentFetchComplete) { - break - } else { - keys = await parentFetchKeys(pageSize - res.length, _.last(keys)!) - continue - } - } - - const keyPosition = _.sortedIndex(this.#keys, key) - const localParentKey = this.#keys[keyPosition - 1] - if (localParentKey < key) { - startKey = iterLocalKeys(prefix, startKey, false, key) - } - - foundNextKey(key) - ++idx - } + const keys: string[] = [] + while (keys.length < pageSize) { + const next = await this.findNextKey(prefix, startKey, undefined) + if (!next) break + startKey = next + if ((await this.get(next, false)) == StorageValueKind.Deleted) continue + keys.push(next) } - if (res.length < pageSize) { - iterLocalKeys(prefix, startKey, prefix === startKey) - } - - return res + return keys } /** diff --git a/packages/db/package.json b/packages/db/package.json index ce2cb6a9..98e6aa5b 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-db", - "version": "1.0.0", + "version": "1.0.1-1", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module", diff --git a/packages/testing/package.json b/packages/testing/package.json index 89b5d94d..79abdc40 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-testing", - "version": "1.0.0", + "version": "1.0.1-1", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module", diff --git a/packages/utils/package.json b/packages/utils/package.json index 712f7b9a..72aaa9f8 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-utils", - "version": "1.0.0", + "version": "1.0.1-1", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module", diff --git a/yarn.lock b/yarn.lock index c8232f3e..d1209d86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1682,78 +1682,78 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/api-augment@npm:14.0.1" - dependencies: - "@polkadot/api-base": "npm:14.0.1" - "@polkadot/rpc-augment": "npm:14.0.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-augment": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/ea76c166a0309bb249f8abd527f1c9772aa5982c75bfc32e90ab6f8d7c94fd98703554e3e3565711eea6a3f4c1e94c65271edafd67fc92bf898bfabb993bdc49 +"@polkadot/api-augment@npm:14.2.3, @polkadot/api-augment@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/api-augment@npm:14.2.3" + dependencies: + "@polkadot/api-base": "npm:14.2.3" + "@polkadot/rpc-augment": "npm:14.2.3" + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-augment": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/54315ab4dc616b44b20dcde8452e53b2d87395b8800f9637de6fc831bd0bc3fcfa39e3995835f5076ec3a26b3e90c16af093cbad252e9d738f8a6367cbb1a319 languageName: node linkType: hard -"@polkadot/api-base@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/api-base@npm:14.0.1" +"@polkadot/api-base@npm:14.2.3, @polkadot/api-base@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/api-base@npm:14.2.3" dependencies: - "@polkadot/rpc-core": "npm:14.0.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" + "@polkadot/rpc-core": "npm:14.2.3" + "@polkadot/types": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" rxjs: "npm:^7.8.1" - tslib: "npm:^2.7.0" - checksum: 10c0/3b178018b73acc0b642fd13fdaaeaaa22b84cab421c3c0ed527c74adc99d767af7575bc3d2a683f79801c1941fe292850465a2a3215f61427b1ee74984eb4541 + tslib: "npm:^2.8.0" + checksum: 10c0/69f78a144f8bdbfd5a6808979ecd20bb0a0df92a7e29dbd2f23e934cdc555cad243137df2ee786cd2abd60bcbac899bb49f8a64527772c9fbc7dda3704aeb16e languageName: node linkType: hard -"@polkadot/api-derive@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/api-derive@npm:14.0.1" - dependencies: - "@polkadot/api": "npm:14.0.1" - "@polkadot/api-augment": "npm:14.0.1" - "@polkadot/api-base": "npm:14.0.1" - "@polkadot/rpc-core": "npm:14.0.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - "@polkadot/util-crypto": "npm:^13.1.1" +"@polkadot/api-derive@npm:14.2.3": + version: 14.2.3 + resolution: "@polkadot/api-derive@npm:14.2.3" + dependencies: + "@polkadot/api": "npm:14.2.3" + "@polkadot/api-augment": "npm:14.2.3" + "@polkadot/api-base": "npm:14.2.3" + "@polkadot/rpc-core": "npm:14.2.3" + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + "@polkadot/util-crypto": "npm:^13.2.2" rxjs: "npm:^7.8.1" - tslib: "npm:^2.7.0" - checksum: 10c0/c93b7ca568e17933c98be9bd76d6cb5e3b60ef4fcc1fc3cf22fbce7b78337f3b1867de80e7cb55c374598c6653e77f2081c1f0ff201b9d506389beb40801b7e0 + tslib: "npm:^2.8.0" + checksum: 10c0/88ae9fe75848111b1f6d098ceef469afb829cd8654f09602d550250e03328e12a1f2f8aae28d5937717d1587c70491cc74955755d146772546e8457bdfcfbea7 languageName: node linkType: hard -"@polkadot/api@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/api@npm:14.0.1" - dependencies: - "@polkadot/api-augment": "npm:14.0.1" - "@polkadot/api-base": "npm:14.0.1" - "@polkadot/api-derive": "npm:14.0.1" - "@polkadot/keyring": "npm:^13.1.1" - "@polkadot/rpc-augment": "npm:14.0.1" - "@polkadot/rpc-core": "npm:14.0.1" - "@polkadot/rpc-provider": "npm:14.0.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-augment": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/types-create": "npm:14.0.1" - "@polkadot/types-known": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - "@polkadot/util-crypto": "npm:^13.1.1" +"@polkadot/api@npm:14.2.3, @polkadot/api@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/api@npm:14.2.3" + dependencies: + "@polkadot/api-augment": "npm:14.2.3" + "@polkadot/api-base": "npm:14.2.3" + "@polkadot/api-derive": "npm:14.2.3" + "@polkadot/keyring": "npm:^13.2.2" + "@polkadot/rpc-augment": "npm:14.2.3" + "@polkadot/rpc-core": "npm:14.2.3" + "@polkadot/rpc-provider": "npm:14.2.3" + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-augment": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/types-create": "npm:14.2.3" + "@polkadot/types-known": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + "@polkadot/util-crypto": "npm:^13.2.2" eventemitter3: "npm:^5.0.1" rxjs: "npm:^7.8.1" - tslib: "npm:^2.7.0" - checksum: 10c0/8dcaa6ffec5241d1574544a707795d21f008953b08bfdd31b29375d63d1307de0a301459e4bd64f58d522f23a666b84478c00f82fa980e94266ca16d2d12b688 + tslib: "npm:^2.8.0" + checksum: 10c0/d143ae7fb522586a4cdbc45ea90de95a3ee885d6b4fdaaa19d111a305b7ffdb03ae4d80749b519a3fd262da0f676f609bf4a6a12883dc5e0451efaf17c9180f6 languageName: node linkType: hard -"@polkadot/keyring@npm:^13.1.1, @polkadot/keyring@npm:^13.2.2": +"@polkadot/keyring@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/keyring@npm:13.2.2" dependencies: @@ -1767,7 +1767,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/networks@npm:13.2.2, @polkadot/networks@npm:^13.1.1": +"@polkadot/networks@npm:13.2.2, @polkadot/networks@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/networks@npm:13.2.2" dependencies: @@ -1778,132 +1778,132 @@ __metadata: languageName: node linkType: hard -"@polkadot/rpc-augment@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/rpc-augment@npm:14.0.1" +"@polkadot/rpc-augment@npm:14.2.3": + version: 14.2.3 + resolution: "@polkadot/rpc-augment@npm:14.2.3" dependencies: - "@polkadot/rpc-core": "npm:14.0.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/e3ddaaad5bcad11ba7c11c6074dbdb24b9ac78f710b8bb5113be4b9e6f46d0bce958bc844201c6b540564b2fbb5c06276f5fa5d43e5cb510b4873fcae24258fe + "@polkadot/rpc-core": "npm:14.2.3" + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/b5af7051b4ee499645cc5bceb00c7db4bd7b3c8cebfb0848d401493c6123c923cb2116c3b8ce9bf5297776f07da30963c0b25297cba05075bee2fa830b18c98b languageName: node linkType: hard -"@polkadot/rpc-core@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/rpc-core@npm:14.0.1" +"@polkadot/rpc-core@npm:14.2.3": + version: 14.2.3 + resolution: "@polkadot/rpc-core@npm:14.2.3" dependencies: - "@polkadot/rpc-augment": "npm:14.0.1" - "@polkadot/rpc-provider": "npm:14.0.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" + "@polkadot/rpc-augment": "npm:14.2.3" + "@polkadot/rpc-provider": "npm:14.2.3" + "@polkadot/types": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" rxjs: "npm:^7.8.1" - tslib: "npm:^2.7.0" - checksum: 10c0/77b42ccd7b0388e1098d0024deecd0ff63ed64c1d3fbdea8fc9bda716c3937603f04386b2f89ff2ac9c45034352b435fbe98b015d26954be3262b4451c12da79 + tslib: "npm:^2.8.0" + checksum: 10c0/d6c21caee17eaa3efaa53e867cce5d91b7c768862c5445e3b4e3cc1bc48117f2970413603152a7f365665f9c52ea2c0951b53484ee247d8cbe2f759714e2410f languageName: node linkType: hard -"@polkadot/rpc-provider@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/rpc-provider@npm:14.0.1" - dependencies: - "@polkadot/keyring": "npm:^13.1.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-support": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - "@polkadot/util-crypto": "npm:^13.1.1" - "@polkadot/x-fetch": "npm:^13.1.1" - "@polkadot/x-global": "npm:^13.1.1" - "@polkadot/x-ws": "npm:^13.1.1" +"@polkadot/rpc-provider@npm:14.2.3, @polkadot/rpc-provider@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/rpc-provider@npm:14.2.3" + dependencies: + "@polkadot/keyring": "npm:^13.2.2" + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-support": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + "@polkadot/util-crypto": "npm:^13.2.2" + "@polkadot/x-fetch": "npm:^13.2.2" + "@polkadot/x-global": "npm:^13.2.2" + "@polkadot/x-ws": "npm:^13.2.2" "@substrate/connect": "npm:0.8.11" eventemitter3: "npm:^5.0.1" mock-socket: "npm:^9.3.1" - nock: "npm:^13.5.4" - tslib: "npm:^2.7.0" + nock: "npm:^13.5.5" + tslib: "npm:^2.8.0" dependenciesMeta: "@substrate/connect": optional: true - checksum: 10c0/e75f1577117b5f80cfc7d3267eb96ceb431c0ce0bce57744011eae9526e600607e915268a0b06660d7e00d3757b170237c68304188396c16a52ea3a1c65b54a8 + checksum: 10c0/5140e5f96a7edde55c5fce228b4c73804534a217bbd3859de990ad04066525018355487ec730f8a64019ff6f019ed8c56dd7384014158ef429c46dd0d9a849e4 languageName: node linkType: hard -"@polkadot/types-augment@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/types-augment@npm:14.0.1" +"@polkadot/types-augment@npm:14.2.3": + version: 14.2.3 + resolution: "@polkadot/types-augment@npm:14.2.3" dependencies: - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/527e30fce07d8432ddfc6134930d544561bd1e51f0267d02b21a717bea42270c6ebccb28f00239f3248cd9bd2aba6c068779bb54fd6fe41ac605bf53d7212d55 + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/9e018799a394a99df35df518387821ceb89a1d6ce9492c8cf178528a5f58a0ebed726349650d0b8839fd5683e0799437ecad2f61af9a7c6e5c244cf89dddb03f languageName: node linkType: hard -"@polkadot/types-codec@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/types-codec@npm:14.0.1" +"@polkadot/types-codec@npm:14.2.3, @polkadot/types-codec@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/types-codec@npm:14.2.3" dependencies: - "@polkadot/util": "npm:^13.1.1" - "@polkadot/x-bigint": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/e47eed41cdb71325ba3412ee400caedb08ef6b5f56e56bf09fa7ed9520a9c7e9dd20de83066cbf8161389050280fa7132802f45ac93aaf4173635a44eb427c21 + "@polkadot/util": "npm:^13.2.2" + "@polkadot/x-bigint": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/31997441b8e7ee610bbbc9bd92b9c025ff5cb407f31ed836452ea9279a5a01d13fe3a4e49eef51bb034211673875c43745e35776ddd3135514573f3f21127fde languageName: node linkType: hard -"@polkadot/types-create@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/types-create@npm:14.0.1" +"@polkadot/types-create@npm:14.2.3": + version: 14.2.3 + resolution: "@polkadot/types-create@npm:14.2.3" dependencies: - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/c5684dd2ff61ce2b5a73bce6b278e9f31fc1d6b15ae949d3a18fd747a8293ec83ae783132d53814cc0b07db9286126dcb15868912880f32896b29ce363ed182f + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/a7f02f68231dff12fcf3c985f6ef5322354fb37cab6fbe0f5e30d5f2699049bdcd65791c6e9ad7ba6d8c39434652ef4f7340f398ccbb0fe396517f7d266fe931 languageName: node linkType: hard -"@polkadot/types-known@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/types-known@npm:14.0.1" +"@polkadot/types-known@npm:14.2.3, @polkadot/types-known@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/types-known@npm:14.2.3" dependencies: - "@polkadot/networks": "npm:^13.1.1" - "@polkadot/types": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/types-create": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/da263e1769cbea8cdb80d49521f5c47f4a3e6ee044c02a1c85f33e755b2ef02d876d604e2c841ef273a673f1632754ba65064b10804e214d3d6a4ed66cba3e11 + "@polkadot/networks": "npm:^13.2.2" + "@polkadot/types": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/types-create": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/453754b09c8c8707113d118019b1acef1adafc5dd9922145348ea5d34fac4cc77facbd1b5e6241cef29253b8b7fae6cb76123dd7c86da0407dfbd37391a8f654 languageName: node linkType: hard -"@polkadot/types-support@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/types-support@npm:14.0.1" +"@polkadot/types-support@npm:14.2.3": + version: 14.2.3 + resolution: "@polkadot/types-support@npm:14.2.3" dependencies: - "@polkadot/util": "npm:^13.1.1" - tslib: "npm:^2.7.0" - checksum: 10c0/d834b06f4761fbc61a5426ea84c2ac890ab31e888021e7cdf6883898156af684f612a677d5e13f7f8a196d971f394947e9eb45507ab3dcf9a57276667306c0dc + "@polkadot/util": "npm:^13.2.2" + tslib: "npm:^2.8.0" + checksum: 10c0/a51aad2244fc1e1e03e8b6ec00db580f118d990948c2e5dbb95e81dc9736bb3d650d8db8e58a7b2a5bd3e9783f9fa4e17b2ecc85f34d362b069ea8eb211f31e2 languageName: node linkType: hard -"@polkadot/types@npm:14.0.1": - version: 14.0.1 - resolution: "@polkadot/types@npm:14.0.1" - dependencies: - "@polkadot/keyring": "npm:^13.1.1" - "@polkadot/types-augment": "npm:14.0.1" - "@polkadot/types-codec": "npm:14.0.1" - "@polkadot/types-create": "npm:14.0.1" - "@polkadot/util": "npm:^13.1.1" - "@polkadot/util-crypto": "npm:^13.1.1" +"@polkadot/types@npm:14.2.3, @polkadot/types@npm:^14.0.1": + version: 14.2.3 + resolution: "@polkadot/types@npm:14.2.3" + dependencies: + "@polkadot/keyring": "npm:^13.2.2" + "@polkadot/types-augment": "npm:14.2.3" + "@polkadot/types-codec": "npm:14.2.3" + "@polkadot/types-create": "npm:14.2.3" + "@polkadot/util": "npm:^13.2.2" + "@polkadot/util-crypto": "npm:^13.2.2" rxjs: "npm:^7.8.1" - tslib: "npm:^2.7.0" - checksum: 10c0/30599aca74862fff4fd7d1b90f3db80faa5b8972a3f975ee49f5cbbf4ecf857f6948f95b2349b9182802f6a0b3e9a72106b2e7b9a9d387b16e9970362e3ce24c + tslib: "npm:^2.8.0" + checksum: 10c0/e196f95110169c8ac6d5c0eef6da3bd1eaf718e7308b4db877099ee0f772b7d1d2947e51b1a93a9c013b0e01800d66f9686ff43b57fbf9d68e2f203336775d59 languageName: node linkType: hard -"@polkadot/util-crypto@npm:13.2.2, @polkadot/util-crypto@npm:^13.1.1, @polkadot/util-crypto@npm:^13.2.2": +"@polkadot/util-crypto@npm:13.2.2, @polkadot/util-crypto@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/util-crypto@npm:13.2.2" dependencies: @@ -1923,7 +1923,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/util@npm:13.2.2, @polkadot/util@npm:^13.1.1, @polkadot/util@npm:^13.2.2": +"@polkadot/util@npm:13.2.2, @polkadot/util@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/util@npm:13.2.2" dependencies: @@ -2018,7 +2018,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:13.2.2, @polkadot/x-bigint@npm:^13.1.1": +"@polkadot/x-bigint@npm:13.2.2, @polkadot/x-bigint@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/x-bigint@npm:13.2.2" dependencies: @@ -2028,7 +2028,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-fetch@npm:^13.1.1": +"@polkadot/x-fetch@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/x-fetch@npm:13.2.2" dependencies: @@ -2039,7 +2039,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-global@npm:13.2.2, @polkadot/x-global@npm:^13.1.1": +"@polkadot/x-global@npm:13.2.2, @polkadot/x-global@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/x-global@npm:13.2.2" dependencies: @@ -2081,7 +2081,7 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-ws@npm:^13.1.1": +"@polkadot/x-ws@npm:^13.2.2": version: 13.2.2 resolution: "@polkadot/x-ws@npm:13.2.2" dependencies: @@ -7358,7 +7358,7 @@ __metadata: languageName: node linkType: hard -"nock@npm:^13.5.4": +"nock@npm:^13.5.5": version: 13.5.5 resolution: "nock@npm:13.5.5" dependencies: