Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-6230] peer CLI support for cfg lifecycle
This change set: - Extends LSCC.GETINSTALLEDCHAINCODES to return also the ID to be used for the config update Txn by extending the protos/peer/query.proto and adding an ID for a chaincode. - Adds a new ability to the peer CLI- to support instantiation\upgrade in the config lifecycle way. the flow now is: - The peer CLI queries CSCC to obtain the resource config. - If the a bad status (not OK) is returned it means the channel doesn't have the capability and it resumes the flow of the old instantiate. - If a good (OK) status is returned, it queries LSCC and searches for the chaincode's ID (hashes of code and metadata) - Assuming it is found, it uses the old config fetched from the peer, and the ID of the chaincode, and the CLI parameters to build the new config, and submits it to the orderer as a resource update Txn. - Afterwards, it continues the usual flow of instantiate and upgrade (invoking LSCC and init of the target chaincode) - It can also: - Instead of sending the config update, save it to disk to be passed for another person. This is via the --resourceEnvelopeSavePath flag (-S) - Loaded from disk for appending a signature and optionally afterwards - sending the new config transaction for ordering. this is via the --resourceEnvelopeLoadPath flag (-L) Change-Id: I0f28a4f55249b7cd60d6d06e21ddb5267721a802 Signed-off-by: yacovm <yacovm@il.ibm.com>
- Loading branch information
Showing
8 changed files
with
366 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.