-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8092bd9
commit 029c230
Showing
134 changed files
with
10,621 additions
and
3,338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"node_wallet":"0xb664cf668534fde04cf43173e2187b7a9196bfc3", | ||
"node_private_key":"0dbaee2066aacd16d43a9e23649f232913bca244369463320610ffe6ffb0d69d", | ||
"management_wallet":"0x64b592e8e9af51eb0dba5d4c18b817c01e8e75a8", | ||
"initial_deposit_amount": "10000000000000000000000", | ||
"local_network_only":true, | ||
"blockchain":{ | ||
"hub_contract_address":"0x0987197628Bb06133B6FA2409eb4cF9FCaFe8d3a", | ||
"rpc_server_url":"http://localhost:7545/" | ||
}, | ||
"network":{ | ||
"bootstraps":[ | ||
|
||
], | ||
"hostname":"127.0.0.1", | ||
"remoteWhitelist":[ | ||
"0.0.0.0", | ||
"127.0.0.1" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,13 @@ node_js: | |
env: | ||
- NODE_ENV=development ARTIFACTS_DIR=$TRAVIS_BUILD_DIR/artifacts CUCUMBER_ARTIFACTS_DIR=$ARTIFACTS_DIR/cucumber BDD_SECTION=first | ||
- NODE_ENV=development ARTIFACTS_DIR=$TRAVIS_BUILD_DIR/artifacts CUCUMBER_ARTIFACTS_DIR=$ARTIFACTS_DIR/cucumber BDD_SECTION=second | ||
- NODE_ENV=development ARTIFACTS_DIR=$TRAVIS_BUILD_DIR/artifacts CUCUMBER_ARTIFACTS_DIR=$ARTIFACTS_DIR/cucumber BDD_SECTION=third | ||
- NODE_ENV=development ARTIFACTS_DIR=$TRAVIS_BUILD_DIR/artifacts CUCUMBER_ARTIFACTS_DIR=$ARTIFACTS_DIR/cucumber BDD_SECTION=fourth | ||
|
||
|
||
sudo: enabled | ||
services: | ||
- docker | ||
addons: | ||
apt: | ||
packages: | ||
|
@@ -17,32 +22,37 @@ before_script: | |
- sudo ./setup_arangodb.sh | ||
- cp .origintrail_noderc.travis .origintrail_noderc | ||
- npm run bootstrap | ||
- npm install -g ganache-cli@6.1.5 &> /dev/null | ||
- npm install -g ganache-cli@6.2.5 &> /dev/null | ||
- npm install -g [email protected] &> /dev/null | ||
script: | ||
- npm run lint | ||
- if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then | ||
npm run test:bdd:dryrun; | ||
fi | ||
- if [[ ("$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "first" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "first" ) ]]; then | ||
npm run test:bdd:first -- --world-parameters '{"appDataBaseDir":"$CUCUMBER_ARTIFACTS_DIR","keepFailedArtifacts":true}'; | ||
npm run test:bdd -- --tags=@first --world-parameters '{"appDataBaseDir":"$CUCUMBER_ARTIFACTS_DIR","keepFailedArtifacts":true}'; | ||
fi | ||
- if [[ ("$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "second" ) ]]; then | ||
npm run test:bdd:second -- --world-parameters '{"appDataBaseDir":"$CUCUMBER_ARTIFACTS_DIR","keepFailedArtifacts":true}'; | ||
npm run test:bdd -- --tags=@second --world-parameters '{"appDataBaseDir":"$CUCUMBER_ARTIFACTS_DIR","keepFailedArtifacts":true}'; | ||
fi | ||
- if [[ ("$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "third" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "third" ) ]]; then | ||
npm run test:bdd -- --tags=@third --world-parameters '{"appDataBaseDir":"$CUCUMBER_ARTIFACTS_DIR","keepFailedArtifacts":true}'; | ||
fi | ||
- if [[ ( "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "push" && "$BDD_SECTION" == "first" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "first" ) ]]; then | ||
npm test 2> $ARTIFACTS_DIR/mocha-logs.log; | ||
fi | ||
# compile and check Smart Contracts | ||
- ganache-cli -i 5777 -p 7545 -l 10000000 -m "aspect ask story desert profit engage tuition leave fade giraffe exclude brief" &> $ARTIFACTS_DIR/ganache.log & | ||
- ganache-cli -i 5777 -p 7545 -l 10000000 --acctKeys $ARTIFACTS_DIR/acct-keys.log -m "aspect ask story desert profit engage tuition leave fade giraffe exclude brief" &> $ARTIFACTS_DIR/ganache.log & | ||
- cd modules/Blockchain/Ethereum | ||
- if [[ ( "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "push" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "second" ) ]]; then | ||
truffle test --network test > $ARTIFACTS_DIR/truffle-test.log; | ||
fi | ||
- if [[ ( "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "push" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "second" ) ]]; then | ||
- if [[ ( "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "push" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "cron" && "$BDD_SECTION" == "second" ) || ( "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "third" ) || ( "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "fourth" ) ]]; then | ||
rm -rf build && truffle migrate --reset --compile-all --network ganache > $ARTIFACTS_DIR/truffle-migrate.log; | ||
fi | ||
- cd $TRAVIS_BUILD_DIR | ||
- if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "fourth" ]]; then ./test/docker/check_image.sh; fi | ||
- if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" && "$BDD_SECTION" == "fourth" ]]; then ./test/docker/cleanup_image.sh; fi | ||
- jobs | ||
- kill -9 %1 | ||
after_script: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
module.exports = { | ||
up: (queryInterface, Sequelize) => queryInterface.createTable('challenges', { | ||
id: { | ||
allowNull: false, | ||
primaryKey: true, | ||
type: Sequelize.STRING, | ||
}, | ||
data_set_id: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
dh_id: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
dh_identity: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
offer_id: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
block_id: { | ||
allowNull: false, | ||
type: Sequelize.INTEGER, | ||
}, | ||
answer: { | ||
allowNull: true, | ||
type: Sequelize.STRING, | ||
}, | ||
expected_answer: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
start_time: { | ||
allowNull: false, | ||
type: Sequelize.INTEGER, | ||
}, | ||
end_time: { | ||
allowNull: true, | ||
type: Sequelize.INTEGER, | ||
}, | ||
status: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
}), | ||
down: queryInterface => queryInterface.dropTable('challenges'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
module.exports = { | ||
up: async (queryInterface, Sequelize) => { | ||
await queryInterface.dropTable('miner_records'); | ||
|
||
return queryInterface.createTable('miner_tasks', { | ||
id: { | ||
allowNull: false, | ||
autoIncrement: true, | ||
primaryKey: true, | ||
type: Sequelize.INTEGER, | ||
}, | ||
offer_id: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
difficulty: { | ||
allowNull: false, | ||
type: Sequelize.INTEGER, | ||
}, | ||
task: { | ||
allowNull: false, | ||
type: Sequelize.STRING, | ||
}, | ||
result: { | ||
type: Sequelize.JSON, | ||
}, | ||
status: { | ||
type: Sequelize.STRING, | ||
}, | ||
message: { | ||
type: Sequelize.STRING, | ||
}, | ||
}); | ||
}, | ||
down: queryInterface => queryInterface.dropTable('miner_tasks'), | ||
}; |
12 changes: 12 additions & 0 deletions
12
migrations/201807132333336-holding-data-add-litigation-root-hash.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
module.exports = { | ||
up: async (queryInterface, Sequelize) => | ||
queryInterface.addColumn( | ||
'holding_data', | ||
'litigation_root_hash', | ||
{ | ||
type: Sequelize.STRING, | ||
}, | ||
), | ||
down: queryInterface => queryInterface.removeColumn('holding_data', 'litigation_root_hash'), | ||
}; |
12 changes: 12 additions & 0 deletions
12
migrations/201807132333446-replicated-data-add-litigation-private-key.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
module.exports = { | ||
up: async (queryInterface, Sequelize) => | ||
queryInterface.addColumn( | ||
'replicated_data', | ||
'litigation_private_key', | ||
{ | ||
type: Sequelize.STRING, | ||
}, | ||
), | ||
down: queryInterface => queryInterface.removeColumn('replicated_data', 'litigation_private_key'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
module.exports = { | ||
up: async (queryInterface, Sequelize) => | ||
queryInterface.addColumn( | ||
'offers', | ||
'global_status', | ||
{ | ||
type: Sequelize.STRING, | ||
}, | ||
), | ||
down: queryInterface => queryInterface.removeColumn('offers', 'global_status'), | ||
}; |
Oops, something went wrong.