diff --git a/package-lock.json b/package-lock.json
index d073acf158..daa44cfd37 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "origintrail_node",
- "version": "8.1.1-rc.11",
+ "version": "8.2.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "origintrail_node",
- "version": "8.1.1-rc.11",
+ "version": "8.2.1",
"license": "ISC",
"dependencies": {
"@comunica/query-sparql": "^4.0.2",
diff --git a/package.json b/package.json
index ec26e3aa65..67605721f1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
- "version": "8.1.1-rc.12",
+ "version": "8.2.1",
"description": "OTNode V8",
"main": "index.js",
"type": "module",
diff --git a/src/commands/protocols/publish/publish-finalization-command.js b/src/commands/protocols/publish/publish-finalization-command.js
index d9146a2f06..b314b5c53b 100644
--- a/src/commands/protocols/publish/publish-finalization-command.js
+++ b/src/commands/protocols/publish/publish-finalization-command.js
@@ -84,15 +84,7 @@ class PublishFinalizationCommand extends Command {
const ual = this.ualService.deriveUAL(blockchain, contractAddress, id);
try {
- await this.validatePublishData(
- operationId,
- blockchain,
- merkleRoot,
- cachedMerkleRoot,
- byteSize,
- assertion,
- ual,
- );
+ await this.validatePublishData(merkleRoot, cachedMerkleRoot, byteSize, assertion, ual);
} catch (e) {
this.logger.error(`Failed to validate publish data: ${e.message}`);
this.operationIdService.emitChangeEvent(
@@ -173,52 +165,21 @@ class PublishFinalizationCommand extends Command {
return Command.empty();
}
- async validatePublishData(
- operationId,
- blockchain,
- merkleRoot,
- cachedMerkleRoot,
- byteSize,
- assertion,
- ual,
- ) {
- try {
- if (merkleRoot !== cachedMerkleRoot) {
- const errorMessage = `Invalid Merkle Root for Knowledge Collection: ${ual}. Received value from blockchain: ${merkleRoot}, Cached value from publish operation: ${cachedMerkleRoot}`;
-
- this.logger.error(`Command error (${this.errorType}): ${errorMessage}`);
-
- this.operationIdService.emitChangeEvent(
- OPERATION_ID_STATUS.FAILED,
- operationId,
- blockchain,
- );
- }
-
- const calculatedAssertionSize = this.dataService.calculateAssertionSize(
- assertion.public ?? assertion,
- );
+ async validatePublishData(merkleRoot, cachedMerkleRoot, byteSize, assertion, ual) {
+ if (merkleRoot !== cachedMerkleRoot) {
+ const errorMessage = `Invalid Merkle Root for Knowledge Collection: ${ual}. Received value from blockchain: ${merkleRoot}, Cached value from publish operation: ${cachedMerkleRoot}`;
- if (byteSize.toString() !== calculatedAssertionSize.toString()) {
- const errorMessage = `Invalid Assertion Size for Knowledge Collection: ${ual}. Received value from blockchain: ${byteSize}, Calculated value: ${calculatedAssertionSize}`;
+ throw new Error(errorMessage);
+ }
- this.logger.error(`Command error (${this.errorType}): ${errorMessage}`);
+ const calculatedAssertionSize = this.dataService.calculateAssertionSize(
+ assertion.public ?? assertion,
+ );
- this.operationIdService.emitChangeEvent(
- OPERATION_ID_STATUS.FAILED,
- operationId,
- blockchain,
- );
- }
- } catch (e) {
- this.logger.error(`Command error (${this.errorType}): ${e.message}`);
+ if (byteSize.toString() !== calculatedAssertionSize.toString()) {
+ const errorMessage = `Invalid Assertion Size for Knowledge Collection: ${ual}. Received value from blockchain: ${byteSize}, Calculated value: ${calculatedAssertionSize}`;
- this.operationIdService.emitChangeEvent(
- OPERATION_ID_STATUS.FAILED,
- operationId,
- blockchain,
- );
- throw e;
+ throw new Error(errorMessage);
}
}
diff --git a/src/modules/auto-updater/implementation/ot-auto-updater.js b/src/modules/auto-updater/implementation/ot-auto-updater.js
index e272597d78..fa3c158ac9 100644
--- a/src/modules/auto-updater/implementation/ot-auto-updater.js
+++ b/src/modules/auto-updater/implementation/ot-auto-updater.js
@@ -7,8 +7,8 @@ import semver from 'semver';
import axios from 'axios';
import unzipper from 'unzipper';
-const REPOSITORY_URL = 'https://github.com/OriginTrail/ot-node';
-const ARCHIVE_REPOSITORY_URL = 'github.com/OriginTrail/ot-node/archive/';
+const REPOSITORY_URL = 'https://github.com/OriginTrail/dkg-engine';
+const ARCHIVE_REPOSITORY_URL = 'github.com/OriginTrail/dkg-engine/archive/';
class OTAutoUpdater {
async initialize(config, logger) {
@@ -50,7 +50,7 @@ class OTAutoUpdater {
async update() {
try {
- this.logger.debug(`AutoUpdater - Updating ot-node from ${REPOSITORY_URL}`);
+ this.logger.debug(`AutoUpdater - Updating dkg-engine from ${REPOSITORY_URL}`);
const currentDirectory = appRootPath.path;
const rootPath = path.join(currentDirectory, '..');
@@ -173,7 +173,7 @@ class OTAutoUpdater {
downloadUpdate(destination) {
return new Promise((resolve, reject) => {
const url = `https://${path.join(ARCHIVE_REPOSITORY_URL, this.config.branch)}.zip`;
- this.logger.debug(`AutoUpdater - Downloading ot-node .zip file from url: ${url}`);
+ this.logger.debug(`AutoUpdater - Downloading dkg-engine .zip file from url: ${url}`);
axios({ method: 'get', url, responseType: 'stream' })
.then((response) => {
const fileStream = fs.createWriteStream(destination);
@@ -191,7 +191,7 @@ class OTAutoUpdater {
.catch((error) => {
reject(
Error(
- `AutoUpdater - Unable to download new version of ot-node. Error: ${error.message}`,
+ `AutoUpdater - Unable to download new version of dkg-engine. Error: ${error.message}`,
),
);
});
@@ -199,7 +199,7 @@ class OTAutoUpdater {
}
unzipFile(destination, source) {
- this.logger.debug(`AutoUpdater - Unzipping ot-node new version archive`);
+ this.logger.debug(`AutoUpdater - Unzipping dkg-engine new version archive`);
return new Promise((resolve, reject) => {
const fileReadStream = fs
.createReadStream(source)
@@ -220,7 +220,7 @@ class OTAutoUpdater {
const destinationDirFiles = await fs.readdir(extractedDataPath);
if (destinationDirFiles.length !== 1) {
await fs.remove(extractedDataPath);
- throw Error('Extracted archive for new ot-node version is not valid');
+ throw Error('Extracted archive for new dkg-engine version is not valid');
}
const sourcePath = path.join(extractedDataPath, destinationDirFiles[0]);
await fs.remove(destinationPath);
diff --git a/src/modules/triple-store/implementation/ot-blazegraph/ot-blazegraph.js b/src/modules/triple-store/implementation/ot-blazegraph/ot-blazegraph.js
index 42764bb6de..16a4d9af36 100644
--- a/src/modules/triple-store/implementation/ot-blazegraph/ot-blazegraph.js
+++ b/src/modules/triple-store/implementation/ot-blazegraph/ot-blazegraph.js
@@ -220,7 +220,7 @@ class OtBlazegraph extends OtTripleStore {
} catch (error) {
if (error.response && error.response.status === 404) {
// Expected error: GraphDB is up but has not created node0 repository
- // Ot-node will create repo in initialization
+ // dkg-engine will create repo in initialization
return false;
}
this.logger.error(
diff --git a/src/modules/triple-store/implementation/ot-graphdb/ot-graphdb.js b/src/modules/triple-store/implementation/ot-graphdb/ot-graphdb.js
index c963d43a2d..d27c652f11 100644
--- a/src/modules/triple-store/implementation/ot-graphdb/ot-graphdb.js
+++ b/src/modules/triple-store/implementation/ot-graphdb/ot-graphdb.js
@@ -83,7 +83,7 @@ class OtGraphdb extends OtTripleStore {
} catch (e) {
if (e.response && e.response.status === 404) {
// Expected error: GraphDB is up but has not created node0 repository
- // Ot-node will create repo in initialization
+ // dkg-engine will create repo in initialization
return true;
}
return false;
diff --git a/tools/local-network-setup/README.md b/tools/local-network-setup/README.md
index 74736f6f92..e2c9fa1add 100644
--- a/tools/local-network-setup/README.md
+++ b/tools/local-network-setup/README.md
@@ -14,20 +14,20 @@ This tool will help you set up a local DKG V8 network running with the Hardhat b
# Setup instructions
-In order to run the local network you fist need to clone the "ot-node" repository.
+In order to run the local network you fist need to clone the "dkg-engine" repository.
-## 1. CLONE OT-NODE REPOSITORY & INSTALL DEPENDENCIES
+## 1. CLONE DKG-ENGINE REPOSITORY & INSTALL DEPENDENCIES
-After cloning the **ot-node** repository, please checkout to "v8/develop" branch and install dependencies by running:
+After cloning the **dkg-engine** repository, please checkout to "v8/develop" branch and install dependencies by running:
```bash
-git clone https://github.com/OriginTrail/ot-node.git && cd ot-node/ && npm install && cd ..
+git clone https://github.com/OriginTrail/dkg-engine.git && cd dkg-engine/ && npm install && cd ..
```
-### 2.2 Create the .env file inside the "ot-node" directory:
+### 2.2 Create the .env file inside the "dkg-engine" directory:
```bash
nano .env
diff --git a/v8-data-migration/triple-store-utils.js b/v8-data-migration/triple-store-utils.js
index 14aa812947..ac004dd547 100644
--- a/v8-data-migration/triple-store-utils.js
+++ b/v8-data-migration/triple-store-utils.js
@@ -202,7 +202,7 @@ export async function healthCheck(tripleStoreRepositories, repository, tripleSto
} catch (e) {
if (e.response && e.response.status === 404) {
// Expected error: GraphDB is up but has not created node0 repository
- // Ot-node will create repo in initialization
+ // dkg-engine will create repo in initialization
return true;
}
logger.error(`Health check failed for repository ${repository}:`, e);