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, ∼1230🔥, 0💬
Popular Posts:
Where to find tutorials on RSS specifications? I want to learn it to describe my API services. Here ...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
How to create a navigation file like navigation.xhtml for an EPUB 3.0 book? At least one navigation ...