Hyperledger fabric error in chaincode update

641 views Asked by At

I'm following a tutorial with commercial paper in Hyperledger Fabric docs, and I'm trying to update my chaincode, but I get this error:

Error: could not assemble transaction, err proposal response was not successful, error code 500, msg Channel 'mychannel' has been migrated to the new lifecycle, LSCC is now read-only

Firstly, I installed a new chaincode, approved it from both organizations, and committed it. After this, I'm calling the upgrade method like this:

peer chaincode upgrade -o localhost:7050 -C mychannel --name papercontract --tls --cafile $ORDERER_CA -v 0.4 -c '{"Args":[]}'

Why am I getting an error?

1

There are 1 answers

0
Urko On

You got this error because you have applied the new chaincode lifecycle peer lifecycle chaincode to your chaincode, but now you are trying to update it with the old chaincode lifecycle peer chaincode.

When you already have a channel where there are chaincodes installed with the new lifecycle, you can't install chaincodes with the old lifecycle on that channel.

You will get the same error you mentioned if you try.