-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blockchain service #2517
Draft
stwiname
wants to merge
8
commits into
main
Choose a base branch
from
blockchain-service
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Blockchain service #2517
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 67.57% (-2.54% 🔻) |
20414/30211 |
🟢 | Branches | 80.06% (+1.77% 🔼) |
2807/3506 |
🟡 | Functions | 71.52% (+9.02% 🔼) |
1125/1573 |
🟡 | Lines | 67.57% (-2.54% 🔻) |
20414/30211 |
⚠️ Details were not displayed: the report size has exceeded the limit.
Test suite run failed
Failed tests: 23/599. Failed suites: 6/107.
● BaseProjectService › initializing services › succeeds with no rewinds
expect(received).resolves.not.toThrow()
Received promise rejected instead of resolved
Rejected to value: [TypeError: Cannot read properties of undefined (reading 'metadata')]
428 | await setupProject();
429 |
> 430 | await expect(service.init()).resolves.not.toThrow();
| ^
431 | });
432 |
433 | it('succeeds with a project upgrade rewind', async () => {
at expect (node_modules/expect/build/index.js:105:15)
at Object.<anonymous> (packages/node-core/src/indexer/project.service.spec.ts:430:13)
● BaseProjectService › initializing services › succeeds with a project upgrade rewind
Method getBlockTimestamp not implemented.
52 | // eslint-disable-next-line @typescript-eslint/promise-function-async
53 | getBlockTimestamp(height: number): Promise<Date | undefined> {
> 54 | throw new Error('Method getBlockTimestamp not implemented.');
| ^
55 | }
56 | getBlockSize(block: IBlock): number {
57 | return 0;
at TestBlockchainService.getBlockTimestamp (packages/node-core/src/indexer/project.service.spec.ts:54:11)
at TestProjectService.initUpgradeService (packages/node-core/src/indexer/project.service.ts:430:58)
at TestProjectService.init (packages/node-core/src/indexer/project.service.ts:137:32)
at Object.<anonymous> (packages/node-core/src/indexer/project.service.spec.ts:451:7)
● BaseProjectService › initializing services › succeeds with an unfinalized blocks rewind
expect(received).resolves.not.toThrow()
Received promise rejected instead of resolved
Rejected to value: [TypeError: Cannot read properties of undefined (reading 'metadata')]
466 | const reindexSpy = jest.spyOn(service, 'reindex');
467 |
> 468 | await expect(service.init()).resolves.not.toThrow();
| ^
469 |
470 | expect(reindexSpy).toHaveReturnedTimes(1);
471 | });
at expect (node_modules/expect/build/index.js:105:15)
at Object.<anonymous> (packages/node-core/src/indexer/project.service.spec.ts:468:13)
● Store service integration test › Correct db sync on historical project
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/indexer/store.service.test.ts:55:11)
● Store service integration test › Correct db sync on non-historical
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/indexer/store.service.test.ts:152:11)
● Store service integration test › Cyclic relations on non-historical
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/indexer/store.service.test.ts:218:11)
● Store service integration test › Init with enums
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/indexer/store.service.test.ts:260:11)
● Store service integration test › Able to drop notification triggers and functions
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/indexer/store.service.test.ts:317:11)
● Test suite failed to run
TypeError: The "path" argument must be of type string. Received type undefined undefined
45 |
46 | afterAll(async () => {
> 47 | await rimraf(tempDir);
| ^
48 | });
49 |
50 | it('Correct db sync on historical project', async () => {
at pathArg (node_modules/rimraf/src/path-arg.ts:16:25)
at node_modules/rimraf/src/index.ts:39:33
at Object.<anonymous> (packages/node/src/indexer/store.service.test.ts:47:17)
● Dictionary V1 › coreDictionary › can use scoped dictionary query
expect(received).toEqual(expected) // deep equality
Expected: 0
Received: undefined
95 | // Out of range of scoped entries
96 | const result = await dictionary.getData(100, 199, 10);
> 97 | expect(result?.batchBlocks.length).toEqual(0);
| ^
98 |
99 | const result2 = await dictionary.getData(1000, 10000, 10);
100 | expect(result2?.batchBlocks.length).toBeGreaterThan(0);
at Object.<anonymous> (packages/node-core/src/indexer/dictionary/v1/dictionaryV1.spec.ts:97:42)
● Dictionary V1 › return dictionary query result
expect(received).toBeGreaterThan(expected)
Matcher error: received value must be a number or bigint
Received has value: undefined
160 | const endBlock = 10001;
161 | const dic = await dictionary.getData(startBlock, endBlock, batchSize);
> 162 | expect(dic?.batchBlocks.length).toBeGreaterThan(1);
| ^
163 | expect(dic?.batchBlocks[0]).toBe(1463);
164 | });
165 |
at Object.<anonymous> (packages/node-core/src/indexer/dictionary/v1/dictionaryV1.spec.ts:162:37)
● Individual dictionary V1 test › return undefined when dictionary api failed
ApolloError: Response not successful: Received status code 500
at new ApolloError (node_modules/@apollo/client/errors/index.js:40:28)
at node_modules/@apollo/client/core/QueryManager.js:777:71
at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
at Array.forEach (<anonymous>)
at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:170:14)
at node_modules/@apollo/client/link/http/createHttpLink.js:145:17
Cause:
ServerError: Response not successful: Received status code 500
at Object.throwServerError (node_modules/@apollo/client/link/utils/throwServerError.js:2:17)
at throwServerError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:120:9)
at node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:176:48
● Individual dictionary V1 test › limits the dictionary query to that block range
ApolloError: Response not successful: Received status code 500
at new ApolloError (node_modules/@apollo/client/errors/index.js:40:28)
at node_modules/@apollo/client/core/QueryManager.js:777:71
at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
at Array.forEach (<anonymous>)
at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:170:14)
at node_modules/@apollo/client/link/http/createHttpLink.js:145:17
Cause:
ServerError: Response not successful: Received status code 500
at Object.throwServerError (node_modules/@apollo/client/link/utils/throwServerError.js:2:17)
at throwServerError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:120:9)
at node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:176:48
● Individual dictionary V1 test › test query the correct range
ApolloError: Response not successful: Received status code 500
at new ApolloError (node_modules/@apollo/client/errors/index.js:40:28)
at node_modules/@apollo/client/core/QueryManager.js:777:71
at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
at Array.forEach (<anonymous>)
at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:170:14)
at node_modules/@apollo/client/link/http/createHttpLink.js:145:17
Cause:
ServerError: Response not successful: Received status code 500
at Object.throwServerError (node_modules/@apollo/client/link/utils/throwServerError.js:2:17)
at throwServerError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:120:9)
at node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:176:48
● Individual dictionary V1 test › use minimum value of event/extrinsic returned block as batch end block
ApolloError: Response not successful: Received status code 500
at new ApolloError (node_modules/@apollo/client/errors/index.js:40:28)
at node_modules/@apollo/client/core/QueryManager.js:777:71
at both (node_modules/@apollo/client/utilities/observables/asyncMap.js:22:31)
at node_modules/@apollo/client/utilities/observables/asyncMap.js:11:72
at Object.then (node_modules/@apollo/client/utilities/observables/asyncMap.js:11:24)
at Object.error (node_modules/@apollo/client/utilities/observables/asyncMap.js:24:49)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at node_modules/@apollo/client/utilities/observables/iteration.js:7:68
at Array.forEach (<anonymous>)
at iterateObserversSafely (node_modules/@apollo/client/utilities/observables/iteration.js:7:25)
at Object.error (node_modules/@apollo/client/utilities/observables/Concast.js:76:21)
at notifySubscription (node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
at SubscriptionObserver.error (node_modules/zen-observable/lib/Observable.js:240:7)
at handleError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:170:14)
at node_modules/@apollo/client/link/http/createHttpLink.js:145:17
Cause:
ServerError: Response not successful: Received status code 500
at Object.throwServerError (node_modules/@apollo/client/link/utils/throwServerError.js:2:17)
at throwServerError (node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:120:9)
at node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js:176:48
● Substrate DictionaryService › should return all specVersion
expect(received).toBeGreaterThan(expected)
Matcher error: received value must be a number or bigint
Received has value: undefined
63 | const specVersions = await dictionaryService.getSpecVersions();
64 |
> 65 | expect(specVersions?.length).toBeGreaterThan(0);
| ^
66 | dictionaryService.onApplicationShutdown();
67 | }, 50000);
68 | });
at Object.<anonymous> (packages/node/src/indexer/dictionary/v1/substrateDictionaryV1.spec.ts:65:34)
● SchemaMigration integration tests › Should initialize correct schema based on startHeight
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/configure/SchemaMigration.service.test.ts:53:11)
● SchemaMigration integration tests › On entity drop isRewindable should be false
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/configure/SchemaMigration.service.test.ts:74:11)
● SchemaMigration integration tests › Should update sequelize Models in cachedModels
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/configure/SchemaMigration.service.test.ts:89:11)
● SchemaMigration integration tests › Ensure no duplication in cacheModels
Nest can't resolve dependencies of the UnfinalizedBlocksService (NodeConfig, ?, IBlockchainService). Please make sure that the argument Object at index [1] is available in the FetchModule context.
Potential solutions:
- Is FetchModule a valid NestJS module?
- If Object is a provider, is it part of the current FetchModule?
- If Object is exported from a separate @Module, is that module imported within FetchModule?
@Module({
imports: [ /* the Module containing Object */ ]
})
94 | timestampField = false,
95 | ): Promise<INestApplication> {
> 96 | const m = await Test.createTestingModule({
| ^
97 | imports: [
98 | DbModule.forRoot(),
99 | EventEmitterModule.forRoot(),
at TestingInjector.lookupComponentInParentModules (node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (node_modules/@nestjs/core/injector/injector.js:88:9)
at node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstancesOfProviders (node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 8)
at TestingInstanceLoader.createInstances (node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at prepareApp (packages/node/src/utils/test.utils.ts:96:13)
at Object.<anonymous> (packages/node/src/configure/SchemaMigration.service.test.ts:125:11)
● Cli publish › should upload appropriate project to IPFS
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(75,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(87,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(63,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(69,48)
TS2558: Expected 0 type arguments, but got 1.
44 | const outputDir = path.resolve(directory, flags.output ?? 'dist');
45 |
> 46 | await runWebpack(buildEntries, directory, outputDir, isDev, true);
| ^
47 | if (!flags.silent) {
48 | this.log('Building and packing code ...');
49 | this.log('Done!');
at Object.error (node_modules/@oclif/core/lib/errors/index.js:27:15)
at Build.error (node_modules/@oclif/core/lib/command.js:139:23)
at Build.run (packages/cli/src/commands/build/index.ts:46:18)
at async Build._run (node_modules/@oclif/core/lib/command.js:117:22)
at async createMultiChainTestProject (packages/cli/src/createProject.fixtures.ts:89:5)
at async Promise.all (index 1)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:18:21)
● Cli publish › convert to deployment and removed descriptive field
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(75,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(87,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(63,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(69,48)
TS2558: Expected 0 type arguments, but got 1.
44 | const outputDir = path.resolve(directory, flags.output ?? 'dist');
45 |
> 46 | await runWebpack(buildEntries, directory, outputDir, isDev, true);
| ^
47 | if (!flags.silent) {
48 | this.log('Building and packing code ...');
49 | this.log('Done!');
at Object.error (node_modules/@oclif/core/lib/errors/index.js:27:15)
at Build.error (node_modules/@oclif/core/lib/command.js:139:23)
at Build.run (packages/cli/src/commands/build/index.ts:46:18)
at async Build._run (node_modules/@oclif/core/lib/command.js:117:22)
at async createMultiChainTestProject (packages/cli/src/createProject.fixtures.ts:89:5)
at async Promise.all (index 1)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:18:21)
● Cli publish › convert js object to JSON object
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(75,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(87,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(63,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(69,48)
TS2558: Expected 0 type arguments, but got 1.
44 | const outputDir = path.resolve(directory, flags.output ?? 'dist');
45 |
> 46 | await runWebpack(buildEntries, directory, outputDir, isDev, true);
| ^
47 | if (!flags.silent) {
48 | this.log('Building and packing code ...');
49 | this.log('Done!');
at Object.error (node_modules/@oclif/core/lib/errors/index.js:27:15)
at Build.error (node_modules/@oclif/core/lib/command.js:139:23)
at Build.run (packages/cli/src/commands/build/index.ts:46:18)
at async Build._run (node_modules/@oclif/core/lib/command.js:117:22)
at async createMultiChainTestProject (packages/cli/src/createProject.fixtures.ts:89:5)
at async Promise.all (index 1)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:18:21)
● Cli publish › Get directory CID from multi-chain project
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(75,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ClaimRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(81,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/ForgeRecord.ts(87,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(63,48)
TS2558: Expected 0 type arguments, but got 1.
[tsl] ERROR in /tmp/14FdPZ/multi_mocked_starter/src/types/models/NFT.ts(69,48)
TS2558: Expected 0 type arguments, but got 1.
44 | const outputDir = path.resolve(directory, flags.output ?? 'dist');
45 |
> 46 | await runWebpack(buildEntries, directory, outputDir, isDev, true);
| ^
47 | if (!flags.silent) {
48 | this.log('Building and packing code ...');
49 | this.log('Done!');
at Object.error (node_modules/@oclif/core/lib/errors/index.js:27:15)
at Build.error (node_modules/@oclif/core/lib/command.js:139:23)
at Build.run (packages/cli/src/commands/build/index.ts:46:18)
at async Build._run (node_modules/@oclif/core/lib/command.js:117:22)
at async createMultiChainTestProject (packages/cli/src/createProject.fixtures.ts:89:5)
at async Promise.all (index 1)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:18:21)
Report generated by 🧪jest coverage report action from a0e730a
stwiname
force-pushed
the
blockchain-service
branch
from
August 5, 2024 04:51
8d0791c
to
babc846
Compare
stwiname
force-pushed
the
blockchain-service
branch
from
November 13, 2024 01:05
8a7c91b
to
ad60722
Compare
stwiname
force-pushed
the
blockchain-service
branch
from
December 11, 2024 01:43
b648e59
to
a0e730a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is another phase of moving more code to node core, it is a shift away from using super classes and now defines a clear interface for blockchain specific code.
This reduces a lot of boiler plate in extending classes and having to redefine constructors as well as nestjs modules. This will greatly simplify adding support for new blockchains.
TODOs
initBlockDispatcher
,preLoopHook
)Type of change
Please delete options that are not relevant.
Checklist