问题
I am following the two org hyperledger fabric example. After starting the network I can see 4 extra dev peers running along with 4 peers(2 peers per org) in docker containers. But in configuration I gave only 4 peers. I am not understanding how the other 4 dev peers got created and whats their purpose.
回答1:
A specific 'Chain Code Container' gets created for each peer running the Business Network. E.g. dev-peer0.org1.example.com-tutorial-network-0.16.3...
. These containers are started and restarted automatically.
回答2:
Chaincodes are instantiated in a separate container. When you instantiate a chaincode in a peer ,container for that chaincode is created.
If you instantiate 3 chaincode in a peer0 then you will see 3 containers with name like dev-peer0.mycc1, dev-peer0.mycc2,dev-peer0.mycc3
More details about this process can be found in an offical document mentioned below.(search text "dev-peer")
https://github.com/hyperledger/fabric/blob/release-1.4/docs/source/build_network.rst
来源:https://stackoverflow.com/questions/48657596/extra-dev-peers-in-hyperledger-fabric