Hyperledger Fabric: Upgrading Chaincode after modification

0 votes

I am suppose to upgrade the chaincode

I have tried to execute the peer chaincode upgrade within the docker peer node:

peer chaincode upgrade -n tuna-app -p github.com/tuna-app

but end up with the error

 Error getting (testchainid) orderer endpoint: Error endorsing GetConfigBlock: rpc error: code = Unknown desc = chaincode error (status: 500, message: "GetConfigBlock" request failed authorization check for channel [testchainid]: [Failed to get policy manager for channel [testchainid]])

Any ideas?

Nov 13, 2018 in Blockchain by slayer
• 29,040 points
244 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You need to specify the channel name for which you'd like to upgrade the chaincode, specify args and new version and specify the ordering service endpoints so peer cli will be able to submit the upgrade transaction:

peer chaincode upgrade -n tuna-app -v 2.0 \
               -c '{"Args":[""]}' \
               -p github.com/tuna-app -C mychannel \
               -o orderer:7051
answered Nov 13, 2018 by Omkar
• 65,850 points

Related Questions In Blockchain

+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 16,450 points
593 views
+1 vote
2 answers

Where is custom chaincode path Hyperledger Fabric 1.0?

You have to have your chaincode at ...READ MORE

answered Jul 10, 2018 in Blockchain by slayer
• 29,040 points
631 views
0 votes
1 answer
+16 votes
4 answers
+1 vote
2 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.