hyperledger

HFC: CC deployment successfull while PEER: “Error building images: …”

泪湿孤枕 提交于 2019-12-07 09:16:28
TL;DR; Go to ---- EDIT section below I am using hfc@0.6.5 in a standalone node.js application. A membersrvc and peer are started with docker-compose , where: membersrvc: container_name: membersrvc image: hyperledger/fabric-membersrvc:latest ports: - "7054:7054" command: membersrvc vp0: container_name: peer image: hyperledger/fabric-peer:latest ports: - "7050:7050" - "7051:7051" - "7053:7053" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 - CORE_SECURITY_ENABLED=true - CORE_PEER_PKI_ECA_PADDR=172.17.0

Error invoking chaincode using Node.js SDK [TypeError: Cannot read property 'getConnectivityState' of undefined]

让人想犯罪 __ 提交于 2019-12-07 00:46:27
Failed to invoke successfully :: TypeError: Cannot read property 'getConnectivityState' of undefined /opt/share/hyperledger/node_modules/fabric-client/lib/EventHub.js:355 if(self._stream) state = self. stream.call.channel .getConnectivityState(); ^ TypeError: Cannot read property 'getConnectivityState' of undefined at ClientDuplexStream.<anonymous> (/opt/share/hyperledger/node_modules/fabric-client/lib/EventHub.js:355:56) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/opt/share/hyperledger/node_modules/grpc/src/client.js:236

History For Private Data In Hyperledger Fabric

╄→尐↘猪︶ㄣ 提交于 2019-12-06 19:33:30
Is there any way to get the history for Private data in Hyperledger Fabric node SDK. I've tried using getHistoryForKey(key) It returns an empty object with only { done: true } The API to get history for private data is not yet implemented, but is planned for a future release of Hyperledger Fabric. In the interim you could add some minimal information to a public key in the same transaction for historical tracking. That could either be a logical key, or if the key itself is sensitive, you could take a hash of the logical key and save that as a public key. Then use GetHistoryForKey on the public

Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to init chaincode(handler not found for chaincode mycc:0)

断了今生、忘了曾经 提交于 2019-12-06 17:38:26
I'm trying to make the tutorial " Chaincode for Developers " work. But at the section " Terminal 3 - Use the chaincode " I'm stuck trying to run this command $ peer chaincode instantiate -n mycc -v 0 -c '{"Args":["a","10"]}' -C myc It exits with this error : Error: Error endorsing chaincode: rpc error: code = Unknown desc = Failed to init chaincode(handler not found for chaincode mycc:0) I've done some research but I don't know what to do. Could somebody please help me ? This is solved. There were three primary problems. As Chris mentioned, the certs are expired. In the future you can easily

Deploying an angular application in hyperledger-composer

我们两清 提交于 2019-12-06 16:58:59
问题 I have my composer-rest-server running on port 3000 and now I try to generate an angular application with yo hyperledger-composer following the tutorial. Steps creating the webapp: After I do npm start and it seems that the webapp es correctly created because I am able to reach it from the localhost with curl localhost:4200 but when I try to reach it from another host I get nothing. Both hosts are connected because I can reach the composer server running on port 3000. 回答1: you need to change

Hyperledger SDK for Java chaincode (shim-client-1.0)

橙三吉。 提交于 2019-12-06 15:56:56
I tried to compile chaincode sample and write my own one ( https://github.com/hyperledger/fabric/tree/master/examples/chaincode/java/SimpleSample ) However, I can't get a shim-client-1.0. Do you have plans to make java sdk public? I hope that “shim-client-1.0.jar” will be added to maven repository soon, nevertheless you can try to compile it using source code in “github.com/hyperledger/fabric/core/chaincode/shim/java”. gradle build and "shim-client-1.0.jar" will be available in github.com/hyperledger/fabric/core/chaincode/shim/java/build/lib folder. 来源: https://stackoverflow.com/questions

Hyperledger fabric's ChannelCreationPolicy

有些话、适合烂在心里 提交于 2019-12-06 13:50:27
问题 I am struggling so hard to write policy for creating channel (ChannelCreationPolicy) here is my configtx.yaml --- Organizations: - &OrdererOrg Name: OrdererOrg ID: OrdererMSP MSPDir: ../crypto-config/ordererOrganizations/orderer-org/msp - &ShopOrg Name: ShopOrgMSP ID: ShopOrgMSP MSPDir: ../crypto-config/peerOrganizations/shop-org/msp AnchorPeers: - Host: shop-peer-0 Port: 7051 Orderer: &OrdererDefaults OrdererType: solo Addresses: - orderer0:7050 BatchTimeout: 2s BatchSize: MaxMessageCount:

Modifying Hyperledger Composer WebApp

核能气质少年 提交于 2019-12-06 11:33:35
问题 I've completed the Hyperledger Composer Developer tutorial https://hyperledger.github.io/composer/tutorials/developer-guide.html and I've generated the BNA, deployed it to a local Hyperledger Fabric 1.0 instance, generated the REST API, and generated the skeleton webapp using yo. However, I noticed that the resulting webapp only has a menu for adding assets, and none for adding participants and submitting transactions. I have two questions: 1) Why doesn't the webapp generate menus for adding

How to print and view logs from Hyperledger Fabric chaincode

邮差的信 提交于 2019-12-06 11:01:57
I want to see logs while calling functions in my chaincode, for debugging purposes. I tried something like this: var logger = shim.NewLogger("chaincode_example02") logger.Info("get_caller_data called"); I've viewed logs of the peer running the chaincode, but I couldn't find the above log. What am I doing wrong? If you startup your chaincode in dev mode using a command like ./chaincode_example02 , then the log statements should be visible in the console where that same process is started. If you deploy the chaincode in net mode then each peer starts up a docker container that is named something

Unable to create channel in Hyperledger fabric using custom crypto graphic material

冷暖自知 提交于 2019-12-06 10:47:54
I am following the below link to run the first network sample using the custom crypto graphic material. First Network with custom cryptographic material Post generation of certificates from the Third Party CA. i have places all the certificates in the required dir structure. Following other steps now when i start the docker containers they come up. but when i try to create channell i get below error Error: got unexpected status: BAD_REQUEST -- Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub