Closed davidkel closed 2 years ago
On further reflection I think all the networks for fabric should be removed. We should test using fabric-samples test-network as a start but also look to what would be required to use something like mini-fabric to create a more custom network. Looking at what the current fabric networks do we have
What does test network from fabric samples provide:
test-network obviously doesn't cover what was provided before but I think it provides a good start. fabric also has other test networks such as test-network-k8s, test-network-nano-bash (poor name, but really this is fabric running natively locally) which we could also look to support
Maybe we shouldn't provide any custom networks of our own. I'd suggest concentrating on examples that show how to put together a "Caliper project". So for every main/useful/interesting Fabric sample chaincode (and some a corresponding sample network), we could provide a project that includes the followings:
package.json
listing Caliper as a dependency, providing a script to run the benchmark, etc.I think these projects would be more useful for users and would provide a nice starting point/skeleton for custom Caliper projects.
@aklenik I've actually found caliper-benchmarks to be very easy to use with test-network (once I got to grips with everything that was in it and deleted all the custom fabric networks). Admittedly it's one big project with several different benchmarks, but as an example here are the instructions for use so far
So for example I want to benchmark using node fabcar in test-network directory
./network.sh deployCC -ccn fabcar -ccp ../../caliper-benchmarks/src/fabric/samples/fabcar/javascript -ccl javascript
in the caliper benchmarks directory
npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig testnetwork.yml --caliper-benchconfig benchmarks/samples/fabric/fabcar/config.yaml --caliper-flow-only-test --caliper-fabric-gateway-enabled
This get's it close (ie simple to get a network setup and run a benchmark) to what you are proposing as well except that all the chaincodes/benchmarks are held in a single large repo making it hard to work out exactly whats going on, but I think that the way it's set up does provide the basis for creating a simple caliper project (I can only attest to fabric here though)
The fabric team are also looking for a set of pre-canned assets which they can use to drive a workload on various fabric configuration and this repo will fit the bill via the fabric specific fixed-asset and fixed-asset-base chaincodes in this repo
No need to provide custom networks for fabric
A summary of the fabric networks that exist in this repo
There are reports for 1.4.0, 2.0.0, 2.1.0
the config_* directories contain a configtx.yaml and crypto-config.yaml to generate genesis blocks and crypto material
the docker-compose subdirs use docker compose to bring up a set of nodes reference config_* directories
the v1/v2 dirs contain old format network configs which reference config_* directories and define the version of fabric images to use with the docker compose definitions
ansible playbooks uses ibm.blockchain_platform_manager which is now end of life and only supports 1.4
In summary we have dual system (docker-compose + ansible based) here that will try to bring up various fabric configurations on a single machine using docker. There is a lot of legacy networks which are old now 1.0, 1.1, 1.2, 1.3 and 1.4 is now out of LTS support. If we wanted to keep 1.4 for comparison reasons then we should have a 1.4.12 (the final 1.4 LTS release) release. We don't have a 2.2 equivalent either.
The other problem is that there are published reports for 1.4.0, 2.0.0 and 2.1.0 which would have used this system to set them up
Question is what do we do with all of this ?
Do we want to provide specific network configurations that can be brought up for later fabric releases such as 2.2 or beyond or do we want to leave that to the users of caliper-benchmarks to provide and this repo just provides the caliper configuration for a set of reusable benchmarks ? I'm thinking that this is the best option. The problem is that hyperledger fabric doesn't provide a way to easily build different types of fabric network that can be automated. There are lots of solutions out there, some target native (test-network-nano-bash), some target docker (test-network, minifabric) others target k8s (test-network-k8s) and there are loads of others such as hyperledger cello, hyperledger bevel and a wide variety of others stored on community githubs but it hard to know which ones are actively maintained and would be suited to use here.
My preference now is that for fabric this repo contains caliper assets with chaincodes and their associated workloads to perform some standard set of benchmarking. If we ever produce further reports and the likelyhood is that we won't then we would need to describe how the network was created and may publish the assets here for the report.
One final thing, the CI currently uses this network
we might need to keep it or replace it with say test-network ?