Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #149 from LiskHQ/136-update-lisk-sdk–dependencies
Browse files Browse the repository at this point in the history
Update Lisk SDK dependencies
  • Loading branch information
sameersubudhi authored Sep 8, 2023
2 parents 473426a + c6d7c74 commit 54d616b
Show file tree
Hide file tree
Showing 6 changed files with 1,357 additions and 1,336 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@
"/docs"
],
"dependencies": {
"@liskhq/lisk-api-client": "5.1.7-alpha.2",
"@liskhq/lisk-chain": "0.3.5-alpha.2",
"@liskhq/lisk-codec": "0.3.0-beta.5",
"@liskhq/lisk-cryptography": "3.2.2-alpha.1",
"@liskhq/lisk-db": "0.3.7",
"@liskhq/lisk-utils": "0.3.0-beta.3",
"@liskhq/lisk-validator": "0.7.0-beta.5",
"@liskhq/lisk-api-client": "5.2.0-rc.0",
"@liskhq/lisk-chain": "0.4.0-rc.0",
"@liskhq/lisk-codec": "0.4.0-rc.0",
"@liskhq/lisk-cryptography": "3.3.0-rc.0",
"@liskhq/lisk-db": "0.3.8",
"@liskhq/lisk-utils": "0.4.0-rc.0",
"@liskhq/lisk-validator": "0.8.0-rc.0",
"@oclif/command": "1.8.21",
"@oclif/config": "1.14.0",
"@oclif/errors": "1.2.2",
"@oclif/plugin-help": "2.2.3",
"cli-ux": "5.5.1",
"debug": "4.1.1",
"fs-extra": "11.1.0",
"lisk-framework": "0.10.0-beta.7",
"lisk-framework": "0.11.0-rc.0",
"semver": "7.3.2",
"shelljs": "^0.8.5",
"tar": "6.1.13"
Expand Down
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export interface TransactionPool {
readonly minReplacementFeeDifference?: string;
}

export interface Backup {
height: number;
}
export interface ApplicationConfigV3 {
label: string;
version: string;
Expand All @@ -79,6 +82,7 @@ export interface ApplicationConfigV3 {
plugins: {
[key: string]: PluginOptions;
};
backup: Backup;
transactionPool: TransactionPool;
rpc: RPCConfig;
}
Expand Down Expand Up @@ -372,10 +376,6 @@ export interface RegisteredModule {
}[];
}

export interface Backup {
height: number;
}

export interface NodeInfo {
readonly version: string;
readonly networkVersion: string;
Expand Down
13 changes: 12 additions & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ export const migrateUserConfig = async (
cli.action.stop();
}

// TODO: Verify if needed
if (configV3.backup?.height) {
cli.action.start(
`Setting config property 'system.backup.height' to: ${configV3.backup.height}.`,
);
configV4.system.backup = {
height: Math.max(snapshotHeight + 1, configV3.backup.height + 1),
};
cli.action.stop();
}

if (configV3.transactionPool) {
if (configV3.transactionPool.maxTransactions) {
cli.action.start(
Expand Down Expand Up @@ -259,7 +270,7 @@ export const validateConfig = async (config: ApplicationConfig): Promise<boolean
try {
(await validator.validate(applicationConfigSchema, config)) as unknown;
return true;
} catch (_) {
} catch (error) {
return false;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/utils/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Port } from '../types';
import { getAPIClient } from '../client';
import { DEFAULT_PORT_P2P, DEFAULT_PORT_RPC } from '../constants';

const INSTALL_LISK_CORE_COMMAND = 'npm i -g lisk-core@^4.0.0-beta.5';
const INSTALL_LISK_CORE_COMMAND = 'npm i -g lisk-core@^4.0.0-rc.0';
const INSTALL_PM2_COMMAND = 'npm i -g pm2';
const PM2_FILE_NAME = 'pm2.migrator.config.json';
const START_PM2_COMMAND = `pm2 start ${PM2_FILE_NAME}`;
Expand Down
3 changes: 3 additions & 0 deletions test/unit/fixtures/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export const configV3 = {
wsMaxPayload: 10,
advertiseAddress: true,
},
backup: {
height: 10,
},
transactionPool: {
maxTransactions: 4096,
maxTransactionsPerAccount: 64,
Expand Down
Loading

0 comments on commit 54d616b

Please sign in to comment.