Skip to content

Commit

Permalink
Merge pull request #1195 from OriginTrail/prerelease/mainnet
Browse files Browse the repository at this point in the history
OriginTrail Mainnet Release v4.0.7
  • Loading branch information
djordjekovac authored Mar 5, 2020
2 parents cf0d3cd + 25b7806 commit 685d9fe
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @kipliklotrika @schrink @vukdjoric @simonovic86 @alexveljkovic @branarakic @radomir-sebek @Kuki145 @daleksic1 @nesovic @Niks988
* @branarakic @Kuki145 @djordjekovac @kotlarmilos
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions importers/use_cases/OBE/ORDER100678.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<eventTime>2019-10-23T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100678</epc>
<epc>urn:epc:idpat:sgtin:100678</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:shipping</bizStep>
Expand All @@ -93,7 +93,7 @@
<eventTime>2019-10-23T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100678</epc>
<epc>urn:epc:idpat:sgtin:100678</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:transporting</bizStep>
Expand All @@ -109,7 +109,7 @@
<eventTime>2019-10-25T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100678</epc>
<epc>urn:epc:idpat:sgtin:100678</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:receiving</bizStep>
Expand All @@ -125,7 +125,7 @@
<eventTime>2019-10-26T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100678</epc>
<epc>urn:epc:idpat:sgtin:100678</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:shipping</bizStep>
Expand Down
8 changes: 4 additions & 4 deletions importers/use_cases/OBE/ORDER100679.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<eventTime>2019-10-25T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100679</epc>
<epc>urn:epc:idpat:sgtin:100679</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:shipping</bizStep>
Expand All @@ -93,7 +93,7 @@
<eventTime>2019-10-25T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100679</epc>
<epc>urn:epc:idpat:sgtin:100679</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:transporting</bizStep>
Expand All @@ -109,7 +109,7 @@
<eventTime>2019-10-27T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100679</epc>
<epc>urn:epc:idpat:sgtin:100679</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:receiving</bizStep>
Expand All @@ -125,7 +125,7 @@
<eventTime>2019-10-28T00:00:00</eventTime>
<eventTimeZoneOffset>-00:00</eventTimeZoneOffset>
<epcList>
<epc>100679</epc>
<epc>urn:epc:idpat:sgtin:100679</epc>
</epcList>
<action>OBSERVE</action>
<bizStep>urn:epcglobal:cbv:bizstep:shipping</bizStep>
Expand Down
25 changes: 11 additions & 14 deletions modules/command/dh/dh-litigation-initiated-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class DHLitigationInitiatedCommand extends Command {
super(ctx);
this.config = ctx.config;
this.logger = ctx.logger;
this.commandExecutor = ctx.commandExecutor;
}

/**
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "origintrail_node",
"version": "4.0.6",
"version": "4.0.7",
"description": "OriginTrail node",
"main": ".eslintrc.js",
"config": {
Expand Down
2 changes: 1 addition & 1 deletion test/bdd/features/importer.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 0 additions & 21 deletions test/bdd/features/litigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 685d9fe

Please sign in to comment.