diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d09f316753..2aeefc6d8e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @kipliklotrika @schrink @vukdjoric @simonovic86 @alexveljkovic @branarakic @radomir-sebek @Kuki145 @daleksic1 @nesovic @Niks988 \ No newline at end of file +* @branarakic @Kuki145 @djordjekovac @kotlarmilos diff --git a/README.md b/README.md index d9eeb69007..72bcd35e67 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ __OriginTrail is an ecosystem dedicated to making global supply chains work toge This repository contains a work-in-progress code for a network node. -__OriginTrail Decentralized Network (ODN)__ is currently running in the __Freedom-Gemini__ stage. For further information about the roadmap please see our [website](https://tech.origintrail.io/roadmap). +__OriginTrail Decentralized Network (ODN)__ is currently running in the __OriginTrail v4 Freedom-Gemini Mainnet__ stage. For further information about the roadmap please see our [website](https://tech.origintrail.io/roadmap). [Please see our main documentation page for more information](http://docs.origintrail.io) diff --git a/config/config.json b/config/config.json index 564370040d..3ed0b7ba87 100644 --- a/config/config.json +++ b/config/config.json @@ -203,7 +203,7 @@ }, "dataSetStorage": "data_set_storage", "dc_holding_time_in_minutes": 60, - "dc_litigation_interval_in_minutes": 5, + "dc_litigation_interval_in_minutes": 15, "dc_challenge_retry_delay_in_millis": 600000, "dh_challenge_retry_delay_in_millis": 600000, "dh_max_holding_time_in_minutes": 10080, @@ -315,7 +315,7 @@ }, "dataSetStorage": "data_set_storage", "dc_holding_time_in_minutes": 262800, - "dc_litigation_interval_in_minutes": 5, + "dc_litigation_interval_in_minutes": 15, "dc_challenge_retry_delay_in_millis": 600000, "dh_challenge_retry_delay_in_millis": 600000, "dh_max_holding_time_in_minutes": 5256000, diff --git a/importers/use_cases/OBE/ORDER100678.xml b/importers/use_cases/OBE/ORDER100678.xml index dcfb423a22..5169e84c4b 100644 --- a/importers/use_cases/OBE/ORDER100678.xml +++ b/importers/use_cases/OBE/ORDER100678.xml @@ -77,7 +77,7 @@ 2019-10-23T00:00:00 -00:00 - 100678 + urn:epc:idpat:sgtin:100678 OBSERVE urn:epcglobal:cbv:bizstep:shipping @@ -93,7 +93,7 @@ 2019-10-23T00:00:00 -00:00 - 100678 + urn:epc:idpat:sgtin:100678 OBSERVE urn:epcglobal:cbv:bizstep:transporting @@ -109,7 +109,7 @@ 2019-10-25T00:00:00 -00:00 - 100678 + urn:epc:idpat:sgtin:100678 OBSERVE urn:epcglobal:cbv:bizstep:receiving @@ -125,7 +125,7 @@ 2019-10-26T00:00:00 -00:00 - 100678 + urn:epc:idpat:sgtin:100678 OBSERVE urn:epcglobal:cbv:bizstep:shipping diff --git a/importers/use_cases/OBE/ORDER100679.xml b/importers/use_cases/OBE/ORDER100679.xml index 5b09025c31..b34aad4e9e 100644 --- a/importers/use_cases/OBE/ORDER100679.xml +++ b/importers/use_cases/OBE/ORDER100679.xml @@ -77,7 +77,7 @@ 2019-10-25T00:00:00 -00:00 - 100679 + urn:epc:idpat:sgtin:100679 OBSERVE urn:epcglobal:cbv:bizstep:shipping @@ -93,7 +93,7 @@ 2019-10-25T00:00:00 -00:00 - 100679 + urn:epc:idpat:sgtin:100679 OBSERVE urn:epcglobal:cbv:bizstep:transporting @@ -109,7 +109,7 @@ 2019-10-27T00:00:00 -00:00 - 100679 + urn:epc:idpat:sgtin:100679 OBSERVE urn:epcglobal:cbv:bizstep:receiving @@ -125,7 +125,7 @@ 2019-10-28T00:00:00 -00:00 - 100679 + urn:epc:idpat:sgtin:100679 OBSERVE urn:epcglobal:cbv:bizstep:shipping diff --git a/modules/command/dh/dh-litigation-initiated-command.js b/modules/command/dh/dh-litigation-initiated-command.js index 39baf6052d..9fa9032bc6 100644 --- a/modules/command/dh/dh-litigation-initiated-command.js +++ b/modules/command/dh/dh-litigation-initiated-command.js @@ -11,6 +11,7 @@ class DHLitigationInitiatedCommand extends Command { super(ctx); this.config = ctx.config; this.logger = ctx.logger; + this.commandExecutor = ctx.commandExecutor; } /** @@ -44,23 +45,19 @@ class DHLitigationInitiatedCommand extends Command { this.logger.warn(`Litigation initiated for offer ${offerId}, object index ${requestedObjectIndex} and block index ${requestedBlockIndex}.`); - return { - commands: [ - { - name: 'dhLitigationAnswerCommand', - data: { - offerId, - objectIndex: requestedObjectIndex, - blockIndex: requestedBlockIndex, - }, - retries: constants.ANSWER_LITIGATION_COMMAND_RETRIES, - }, - ], - }; + await this.commandExecutor.add({ + name: 'dhLitigationAnswerCommand', + data: { + offerId, + objectIndex: requestedObjectIndex, + blockIndex: requestedBlockIndex, + }, + retries: constants.ANSWER_LITIGATION_COMMAND_RETRIES, + }); } } } catch (e) { - this.logger.error(`Failed to process LitigationInitiatedCommand. ${e}`); + this.logger.error(`Failed to process dhLitigationInitiatedCommand. ${e}`); } return Command.repeat(); diff --git a/package.json b/package.json index 5f17a17b83..4d2fbaceb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "4.0.6", + "version": "4.0.7", "description": "OriginTrail node", "main": ".eslintrc.js", "config": { diff --git a/test/bdd/features/importer.feature b/test/bdd/features/importer.feature index ecc63b2234..3df984a599 100644 --- a/test/bdd/features/importer.feature +++ b/test/bdd/features/importer.feature @@ -82,7 +82,7 @@ Feature: Test basic importer features And DC waits for import to finish And DC initiates the replication for last imported dataset And I wait for replications to finish - Then I call traversal from "id" "100678" with connection types "EPC" + Then I call traversal from "sgtin" "urn:epc:idpat:sgtin:100678" with connection types "EPC" Then the last traversal should contain 5 objects in total And I calculate and validate the proof of the last traversal diff --git a/test/bdd/features/litigation.feature b/test/bdd/features/litigation.feature index e2558a14e1..2b46d41372 100644 --- a/test/bdd/features/litigation.feature +++ b/test/bdd/features/litigation.feature @@ -86,27 +86,6 @@ Feature: Test various litigation scenarios # Then I wait for 3 replacement replications to finish # Then I wait for replacement to be completed - @fourth - Scenario: Test litigation case - Given the replication difficulty is 0 - And I setup 4 nodes - When I override configuration for all nodes - | dc_holding_time_in_minutes | 5 | - | numberOfChallenges | 100 | - | challengeResponseTimeMills | 5000 | - And I start the nodes - And I use 1st node as DC - And DC imports "importers/xml_examples/Retail/01_Green_to_pink_shipment.xml" as GS1-EPCIS - And DC waits for import to finish - Given DC initiates the replication for last imported dataset - And DC waits for last offer to get written to blockchain - And I wait for 4th node to verify replication - And I stop the 4th node - And I wait for replications to finish - When I wait for litigation initiation - And I simulate true litigation answer for 4th node - Then the last replication status for 4th node should be holding - @first Scenario: DC should discriminate DH which has reputation lower than threshold Given the replication difficulty is 0