Tools, FAQ, Tutorials:
Incompatible Chaincode on BYFN Peers
How to list installed and instantiated chaincodes on BYFN Peers?
✍: FYIcenter.com
You can follow this tutorial to list and review installed and instantiated chaincodes
on peer nodes of your BYFN network.
1. Connect to the BYFN CLI container and check the default peer:
$ docker exec -it cli bash bash-4.4# echo $CORE_PEER_ADDRESS peer0.org2.example.com:7051
2. List installed and instantiated chaincode on default peer, peer0.org1:
bash-4.4# peer chaincode list --installed Get installed chaincodes on peer: Name: mycc, Version: 1.0, Path: github.com/chaincode/chaincode_example02/go/, Id: 476fca1a949274001971f1ec2836cb09321f0b71268b3762d68931c93f218134 bash-4.4# peer chaincode list --instantiated -C mychannel Get instantiated chaincodes on channel mychannel: Name: mycc, Version: 1.0, Path: github.com/chaincode/chaincode_example02/go/, Escc: escc, Vscc: vscc
3. List installed and instantiated chaincode on peer0.org2, using prefix to specify the target peer:
bash-4.4# CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger\ /fabric/peer/crypto/peerOrganizations/org2.example.com/users\ /Admin@org2.example.com/msp CORE_PEER_ADDRESS=peer0.org2.example.com:7051 \ CORE_PEER_LOCALMSPID=Org2MSP CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src\ /github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com\ /peers/peer0.org2.example.com/tls/ca.crt \ peer chaincode list --installed Get installed chaincodes on peer: Name: mycc, Version: 1.0, Path: /opt/gopath/src/github.com/chaincode/chaincode_example02/node/, Id: ade2b277014cd59f9856722c2bee26f274823622ea6f3d6994eb1db968dbd69a bash-4.4# CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger\ /fabric/peer/crypto/peerOrganizations/org2.example.com/users\ /Admin@org2.example.com/msp CORE_PEER_ADDRESS=peer0.org2.example.com:7051 \ CORE_PEER_LOCALMSPID=Org2MSP CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src\ /github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com\ /peers/peer0.org2.example.com/tls/ca.crt \ chaincode list --instantiated -C mychannel Get instantiated chaincodes on channel mychannel: Name: mycc, Version: 1.0, Path: /opt/gopath/src/github.com/chaincode/chaincode_example02/node/, Escc: escc, Vscc: vscc
Looks like we have a problem here. 2 anchor peers run the same chaincode instance "mycc" in "mychannel" using difference chaincode source code. One uses the Golang version, and the other uses the Node.js version.
This will cause the "could not assemble transaction: ProposalResponsePayloads do not match" error when running the "peer chaincode invoke" command mentioned the previous tutorial. See next tutorial on how to resolve the issue.
⇒ BYFN Chaincode Docker Container
⇐ BYFN CLI "peer" Command Prefix
2020-09-15, ∼1203🔥, 0💬
Popular Posts:
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
Where to find tutorials on HTML language? I want to know how to learn HTML. Here is a large collecti...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...
What is Azure API Management Gateway? Azure API Management Gateway is the Azure Web server that serv...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...