Good afternoon people;
I'm having problems running a performance test using hyperledger caliper. I followed the tutorial provided at https://hyperledger.github.io/caliper/v0.4.2/fabric-tutorial/tutorials-fabric-existing/#step-1---create-a-caliper-workspace. My version of hyperledger fabric is 2.3, running on Ubuntu 18 LTS.
My network has 3 peers and an orderer, and solo consensus.
The network is up and transacting normally.
config.yaml
test:
name: monitor
description: Caliper test
workers:
type: local
number: 5
rounds:
- label: Set.
txDuration: 100
rateControl:
type: fixed-load
opts:
transactionLoad: 5
workload:
module: set.js
arguments:
assets: 1000
- label: getData.
txDuration: 30
rateControl:
type: fixed-load
opts:
transactionLoad: 5
workload:
module: getTotalData.js
network.yaml
name: Fabric
version: "2.0.0"
mutual-tls: "false"
caliper:
blockchain: fabric
channels:
- channelName: channelall
contracts:
- id: monitor
organizations:
- mspid: Org1MSP
identities:
certificates:
- name: 'User1'
clientPrivateKey:
path: '../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore/priv_sk'
clientSignedCert:
path: '../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/[email protected]'
connectionProfile:
path: 'connection_files/connection-org1.yaml'
discover: true
- mspid: Org2MSP
identities:
certificates:
- name: 'User1'
clientPrivateKey:
path: '../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp/keystore/priv_sk'
clientSignedCert:
path: '../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp/signcerts/[email protected]'
connectionProfile:
path: 'connection_files/connection-org1.yaml'
discover: true
- mspid: Org3MSP
identities:
certificates:
- name: 'User1'
clientPrivateKey:
path: '../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org3.example.com/users/[email protected]/msp/keystore/priv_sk'
clientSignedCert:
path: '../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org3.example.com/users/[email protected]/msp/signcerts/[email protected]'
connectionProfile:
path: 'connection_files/connection-org1.yaml'
discover: true
The connection files, I put in a separate directory, 1 for each peer, in a file called connection-org1.yaml, etc...
name: fabric
version: 2.0.0
client:
organization: Org1
connection:
timeout:
peer:
endorser: '300'
organizations:
Org1:
mspid: Org1MSP
peers:
- peer0.org1.example.com
certificateAuthorities:
- ca.org1.example.com
peers:
peer0.org1.example.com:
url: grpcs://public_ip_peer:7051
tlsCACerts:
path: ../../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: https://localhost:7054
caName: ca-org1
tlsCACerts:
path: ../../../../fabric/fabric-samples/sharedchannel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem
httpOptions:
verify: false
I use a script to run the test called exec_test.sh
exec_test.sh
npm install --only=prod @hyperledger/[email protected]
npx caliper bind --caliper-bind-sut fabric:2.2
# Set workspace as caliper-benchmarks root
WORKSPACE="/home/ubuntu/caliper/caliper-benchmarks/monitor"
# Nominate a target network
NETWORK="network.yaml"
cd ${WORKSPACE}
echo "Workspce: " ${WORKSPACE}
# Available benchmarks
BENCHMARK="config.yaml"
echo "Benchmark: " ${BENCHMARK}
echo "Network: " ${NETWORK}
# Execute Phases
runBenchmark () {
npx caliper launch manager \
--caliper-workspace ${WORKSPACE} \
--caliper-benchconfig ${BENCHMARK} \
--caliper-networkconfig ${NETWORK} \
--caliper-flow-only-test \
--caliper-fabric-gateway-enabled \
sleep 5s
}
runBenchmark
After running the test I get the following feedback:
ubuntu@node1:~/caliper/caliper-benchmarks/monitor$ sudo ./exec_test.sh
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated @web3-js/[email protected]: The branch for this fork was merged upstream, please update your package to [email protected]
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated @web3-js/[email protected]: This package is deprecated, for a pure JS implementation please use scrypt-js
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
+ @hyperledger/[email protected]
updated 1 package and audited 921 packages in 14.377s
5 packages are looking for funding
run `npm fund` for details
found 76 vulnerabilities (2 low, 23 moderate, 45 high, 6 critical)
run `npm audit fix` to fix them, or `npm audit` for details
2021.12.17-18:07:39.576 warn [caliper] [bind] Working directory not specified. Using "/home/ubuntu/caliper/caliper-benchmarks/monitor"
2021.12.17-18:07:39.577 info [caliper] [bind] Binding for [email protected]. This might take some time...
2021.12.17-18:07:39.577 info [caliper] [bind] Using working directory: /home/ubuntu/caliper/caliper-benchmarks/monitor
2021.12.17-18:07:39.577 info [caliper] [bind] Calling npm with: install [email protected] [email protected]
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: This package is no longer maintained.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
+ [email protected]
+ [email protected]
removed 5 packages, updated 7 packages and audited 916 packages in 7.354s
33 packages are looking for funding
run `npm fund` for details
found 69 vulnerabilities (2 low, 22 moderate, 43 high, 2 critical)
run `npm audit fix` to fix them, or `npm audit` for details
Workspce: /home/ubuntu/caliper/caliper-benchmarks/monitor
Benchmark: config.yaml
Network: network.yaml
2021.12.17-18:07:48.281 info [caliper] [cli-launch-manager] Set workspace path: /home/ubuntu/caliper/caliper-benchmarks/monitor
2021.12.17-18:07:48.283 info [caliper] [cli-launch-manager] Set benchmark configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/config.yaml
2021.12.17-18:07:48.284 info [caliper] [cli-launch-manager] Set network configuration path: /home/ubuntu/caliper/caliper-benchmarks/monitor/network.yaml
2021.12.17-18:07:48.285 info [caliper] [cli-launch-manager] Set SUT type: fabric
2021.12.17-18:07:48.335 info [caliper] [benchmark-validator] No observer specified, will default to `none`
2021.12.17-18:07:48.336 info [caliper] [caliper-engine] Starting benchmark flow
2021.12.17-18:07:49.162 info [caliper] [fabric-connector] Initializing gateway connector compatible with installed SDK: 2.2.3
2021.12.17-18:07:49.183 info [caliper] [IdentityManager] Adding User1 (admin=false) as User1 for organization Org1MSP
2021.12.17-18:07:49.185 info [caliper] [IdentityManager] Adding User1 (admin=false) as _Org2MSP_User1 for organization Org2MSP
2021.12.17-18:07:49.187 info [caliper] [IdentityManager] Adding User1 (admin=false) as _Org3MSP_User1 for organization Org3MSP
2021.12.17-18:07:49.188 info [caliper] [caliper-engine] Skipping start commands due to benchmark flow conditioning
2021.12.17-18:07:49.188 info [caliper] [caliper-engine] Skipping initialization phase due to benchmark flow conditioning
2021.12.17-18:07:49.188 info [caliper] [caliper-engine] Skipping install smart contract phase due to benchmark flow conditioning
2021.12.17-18:07:49.191 error [caliper] [caliper-engine] Error while performing "test" step: TypeError: Cannot read property 'hasOwnProperty' of undefined
at new WorkerOrchestrator (/home/ubuntu/caliper/node_modules/@hyperledger/caliper-core/lib/manager/orchestrators/worker-orchestrator.js:72:25)
at new RoundOrchestrator (/home/ubuntu/caliper/node_modules/@hyperledger/caliper-core/lib/manager/orchestrators/round-orchestrator.js:40:35)
at CaliperEngine.run (/home/ubuntu/caliper/node_modules/@hyperledger/caliper-core/lib/manager/caliper-engine.js:148:43)
2021.12.17-18:07:49.191 info [caliper] [caliper-engine] Skipping end command due to benchmark flow conditioning
2021.12.17-18:07:49.191 error [caliper] [cli-launch-manager] Benchmark failed with error code 6
Please does anyone have any idea what I can do to resolve this issue?