Open RajanHarshit opened 10 months ago
Perhaps the chaincode name is incorrect, the samples often use 'basic' as the deployed chaincode name instead of 'asset-transfer-basic'.
To troubleshoot you can post the peer log from startup time with some additional debug enabled, e.g.:
FABRIC_LOGGING_SPEC=debug:cauthdsl,policies,msp,grpc,peer.gossip.mcs,gossip,leveldbhelper=info
You can also use the discover client to identify which peers are available and which chaincodes are deployed along with their deployed endorsement policy layouts, e.g.:
discover --configFile conf.yaml --userKey /<fabric-samples_location>/test-network/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk --userCert /<fabric-samples_location>/test-network/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem --peerTLSCA /<fabric-samples_location>/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --MSP Org1MSP saveConfig
discover --configFile conf.yaml peers --channel mychannel --server localhost:7051
discover --configFile conf.yaml endorsers --channel mychannel --chaincode basic --server localhost:7051
Description
Hi, I am using :- (As per 2.5.4 release note)
GO v1.20.6 FABRIC v2.5.4 FABRIC-SAMPLE v2.4.9 (latest tag) COUCH_DB v3.3.2 CA_VERSION v1.5.6
I am using fabric-sample's chaincode which is located at path fabric-sample/asset-transfer-basic/chaincode-javascript This chaincode has function , named createAsset. used for adding asset record on blockchain.
When I am invoking this function from Node SDK (api client), I am getting below error.
ERROR [discovery] chaincodeQuery -> Failed constructing descriptor for chaincode chaincodes:<name:"asset-transfer-basic" > : no peer combination can satisfy the endorsement policy
While chaincode deployment , I am passing --signature-policy "OR(Org1MSP.peer)" flag
Steps to reproduce
docker exec -it peer0.org1.example.com peer channel list
I am getting error at this point.