I have used BYFN to create a fabric network, with configuration
2 ORG with each ORG having 2 peers (each having their own couch-db as state db), 1 orderer and 2 fabric-ca.
Now, I installed a chaincode(named as ordering-network
) on peer0.org1
and peer0.org2
and started the chaincode on peer0.org1
.
Scenario:
- I am able to submit transactions on the chaincode using
org1
admin credentials or by creating participant identity all linked toorg1
. I was not able to start chaincode on
peer0.org2
with below exception.Error: Error trying to start business network. Error: No valid responses from any peers.Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: chaincode exists
ordering-network
)I tried to access the chaincode with admin credentials of
org2
throughcomposer-playground
, but was returned with an exceptionError: Error trying to ping. Error: 2 UNKNOWN: error executing chaincode: transaction returned with failure: Error: The current identity, with the name 'admin' and the identifier '50a2c29340d9011a6530a95ead8ad83effc7804880ce482f8926aabaf6f1bb87', has not been registered
Questions:
- If a single chaincode is installed on multiple peers is it only required to be started (instantiated) by any one of the peers (across orgs)?
- If I want both the peers to be able to modify the chaincode, what will be process? By process, I mean each of the org's peer will need to modify and update the code at their end or any one org's member can update the chaincode and it will be instantiated on all peers?
- Is endorsement policy responsible to make sure the involvement of multiple peers of different org in a chaincode?
Apologies for the long post, but I'm not able to understand how single chaincode work across multiple organisations.
Source to ChainCode: https://github.com/monarch0111/ordering-network/