hyperledger / hyperledger/fabric-samples

A problem when update the contract.

Open
#1,076 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
3.5k
Avg merge
3d 20h
Merged PRs (30d)
6

Description

The first image shows the deployment of the go-version basic chaincode in testnetwork. You can see that the command is "chaincode peer. add..," and the query is correct.
The second image shows the deployment of the Java-version basic chaincode after the contract upgrade, and you can see that the command is "/root/chaincode jav...".
At this point, there will be problems when querying all assets, as seen in image 3.
But the data is still in the database, as seen in image 4.

![合约升级1](https://github.com/hyperledger/fabric-samples/assets/97946841/879de651-a6ae-4f51-8d59-6f4fd12f850f)
![合约升级2](https://github.com/hyperledger/fabric-samples/assets/97946841/14ce4992-dfe5-49a8-8101-6d634df4f69c)
![合约升级3](https://github.com/hyperledger/fabric-samples/assets/97946841/f0b30230-9a10-49a4-baa5-0136769ce289)
![合约升级4](https://github.com/hyperledger/fabric-samples/assets/97946841/bfa39e21-50db-4331-b6fe-93dbe84b02d5)

The answer I received is:

This is probably because go-version chaincode and Java-version chaincode use different key names in Asset's JSON format.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.