Substra / hlf-k8s

Initializes an Hyperledger Fabric network (orchestrator distributed mode)
https://docs.substra.org
Apache License 2.0
31 stars 20 forks source link

docs: add instructions for chaincode upgrade #50

Closed AurelienGasser closed 2 years ago

AurelienGasser commented 4 years ago

There are currently no instructions on how to upgrade the chaincode version on a running installation.

Kelvin-M commented 4 years ago

You can find more information here : https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.html#upgrade and https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchaincode.html#peer-chaincode-upgrade-example

We have also a chaincode upgrade instructions in the docker-compose version : https://github.com/SubstraFoundation/hlf-k8s/blob/master/python-scripts/utils/run_utils.py#L254 It is based on the fabric-sdk-py client : https://github.com/hyperledger/fabric-sdk-py/blob/master/hfc/fabric/client.py#L1395

Be careful, depending on the policy, the transaction must be endorsed by multiple peers, so you should use :

--peerAddresses stringArray
--tlsRootCertFiles stringArray

Usage example here for instance https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchaincode.html#peer-chaincode-upgrade