1

I have setup the byfn from here. What I am going through that is invoking by this command.

peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}

It give me an error that iI found by docker logs {peer0_container_id}. I also set CORE_PEER_ADDRESSAUTODETECT=true

2020-01-06 08:08:39.972 UTC [vscc] Validate -> ERRO 0ad VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy

2020-01-06 08:08:39.973 UTC [committer.txvalidator] validateTx -> ERRO 0ae VSCCValidateTx for transaction txId = ea10c982be12ab3762b4199a349c1409fb22bde5230667be78b2394ccdb05d37 returned error: validation of endorsement policy for chaincode mycc in tx 9:0 failed: signature set did not satisfy policy

But for this command it working fine I mean transaction is valid.

peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'

Is there anything to configure for invoking with the first one I mean except passing the --peerAddresses param?

I have also added the third organization from here. And here the invoke command also work i mean valid transaction.

peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -c '{"Args":["invoke","a","b","10"]}'

So, why does not the same invoke is not working for the byfn?

Note for byfn I have removed the all images and done it from the beginning. So here is no conflict actually.

Community
  • 1
  • 1
R.A.Munna
  • 1,699
  • 1
  • 15
  • 29

0 Answers0