From 0c6d358045619d02b9485c9fd09889c395600b7f Mon Sep 17 00:00:00 2001 From: Zeeshan Akram <97m.zeeshan@gmail.com> Date: Mon, 17 Jul 2023 11:05:17 +0500 Subject: [PATCH 1/2] fix: handling of Finalized txs in sendExtrinsic function --- cli/src/base/ApiCommandBase.ts | 2 +- distributor-node/src/services/networking/runtime/api.ts | 2 +- storage-node/src/services/runtime/api.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/base/ApiCommandBase.ts b/cli/src/base/ApiCommandBase.ts index 28d2827668..311e4b0e87 100644 --- a/cli/src/base/ApiCommandBase.ts +++ b/cli/src/base/ApiCommandBase.ts @@ -529,7 +529,7 @@ export default abstract class ApiCommandBase extends StateAwareCommandBase { return } - if (result.status.isInBlock) { + if (result.status.isInBlock || result.status.isFinalized) { unsubscribe() result.events .filter(({ event }) => event.section === 'system') diff --git a/distributor-node/src/services/networking/runtime/api.ts b/distributor-node/src/services/networking/runtime/api.ts index 050403b35b..1398b148ef 100644 --- a/distributor-node/src/services/networking/runtime/api.ts +++ b/distributor-node/src/services/networking/runtime/api.ts @@ -110,7 +110,7 @@ export class RuntimeApi { return } - if (result.status.isInBlock) { + if (result.status.isInBlock || result.status.isFinalized) { unsubscribe() result.events .filter(({ event }) => event.section === 'system') diff --git a/storage-node/src/services/runtime/api.ts b/storage-node/src/services/runtime/api.ts index 829e89db27..9bb81576ed 100644 --- a/storage-node/src/services/runtime/api.ts +++ b/storage-node/src/services/runtime/api.ts @@ -99,7 +99,7 @@ async function sendExtrinsic( return } - if (result.status.isInBlock) { + if (result.status.isInBlock || result.status.isFinalized) { unsubscribe() result.events .filter(({ event }) => event.section === 'system') From 048f23c33028bc1cd291668cb2b78217e5c461b8 Mon Sep 17 00:00:00 2001 From: Zeeshan Akram <97m.zeeshan@gmail.com> Date: Mon, 17 Jul 2023 16:15:19 +0500 Subject: [PATCH 2/2] bump package versions & update CHANGELOG --- cli/package.json | 2 +- distributor-node/CHANGELOG.md | 4 ++++ distributor-node/package.json | 2 +- storage-node/CHANGELOG.md | 4 ++++ storage-node/package.json | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cli/package.json b/cli/package.json index 2ba0278203..21c46e4d40 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,7 +1,7 @@ { "name": "@joystream/cli", "description": "Command Line Interface for Joystream community and governance activities", - "version": "1.2.0", + "version": "1.2.1", "author": "Leszek Wiesner", "bin": { "joystream-cli": "./bin/run" diff --git a/distributor-node/CHANGELOG.md b/distributor-node/CHANGELOG.md index 9afec48f5d..2a5a428282 100644 --- a/distributor-node/CHANGELOG.md +++ b/distributor-node/CHANGELOG.md @@ -1,3 +1,7 @@ +### 1.2.2 + +- **FIX** `sendExtrinsic`: The send extrinsic function (which is a wrapper around PolkadotJS `tx.signAndSend` function) has been fixed to handle the case when tx has been finalized before the callback registered in `tx.signAndSend` would run. + ### 1.2.1 - Integrates OpenTelemetry API/SDK with Argus for exporting improved tracing logs & metrics to Elasticsearch. Adds `./start-elasticsearch-stack.sh` script to bootstrap elasticsearch services (Elasticsearch + Kibana + APM Server) with all the required configurations. diff --git a/distributor-node/package.json b/distributor-node/package.json index 1a1a56c67f..9c9c07df88 100644 --- a/distributor-node/package.json +++ b/distributor-node/package.json @@ -1,7 +1,7 @@ { "name": "@joystream/distributor-cli", "description": "Joystream distributor node CLI", - "version": "1.2.1", + "version": "1.2.2", "author": "Joystream contributors", "bin": { "joystream-distributor": "./bin/run" diff --git a/storage-node/CHANGELOG.md b/storage-node/CHANGELOG.md index 8e59c69494..fdd434f7c4 100644 --- a/storage-node/CHANGELOG.md +++ b/storage-node/CHANGELOG.md @@ -1,3 +1,7 @@ +### 3.5.1 + +- **FIX** `sendExtrinsic`: The send extrinsic function (which is a wrapper around PolkadotJS `tx.signAndSend` function) has been fixed to handle the case when tx has been finalized before the callback registered in `tx.signAndSend` would run. + ### 3.5.0 - Integrates OpenTelemetry API/SDK with Colossus for exporting improved tracing logs & metrics to Elasticsearch. Adds `./start-elasticsearch-stack.sh` script to bootstrap elasticsearch services (Elasticsearch + Kibana + APM Server) with all the required configurations. diff --git a/storage-node/package.json b/storage-node/package.json index 32654bfba4..4fc57b6c52 100644 --- a/storage-node/package.json +++ b/storage-node/package.json @@ -1,7 +1,7 @@ { "name": "storage-node", "description": "Joystream storage subsystem.", - "version": "3.5.0", + "version": "3.5.1", "author": "Joystream contributors", "bin": { "storage-node": "./bin/run"