Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to use Caliper with Hyperledger Fabric v3.x (with smartBFT consensus type). Is it possible? #1665

Open
umitkilic opened this issue Nov 25, 2024 · 4 comments
Labels
question Further information is requested User Error

Comments

@umitkilic
Copy link

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 umitkilic added the enhancement New feature or request label Nov 25, 2024
@davidkel
Copy link
Contributor

davidkel commented Nov 26, 2024

@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

@umitkilic
Copy link
Author

umitkilic commented Nov 28, 2024

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
Copy link
Author

@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

Here is another and most current problem I have faced (#1666). Thanks.

@davidkel
Copy link
Contributor

@umitkilic I posted to that issue which I hope will help you

@davidkel davidkel added question Further information is requested User Error and removed enhancement New feature or request labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested User Error
Projects
None yet
Development

No branches or pull requests

2 participants