From 77d77a3600c5b4a5775d751084c76b10ed4eee91 Mon Sep 17 00:00:00 2001 From: Vuk Djoric Date: Tue, 2 Oct 2018 15:25:12 +0200 Subject: [PATCH] Trim edge imports (#599) * trim edge imports data * version bump * Catchup with stable --- config/runtimeConfig.json | 8 ++++---- modules/DHService.js | 1 + modules/EventEmitter.js | 1 + modules/command/dh/dh-data-read-request-free-command.js | 1 + modules/importer.js | 1 + modules/network/kademlia/kademlia.js | 6 ------ package-lock.json | 2 +- package.json | 2 +- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/config/runtimeConfig.json b/config/runtimeConfig.json index 808b0e74f..a796c9377 100644 --- a/config/runtimeConfig.json +++ b/config/runtimeConfig.json @@ -43,16 +43,16 @@ }, "stable": { "network": { - "id": "StablenetV1.0.0", + "id": "StablenetV1.0.1", "bootstraps": ["https://82.196.10.12:5278/#ca87147a501adf39eaa648c2b09735559ee3511d"], "remoteWhitelist": ["54.93.223.161", "127.0.0.1"] }, "blockchainContracts": { "otContractAddress": "0xc47ab060e064e9291d723e14ddf4122bc121624b", "tokenContractAddress": "0x98d9a611ad1b5761bdc1daac42c48e4d54cf5882", - "escrowContractAddress": "0x6103d41059145b72f7ce5760910c017838454bca", - "biddingContractAddress": "0x4e3f704a3a8e874cf576606ed3b2a5e7bff37ad5", - "readingContractAddress": "0x35459b23d3eae1c82b8f349e9df4d28bc11ac5a9" + "escrowContractAddress": "0x68da38286d0dde6b06261655490af1074e0c5572", + "biddingContractAddress": "0x5ecbb18f557049133b42bfe44f892ad7d768d633", + "readingContractAddress": "0x930a3b8c660c4f6bdd74f9181bb82ad3a55d2f64" }, "bugSnag": { "releaseStage": "stable" diff --git a/modules/DHService.js b/modules/DHService.js index bef763b23..a09e3de2f 100644 --- a/modules/DHService.js +++ b/modules/DHService.js @@ -82,6 +82,7 @@ class DHService { throw Error(`Didn't find import with ID. ${importId}`); } + ImportUtilities.deleteInternal(edges); ImportUtilities.deleteInternal(vertices); const holdingData = holdingDataModel.get({ plain: true }); const dataPublicKey = holdingData.data_public_key; diff --git a/modules/EventEmitter.js b/modules/EventEmitter.js index 3137c60d7..1bfc42115 100644 --- a/modules/EventEmitter.js +++ b/modules/EventEmitter.js @@ -942,6 +942,7 @@ class EventEmitter { const vertices = values[0]; const edges = values[1]; + ImportUtilities.deleteInternal(edges); ImportUtilities.deleteInternal(vertices); const keyPair = Encryption.generateKeyPair(); diff --git a/modules/command/dh/dh-data-read-request-free-command.js b/modules/command/dh/dh-data-read-request-free-command.js index 7da16bf2c..43bfc1441 100644 --- a/modules/command/dh/dh-data-read-request-free-command.js +++ b/modules/command/dh/dh-data-read-request-free-command.js @@ -78,6 +78,7 @@ class DHDataReadRequestFreeCommand extends Command { throw Error(`Failed to get data info for import ID ${importId}.`); } + ImportUtilities.deleteInternal(edges); ImportUtilities.deleteInternal(vertices); // Get replication key and then encrypt data. diff --git a/modules/importer.js b/modules/importer.js index fe2146dea..52ecccd9c 100644 --- a/modules/importer.js +++ b/modules/importer.js @@ -89,6 +89,7 @@ class Importer { } = json_document; this.log.trace('Import vertices and edges'); + ImportUtilities.deleteInternal(edges); ImportUtilities.deleteInternal(vertices); if (packKeys) { diff --git a/modules/network/kademlia/kademlia.js b/modules/network/kademlia/kademlia.js index 70293e282..110dfcda7 100644 --- a/modules/network/kademlia/kademlia.js +++ b/modules/network/kademlia/kademlia.js @@ -162,12 +162,6 @@ class Kademlia { this.log.info('Quasar initialised'); this.node.peercache = this.node.plugin(PeerCache(`${__dirname}/../../../data/${config.embedded_peercache_path}`)); this.log.info('Peercache initialised'); - // this.node.spartacus = this.node.plugin(kadence.spartacus( - // this.xprivkey, - // parseInt(config.child_derivation_index, 10), - // kadence.constants.HD_KEY_DERIVATION_PATH, - // )); - // this.log.info('Spartacus initialized'); if (onionEnabled) { this.enableOnion(); diff --git a/package-lock.json b/package-lock.json index 2c4359cd4..de060d06f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail-node", - "version": "1.3.41", + "version": "1.3.42", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 82fbf9647..ba4a96248 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail-node", - "version": "1.3.41", + "version": "1.3.42", "description": "OriginTrail node", "main": ".eslintrc.js", "config": {