From 2e49b4c2e3a6dc72fa13a7b4d40899d7cf3dcc58 Mon Sep 17 00:00:00 2001 From: Chenxi Li Date: Thu, 12 Sep 2019 13:00:30 +0800 Subject: [PATCH] adapt to caliper v0.1.0 --- CONTRIBUTING.md | 1 + packages/caliper-cli/package.json | 1 + packages/caliper-fisco-bcos/package.json | 7 ++----- .../network/fisco-bcos/4nodes1group/fisco-bcos.json | 8 ++++---- packages/caliper-samples/package.json | 4 +++- packages/caliper-tests-integration/package.json | 12 ++++++++++-- .../caliper-tests-integration/scripts/npm_publish.js | 2 +- .../scripts/publishNpmPackages.js | 1 + 8 files changed, 23 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0d6ebac1..885a3f33a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,6 +39,7 @@ Each `caliper-` is a separate package that contains a distinct adaptor - caliper-fabric - caliper-iroha - caliper-sawtooth +- caliper-fisco-bcos Each adaptor implements the `BlockchainInterface` from the core package, as well as a `ClientFactory` and `ClientWorker` that are bespoke to the adaptor. diff --git a/packages/caliper-cli/package.json b/packages/caliper-cli/package.json index 1be252de4..4d0669382 100644 --- a/packages/caliper-cli/package.json +++ b/packages/caliper-cli/package.json @@ -28,6 +28,7 @@ "@hyperledger/caliper-fabric": "^0.1.0", "@hyperledger/caliper-iroha": "^0.1.0", "@hyperledger/caliper-sawtooth": "^0.1.0", + "@hyperledger/caliper-fisco-bcos": "^0.0.1", "chalk": "1.1.3", "yargs": "10.0.3" }, diff --git a/packages/caliper-fisco-bcos/package.json b/packages/caliper-fisco-bcos/package.json index c4719a965..cd93d73e6 100644 --- a/packages/caliper-fisco-bcos/package.json +++ b/packages/caliper-fisco-bcos/package.json @@ -1,10 +1,7 @@ { - "name": "caliper-fisco-bcos", + "name": "@hyperledger/caliper-fisco-bcos", "version": "0.0.1", "description": "Caliper adapter of FISCO BCOS blockchain backend", - "scripts": { - "test": "echo test" - }, "repository": { "type": "git", "url": "https://github.com/vita-dounai/caliper.git" @@ -55,4 +52,4 @@ "url": "https://github.com/hyperledger/caliper/blob/master/LICENSE" } ] -} \ No newline at end of file +} diff --git a/packages/caliper-samples/network/fisco-bcos/4nodes1group/fisco-bcos.json b/packages/caliper-samples/network/fisco-bcos/4nodes1group/fisco-bcos.json index 3b190ff17..aed76f8e8 100644 --- a/packages/caliper-samples/network/fisco-bcos/4nodes1group/fisco-bcos.json +++ b/packages/caliper-samples/network/fisco-bcos/4nodes1group/fisco-bcos.json @@ -35,9 +35,9 @@ } ], "authentication": { - "key": "packages/caliper-samples/network/fisco-bcos/4nodes1group/sdk/node.key", - "cert": "packages/caliper-samples/network/fisco-bcos/4nodes1group/sdk/node.crt", - "ca": "packages/caliper-samples/network/fisco-bcos/4nodes1group/sdk/ca.crt" + "key": "../caliper-samples/network/fisco-bcos/4nodes1group/sdk/node.key", + "cert": "../caliper-samples/network/fisco-bcos/4nodes1group/sdk/node.crt", + "ca": "../caliper-samples/network/fisco-bcos/4nodes1group/sdk/ca.crt" }, "groupID": 1, "timeout": 100000 @@ -68,4 +68,4 @@ "Size": "4 Nodes", "Distribution": "Single Host" } -} \ No newline at end of file +} diff --git a/packages/caliper-samples/package.json b/packages/caliper-samples/package.json index d1075894b..4be61638c 100644 --- a/packages/caliper-samples/package.json +++ b/packages/caliper-samples/package.json @@ -44,7 +44,9 @@ "src/contract/sawtooth/simple/simple_python/simple-tp-python", "src/contract/sawtooth/simple/simple_python/packaging/systemd/sawtooth-simple-tp-python", "src/contract/sawtooth/docker/sawtooth-int-simple-tp-python", - "network/fisco-bcos/4nodes1group" + "network/fisco-bcos/4nodes1group", + "src/contract/fisco-bcos/helloworld/HelloWorld.address", + "src/contract/fisco-bcos/transfer/ParallelOk.address" ], "file_type_method": "EXCLUDE", "file_types": [ diff --git a/packages/caliper-tests-integration/package.json b/packages/caliper-tests-integration/package.json index 703f89f66..d2c695778 100644 --- a/packages/caliper-tests-integration/package.json +++ b/packages/caliper-tests-integration/package.json @@ -34,7 +34,14 @@ "verdaccio": "3.12.0", "license-check-and-add": "2.3.6" }, - "dependencies": {}, + "dependencies": { + "@hyperledger/caliper-cli": "^0.1.0", + "fabric-ca-client": "^1.4.0", + "fabric-client": "^1.4.0", + "fabric-network": "^1.4.0", + "fabric-protos": "^2.0.0-snapshot.1", + "grpc": "^1.14.2" + }, "license-check-and-add-config": { "folder": ".", "license": "../../LICENSE.txt", @@ -46,7 +53,8 @@ ".pm2/touch", "storage", "scripts/storage", - "log" + "log", + ".DS_Store" ], "file_type_method": "EXCLUDE", "file_types": [ diff --git a/packages/caliper-tests-integration/scripts/npm_publish.js b/packages/caliper-tests-integration/scripts/npm_publish.js index 863a41dc1..32476e956 100644 --- a/packages/caliper-tests-integration/scripts/npm_publish.js +++ b/packages/caliper-tests-integration/scripts/npm_publish.js @@ -52,9 +52,9 @@ const packages = [ 'caliper-burrow', 'caliper-composer', 'caliper-fabric', - 'caliper-fisco-bcos', 'caliper-iroha', 'caliper-sawtooth', + 'caliper-fisco-bcos', 'caliper-cli']; (async function () { diff --git a/packages/caliper-tests-integration/scripts/publishNpmPackages.js b/packages/caliper-tests-integration/scripts/publishNpmPackages.js index c70d7d65c..46c83047c 100644 --- a/packages/caliper-tests-integration/scripts/publishNpmPackages.js +++ b/packages/caliper-tests-integration/scripts/publishNpmPackages.js @@ -30,6 +30,7 @@ const packages = [ 'caliper-fabric', 'caliper-iroha', 'caliper-sawtooth', + 'caliper-fisco-bcos', 'caliper-cli' ];