Skip to content

Commit

Permalink
Expand parameters (#942) (#943)
Browse files Browse the repository at this point in the history
* expand parameters
  • Loading branch information
simonovic86 authored Jun 22, 2019
1 parent 07307bc commit bd197ff
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
15 changes: 10 additions & 5 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
"dh_min_litigation_interval_in_minutes": 5,
"deposit_on_demand": true,
"dc_choose_time": 600000,
"requireApproval": false
"requireApproval": false,
"dh_max_data_set_size": 1000000
},
"staging": {
"identity": null,
Expand Down Expand Up @@ -195,7 +196,8 @@
"dh_min_litigation_interval_in_minutes": 5,
"deposit_on_demand": false,
"dc_choose_time": 600000,
"requireApproval": false
"requireApproval": false,
"dh_max_data_set_size": 1000000
},
"stable": {
"identity": null,
Expand Down Expand Up @@ -294,7 +296,8 @@
"dh_min_litigation_interval_in_minutes": 5,
"deposit_on_demand": false,
"dc_choose_time": 600000,
"requireApproval": false
"requireApproval": false,
"dh_max_data_set_size": 1000000
},
"production": {
"identity": null,
Expand Down Expand Up @@ -396,7 +399,8 @@
"dh_min_litigation_interval_in_minutes": 5,
"deposit_on_demand": false,
"dc_choose_time": 600000,
"requireApproval": false
"requireApproval": false,
"dh_max_data_set_size": 1000000
},
"mariner": {
"identity": null,
Expand Down Expand Up @@ -498,6 +502,7 @@
"dh_min_litigation_interval_in_minutes": 5,
"deposit_on_demand": false,
"dc_choose_time": 600000,
"requireApproval": true
"requireApproval": true,
"dh_max_data_set_size": 1000000
}
}
4 changes: 4 additions & 0 deletions modules/command/dh/dh-replication-import-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class DhReplicationImportCommand extends Command {
const calculatedDataSetId =
await ImportUtilities.importHash(dataSetId, decryptedVertices, edges);

if (bytes(JSON.stringify(litigationVertices)) > this.config.dh_max_data_set_size) {
throw new Error(`Data set size is bigger than given limit of ${this.config.dh_max_data_set_size} bytes`);
}

if (dataSetId !== calculatedDataSetId) {
throw new Error(`Calculated data set ID ${calculatedDataSetId} differs from DC data set ID ${dataSetId}`);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "2.0.55",
"version": "2.0.56",
"description": "OriginTrail node",
"main": ".eslintrc.js",
"config": {
Expand Down
2 changes: 1 addition & 1 deletion setup_arangodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ echo arangodb3 arangodb3/upgrade boolean true | debconf-set-selections
echo arangodb3 arangodb3/storage_engine select mmfiles | debconf-set-selections
echo arangodb3 arangodb3/password password root | debconf-set-selections
echo arangodb3 arangodb3/password_again password root | debconf-set-selections
apt-get install arangodb3=3.3.12 -y
apt-get install arangodb3=3.3.12 -y --allow-unauthenticated

sed -i 's/authentication = true/authentication = false/g' /etc/arangodb3/arangod.conf
systemctl start arangodb3
Expand Down
2 changes: 1 addition & 1 deletion test/modules/utilities.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Utilities module', () => {
'is_bootstrap_node', 'houston_password', 'enable_debug_logs_level', 'reverse_tunnel_address', 'reverse_tunnel_port',
'autoUpdater', 'bugSnag', 'network', 'dataSetStorage', 'dc_holding_time_in_minutes', 'dc_choose_time', 'dc_litigation_interval_in_minutes',
'dc_token_amount_per_holder', 'dh_max_holding_time_in_minutes', 'dh_min_litigation_interval_in_minutes', 'dh_min_token_price',
'erc725_identity_filepath', 'deposit_on_demand', 'requireApproval'],
'erc725_identity_filepath', 'deposit_on_demand', 'requireApproval', 'dh_max_data_set_size'],
`Some config items are missing in config for environment '${environment}'`,
);
assert.hasAllKeys(
Expand Down
2 changes: 1 addition & 1 deletion testnet/install-arango.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ echo arangodb3 arangodb3/upgrade boolean true | debconf-set-selections
echo arangodb3 arangodb3/storage_engine select mmfiles | debconf-set-selections
echo arangodb3 arangodb3/password password root | debconf-set-selections
echo arangodb3 arangodb3/password_again password root | debconf-set-selections
apt-get install arangodb3=3.3.12 -y
apt-get install arangodb3=3.3.12 -y --allow-unauthenticated

0 comments on commit bd197ff

Please sign in to comment.