ruan0007 / caliper-min Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
The framework.run()
should receive 3 arguments instead of 2.
caliper-min/benchmark/smallbank/main.js
Line 79 in b558ef1
Hi, I follow the README.md under the path "caliper-min/benchmark/custom/". When I run experiment using the command such as "./exp.sh "workload/intro/empty.json" "sharp"", it occurs some errors as follows:
Start experiment on Fabric SHARP for workload intro/empty
----------Launch Fabric------------
Creating network "simpledocker_basic" with the default driver
Creating orderer.example.com ... done
Creating peer0.org1.example.com ... done
----------Run the benchmark------------
module.js:549
throw err;
^
Error: Cannot find module 'commander'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at main (/home/ada/go/src/github.com/hyperledger/caliper-min/benchmark/custom/main.js:42:19)
at Object.<anonymous> (/home/ada/go/src/github.com/hyperledger/caliper-min/benchmark/custom/main.js:91:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
--------- Shut down Fabric-------------
WARNING: The BLOCK_SIZE variable is not set. Defaulting to a blank string.
WARNING: The TXN_SPAN_LIMIT variable is not set. Defaulting to a blank string.
WARNING: The CC_TYPE variable is not set. Defaulting to a blank string.
Stopping peer0.org1.example.com ... done
Stopping orderer.example.com ... done
Removing peer0.org1.example.com ... done
Removing orderer.example.com ... done
Removing network simpledocker_basic
----------Process the logs for more measurements------------
Traceback (most recent call last):
File "fabric_log_script/process_occ-sharp_orderer.py", line 100, in <module>
sys.exit(main())
File "fabric_log_script/process_occ-sharp_orderer.py", line 74, in main
print "Process Txn Delay (us)\t", totalProcessTxnDelay / scheduleTxnCount
ZeroDivisionError: integer division or modulo by zero
Dump orderer measurements to result/17-04/sharp/intro/empty/orderer.stat
Finish experiment on Fabric SHARP for workload intro/empty
Greetings. I am trying to use your Caliper variant with the BFT-SMaRt ordering service for Fabric. However, I am having trouble with progressing beyond chaincode instantiation. I am able to create the channel and install the chaincode for the smallbank benchmark without issues, but then when it is time to actually instantiate it, I get this error:
node main.js -c fabric-config.json -n ../../network/fabric/bftsmart/setup.json
TAP version 13
# #######Caliper Test######
Creating empty stat file in /data/ruanpc/exp_stat/caliper/12-08/smallbank/fabric-config.json.res
sleep 5
# create mychannel......
ok 1 created mychannel successfully
# Sleep 5s......
# Join channel......
# join mychannel
ok 2 Successfully joined mychannel
# install all chaincodes......
ok 3 Installed chaincode smallbank successfully in all peers
# Instantiate chaincode......
not ok 4 Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate proposal due to error: Error: "targets" parameter not specified and no peers are set on this Channel instance or specfied for this channel in the network at Channel._getTargets (/root/caliper/node_modules/fabric-client/lib/Channel.js:3541:10) at Channel._sendChaincodeProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2581:22) at Channel.sendInstantiateProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2540:15) at Client.newDefaultKeyValueStore.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:486:28) at <anonymous> at Client.newDefaultKeyValueStore.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:564:15) at <anonymous> at Client.newDefaultKeyValueStore.then.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:573:15) at <anonymous>
---
operator: fail
at: chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:64:19)
stack: |-
Error: Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate proposal due to error: Error: "targets" parameter not specified and no peers are set on this Channel instance or specfied for this channel in the network
at Channel._getTargets (/root/caliper/node_modules/fabric-client/lib/Channel.js:3541:10)
at Channel._sendChaincodeProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2581:22)
at Channel.sendInstantiateProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2540:15)
at Client.newDefaultKeyValueStore.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:486:28)
at <anonymous>
at Client.newDefaultKeyValueStore.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:564:15)
at <anonymous>
at Client.newDefaultKeyValueStore.then.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:573:15)
at <anonymous>
at Test.assert [as _assert] (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:225:54)
at Test.bound [as _assert] (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:77:32)
at Test.fail (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:318:10)
at Test.bound [as fail] (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:77:32)
at chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:64:19)
at <anonymous>
...
fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed
at chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:65:31)
at <anonymous>
info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: instantiate chaincodes failed
at chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:65:31)
at <anonymous>
sleep 5
From what I can understand, this is something that happens within Caliper itself, and not an error in any of the components of Fabric. This leads me to infer that the problem must be on my network configuration file. Here it is the configuration I am using:
{
"fabric": {
"channel": [
{
"config": "/root/fabric/bftsmart/config/mychannel.tx",
"deployed": false,
"name": "mychannel",
"organizations": [
"lasige",
"ibm"
]
}
],
"cryptodir": "/root/fabric/bftsmart/config/crypto-config",
"endorsement-policy": {
"identities": [
{
"role": {
"mspId": "LaSIGEMSP",
"name": "member"
}
},
{
"role": {
"mspId": "IBMMSP",
"name": "member"
}
}
],
"policy": {
"2-of": [
{
"signed-by": 0
},
{
"signed-by": 1
}
]
}
},
"network": {
"orderers": [
{
"mspid": "FrontendsMSP",
"server-hostname": "1000.frontend.bft",
"tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/tls/ca.crt",
"url": "grpc://s2:7050",
"user": {
"cert": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/signcerts/[email protected]",
"key": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/keystore/key.pem"
}
},
{
"mspid": "FrontendsMSP",
"server-hostname": "2000.frontend.bft",
"tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/tls/ca.crt",
"url": "grpc://s3:8050",
"user": {
"cert": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/signcerts/[email protected]",
"key": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/keystore/key.pem"
}
}
],
"lasige": {
"mspid": "LaSIGEMSP",
"name": "peerlasige",
"peer0": {
"requests": "grpc://s7:7051",
"server-hostname": "0.peer.lasige.bft",
"tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/lasige.bft/peers/0.peer.lasige.bft/tls/ca.crt"
},
"user": {
"cert": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/lasige.bft/users/[email protected]/msp/signcerts/[email protected]",
"key": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/lasige.bft/users/[email protected]/msp/keystore/key.pem"
}
},
"ibm": {
"mspid": "IBMMSP",
"name": "peeribm",
"peer0": {
"requests": "grpc://s9:8051",
"server-hostname": "0.peer.ibm.bft",
"tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/ibm.bft/peers/0.peer.ibm.bft/tls/ca.crt"
},
"user": {
"cert": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/ibm.bft/users/[email protected]/msp/signcerts/[email protected]",
"key": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/ibm.bft/users/[email protected]/msp/keystore/key.pem"
}
}
}
},
"info": {
"Distribution": "Single Host",
"Orderer": "bftsmart",
"Size": "Multi Peers",
"Version": "1.3.0"
}
}
I based this configuration in your own samples. What could I be missing?
Multiple client connection options have been commented out for non-TLS traffic.
Allow TLS traffic using certification
caliper-min/src/fabric/e2eUtils.js
Line 632 in b558ef1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.