Re: Fabric 2.0 - Commit Chaincode
Nikhil Gupta
Hey, Does your organization have the endorsement sub policy? Endorsement:
To: Fabric <fabric@...> From: "Nicholas Leonardi via lists.hyperledger.org" Sent by: fabric@... Date: 04/07/2020 01:53PM Subject: [EXTERNAL] [Hyperledger Fabric] Fabric 2.0 - Commit Chaincode Hey guys, I have a simple network with 1 org, 3 orderers and 1 peer. I can't seem to commit the chaincode. I'm able to package, install and approveForMyOrg. I checked the commit readiness and it is showing as true for my org "approvals": { "Org1MSP": true } Only the commit isn't working. I checked everything, the MSP envs, paths to the certs, --peerAddresses, fabric-cfg-path env I keep getting ENDORSEMENT_POLICY_FAILURE. The peer logs gives this error: VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode _lifecycle in tx 3:0 failed: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Endorsement' sub-policies to be satisfied The configtx ApplicationDefaults are correct. Also, the configtx.yaml was copied from the fabric samples so everything is there. LifecycleEndorsement: Type: ImplicitMeta Rule: "MAJORITY Endorsement" Endorsement: Type: ImplicitMeta Rule: "MAJORITY Endorsement" shed some light? Thanks in advance. Below are the commands I'm using to install cc peer lifecycle chaincode package chaincode.tar.gz --path /etc/hyperledger/chaincode --lang node --label ccv1 lifecycle chaincode install chaincode.tar.gz peer lifecycle chaincode approveformyorg -o orderer1.org1.com:7050 --channelID channel --name chaincode --version 1.0 --init-required --sequence 1 --tls --cafile /etc/hyperledger/crypto-config/ordererOrganizations/orderers/orderer1.org1.com/tls/ca.crt --package-id myccv1:f997652c8722e223ccc7453128d5d8db797e9a1abf712863a255c8338530ed6d peer lifecycle chaincode commit -o orderer1.org1.com:7050 --channelID channel --name chaincode --version 1.0 --sequence 1 --init-required --tls true --cafile /etc/hyperledger/crypto-config/ordererOrganizations/orderers/orderer1.org1.com/tls/ca.crt --peerAddresses peer.org1.com:7051 --tlsRootCertFiles /etc/hyperledger/crypto-config/peerOrganizations/peers/peer.org1.com/tls/ca.crt
|
||||
|