Skip to content

Commit

Permalink
Update changelogs, address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Aug 27, 2023
1 parent f3bf204 commit 2856366
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 24 deletions.
2 changes: 2 additions & 0 deletions packages/common-substrate/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- move block filters to common (#1969)
### Added
- Parent option to manifest (#1797)

## [2.4.0] - 2023-08-16
### Added
Expand Down
2 changes: 2 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- move block filters to common (#1969)
### Added
- Add spec for project upgrades (#1797)

## [2.6.0] - 2023-08-25
### Changed
Expand Down
6 changes: 6 additions & 0 deletions packages/node-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Use test runs as unit for tests instead of entity checks (#1957)

### Changed
- Move more code from node to node-core. Including configure module, workers (#1797)

### Added
- Project upgrades feature and many other changes to support it (#1797)

## [4.2.3] - 2023-08-17
### Fixed
- delay getPoiBlocksByRange when fully synced, fixes the high CPU usage issue (#1952)
Expand Down
40 changes: 22 additions & 18 deletions packages/node-core/src/configure/configure.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,28 @@ export async function registerApp<P extends ISubqueryProject>(
});

const createParentProject = async (cid: string): Promise<P> => {
cid = `ipfs://${cid}`;
const reader = await ReaderFactory.create(cid, {
ipfs: config.ipfs,
});
return createProject(
cid,
await reader.getProjectSchema(),
reader,
await getCachedRoot(reader, config.root),
omitBy(
// Apply the network endpoint and dictionary from the source project to the parent projects if they are not defined in the config
{
endpoint: config.networkEndpoints ?? project.network.endpoint,
dictionary: config.networkDictionary ?? project.network.dictionary,
},
isNil
)
);
try {
cid = `ipfs://${cid}`;
const reader = await ReaderFactory.create(cid, {
ipfs: config.ipfs,
});
return createProject(
cid,
await reader.getProjectSchema(),
reader,
await getCachedRoot(reader, config.root),
omitBy(
// Apply the network endpoint and dictionary from the source project to the parent projects if they are not defined in the config
{
endpoint: config.networkEndpoints ?? project.network.endpoint,
dictionary: config.networkDictionary ?? project.network.dictionary,
},
isNil
)
);
} catch (e) {
throw new Error(`Failed to load parent project with cid: ${cid}. ${e}`);
}
};

const projectUpgradeService = await ProjectUpgradeSevice.create(project, createParentProject);
Expand Down
6 changes: 0 additions & 6 deletions packages/node-core/src/indexer/dictionary.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,5 @@ describe('DictionaryService', () => {
expect(results?.queryEndBlock).toEqual(499);
});

// it('sort map', () => {
// const unorderedDs = [mockDS[2], mockDS[0], mockDS[1]];
// dictionaryService.buildDictionaryEntryMap(unorderedDs, (startBlock) => startBlock as any);
// expect([...(dictionaryService as any).mappedDictionaryQueryEntries.keys()]).toStrictEqual([100, 500, 1000]);
// });

// TODO write a test that queries over 2 block ranges in case DS has been removed
});
5 changes: 5 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Move code to node-core (#1797)

### Added
- Project upgrades feature which allows upgrading projects at specific heights (#1797)

## [2.12.2] - 2023-08-17
### Fixed
Expand Down

0 comments on commit 2856366

Please sign in to comment.