Re: two channels with the same chaincode


Matthew White
 

Hello,

 

The label is packaged with the chaincode, and is used to prefix a sha hash  of the packaged file this makes the “packageid” (aka “chaincodeid”).

 

The chaincode name isn’t in the packaged code, and is associated with the package id at approval time.

More than one chaincode name can be associated with the same packageid/chaincodeid.

 

Within the context a single peer, it will have/expect running chaincode ‘images’ on a 1:1 basis with the chaincodeids.

 

The same chaincode name *should* be usable on different channels irrespective of peer… have you seen differently?

 

Thanks Matthew

From: fabric@... <fabric@...> On Behalf Of Nikos Karamolegkos
Sent: 07 September 2022 09:34
To: fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] two channels with the same chaincode

 

Also, If I have already packaged my chaincode to tar. gz file with PACKAGE_ID= abcdf and I would like to use the same chaincode to a new channel (same chaincode functionality but different chaincode name and label - given that I can not use the

ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

Also, If I have already packaged my chaincode to tar.gz file with PACKAGE_ID= abcdf and I would like to use the same chaincode to a new channel (same chaincode functionality but different chaincode name and label - given that I can not use the same chaincode name to different channels where the same peers are joined -) I have to package it again (i.e create new tar.gz file). Correct?

Unless otherwise stated above:

IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU

Join fabric@lists.hyperledger.org to automatically receive all group messages.