icordoba
icordoba

Reputation: 1899

How to change the policy to commit chaincode from MAJORITY to ANY in Hyperledger Fabric 2.5

i have a HLF network with default policy configuration and 3 organizations. when I upgrade chaincode, every org needs to approve, which is OK, but the "peer lifecycle chaincode commit" command I execute in the CLI of one organization requires me at least two peerAddresses (two organizations), needing the tlsRootCertFiles parameter for each of them. I guess that's because the default is that way (MAJORITY)...

peer lifecycle chaincode commit -o orderer1.mydomain-net:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/crypto/orderer/tls/ca.crt --channelID myChannel --name myChaincode --version 1.0 --sequence 1 --init-required --peerAddresses peer0.mydomain-net:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/crypto/admin/msp/cacerts/ca.crt --peerAddresses peer0.myotherdomain-net:7051 --tlsRootCertFiles /secondCAPath/ca.crt

but what configuration change (configtx?) shall I do to just require just one organization peer address and CA for the commit of the approvals of new chaincode? Thanks (I guess... I just need to change the "MAJORITY" endorsement policy to ANY, is that correct?)

Upvotes: 0

Views: 10

Answers (0)

Related Questions