ccchecker tool used in this sample to stress test the peer/endorser
- Docker - v1.12 or higher
- Docker Compose - v1.8 or higher
- Git client - needed for clone commands
- Generate Docker images (using "make docker" in fabric repo)
- Install Go (required for compiling ccchecker code)
- Crypto material will be generated using the cryptogen tool (pre-built) from fabric and mounted to all peers, the orderering nodes. More details about using cryptogen tool here.
- An Orderer genesis block (genesis.block) and channel configuration transaction (mychannel.tx also anchorpeer update transactions Org1MSPanchors.tx & Org2MSPanchors.tx) has been pre generated using the configtxgen tool and placed within the channel-artifacts folder. More details about using configtxgen tool here.
git clone https://github.com/asararatnakar/chaincodechecker
cd chaincodechecker
./network_setup.sh restart mychannel 10
Once you have completed the above setup, you will be provisioned a local network with following configuration:
- 3 Zookeepers
- 3 Kafka broker
- 3 Orderer services
- 2 Peer Orgs (each Org contains a leader/anchor peer and a non-leader peer)
- And a CLI Container
ccchecker is mounted to the CLI container(s) and executes the script.sh, which creates the default channel mychannel and joins the peers on to this channel
With the following default configurations (Refer ccchecker/ccchecker.json and ccchecker/env.json) Concurrency & NumberOfInvokes: 10 , ChainName : mychannel , Name : mycc
Outpiut would be some thing similar:
--- Starting 'Chaincode Checker' tool ---
...
Time for invokes(ms): 1375
Num successful invokes: 100(100)
Num successful queries: 100(100)
Test complete
NOTE: Fabric commit level used at the time of uploading the changes c50e0dd1ca1ea96cb69503fc83a302c53eff96a6
docker exec -it peer0.org1.cli /bin/bash -c "./scripts/common.sh org1"
docker exec -it peer0.org2.cli /bin/bash -c "./scripts/common.sh org2"
docker exec -it peer1.org1.cli /bin/bash -c "./scripts/common.sh org1"
docker exec -it peer1.org2.cli /bin/bash -c "./scripts/common.sh org2"