hyperledger / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper/
Apache License 2.0
651 stars 404 forks source link

Remove the need to provide channel and contract information in the fabric network configuration file #1207

Open davidkel opened 2 years ago

davidkel commented 2 years ago

Please share the technical limitation of Caliper that you encountered.

Channel information should not be in the network configuration file but should be part of the workload module. The 2.0 fabric network configuration file currently requires this and is used by the v1 and v2 connectors to ensure that all expensive operations creating the node sdk resources are done at init time and not when the workload is executing. The peer-gateway connector currently does the same although it shouldn't need to because it's not expensive for the gateway to create contract instances so this can be done at submission time.

Please detail your feature idea that could alleviate the limitation.

The idea is to remove the need for the channel block in the network connection file and have the v1, v2 connectors determine to channels and chaincodes instantiated to be able to create the contract instances at init time. The peer gateway connector will build and cache contracts at submission time as the creation of these objects is not expensive

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

aklenik commented 2 years ago

Totally agree! We might have a unified Fabric connector network configuration at our hand once the recent feature requests are done 🙂

davidkel commented 4 months ago

I did some initial work on how the v1 and v2 connectors could do this here https://github.com/davidkel/sandbox/tree/master/channels-and-chaincodes

However much as this would be cleaner I don't see it as a priority at this time