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, 934🔥, 0💬
Popular Posts:
Why am I getting this "Docker failed to initialize" error? After installing the latest version of Do...
Where to get the detailed description of the json_encode() Function in PHP? Here is the detailed des...
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
How To Control Vertical Alignment? By default, text in all table cells are aligned to the top vertic...
How to use the "set-body" Policy Statement for an Azure API service operation? The "set-body" Policy...