I have set up a hyperledger fabric network shown below: org1: peer0.org1 org2: peer0.org2
chaincodes: 1:deed.js 2:bor.js
I have installed chaincode deed.js on org1 and org2 peers. I have installed bor.js only on org2 peer.
I have approved chaincode deed.js on org1 and org2 peers. I have committed chaincode bor.js on org1 and org2 peers.
I have invoked chaincode deed.js using org1 and org2 peers. I have invoked chaincode bor.js using org2 peer.
Querying deed.js works fine. But querying bor.js is throwing an error:
Error: endorsement failure during query. response: status:500 message:"make sure the chaincode bor has been successfully defined on channel mychannel and try again: chaincode definition for 'bor' exists, but chaincode is not installed" .
I know the error is due to the reason that I have not installed chaincode bor.js on org1, but my project is such that I must install bor.js smart contract only on org2 but not on org1.
My endorsement policy for applications section of configtx.yaml is defined below:
Application: &ApplicationDefaults
# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:
# Policies defines the set of policies at this level of the config tree
# For Application policies, their canonical path is
# /Channel/Application/<PolicyName>
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
LifecycleEndorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Endorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Capabilities:
<<: *ApplicationCapabilities
Is there any way to perform the query operation on bor.js chaincode without an error by installing bor.js only on org2 peer?.