I want to use Caliper with Hyperledger Fabric v3.x (with smartBFT consensus type). Is it possible?
Please share the technical limitation of Caliper that you encountered.
Caliper gives error when I want to use it with Fabric v3.x
Please detail your feature idea that could alleviate the limitation.
I want to use Caliper with Hyperledger Fabric v3.x (with smartBFT consensus type).
Please share some details about your use case if possible, and how the new feature would make Caliper a better performance benchmarking framework.
No response
Please share any suggestions about the new feature's code/configuration API (using formatted YAML segments or pseudo-code).
No response
@umitkilic It should work, but it's not been tested (someone in discord has said they have tried it and it works). However it will only work if you bind to fabric:fabric-gateway. It will definitely NOT work if you bind to either fabric:1.4 or fabric:2.2
Please in future, provide details of the error. Caliper gives error when I want to use it with Fabric v3.x is not useful to understand the exact problem you have
Thanks for reply. I tried with caliper v0.5.0 and caliperv0.6.0 with appropriate update downloads (such as caliper-core, caliper-fabric-caliper-gateway etc. under node_modules). Also network-config file is arranged as you said (blockchain: fabric:fabric-gateaway).
Nevertheless, it gives the below error:
` 2024.11.28-14:56:05.951 info [caliper] [cli-launch-manager] Set workspace path: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking 2024.11.28-14:56:05.952 info [caliper] [cli-launch-manager] Set benchmark configuration path: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking/benchmarks/scenario/simple/fabcar/config.yaml 2024.11.28-14:56:05.953 info [caliper] [cli-launch-manager] Set network configuration path: /home/umit/Desktop/HLFv3_PHD_UK/benchmarking/networks/fabric/v2.1/network-config_2.1.yaml 2024.11.28-14:56:05.953 info [caliper] [cli-launch-manager] Set SUT type: fabric:fabric-gateway 2024.11.28-14:56:05.954 error [caliper] [cli-launch-manager] Unexpected error during benchmark execution: Error: Module "fabric:fabric-gateway" could not be loaded: Error: Cannot find module 'fabric:fabric-gateway' Require stack:
- /home/umit/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js
- /home/umit/node_modules/@hyperledger/caliper-cli/lib/launch/launchManagerCommand.js
- /home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/index.js
- /home/umit/node_modules/@hyperledger/caliper-cli/caliper.js Searched paths: /home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/utils/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules,/home/umit/node_modules/@hyperledger/node_modules,/home/umit/node_modules,/home/node_modules,/node_modules Usage: caliper launch manager --caliper-bind-sut fabric:2.2 [other options]
Options: --help, -h Show usage information [boolean] --version Show version information [boolean] --caliper-bind-sut The name and version of the platform to bind to [string] --caliper-bind-cwd The working directory for performing the SDK install [string] --caliper-bind-args Additional arguments to pass to "npm install". Use the "=" notation when setting this parameter [string] --caliper-bind-file Yaml file to override default (supported) package versions when binding an SDK [string]
Error: Module "fabric:fabric-gateway" could not be loaded: Error: Cannot find module 'fabric:fabric-gateway' Require stack:
- /home/umit/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js
- /home/umit/node_modules/@hyperledger/caliper-cli/lib/launch/launchManagerCommand.js
- /home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/index.js
- /home/umit/node_modules/@hyperledger/caliper-cli/caliper.js
Searched paths: /home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/utils/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/node_modules,/home/umit/node_modules/@hyperledger/caliper-cli/node_modules,/home/umit/node_modules/@hyperledger/node_modules,/home/umit/node_modules,/home/node_modules,/node_modules
at CaliperUtils.loadModule (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/utils/caliper-utils.js:117:19)
at CaliperUtils.loadModuleFunction (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/utils/caliper-utils.js:159:35)
at LaunchManager.handler (/home/umit/node_modules/@hyperledger/caliper-cli/lib/launch/lib/launchManager.js:58:49)
at module.exports.handler (/home/umit/node_modules/@hyperledger/caliper-cli/lib/launch/launchManagerCommand.js:46:44)
at Object.runCommand (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/lib/command.js:240:40)
at Object.parseArgs [as _parseArgs] (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/yargs.js:1154:41)
at Object.runCommand (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/lib/command.js:198:30)
at Object.parseArgs [as _parseArgs] (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/yargs.js:1154:41)
at Object.get [as argv] (/home/umit/node_modules/@hyperledger/caliper-cli/node_modules/yargs/yargs.js:1088:21)
at Object.
(/home/umit/node_modules/@hyperledger/caliper-cli/caliper.js:39:5 `
@umitkilic It should work, but it's not been tested (someone in discord has said they have tried it and it works). However it will only work if you bind to
fabric:fabric-gateway. It will definitely NOT work if you bind to eitherfabric:1.4orfabric:2.2Please in future, provide details of the error.
Caliper gives error when I want to use it with Fabric v3.xis not useful to understand the exact problem you have
Here is another and most current problem I have faced (https://github.com/hyperledger-caliper/caliper/issues/1666). Thanks.
@umitkilic I posted to that issue which I hope will help you
Looking again at this, I see your comment about blockchain: fabric:fabric-gateaway which I guess you put in the benchmark config ? This isn't correct. it should be blockchain: fabric. You then need to use the caliper bind command to pull in the required sdk, ie
npx caliper bind --caliper-bind-sut fabric:fabric-gateway
as described in the tutorial
https://hyperledger-caliper.github.io/caliper/0.6.0/tutorial/fabric/#overview