1

What do I want to do

Originally, I wanted to deploy 3 organiazations on different hosts respectively and 50 peers in a fabric network and provide web service that let users interact with fabric ledger.But, as a beginner, I am aware of complexity of deployment.So I try to construct a network with one organization involving 16 peers.I created the crypto materails of organizations using cryptogen and then modified the configtx.yaml file to generate channel config file.After that, the docker-compose.yaml was created which includes an orderer,sixteen peers, sixteen couchdb and four cli.Until I start the network using docker-compose up -d,everything is ok.Due to the web service is required, I prepare to use Gin web framework and fabric-sdk-go connecting fabric-network.Error occurred when I invoked the chaincode using fabric-sdk-go.

Error I encountered

Query failed: Failed to get endorsing peers: error getting channel response for channel [channel1]: Discovery status Code: (11) UNKNOWN. Description: error received from Discovery Server: failed constructing descriptor for chaincodes:<name:"mychaincode" > 

This error was returned by fabric-sdk-go.

What have I tried

My final goal is to deploy a fabric network including three organizations and fifty peers in different hosts.But now, I'm confused. After ran my powerTrading binary, I use command docker exec -it cli{x} bash to see corresponding peer if installed the chaincode mychaincode or not.The result is all of them have installed chaincode successfully. And I also use Google to find some articles related to error I encounterd. Such as,

According to the articles above, I guess that the reason causing my error is the anchor peer was not specified.But I don't know how to specify anchor peer for one organization on a channel using fabric-sdk-go.I only find an article about adding an anchor peer on channel using node sdk[https://stackoverflow.com/questions/56452066/how-to-add-anchor-peers-on-channel-using-node-sdk-hyperledger-fabric].

How to resolve this problem?And is there any simple tutorial which can help me understand Hyperledger Fabric more?Any help will be appreciated!Thanks!

LM T
  • 11
  • 2

0 Answers0