Skip to content
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

Fix prerelease 3.4.7 3 #223

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
*.tgz
*.cmd
*.sh
*.proto
*.patch
*.proto
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
},
"packageManager": "[email protected]",
"dependencies": {
"@geut/chan": "^3.2.9"
"@geut/chan": "^3.2.9",
"patch-package": "^8.0.0"
}
}
3 changes: 0 additions & 3 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Patch encoding issue in tendermint37 client, this is a temporary fix until [this fix](https://github.com/cosmos/cosmjs/pull/1546) in `@cosmjs/tendermint-rpc` is released (#220)

## [3.4.6] - 2023-12-25
### Fixed
- Update @subql/node-core to fix bypass block maximum call stack size exceeded issue.
Expand Down
6 changes: 2 additions & 4 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@subql/node-cosmos",
"version": "3.4.7-0",
"version": "3.4.7-3",
"description": "",
"author": "SubQuery Pte Ltd",
"license": "GPL-3.0",
Expand All @@ -11,8 +11,7 @@
"start": "nest start",
"start:dev": "nodemon",
"start:prod": "node dist/main",
"changelog:release": "echo \"Updating changelog $npm_package_version\" && npx chan release $npm_package_version --git-url \"https://github.com/subquery/subql-cosmos\" --release-prefix=\"node-cosmos/\"",
"postinstall": "patch-package"
"changelog:release": "echo \"Updating changelog $npm_package_version\" && npx chan release $npm_package_version --git-url \"https://github.com/subquery/subql-cosmos\" --release-prefix=\"node-cosmos/\""
},
"homepage": "https://github.com/subquery/subql-cosmos",
"repository": "github:subquery/subql-cosmos",
Expand All @@ -37,7 +36,6 @@
"cron-converter": "^1.0.2",
"eventemitter2": "^6.4.5",
"lodash": "^4.17.21",
"patch-package": "^8.0.0",
"pg": "^8.7.1",
"protobufjs": "^6.11.4",
"reflect-metadata": "^0.1.13",
Expand Down
17 changes: 0 additions & 17 deletions packages/node/patches/@cosmjs+tendermint-rpc+0.30.1.patch

This file was deleted.

62 changes: 4 additions & 58 deletions packages/node/src/indexer/api.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import { INestApplication } from '@nestjs/common';
import { EventEmitter2, EventEmitterModule } from '@nestjs/event-emitter';
import { Test } from '@nestjs/testing';
import { loadFromJsonOrYaml } from '@subql/common';
import {
ConnectionPoolService,
ConnectionPoolStateManager,
NodeConfig,
} from '@subql/node-core';
import { ConnectionPoolService, delay, NodeConfig } from '@subql/node-core';
import { GraphQLSchema } from 'graphql';
import { SubqueryProject } from '../configure/SubqueryProject';
import { ApiService } from './api.service';
Expand All @@ -23,20 +19,13 @@ const CHAINID = 'juno-1';

const TEST_BLOCKNUMBER = 3266772;

const ENDPOINT_CHIHUAHUA = 'https://chihuahua-rpc.publicnode.com:443';
const CHAINID_CHIHUAHUA = 'chihuahua-1';
const TEST_CHIHUAHUA = 10925390;

const projectsDir = path.join(__dirname, '../../test');

function testCosmosProject(
endpoint = ENDPOINT,
chainID = CHAINID,
): SubqueryProject {
function testCosmosProject(): SubqueryProject {
return {
network: {
endpoint: [endpoint],
chainId: chainID,
endpoint: ENDPOINT,
chainId: CHAINID,
},
dataSources: [],
id: 'test',
Expand All @@ -54,7 +43,6 @@ describe.skip('ApiService', () => {
const prepareApiService = async () => {
const module = await Test.createTestingModule({
providers: [
ConnectionPoolStateManager,
ConnectionPoolService,
{
provide: 'ISubqueryProject',
Expand Down Expand Up @@ -108,45 +96,3 @@ describe.skip('ApiService', () => {
expect(txInfos.length).toEqual(4);
});
});

describe('ApiService Chihuahua', () => {
let app: INestApplication;
let apiService: ApiService;
const prepareApiService = async () => {
const module = await Test.createTestingModule({
providers: [
ConnectionPoolStateManager,
ConnectionPoolService,
{
provide: 'ISubqueryProject',
useFactory: () =>
testCosmosProject(ENDPOINT_CHIHUAHUA, CHAINID_CHIHUAHUA),
},
{
provide: NodeConfig,
useFactory: () => ({}),
},
EventEmitter2,
ApiService,
NodeConfig,
],
imports: [EventEmitterModule.forRoot()],
}).compile();
app = module.createNestApplication();
await app.init();
apiService = app.get(ApiService);
await apiService.init();
};

beforeAll(async () => {
await prepareApiService();
});

// This is to test https://github.com/cosmos/cosmjs/issues/1543
it('chihuahua test, can query block result', async () => {
const api = apiService.api;
const blockInfo = await api.blockInfo(TEST_CHIHUAHUA);
const blockResult = await api.blockResults(TEST_CHIHUAHUA);
expect(blockResult).toBeTruthy();
});
});
Loading
Loading