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

Commit

Permalink
Merge branch 'development' of https://github.com/LiskHQ/lisk-sdk into…
Browse files Browse the repository at this point in the history
… 8351-update-typedoc
  • Loading branch information
shuse2 committed Apr 14, 2023
2 parents 8e0d85b + fe66827 commit 0ea886e
Show file tree
Hide file tree
Showing 30 changed files with 287 additions and 230 deletions.
18 changes: 9 additions & 9 deletions commander/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-commander",
"version": "6.0.0-alpha.18",
"version": "6.0.0-alpha.19",
"description": "A command line interface for Lisk",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -101,16 +101,16 @@
"/docs"
],
"dependencies": {
"@liskhq/lisk-api-client": "^6.0.0-alpha.17",
"@liskhq/lisk-chain": "^0.4.0-alpha.15",
"@liskhq/lisk-client": "^6.0.0-alpha.17",
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-api-client": "^6.0.0-alpha.18",
"@liskhq/lisk-chain": "^0.4.0-alpha.16",
"@liskhq/lisk-client": "^6.0.0-alpha.18",
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-db": "0.3.5",
"@liskhq/lisk-passphrase": "^4.0.0-alpha.3",
"@liskhq/lisk-transactions": "^6.0.0-alpha.13",
"@liskhq/lisk-transactions": "^6.0.0-alpha.14",
"@liskhq/lisk-utils": "^0.3.0-alpha.5",
"@liskhq/lisk-validator": "^0.7.0-alpha.8",
"@liskhq/lisk-validator": "^0.7.0-alpha.9",
"@oclif/core": "1.20.4",
"@oclif/plugin-autocomplete": "1.3.6",
"@oclif/plugin-help": "5.1.19",
Expand All @@ -121,7 +121,7 @@
"cli-table3": "0.6.0",
"fs-extra": "11.1.0",
"inquirer": "8.2.5",
"lisk-framework": "^6.0.0-alpha.18",
"lisk-framework": "^0.10.0-alpha.19",
"listr": "0.14.3",
"progress": "2.0.3",
"semver": "7.3.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@
}
},
"dependencies": {
"@liskhq/lisk-framework-dashboard-plugin": "0.2.0-alpha.18",
"@liskhq/lisk-framework-faucet-plugin": "0.2.0-alpha.18",
"@liskhq/lisk-framework-monitor-plugin": "0.3.0-alpha.18",
"@liskhq/lisk-framework-forger-plugin": "0.3.0-alpha.18",
"@liskhq/lisk-framework-report-misbehavior-plugin": "0.3.0-alpha.18",
"@liskhq/lisk-framework-chain-connector-plugin": "0.1.0-alpha.7",
"@liskhq/lisk-framework-dashboard-plugin": "0.2.0-alpha.19",
"@liskhq/lisk-framework-faucet-plugin": "0.2.0-alpha.19",
"@liskhq/lisk-framework-monitor-plugin": "0.3.0-alpha.19",
"@liskhq/lisk-framework-forger-plugin": "0.3.0-alpha.19",
"@liskhq/lisk-framework-report-misbehavior-plugin": "0.3.0-alpha.19",
"@liskhq/lisk-framework-chain-connector-plugin": "0.1.0-alpha.8",
"@oclif/core": "1.20.4",
"@oclif/plugin-autocomplete": "1.3.6",
"@oclif/plugin-help": "5.1.19",
"@oclif/plugin-version": "1.1.3",
"axios": "0.21.2",
"fs-extra": "11.1.0",
"inquirer": "8.2.5",
"lisk-commander": "6.0.0-alpha.18",
"lisk-sdk": "6.0.0-alpha.18",
"lisk-commander": "6.0.0-alpha.19",
"lisk-sdk": "6.0.0-alpha.19",
"tar": "6.1.11",
"tslib": "2.4.1"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"lisk-sdk": "^6.0.0-alpha.18"
"lisk-sdk": "^6.0.0-alpha.19"
},
"devDependencies": {
"@types/jest": "26.0.21",
Expand Down
12 changes: 6 additions & 6 deletions elements/lisk-api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-api-client",
"version": "6.0.0-alpha.17",
"version": "6.0.0-alpha.18",
"description": "An API client for the Lisk network",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,16 +35,16 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-transactions": "^6.0.0-alpha.13",
"@liskhq/lisk-validator": "^0.7.0-alpha.8",
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-transactions": "^6.0.0-alpha.14",
"@liskhq/lisk-validator": "^0.7.0-alpha.9",
"isomorphic-ws": "4.0.1",
"ws": "8.11.0",
"zeromq": "6.0.0-beta.6"
},
"devDependencies": {
"@liskhq/lisk-chain": "^0.4.0-alpha.15",
"@liskhq/lisk-chain": "^0.4.0-alpha.16",
"@types/jest": "29.2.3",
"@types/jest-when": "3.5.2",
"@types/node": "16.18.3",
Expand Down
10 changes: 5 additions & 5 deletions elements/lisk-chain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-chain",
"version": "0.4.0-alpha.15",
"version": "0.4.0-alpha.16",
"description": "Blocks and state management implementation that are used for block processing according to the Lisk protocol",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,12 +35,12 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-db": "0.3.5",
"@liskhq/lisk-tree": "^0.3.0-alpha.11",
"@liskhq/lisk-tree": "^0.3.0-alpha.12",
"@liskhq/lisk-utils": "^0.3.0-alpha.5",
"@liskhq/lisk-validator": "^0.7.0-alpha.8",
"@liskhq/lisk-validator": "^0.7.0-alpha.9",
"debug": "4.3.4"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions elements/lisk-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-client",
"version": "6.0.0-alpha.17",
"version": "6.0.0-alpha.18",
"description": "A default set of Elements for use by clients of the Lisk network",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -56,14 +56,14 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-api-client": "^6.0.0-alpha.17",
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-api-client": "^6.0.0-alpha.18",
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-passphrase": "^4.0.0-alpha.3",
"@liskhq/lisk-transactions": "^6.0.0-alpha.13",
"@liskhq/lisk-tree": "^0.3.0-alpha.11",
"@liskhq/lisk-transactions": "^6.0.0-alpha.14",
"@liskhq/lisk-tree": "^0.3.0-alpha.12",
"@liskhq/lisk-utils": "^0.3.0-alpha.5",
"@liskhq/lisk-validator": "^0.7.0-alpha.8",
"@liskhq/lisk-validator": "^0.7.0-alpha.9",
"buffer": "6.0.3"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions elements/lisk-codec/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-codec",
"version": "0.3.0-alpha.10",
"version": "0.3.0-alpha.11",
"description": "Implementation of decoder and encoder using Lisk JSON schema according to the Lisk protocol",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,9 +35,9 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-utils": "^0.3.0-alpha.5",
"@liskhq/lisk-validator": "^0.7.0-alpha.8"
"@liskhq/lisk-validator": "^0.7.0-alpha.9"
},
"devDependencies": {
"@types/jest": "29.2.3",
Expand Down
2 changes: 1 addition & 1 deletion elements/lisk-cryptography/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-cryptography",
"version": "4.0.0-alpha.8",
"version": "4.0.0-alpha.9",
"description": "General cryptographic functions for use with Lisk-related software",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down
20 changes: 10 additions & 10 deletions elements/lisk-elements/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-elements",
"version": "6.0.0-alpha.17",
"version": "6.0.0-alpha.18",
"description": "Elements for building blockchain applications in the Lisk network",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,18 +35,18 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-api-client": "^6.0.0-alpha.17",
"@liskhq/lisk-chain": "^0.4.0-alpha.15",
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-api-client": "^6.0.0-alpha.18",
"@liskhq/lisk-chain": "^0.4.0-alpha.16",
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-db": "0.3.5",
"@liskhq/lisk-p2p": "^0.8.0-alpha.10",
"@liskhq/lisk-p2p": "^0.8.0-alpha.11",
"@liskhq/lisk-passphrase": "^4.0.0-alpha.3",
"@liskhq/lisk-transaction-pool": "^0.6.0-alpha.12",
"@liskhq/lisk-transactions": "^6.0.0-alpha.13",
"@liskhq/lisk-tree": "^0.3.0-alpha.11",
"@liskhq/lisk-transaction-pool": "^0.6.0-alpha.13",
"@liskhq/lisk-transactions": "^6.0.0-alpha.14",
"@liskhq/lisk-tree": "^0.3.0-alpha.12",
"@liskhq/lisk-utils": "^0.3.0-alpha.5",
"@liskhq/lisk-validator": "^0.7.0-alpha.8"
"@liskhq/lisk-validator": "^0.7.0-alpha.9"
},
"devDependencies": {
"@types/jest": "29.2.3",
Expand Down
8 changes: 4 additions & 4 deletions elements/lisk-p2p/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-p2p",
"version": "0.8.0-alpha.10",
"version": "0.8.0-alpha.11",
"description": "Unstructured P2P library for use with Lisk-related software",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -41,9 +41,9 @@
"disableLocalIPs": "./scripts/disableTestLocalIPs.sh 2 19"
},
"dependencies": {
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-validator": "^0.7.0-alpha.8",
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-validator": "^0.7.0-alpha.9",
"lodash.shuffle": "4.2.0",
"semver": "7.3.8",
"socketcluster-client": "14.3.1",
Expand Down
4 changes: 2 additions & 2 deletions elements/lisk-transaction-pool/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-transaction-pool",
"version": "0.6.0-alpha.12",
"version": "0.6.0-alpha.13",
"description": "Transaction pool library for use with Lisk-related software",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -36,7 +36,7 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-utils": "^0.3.0-alpha.5",
"debug": "4.3.4"
},
Expand Down
8 changes: 4 additions & 4 deletions elements/lisk-transactions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-transactions",
"version": "6.0.0-alpha.13",
"version": "6.0.0-alpha.14",
"description": "Utility functions related to transactions according to the Lisk protocol",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,9 +35,9 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-codec": "^0.3.0-alpha.10",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-validator": "^0.7.0-alpha.8"
"@liskhq/lisk-codec": "^0.3.0-alpha.11",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-validator": "^0.7.0-alpha.9"
},
"devDependencies": {
"@types/jest": "29.2.3",
Expand Down
4 changes: 2 additions & 2 deletions elements/lisk-tree/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-tree",
"version": "0.3.0-alpha.11",
"version": "0.3.0-alpha.12",
"description": "Library containing Merkle tree implementations for use with Lisk-related software",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -35,7 +35,7 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"@liskhq/lisk-utils": "^0.3.0-alpha.5"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions elements/lisk-validator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-validator",
"version": "0.7.0-alpha.8",
"version": "0.7.0-alpha.9",
"description": "Validation library according to the Lisk protocol",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -36,7 +36,7 @@
"build:check": "node -e \"require('./dist-node')\""
},
"dependencies": {
"@liskhq/lisk-cryptography": "^4.0.0-alpha.8",
"@liskhq/lisk-cryptography": "^4.0.0-alpha.9",
"ajv": "8.1.0",
"ajv-formats": "2.1.1",
"debug": "4.3.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@liskhq/lisk-framework-chain-connector-plugin",
"version": "0.1.0-alpha.7",
"version": "0.1.0-alpha.8",
"description": "A plugin used by a relayer node to automatically create and submit Cross Chain Transaction by aggregating off-chain information of a chain",
"author": "Lisk Foundation <admin@lisk.com>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"debug": "4.3.4",
"fs-extra": "11.1.0",
"lisk-sdk": "^6.0.0-alpha.18"
"lisk-sdk": "^6.0.0-alpha.19"
},
"devDependencies": {
"@types/jest": "29.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
OutboxRootWitness,
JSONObject,
Schema,
OwnChainAccountJSON,
Transaction,
LastCertificate,
CcmSendSuccessEventData,
Expand Down Expand Up @@ -140,15 +139,7 @@ export class ChainConnectorPlugin extends BasePlugin<ChainConnectorPluginConfig>
this.endpoint.load(this._chainConnectorStore);

this._sendingChainClient = this.apiClient;

this._ownChainID = Buffer.from(
(
await this._sendingChainClient.invoke<OwnChainAccountJSON>(
'interoperability_getOwnChainAccount',
)
).chainID,
'hex',
);
this._ownChainID = Buffer.from(this.appConfig.genesis.chainID, 'hex');
if (this._receivingChainID[0] !== this._ownChainID[0]) {
throw new Error('Receiving Chain ID network does not match the sending chain network.');
}
Expand Down Expand Up @@ -313,15 +304,32 @@ export class ChainConnectorPlugin extends BasePlugin<ChainConnectorPluginConfig>
record.height <= (newCertificate ? newCertificate.height : this._lastCertificate.height),
);
// Calculate messageWitnessHashes for pending CCMs if any
const sendingChainChannelDataJSON = await this._receivingChainClient.invoke<ChannelDataJSON>(
const channelDataOnReceivingChain = await this._receivingChainClient.invoke<ChannelDataJSON>(
'interoperability_getChannel',
{ chainID: this._ownChainID.toString('hex') },
);
const sendingChainChannelData = channelDataJSONToObj(sendingChainChannelDataJSON);
if (!channelDataOnReceivingChain?.inbox) {
this.logger.info('Receiving chain is not registered yet on the sending chain.');
return;
}
const inboxSizeOnReceivingChain = channelDataJSONToObj(channelDataOnReceivingChain).inbox.size;

const receivingChainChannelDataJSON = await this._sendingChainClient.invoke<ChannelDataJSON>(
'interoperability_getChannel',
{ chainID: this._receivingChainID.toString('hex') },
);

if (!receivingChainChannelDataJSON?.outbox) {
this.logger.info('Sending chain is not registered yet on the receiving chain.');
return;
}
const outboxSizeOnSendingChain = channelDataJSONToObj(receivingChainChannelDataJSON).outbox
.size;
const messageWitnessHashesForCCMs = calculateMessageWitnesses(
sendingChainChannelData,
ccmsToBeIncluded,
inboxSizeOnReceivingChain,
outboxSizeOnSendingChain,
lastSentCCM,
ccmsToBeIncluded,
this._maxCCUSize,
);
const { crossChainMessages, lastCCMToBeSent, messageWitnessHashes } =
Expand Down
Loading

0 comments on commit 0ea886e

Please sign in to comment.